2 * Malta Platform-specific hooks for SMP operation
4 #include <linux/init.h>
6 #include <asm/mipsregs.h>
7 #include <asm/mipsmtregs.h>
9 #include <asm/smtc_ipi.h>
11 /* VPE/SMP Prototype implements platform interfaces directly */
14 * Cause the specified action to be performed on a targeted "CPU"
17 void core_send_ipi(int cpu, unsigned int action)
19 /* "CPU" may be TC of same VPE, VPE of same CPU, or different CPU */
20 smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
24 * Platform "CPU" startup hook
27 void prom_boot_secondary(int cpu, struct task_struct *idle)
29 smtc_boot_secondary(cpu, idle);
33 * Post-config but pre-boot cleanup entry point
36 void prom_init_secondary(void)
38 void smtc_init_secondary(void);
41 /* Don't enable Malta I/O interrupts (IP2) for secondary VPEs */
42 myvpe = read_c0_tcbind() & TCBIND_CURVPE;
44 /* Ideally, this should be done only once per VPE, but... */
45 clear_c0_status(STATUSF_IP2);
46 set_c0_status(STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP3
47 | STATUSF_IP4 | STATUSF_IP5 | STATUSF_IP6
51 smtc_init_secondary();
55 * Platform SMP pre-initialization
57 * As noted above, we can assume a single CPU for now
58 * but it may be multithreaded.
61 void __cpuinit plat_smp_setup(void)
63 if (read_c0_config3() & (1<<2))
64 mipsmt_build_cpu_map(0);
67 void __init plat_prepare_cpus(unsigned int max_cpus)
69 if (read_c0_config3() & (1<<2))
70 mipsmt_prepare_cpus();
74 * SMP initialization finalization entry point
77 void prom_smp_finish(void)
83 * Hook for after all CPUs are online
86 void prom_cpus_done(void)