diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-04-30 22:54:27 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-04-30 22:54:27 -0700 |
commit | c9f2946fbec88d4baa3a6d47eb3a8e6b08b05cd9 (patch) | |
tree | 2b18303a2a69cf0c9d0224daebda5e5fc34308d8 /arch/sparc64/mm/tlb.c | |
parent | 1241140f5183db38393556832198a3b109bf9085 (diff) | |
download | op-kernel-dev-c9f2946fbec88d4baa3a6d47eb3a8e6b08b05cd9.zip op-kernel-dev-c9f2946fbec88d4baa3a6d47eb3a8e6b08b05cd9.tar.gz |
[SPARC64]: Disable preemption during flush_tlb_pending().
A context switch will force a call to flush_tlb_pending() (via
switch_to()), so if we test tlb_nr to be non-zero, then sleep, it
would become zero and later back at the original context we'll pass
zero down into the TLB flushing code which should never see a nr
argument of zero.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/mm/tlb.c')
-rw-r--r-- | arch/sparc64/mm/tlb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c index a079cf42..3f10fc9 100644 --- a/arch/sparc64/mm/tlb.c +++ b/arch/sparc64/mm/tlb.c @@ -8,6 +8,7 @@ #include <linux/percpu.h> #include <linux/mm.h> #include <linux/swap.h> +#include <linux/preempt.h> #include <asm/pgtable.h> #include <asm/pgalloc.h> @@ -24,6 +25,8 @@ void flush_tlb_pending(void) { struct mmu_gather *mp = &__get_cpu_var(mmu_gathers); + preempt_disable(); + if (mp->tlb_nr) { flush_tsb_user(mp); @@ -38,6 +41,8 @@ void flush_tlb_pending(void) } mp->tlb_nr = 0; } + + preempt_enable(); } void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig) |