@@ -1393,6 +1393,14 @@ config HOTPLUG_CPU
Say Y here to experiment with turning CPUs off and on. CPUs
can be controlled through /sys/devices/system/cpu.
+config HOTPLUG_CPU_MASTER
+ bool "Prevent first CPU (master) from hotplugging"
+ depends on HOTPLUG_CPU
+ help
+ Say Y here if your platform treats the first CPU as a special
+ "master" CPU and cannot allow it to hotplug. This prevents the
+ "online" entry in sysfs for that CPU.
+
config LOCAL_TIMERS
bool "Use local timer interrupts"
depends on SMP
@@ -940,7 +940,12 @@ static int __init topology_init(void)
for_each_possible_cpu(cpu) {
struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu);
+#ifdef CONFIG_HOTPLUG_CPU_MASTER
+ if (cpu)
+ cpuinfo->cpu.hotpluggable = 1;
+#else
cpuinfo->cpu.hotpluggable = 1;
+#endif
register_cpu(&cpuinfo->cpu, cpu);
}
--
1.7.4.1
and,
From 5e22ea1fa6a10ea0440057832496087297079a5d Mon Sep 17 00:00:00 2001
From: Mike Turquette <mturquette@ti.com>
Date: Tue, 19 Jul 2011 16:47:11 -0700
Subject: [PATCH 2/2] OMAP4: Kconfig: remove hotplug control for CPU0
On OMAP4, CPU0 cannot be dynamically offlined through the usual CPU
hotplug mechanism due to a variety of constraints. It is treated as a
special "master" CPU for these reasons.
Select HOTPLUG_CPU_MASTER to prevent creation of the hotplug control
entry in sysfs.
Signed-off-by: Mike Turquette <mturquette@ti.com>
---
arch/arm/mach-omap2/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
@@ -51,6 +51,7 @@ config ARCH_OMAP4
select ARCH_HAS_OPP
select PM_OPP if PM
select USB_ARCH_HAS_EHCI
+ select HOTPLUG_CPU_MASTER
comment "OMAP Core Type"
depends on ARCH_OMAP2