Skip to content

Commit

Permalink
sparc64: Need to disable preemption around smp_tsb_sync().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Aug 4, 2008
1 parent 8f616cd commit a3cf5e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/sparc64/mm/tsb.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -415,7 +416,9 @@ void tsb_grow(struct mm_struct *mm, unsigned long tsb_index, unsigned long rss)
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);
Expand Down

0 comments on commit a3cf5e6

Please sign in to comment.