2 * Smp support for CHRP machines.
4 * Written by Cort Dougan (cort@cs.nmt.edu) borrowing a great
5 * deal of code from the sparc and intel versions.
7 * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
11 #include <linux/kernel.h>
12 #include <linux/sched.h>
13 #include <linux/smp.h>
14 #include <linux/interrupt.h>
15 #include <linux/kernel_stat.h>
16 #include <linux/delay.h>
17 #include <linux/spinlock.h>
19 #include <asm/ptrace.h>
20 #include <linux/atomic.h>
23 #include <asm/pgtable.h>
24 #include <asm/sections.h>
28 #include <asm/machdep.h>
32 static int smp_chrp_kick_cpu(int nr
)
34 *(unsigned long *)KERNELBASE
= nr
;
35 asm volatile("dcbf 0,%0"::"r"(KERNELBASE
):"memory");
40 static void smp_chrp_setup_cpu(int cpu_nr
)
42 mpic_setup_this_cpu();
45 /* CHRP with openpic */
46 struct smp_ops_t chrp_smp_ops
= {
47 .message_pass
= smp_mpic_message_pass
,
48 .probe
= smp_mpic_probe
,
49 .kick_cpu
= smp_chrp_kick_cpu
,
50 .setup_cpu
= smp_chrp_setup_cpu
,
51 .give_timebase
= rtas_give_timebase
,
52 .take_timebase
= rtas_take_timebase
,