Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
ed14bbb2
Commit
ed14bbb2
authored
Feb 27, 2010
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIPS: SB1480: Convert IRQ controller lock to raw spinlock.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
5772f6de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
arch/mips/sibyte/bcm1480/irq.c
arch/mips/sibyte/bcm1480/irq.c
+7
-7
No files found.
arch/mips/sibyte/bcm1480/irq.c
View file @
ed14bbb2
...
...
@@ -73,14 +73,14 @@ static struct irq_chip bcm1480_irq_type = {
/* Store the CPU id (not the logical number) */
int
bcm1480_irq_owner
[
BCM1480_NR_IRQS
];
static
DEFINE_SPINLOCK
(
bcm1480_imr_lock
);
static
DEFINE_
RAW_
SPINLOCK
(
bcm1480_imr_lock
);
void
bcm1480_mask_irq
(
int
cpu
,
int
irq
)
{
unsigned
long
flags
,
hl_spacing
;
u64
cur_ints
;
spin_lock_irqsave
(
&
bcm1480_imr_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
bcm1480_imr_lock
,
flags
);
hl_spacing
=
0
;
if
((
irq
>=
BCM1480_NR_IRQS_HALF
)
&&
(
irq
<=
BCM1480_NR_IRQS
))
{
hl_spacing
=
BCM1480_IMR_HL_SPACING
;
...
...
@@ -89,7 +89,7 @@ void bcm1480_mask_irq(int cpu, int irq)
cur_ints
=
____raw_readq
(
IOADDR
(
A_BCM1480_IMR_MAPPER
(
cpu
)
+
R_BCM1480_IMR_INTERRUPT_MASK_H
+
hl_spacing
));
cur_ints
|=
(((
u64
)
1
)
<<
irq
);
____raw_writeq
(
cur_ints
,
IOADDR
(
A_BCM1480_IMR_MAPPER
(
cpu
)
+
R_BCM1480_IMR_INTERRUPT_MASK_H
+
hl_spacing
));
spin_unlock_irqrestore
(
&
bcm1480_imr_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
bcm1480_imr_lock
,
flags
);
}
void
bcm1480_unmask_irq
(
int
cpu
,
int
irq
)
...
...
@@ -97,7 +97,7 @@ void bcm1480_unmask_irq(int cpu, int irq)
unsigned
long
flags
,
hl_spacing
;
u64
cur_ints
;
spin_lock_irqsave
(
&
bcm1480_imr_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
bcm1480_imr_lock
,
flags
);
hl_spacing
=
0
;
if
((
irq
>=
BCM1480_NR_IRQS_HALF
)
&&
(
irq
<=
BCM1480_NR_IRQS
))
{
hl_spacing
=
BCM1480_IMR_HL_SPACING
;
...
...
@@ -106,7 +106,7 @@ void bcm1480_unmask_irq(int cpu, int irq)
cur_ints
=
____raw_readq
(
IOADDR
(
A_BCM1480_IMR_MAPPER
(
cpu
)
+
R_BCM1480_IMR_INTERRUPT_MASK_H
+
hl_spacing
));
cur_ints
&=
~
(((
u64
)
1
)
<<
irq
);
____raw_writeq
(
cur_ints
,
IOADDR
(
A_BCM1480_IMR_MAPPER
(
cpu
)
+
R_BCM1480_IMR_INTERRUPT_MASK_H
+
hl_spacing
));
spin_unlock_irqrestore
(
&
bcm1480_imr_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
bcm1480_imr_lock
,
flags
);
}
#ifdef CONFIG_SMP
...
...
@@ -123,7 +123,7 @@ static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
cpu
=
cpu_logical_map
(
i
);
/* Protect against other affinity changers and IMR manipulation */
spin_lock_irqsave
(
&
bcm1480_imr_lock
,
flags
);
raw_
spin_lock_irqsave
(
&
bcm1480_imr_lock
,
flags
);
/* Swizzle each CPU's IMR (but leave the IP selection alone) */
old_cpu
=
bcm1480_irq_owner
[
irq
];
...
...
@@ -148,7 +148,7 @@ static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
____raw_writeq
(
cur_ints
,
IOADDR
(
A_BCM1480_IMR_MAPPER
(
cpu
)
+
R_BCM1480_IMR_INTERRUPT_MASK_H
+
(
k
*
BCM1480_IMR_HL_SPACING
)));
}
}
spin_unlock_irqrestore
(
&
bcm1480_imr_lock
,
flags
);
raw_
spin_unlock_irqrestore
(
&
bcm1480_imr_lock
,
flags
);
return
0
;
}
...
...
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