21 #include <linux/module.h>
22 #include <linux/kernel.h>
23 #include <linux/sched.h>
32 #include <linux/bitops.h>
33 #include <linux/kexec.h>
36 #include <asm/current.h>
37 #include <asm/delay.h>
38 #include <asm/machvec.h>
42 #include <asm/pgalloc.h>
43 #include <asm/pgtable.h>
44 #include <asm/processor.h>
45 #include <asm/ptrace.h>
47 #include <asm/tlbflush.h>
48 #include <asm/unistd.h>
56 static struct local_tlb_flush_counts {
63 #define IPI_CALL_FUNC 0
64 #define IPI_CPU_STOP 1
65 #define IPI_CALL_FUNC_SINGLE 2
66 #define IPI_KDUMP_CPU_STOP 3
104 while ((ops =
xchg(pending_ipis, 0)) != 0) {
110 ops &= ~(1 << which);
117 generic_smp_call_function_interrupt();
120 generic_smp_call_function_single_interrupt();
155 send_IPI_allbutself (
int op)
182 send_IPI_all (
int op)
204 send_IPI_allbutself(IPI_KDUMP_CPU_STOP);
210 unsigned int cpu, self_cpu;
213 if (cpu != self_cpu) {
234 smp_send_local_flush_tlb (
int cpu)
253 #define FLUSH_DELAY 5
260 int mycpu,
cpu, flush_mycpu = 0;
266 counts[
cpu] = local_tlb_flush_counts[
cpu].count & 0xffff;
273 smp_send_local_flush_tlb(cpu);
280 while(counts[cpu] == (local_tlb_flush_counts[cpu].
count & 0xffff))
300 local_finish_flush_tlb_mm(mm);
308 cpumask_copy(cpus, mm_cpumask(mm));
310 (
void (*)(
void *))local_finish_flush_tlb_mm, mm, 1);
311 free_cpumask_var(cpus);
314 local_finish_flush_tlb_mm(mm);