Thread (7 messages) 7 messages, 2 authors, 2013-06-14
STALE4730d

[PATCH] powerpc/sysfs: disable hotplug for the boot cpu

From: Zhao Chenhui <hidden>
Date: 2013-05-28 08:00:26
Also in: lkml
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Linus Torvalds

Some features depend on the boot cpu, for instance, hibernate/suspend.
So disable hotplug for the boot cpu.

Signed-off-by: Zhao Chenhui <redacted>
---
 arch/powerpc/kernel/sysfs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index e68a845..294b1c4e 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -655,8 +655,10 @@ static int __init topology_init(void)
 		 * CPU.  For instance, the boot cpu might never be valid
 		 * for hotplugging.
 		 */
-		if (ppc_md.cpu_die)
+		if (ppc_md.cpu_die && cpu != boot_cpuid)
 			c->hotpluggable = 1;
+		else
+			c->hotpluggable = 0;
 
 		if (cpu_online(cpu) || c->hotpluggable) {
 			register_cpu(c, cpu);
-- 
1.7.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help