correct implementation of flush_tlb_mask needed to reenable CONFIG_SMP
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Fri, 13 Jan 2006 16:36:47 +0000 (10:36 -0600)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Fri, 13 Jan 2006 16:36:47 +0000 (10:36 -0600)
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
xen/arch/ia64/linux-xen/smp.c

index 97f66a045c5a893f5bd3272bf80e9092d0f19cf4..d667a428b44a394aaaa8c81871b7baca2831d315 100644 (file)
 void flush_tlb_mask(cpumask_t mask)
 {
 #ifdef CONFIG_SMP
-    printf("flush_tlb_mask called, not implemented for SMP\n");
-       dummy();
+    int cpu;
+
+    cpu = smp_processor_id();
+    if (cpu_isset (cpu, mask)) {
+        cpu_clear(cpu, mask);
+       local_flush_tlb_all ();
+    }
+
+    if (cpus_empty(mask))
+        return;
+
+    for (cpu = 0; cpu < NR_CPUS; ++cpu)
+        if (cpu_isset(cpu, mask))
+          smp_call_function_single
+            (cpu, (void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
 #endif
 }
 //#if CONFIG_SMP || IA64