Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
7fe2d9c4
Commit
7fe2d9c4
authored
Feb 27, 2010
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIPS: PNX833x: Convert IRQ controller locks to raw spinlocks.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
541247f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
arch/mips/nxp/pnx833x/common/interrupts.c
arch/mips/nxp/pnx833x/common/interrupts.c
+18
-18
No files found.
arch/mips/nxp/pnx833x/common/interrupts.c
View file @
7fe2d9c4
...
@@ -156,19 +156,19 @@ static int irqflags[PNX833X_PIC_NUM_IRQ]; /* initialized by zeroes */
...
@@ -156,19 +156,19 @@ static int irqflags[PNX833X_PIC_NUM_IRQ]; /* initialized by zeroes */
#define IRQFLAG_STARTED 1
#define IRQFLAG_STARTED 1
#define IRQFLAG_DISABLED 2
#define IRQFLAG_DISABLED 2
static
DEFINE_SPINLOCK
(
pnx833x_irq_lock
);
static
DEFINE_
RAW_
SPINLOCK
(
pnx833x_irq_lock
);
static
unsigned
int
pnx833x_startup_pic_irq
(
unsigned
int
irq
)
static
unsigned
int
pnx833x_startup_pic_irq
(
unsigned
int
irq
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
int
pic_irq
=
irq
-
PNX833X_PIC_IRQ_BASE
;
unsigned
int
pic_irq
=
irq
-
PNX833X_PIC_IRQ_BASE
;
spin_lock_irqsave
(
&
pnx833x_irq_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
pnx833x_irq_lock
,
flags
);
irqflags
[
pic_irq
]
=
IRQFLAG_STARTED
;
/* started, not disabled */
irqflags
[
pic_irq
]
=
IRQFLAG_STARTED
;
/* started, not disabled */
pnx833x_hard_enable_pic_irq
(
pic_irq
);
pnx833x_hard_enable_pic_irq
(
pic_irq
);
spin_unlock_irqrestore
(
&
pnx833x_irq_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
pnx833x_irq_lock
,
flags
);
return
0
;
return
0
;
}
}
...
@@ -177,12 +177,12 @@ static void pnx833x_shutdown_pic_irq(unsigned int irq)
...
@@ -177,12 +177,12 @@ static void pnx833x_shutdown_pic_irq(unsigned int irq)
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
int
pic_irq
=
irq
-
PNX833X_PIC_IRQ_BASE
;
unsigned
int
pic_irq
=
irq
-
PNX833X_PIC_IRQ_BASE
;
spin_lock_irqsave
(
&
pnx833x_irq_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
pnx833x_irq_lock
,
flags
);
irqflags
[
pic_irq
]
=
0
;
/* not started */
irqflags
[
pic_irq
]
=
0
;
/* not started */
pnx833x_hard_disable_pic_irq
(
pic_irq
);
pnx833x_hard_disable_pic_irq
(
pic_irq
);
spin_unlock_irqrestore
(
&
pnx833x_irq_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
pnx833x_irq_lock
,
flags
);
}
}
static
void
pnx833x_enable_pic_irq
(
unsigned
int
irq
)
static
void
pnx833x_enable_pic_irq
(
unsigned
int
irq
)
...
@@ -190,13 +190,13 @@ static void pnx833x_enable_pic_irq(unsigned int irq)
...
@@ -190,13 +190,13 @@ static void pnx833x_enable_pic_irq(unsigned int irq)
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
int
pic_irq
=
irq
-
PNX833X_PIC_IRQ_BASE
;
unsigned
int
pic_irq
=
irq
-
PNX833X_PIC_IRQ_BASE
;
spin_lock_irqsave
(
&
pnx833x_irq_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
pnx833x_irq_lock
,
flags
);
irqflags
[
pic_irq
]
&=
~
IRQFLAG_DISABLED
;
irqflags
[
pic_irq
]
&=
~
IRQFLAG_DISABLED
;
if
(
irqflags
[
pic_irq
]
==
IRQFLAG_STARTED
)
if
(
irqflags
[
pic_irq
]
==
IRQFLAG_STARTED
)
pnx833x_hard_enable_pic_irq
(
pic_irq
);
pnx833x_hard_enable_pic_irq
(
pic_irq
);
spin_unlock_irqrestore
(
&
pnx833x_irq_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
pnx833x_irq_lock
,
flags
);
}
}
static
void
pnx833x_disable_pic_irq
(
unsigned
int
irq
)
static
void
pnx833x_disable_pic_irq
(
unsigned
int
irq
)
...
@@ -204,12 +204,12 @@ static void pnx833x_disable_pic_irq(unsigned int irq)
...
@@ -204,12 +204,12 @@ static void pnx833x_disable_pic_irq(unsigned int irq)
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
int
pic_irq
=
irq
-
PNX833X_PIC_IRQ_BASE
;
unsigned
int
pic_irq
=
irq
-
PNX833X_PIC_IRQ_BASE
;
spin_lock_irqsave
(
&
pnx833x_irq_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
pnx833x_irq_lock
,
flags
);
irqflags
[
pic_irq
]
|=
IRQFLAG_DISABLED
;
irqflags
[
pic_irq
]
|=
IRQFLAG_DISABLED
;
pnx833x_hard_disable_pic_irq
(
pic_irq
);
pnx833x_hard_disable_pic_irq
(
pic_irq
);
spin_unlock_irqrestore
(
&
pnx833x_irq_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
pnx833x_irq_lock
,
flags
);
}
}
static
void
pnx833x_ack_pic_irq
(
unsigned
int
irq
)
static
void
pnx833x_ack_pic_irq
(
unsigned
int
irq
)
...
@@ -220,15 +220,15 @@ static void pnx833x_end_pic_irq(unsigned int irq)
...
@@ -220,15 +220,15 @@ static void pnx833x_end_pic_irq(unsigned int irq)
{
{
}
}
static
DEFINE_SPINLOCK
(
pnx833x_gpio_pnx833x_irq_lock
);
static
DEFINE_
RAW_
SPINLOCK
(
pnx833x_gpio_pnx833x_irq_lock
);
static
unsigned
int
pnx833x_startup_gpio_irq
(
unsigned
int
irq
)
static
unsigned
int
pnx833x_startup_gpio_irq
(
unsigned
int
irq
)
{
{
int
pin
=
irq
-
PNX833X_GPIO_IRQ_BASE
;
int
pin
=
irq
-
PNX833X_GPIO_IRQ_BASE
;
unsigned
long
flags
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
pnx833x_gpio_enable_irq
(
pin
);
pnx833x_gpio_enable_irq
(
pin
);
spin_unlock_irqrestore
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
return
0
;
return
0
;
}
}
...
@@ -236,18 +236,18 @@ static void pnx833x_enable_gpio_irq(unsigned int irq)
...
@@ -236,18 +236,18 @@ static void pnx833x_enable_gpio_irq(unsigned int irq)
{
{
int
pin
=
irq
-
PNX833X_GPIO_IRQ_BASE
;
int
pin
=
irq
-
PNX833X_GPIO_IRQ_BASE
;
unsigned
long
flags
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
pnx833x_gpio_enable_irq
(
pin
);
pnx833x_gpio_enable_irq
(
pin
);
spin_unlock_irqrestore
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
}
}
static
void
pnx833x_disable_gpio_irq
(
unsigned
int
irq
)
static
void
pnx833x_disable_gpio_irq
(
unsigned
int
irq
)
{
{
int
pin
=
irq
-
PNX833X_GPIO_IRQ_BASE
;
int
pin
=
irq
-
PNX833X_GPIO_IRQ_BASE
;
unsigned
long
flags
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
pnx833x_gpio_disable_irq
(
pin
);
pnx833x_gpio_disable_irq
(
pin
);
spin_unlock_irqrestore
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
}
}
static
void
pnx833x_ack_gpio_irq
(
unsigned
int
irq
)
static
void
pnx833x_ack_gpio_irq
(
unsigned
int
irq
)
...
@@ -258,9 +258,9 @@ static void pnx833x_end_gpio_irq(unsigned int irq)
...
@@ -258,9 +258,9 @@ static void pnx833x_end_gpio_irq(unsigned int irq)
{
{
int
pin
=
irq
-
PNX833X_GPIO_IRQ_BASE
;
int
pin
=
irq
-
PNX833X_GPIO_IRQ_BASE
;
unsigned
long
flags
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
pnx833x_gpio_clear_irq
(
pin
);
pnx833x_gpio_clear_irq
(
pin
);
spin_unlock_irqrestore
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
pnx833x_gpio_pnx833x_irq_lock
,
flags
);
}
}
static
int
pnx833x_set_type_gpio_irq
(
unsigned
int
irq
,
unsigned
int
flow_type
)
static
int
pnx833x_set_type_gpio_irq
(
unsigned
int
irq
,
unsigned
int
flow_type
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment