[kernel] r15321 - in dists/sid/linux-2.6/debian: . patches/bugfix/sparc patches/series

Ben Hutchings benh at alioth.debian.org
Thu Mar 4 23:13:18 UTC 2010


Author: benh
Date: Thu Mar  4 23:13:16 2010
New Revision: 15321

Log:
[sparc64] Make prom entry spinlock NMI safe (Closes: #572442)

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/sparc/sparc64-Make-prom-entry-spinlock-NMI-safe.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/series/10

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Thu Mar  4 23:02:05 2010	(r15320)
+++ dists/sid/linux-2.6/debian/changelog	Thu Mar  4 23:13:16 2010	(r15321)
@@ -26,6 +26,7 @@
     - MSI is disabled on QLA24xx chips other than QLA2432 (MSI-X already was)
     - MSI-X is disabled if qlx2enablemsix=2
     - MSI and MSI-X are disabled if qlx2enablemsix=0
+  * [sparc64] Make prom entry spinlock NMI safe (Closes: #572442)
 
  -- maximilian attems <maks at debian.org>  Thu, 25 Feb 2010 13:07:47 +0100
 

Added: dists/sid/linux-2.6/debian/patches/bugfix/sparc/sparc64-Make-prom-entry-spinlock-NMI-safe.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/sparc/sparc64-Make-prom-entry-spinlock-NMI-safe.patch	Thu Mar  4 23:13:16 2010	(r15321)
@@ -0,0 +1,45 @@
+From: David S. Miller <davem at davemloft.net>
+Subject: [PATCH] sparc64: Make prom entry spinlock NMI safe.
+
+If we do something like try to print to the OF console from an NMI
+while we're already in OpenFirmware, we'll deadlock on the spinlock.
+
+Disable NMIs when we take it.
+
+Signed-off-by: David S. Miller <davem at davemloft.net>
+
+diff --git a/arch/sparc/prom/p1275.c b/arch/sparc/prom/p1275.c
+index 4b7c937..815cab6 100644
+--- a/arch/sparc/prom/p1275.c
++++ b/arch/sparc/prom/p1275.c
+@@ -32,8 +32,7 @@ extern void prom_cif_interface(void);
+ extern void prom_cif_callback(void);
+ 
+ /*
+- * This provides SMP safety on the p1275buf. prom_callback() drops this lock
+- * to allow recursuve acquisition.
++ * This provides SMP safety on the p1275buf.
+  */
+ DEFINE_SPINLOCK(prom_entry_lock);
+ 
+@@ -47,7 +46,9 @@ long p1275_cmd(const char *service, long fmt, ...)
+ 	
+ 	p = p1275buf.prom_buffer;
+ 
+-	spin_lock_irqsave(&prom_entry_lock, flags);
++	raw_local_save_flags(flags);
++	raw_local_irq_restore(PIL_NMI);
++	spin_lock(&prom_entry_lock);
+ 
+ 	p1275buf.prom_args[0] = (unsigned long)p;		/* service */
+ 	strcpy (p, service);
+@@ -139,7 +140,8 @@ long p1275_cmd(const char *service, long fmt, ...)
+ 	va_end(list);
+ 	x = p1275buf.prom_args [nargs + 3];
+ 
+-	spin_unlock_irqrestore(&prom_entry_lock, flags);
++	spin_unlock(&prom_entry_lock);
++	raw_local_irq_restore(flags);
+ 
+ 	return x;
+ }

Modified: dists/sid/linux-2.6/debian/patches/series/10
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/10	Thu Mar  4 23:02:05 2010	(r15320)
+++ dists/sid/linux-2.6/debian/patches/series/10	Thu Mar  4 23:13:16 2010	(r15321)
@@ -10,3 +10,4 @@
 + features/all/i915-autoload-without-CONFIG_DRM_I915_KMS-2.patch
 + features/all/radeon-autoload-without-CONFIG_DRM_RADEON_KMS.patch
 + bugfix/all/qla2xxx-disable-broken-msi.patch
++ bugfix/sparc/sparc64-Make-prom-entry-spinlock-NMI-safe.patch



More information about the Kernel-svn-changes mailing list