]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc64/mm/tlb.c
r8169: phy init for the 8168
[linux-2.6-omap-h63xx.git] / arch / sparc64 / mm / tlb.c
index a079cf42505ed08906d42b0371372d6842d8a8b7..3f10fc921b00e1bfb6279f8ccf00986ad7619089 100644 (file)
@@ -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)