Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: CPU#0 is not hotpluggable
@ 2020-07-15  5:35 Huacai Chen
  2020-07-15  7:56 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Huacai Chen @ 2020-07-15  5:35 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Jiaxun Yang,
	Huacai Chen, stable

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

Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 arch/mips/kernel/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/topology.c b/arch/mips/kernel/topology.c
index cd3e1f8..08ad637 100644
--- a/arch/mips/kernel/topology.c
+++ b/arch/mips/kernel/topology.c
@@ -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 "
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-15  8:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-15  5:35 [PATCH] MIPS: CPU#0 is not hotpluggable Huacai Chen
2020-07-15  7:56 ` Sergei Shtylyov
2020-07-15  8:09   ` Huacai Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox