12 #include <linux/kernel.h>
17 #include <linux/sched.h>
20 #include <asm/sections.h>
22 #define STBCR_REG(phys_id) (0xfe400004 | (phys_id << 12))
23 #define RESET_REG(phys_id) (0xfe400008 | (phys_id << 12))
25 #define STBCR_MSTP 0x00000001
26 #define STBCR_RESET 0x00000002
27 #define STBCR_SLEEP 0x00000004
28 #define STBCR_LTSLP 0x80000000
38 x &= (1 << (message << 2));
46 static void shx3_smp_setup(
void)
63 for (i = 1, num = 0; i <
NR_CPUS; i++) {
72 static void shx3_prepare_cpus(
unsigned int max_cpus)
80 for (i = 0; i < SMP_MSG_NR; i++)
84 for (i = 0; i < max_cpus; i++)
88 static void shx3_start_cpu(
unsigned int cpu,
unsigned long entry_point)
105 static unsigned int shx3_smp_processor_id(
void)
110 static void shx3_send_ipi(
unsigned int cpu,
unsigned int message)
112 unsigned long addr = 0xfe410070 + (cpu * 4);
119 static void shx3_update_boot_vector(
unsigned int cpu)
130 unsigned int cpu = (
unsigned int)hcpu;
134 shx3_update_boot_vector(cpu);
137 pr_info(
"CPU %u is now online\n", cpu);
147 .notifier_call = shx3_cpu_callback,
150 static int __cpuinit register_shx3_cpu_notifier(
void)
158 .smp_setup = shx3_smp_setup,
159 .prepare_cpus = shx3_prepare_cpus,
160 .start_cpu = shx3_start_cpu,
161 .smp_processor_id = shx3_smp_processor_id,
162 .send_ipi = shx3_send_ipi,