diff mbox series

MIPS: CPU#0 is not hotpluggable

Message ID 1594791329-20563-1-git-send-email-chenhc@lemote.com (mailing list archive)
State Superseded
Headers show
Series MIPS: CPU#0 is not hotpluggable | expand

Commit Message

Huacai Chen July 15, 2020, 5:35 a.m. UTC
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(-)

Comments

Sergei Shtylyov July 15, 2020, 7:56 a.m. UTC | #1
Hello!

On 15.07.2020 8:35, Huacai Chen wrote:

> 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?

> Cc: stable@vger.kernel.org
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
[...]

MBR, Sergei
Huacai Chen July 15, 2020, 8:09 a.m. UTC | #2
Hi, Sergei,

On Wed, Jul 15, 2020 at 3:56 PM Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>
> Hello!
>
> On 15.07.2020 8:35, Huacai Chen wrote:
>
> > 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.

>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> [...]
>
> MBR, Sergei
diff mbox series

Patch

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 "