19 #include <linux/types.h>
22 #include <linux/kernel.h>
23 #include <linux/module.h>
24 #include <linux/sched.h>
32 #include <linux/bitops.h>
37 #include <asm/current.h>
38 #include <asm/delay.h>
39 #include <asm/tlbflush.h>
43 #include <asm/mmu_context.h>
45 #include <asm/pgtable.h>
46 #include <asm/pgalloc.h>
47 #include <asm/processor.h>
48 #include <asm/ptrace.h>
49 #include <asm/unistd.h>
50 #include <asm/cacheflush.h>
54 static int smp_debug_lvl = 0;
55 #define smp_debug(lvl, printargs...) \
56 if (lvl >= smp_debug_lvl) \
59 #define smp_debug(lvl, ...) do { } while(0)
84 #undef PER_CPU_IRQ_REGION
85 #ifdef PER_CPU_IRQ_REGION
93 #error verify IRQ_OFFSET(IPI_IRQ) is ipi_interrupt() in new IRQ region
137 ops = p->pending_ipi;
139 spin_unlock_irqrestore(lock, flags);
147 unsigned long which =
ffz(~ops);
149 ops &= ~(1 << which);
163 generic_smp_call_function_interrupt();
168 generic_smp_call_function_single_interrupt();
206 p->pending_ipi |= 1 <<
op;
208 spin_unlock_irqrestore(lock, flags);
225 ipi_send(dest_cpu, op);
280 smp_cpu_init(
int cpunum)
301 notify_cpu_starting(cpunum);
324 smp_cpu_init(slave_id);
335 panic(
"smp_callin() AAAAaaaaahhhh....\n");
357 smp_init_current_idle_task =
idle ;
379 for (timeout = 0; timeout < 10000; timeout++) {
383 smp_init_current_idle_task =
NULL;
395 cpuid, timeout * 100);
404 printk(
KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor);
425 parisc_max_cpus = max_cpus;
439 if (cpu != 0 && cpu < parisc_max_cpus)
445 #ifdef CONFIG_PROC_FS