summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/smp.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2009-06-23 10:00:31 +0100
committerRalf Baechle <ralf@linux-mips.org>2009-06-24 18:34:40 +0100
commit1b2bc75c1bde6581d2694cb3ed7fb06b69685008 (patch)
tree800fc23052bccb1fbf8acfbaabbf5648c69daa9e /arch/mips/include/asm/smp.h
parent4ac4aa5cc3b00cc558575065ae71043e92d1a69a (diff)
MIPS: Add arch generic CPU hotplug
Each platform has to add support for CPU hotplugging itself by providing suitable definitions for the cpu_disable and cpu_die of the smp_ops methods and setting SYS_SUPPORTS_HOTPLUG_CPU. A platform should only set SYS_SUPPORTS_HOTPLUG_CPU once all it's smp_ops definitions have the necessary changes. This patch contains the changes to the dummy smp_ops definition for uni-processor systems. Parts of the code contributed by Cavium Inc. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/smp.h')
-rw-r--r--arch/mips/include/asm/smp.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h
index 2f83fa8631db..01f813dc3888 100644
--- a/arch/mips/include/asm/smp.h
+++ b/arch/mips/include/asm/smp.h
@@ -41,6 +41,7 @@ extern int __cpu_logical_map[NR_CPUS];
/* Octeon - Tell another core to flush its icache */
#define SMP_ICACHE_FLUSH 0x4
+extern cpumask_t cpu_callin_map;
extern void asmlinkage smp_bootstrap(void);
@@ -56,6 +57,24 @@ static inline void smp_send_reschedule(int cpu)
mp_ops->send_ipi_single(cpu, SMP_RESCHEDULE_YOURSELF);
}
+#ifdef CONFIG_HOTPLUG_CPU
+static inline int __cpu_disable(void)
+{
+ extern struct plat_smp_ops *mp_ops; /* private */
+
+ return mp_ops->cpu_disable();
+}
+
+static inline void __cpu_die(unsigned int cpu)
+{
+ extern struct plat_smp_ops *mp_ops; /* private */
+
+ mp_ops->cpu_die(cpu);
+}
+
+extern void play_dead(void);
+#endif
+
extern asmlinkage void smp_call_function_interrupt(void);
extern void arch_send_call_function_single_ipi(int cpu);