]> err.no Git - linux-2.6/blobdiff - arch/sparc64/mm/tlb.c
sparc64: Fix initrd regression.
[linux-2.6] / arch / sparc64 / mm / tlb.c
index a079cf42505ed08906d42b0371372d6842d8a8b7..ae24919cba7cf8bef8a0ad4f8455f5c871e3920f 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>
@@ -22,7 +23,7 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers) = { 0, };
 
 void flush_tlb_pending(void)
 {
-       struct mmu_gather *mp = &__get_cpu_var(mmu_gathers);
+       struct mmu_gather *mp = &get_cpu_var(mmu_gathers);
 
        if (mp->tlb_nr) {
                flush_tsb_user(mp);
@@ -38,6 +39,8 @@ void flush_tlb_pending(void)
                }
                mp->tlb_nr = 0;
        }
+
+       put_cpu_var(mmu_gathers);
 }
 
 void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig)