Skip to contentSkip to conversation

MIPS: CPU#0 is not hotpluggable

PATCH Superseded Huacai Chen 2 participants 3 messages Jul 15, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: CPU#0 is not hotpluggable

Now CPU#0 is not hotpluggable on MIPS, so prevent to create /sys/devices /system/cpu/cpu0/online which confusing some user-space tools.

---
 arch/mips/kernel/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/topology.c +1 -1
index cd3e1f8..08ad637 100644
@@ -20,7 +20,7 @@ static int __init topology_init(void)
 	for_each_present_cpu(i) {
 		struct cpu *c = &per_cpu(cpu_devices, i);
 
-		c->hotpluggable = 1;
+		c->hotpluggable = !!i;
 		ret = register_cpu(c, i);
 		if (ret)
 			printk(KERN_WARNING "topology_init: register_cpu %d "
Signature · 1 line
2.7.0
#2 lore raw

Hi, Sergei,

Quoted 9 lines · Sergei Shtylyov

Hello!

Quoted 2 lines · Huacai Chen

Now CPU#0 is not hotpluggable on MIPS, so prevent to create /sys/devices /system/cpu/cpu0/online which confusing some user-space tools.

Confuses?

Yes, this is my fault.

Quoted 6 lines
Quoted 3 lines

[...]

MBR, Sergei