summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smp-up.c
diff options
context:
space:
mode:
authorRalf Baechle2009-06-23 11:00:31 +0200
committerRalf Baechle2009-06-24 19:34:40 +0200
commit1b2bc75c1bde6581d2694cb3ed7fb06b69685008 (patch)
tree800fc23052bccb1fbf8acfbaabbf5648c69daa9e /arch/mips/kernel/smp-up.c
parentDMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set (diff)
downloadkernel-qcow2-linux-1b2bc75c1bde6581d2694cb3ed7fb06b69685008.tar.gz
kernel-qcow2-linux-1b2bc75c1bde6581d2694cb3ed7fb06b69685008.tar.xz
kernel-qcow2-linux-1b2bc75c1bde6581d2694cb3ed7fb06b69685008.zip
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/kernel/smp-up.c')
-rw-r--r--arch/mips/kernel/smp-up.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c
index 878e3733bbb2..2508d55d68fd 100644
--- a/arch/mips/kernel/smp-up.c
+++ b/arch/mips/kernel/smp-up.c
@@ -55,6 +55,18 @@ static void __init up_prepare_cpus(unsigned int max_cpus)
{
}
+#ifdef CONFIG_HOTPLUG_CPU
+static int up_cpu_disable(void)
+{
+ return -ENOSYS;
+}
+
+static void up_cpu_die(unsigned int cpu)
+{
+ BUG();
+}
+#endif
+
struct plat_smp_ops up_smp_ops = {
.send_ipi_single = up_send_ipi_single,
.send_ipi_mask = up_send_ipi_mask,
@@ -64,4 +76,8 @@ struct plat_smp_ops up_smp_ops = {
.boot_secondary = up_boot_secondary,
.smp_setup = up_smp_setup,
.prepare_cpus = up_prepare_cpus,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_disable = up_cpu_disable,
+ .cpu_die = up_cpu_die,
+#endif
};