[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / arch / sh / boards / saturn / smp.c
blob76460918c9cd9b2d916c20eb8b5a6158a969d61f
1 /*
2 * arch/sh/boards/saturn/smp.c
4 * SMP support for the Sega Saturn.
6 * Copyright (c) 2002 Paul Mundt
8 * Released under the terms of the GNU GPL v2.0.
9 */
10 #include <linux/kernel.h>
11 #include <linux/init.h>
12 #include <linux/smp.h>
14 #include <asm/saturn/smpc.h>
16 extern void start_secondary(void);
18 void __smp_send_ipi(unsigned int cpu, unsigned int action)
20 /* Nothing here yet .. */
23 unsigned int __smp_probe_cpus(void)
26 * This is just a straightforward master/slave configuration,
27 * and probing isn't really supported..
29 return 2;
33 * We're only allowed to do byte-access to SMPC registers. In
34 * addition to which, we treat them as write-only, since
35 * reading from them will return undefined data.
37 static inline void smpc_slave_stop(unsigned int cpu)
39 smpc_barrier();
40 ctrl_outb(1, SMPC_STATUS);
42 ctrl_outb(SMPC_CMD_SSHOFF, SMPC_COMMAND);
43 smpc_barrier();
46 static inline void smpc_slave_start(unsigned int cpu)
48 ctrl_outb(1, SMPC_STATUS);
49 ctrl_outb(SMPC_CMD_SSHON, SMPC_COMMAND);
51 smpc_barrier();
54 void __smp_slave_init(unsigned int cpu)
56 register unsigned long vbr;
57 void **entry;
59 __asm__ __volatile__ ("stc vbr, %0\n\t" : "=r" (vbr));
60 entry = (void **)(vbr + 0x310 + 0x94);
62 smpc_slave_stop(cpu);
64 *(void **)entry = (void *)start_secondary;
66 smpc_slave_start(cpu);