]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/tlb_32.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild...
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / tlb_32.c
index 9bb2363851af3e37d91045f5970f3d6316d0f9d9..f4049f3513b6b5e01e71523a5490fbedd5db9992 100644 (file)
@@ -154,6 +154,12 @@ void native_flush_tlb_others(const cpumask_t *cpumaskp, struct mm_struct *mm,
        flush_mm = mm;
        flush_va = va;
        cpus_or(flush_cpumask, cpumask, flush_cpumask);
+
+       /*
+        * Make the above memory operations globally visible before
+        * sending the IPI.
+        */
+       smp_mb();
        /*
         * We have to send the IPI only to
         * CPUs affected.
@@ -238,6 +244,14 @@ static void do_flush_tlb_all(void *info)
 
 void flush_tlb_all(void)
 {
-       on_each_cpu(do_flush_tlb_all, NULL, 1, 1);
+       on_each_cpu(do_flush_tlb_all, NULL, 1);
+}
+
+void reset_lazy_tlbstate(void)
+{
+       int cpu = raw_smp_processor_id();
+
+       per_cpu(cpu_tlbstate, cpu).state = 0;
+       per_cpu(cpu_tlbstate, cpu).active_mm = &init_mm;
 }