sparc64: Need to disable preemption around smp_tsb_sync().
authorDavid S. Miller <davem@davemloft.net>
Sun, 3 Aug 2008 07:01:05 +0000 (00:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Aug 2008 20:51:35 +0000 (13:51 -0700)
Based upon a bug report by Mariusz Kozlowski

It uses smp_call_function_masked() now, which has a preemption-disabled
requirement.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/mm/tsb.c

index 3547937b17a2f2d43c5d9f667dcfca7e8ce0c1eb..587f8efb2e05efb0681fec3a0c0ed0d59b87357b 100644 (file)
@@ -1,9 +1,10 @@
 /* arch/sparc64/mm/tsb.c
  *
- * Copyright (C) 2006 David S. Miller <davem@davemloft.net>
+ * Copyright (C) 2006, 2008 David S. Miller <davem@davemloft.net>
  */
 
 #include <linux/kernel.h>
+#include <linux/preempt.h>
 #include <asm/system.h>
 #include <asm/page.h>
 #include <asm/tlbflush.h>
@@ -415,7 +416,9 @@ retry_tsb_alloc:
                tsb_context_switch(mm);
 
                /* Now force other processors to do the same.  */
+               preempt_disable();
                smp_tsb_sync(mm);
+               preempt_enable();
 
                /* Now it is safe to free the old tsb.  */
                kmem_cache_free(tsb_caches[old_cache_index], old_tsb);