linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] MIPS: CPU#0 is not hotpluggable
@ 2020-07-16 10:40 Huacai Chen
  2020-07-25  6:37 ` Huacai Chen
  2020-07-26  8:25 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 11+ messages in thread
From: Huacai Chen @ 2020-07-16 10:40 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 confuses 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] 11+ messages in thread

end of thread, other threads:[~2020-07-26 11:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 10:40 [PATCH V2] MIPS: CPU#0 is not hotpluggable Huacai Chen
2020-07-25  6:37 ` Huacai Chen
2020-07-25  6:49   ` Greg KH
2020-07-25  6:57     ` Huacai Chen
2020-07-25  7:45       ` Greg KH
2020-07-25  8:29         ` Huacai Chen
2020-07-25  8:57           ` Greg KH
2020-07-26  2:17             ` Jiaxun Yang
2020-07-26  8:25   ` Thomas Bogendoerfer
2020-07-26 11:30     ` Jiaxun Yang
2020-07-26  8:25 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).