[brcm63xx] add missing SSB_BLOCKIO to prevent build failres, will resolve that global...
[openwrt/svn-archive/archive.git] / target / linux / sibyte / patches / 003-fix_locking.patch
1 Locking of irq_desc is now done in irq_set_affinity; Don't lock it
2 again in chip specific set_affinity function.
3
4 Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
5 ---
6
7 arch/mips/sibyte/bcm1480/irq.c | 7 ++-----
8 arch/mips/sibyte/sb1250/irq.c | 7 ++-----
9 2 files changed, 4 insertions(+), 10 deletions(-)
10
11 diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
12 index 352352b..c147c4b 100644
13 --- a/arch/mips/sibyte/bcm1480/irq.c
14 +++ b/arch/mips/sibyte/bcm1480/irq.c
15 @@ -113,7 +113,6 @@ static void bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
16 {
17 int i = 0, old_cpu, cpu, int_on, k;
18 u64 cur_ints;
19 - struct irq_desc *desc = irq_desc + irq;
20 unsigned long flags;
21 unsigned int irq_dirty;
22
23 @@ -127,8 +126,7 @@ static void bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
24 cpu = cpu_logical_map(i);
25
26 /* Protect against other affinity changers and IMR manipulation */
27 - spin_lock_irqsave(&desc->lock, flags);
28 - spin_lock(&bcm1480_imr_lock);
29 + spin_lock_irqsave(&bcm1480_imr_lock, flags);
30
31 /* Swizzle each CPU's IMR (but leave the IP selection alone) */
32 old_cpu = bcm1480_irq_owner[irq];
33 @@ -153,8 +151,7 @@ static void bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
34 ____raw_writeq(cur_ints, IOADDR(A_BCM1480_IMR_MAPPER(cpu) + R_BCM1480_IMR_INTERRUPT_MASK_H + (k*BCM1480_IMR_HL_SPACING)));
35 }
36 }
37 - spin_unlock(&bcm1480_imr_lock);
38 - spin_unlock_irqrestore(&desc->lock, flags);
39 + spin_unlock_irqrestore(&bcm1480_imr_lock, flags);
40 }
41 #endif
42
43 diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
44 index c08ff58..38cb998 100644
45 --- a/arch/mips/sibyte/sb1250/irq.c
46 +++ b/arch/mips/sibyte/sb1250/irq.c
47 @@ -107,7 +107,6 @@ static void sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
48 {
49 int i = 0, old_cpu, cpu, int_on;
50 u64 cur_ints;
51 - struct irq_desc *desc = irq_desc + irq;
52 unsigned long flags;
53
54 i = cpumask_first(mask);
55 @@ -121,8 +120,7 @@ static void sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
56 cpu = cpu_logical_map(i);
57
58 /* Protect against other affinity changers and IMR manipulation */
59 - spin_lock_irqsave(&desc->lock, flags);
60 - spin_lock(&sb1250_imr_lock);
61 + spin_lock_irqsave(&sb1250_imr_lock, flags);
62
63 /* Swizzle each CPU's IMR (but leave the IP selection alone) */
64 old_cpu = sb1250_irq_owner[irq];
65 @@ -144,8 +142,7 @@ static void sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
66 ____raw_writeq(cur_ints, IOADDR(A_IMR_MAPPER(cpu) +
67 R_IMR_INTERRUPT_MASK));
68 }
69 - spin_unlock(&sb1250_imr_lock);
70 - spin_unlock_irqrestore(&desc->lock, flags);
71 + spin_unlock_irqrestore(&sb1250_imr_lock, flags);
72 }
73 #endif
74