aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2009-05-08 07:38:10 +0000
committerMartin Michlmayr <tbm@cyrius.com>2009-05-08 07:38:10 +0000
commitcc92530c32d780acd75aa0baecca62447e12ef31 (patch)
treefe3d33fba76c215bb5ee677d46c6c193ec86d8d0
parentfdb63ab825dcbc9709f9a1a4ccfdec5d5fcd1dff (diff)
downloadkernel_replicant_linux-cc92530c32d780acd75aa0baecca62447e12ef31.tar.gz
kernel_replicant_linux-cc92530c32d780acd75aa0baecca62447e12ef31.tar.bz2
kernel_replicant_linux-cc92530c32d780acd75aa0baecca62447e12ef31.zip
Broadcom SB: fix locking in set_irq_affinity.
svn path=/dists/sid/linux-2.6/; revision=13588
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/bugfix/mips/sb-irq.patch74
-rw-r--r--debian/patches/series/51
3 files changed, 78 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index b5a3f5a7326b..609ce846e352 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ linux-2.6 (2.6.29-5) UNRELEASED; urgency=low
[ maximilian attems ]
* qla1280: Fix off-by-some error in firmware loading. (closes: #527265)
+ [ Martin Michlmayr ]
+ * Broadcom SB: fix locking in set_irq_affinity.
+
-- dann frazier <dannf@debian.org> Mon, 04 May 2009 13:40:51 -0600
linux-2.6 (2.6.29-4) unstable; urgency=low
diff --git a/debian/patches/bugfix/mips/sb-irq.patch b/debian/patches/bugfix/mips/sb-irq.patch
new file mode 100644
index 000000000000..12904fbd96e1
--- /dev/null
+++ b/debian/patches/bugfix/mips/sb-irq.patch
@@ -0,0 +1,74 @@
+Locking of irq_desc is now done in irq_set_affinity; Don't lock it
+again in chip specific set_affinity function.
+
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+---
+
+ arch/mips/sibyte/bcm1480/irq.c | 7 ++-----
+ arch/mips/sibyte/sb1250/irq.c | 7 ++-----
+ 2 files changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
+index 352352b..c147c4b 100644
+--- a/arch/mips/sibyte/bcm1480/irq.c
++++ b/arch/mips/sibyte/bcm1480/irq.c
+@@ -113,7 +113,6 @@ static void bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
+ {
+ int i = 0, old_cpu, cpu, int_on, k;
+ u64 cur_ints;
+- struct irq_desc *desc = irq_desc + irq;
+ unsigned long flags;
+ unsigned int irq_dirty;
+
+@@ -127,8 +126,7 @@ static void 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(&desc->lock, flags);
+- spin_lock(&bcm1480_imr_lock);
++ spin_lock_irqsave(&bcm1480_imr_lock, flags);
+
+ /* Swizzle each CPU's IMR (but leave the IP selection alone) */
+ old_cpu = bcm1480_irq_owner[irq];
+@@ -153,8 +151,7 @@ static void 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(&bcm1480_imr_lock);
+- spin_unlock_irqrestore(&desc->lock, flags);
++ spin_unlock_irqrestore(&bcm1480_imr_lock, flags);
+ }
+ #endif
+
+diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
+index c08ff58..38cb998 100644
+--- a/arch/mips/sibyte/sb1250/irq.c
++++ b/arch/mips/sibyte/sb1250/irq.c
+@@ -107,7 +107,6 @@ static void sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
+ {
+ int i = 0, old_cpu, cpu, int_on;
+ u64 cur_ints;
+- struct irq_desc *desc = irq_desc + irq;
+ unsigned long flags;
+
+ i = cpumask_first(mask);
+@@ -121,8 +120,7 @@ static void sb1250_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(&desc->lock, flags);
+- spin_lock(&sb1250_imr_lock);
++ spin_lock_irqsave(&sb1250_imr_lock, flags);
+
+ /* Swizzle each CPU's IMR (but leave the IP selection alone) */
+ old_cpu = sb1250_irq_owner[irq];
+@@ -144,8 +142,7 @@ static void sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
+ ____raw_writeq(cur_ints, IOADDR(A_IMR_MAPPER(cpu) +
+ R_IMR_INTERRUPT_MASK));
+ }
+- spin_unlock(&sb1250_imr_lock);
+- spin_unlock_irqrestore(&desc->lock, flags);
++ spin_unlock_irqrestore(&sb1250_imr_lock, flags);
+ }
+ #endif
+
diff --git a/debian/patches/series/5 b/debian/patches/series/5
index c8dd93f948eb..852dd59d6081 100644
--- a/debian/patches/series/5
+++ b/debian/patches/series/5
@@ -1,3 +1,4 @@
+ features/ia64/rtc-efi.patch
+ features/ia64/rtc-inline-LEAP_YEAR.patch
+ bugfix/all/0001-qla1280-Fix-off-by-some-error-in-firmware-loading.patch
++ bugfix/mips/sb-irq.patch