diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2014-06-27 17:59:51 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-08-01 18:06:42 -0400 |
commit | 5ca0e377a649149d717569bfd53e236d474e1331 (patch) | |
tree | 434c3c69ce5c3782c0a6a4e6dd4134c017c9c3d2 | |
parent | f64988f13e82dd1797e59b26c8728d26c332aa43 (diff) |
MIPS: OCTEON: support disabling HOTPLUG_CPU run-time
If nosmp kernel option given, we can assume HOTPLUG_CPU is disabled.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7202/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/cavium-octeon/smp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index 2c8d156f240c..ea969309b35f 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c | |||
@@ -84,6 +84,9 @@ static void octeon_smp_hotplug_setup(void) | |||
84 | #ifdef CONFIG_HOTPLUG_CPU | 84 | #ifdef CONFIG_HOTPLUG_CPU |
85 | struct linux_app_boot_info *labi; | 85 | struct linux_app_boot_info *labi; |
86 | 86 | ||
87 | if (!setup_max_cpus) | ||
88 | return; | ||
89 | |||
87 | labi = (struct linux_app_boot_info *)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER); | 90 | labi = (struct linux_app_boot_info *)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER); |
88 | if (labi->labi_signature != LABI_SIGNATURE) | 91 | if (labi->labi_signature != LABI_SIGNATURE) |
89 | panic("The bootloader version on this board is incorrect."); | 92 | panic("The bootloader version on this board is incorrect."); |
@@ -129,7 +132,7 @@ static void octeon_smp_setup(void) | |||
129 | * will assign CPU numbers for possible cores as well. Cores | 132 | * will assign CPU numbers for possible cores as well. Cores |
130 | * are always consecutively numberd from 0. | 133 | * are always consecutively numberd from 0. |
131 | */ | 134 | */ |
132 | for (id = 0; id < num_cores && id < NR_CPUS; id++) { | 135 | for (id = 0; setup_max_cpus && id < num_cores && id < NR_CPUS; id++) { |
133 | if (!(core_mask & (1 << id))) { | 136 | if (!(core_mask & (1 << id))) { |
134 | set_cpu_possible(cpus, true); | 137 | set_cpu_possible(cpus, true); |
135 | __cpu_number_map[id] = cpus; | 138 | __cpu_number_map[id] = cpus; |