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>
This commit is contained in:
Aaro Koskinen 2014-06-28 00:59:51 +03:00 коммит произвёл Ralf Baechle
Родитель f64988f13e
Коммит 5ca0e377a6
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -84,6 +84,9 @@ static void octeon_smp_hotplug_setup(void)
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
struct linux_app_boot_info *labi; struct linux_app_boot_info *labi;
if (!setup_max_cpus)
return;
labi = (struct linux_app_boot_info *)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER); labi = (struct linux_app_boot_info *)PHYS_TO_XKSEG_CACHED(LABI_ADDR_IN_BOOTLOADER);
if (labi->labi_signature != LABI_SIGNATURE) if (labi->labi_signature != LABI_SIGNATURE)
panic("The bootloader version on this board is incorrect."); panic("The bootloader version on this board is incorrect.");
@ -129,7 +132,7 @@ static void octeon_smp_setup(void)
* will assign CPU numbers for possible cores as well. Cores * will assign CPU numbers for possible cores as well. Cores
* are always consecutively numberd from 0. * are always consecutively numberd from 0.
*/ */
for (id = 0; id < num_cores && id < NR_CPUS; id++) { for (id = 0; setup_max_cpus && id < num_cores && id < NR_CPUS; id++) {
if (!(core_mask & (1 << id))) { if (!(core_mask & (1 << id))) {
set_cpu_possible(cpus, true); set_cpu_possible(cpus, true);
__cpu_number_map[id] = cpus; __cpu_number_map[id] = cpus;