MIPS: No need to check CPU 0 in {loongson3,bmips,octeon}_cpu_disable()
authorTiezhu Yang <yangtiezhu@loongson.cn>
Wed, 25 Nov 2020 10:11:30 +0000 (18:11 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 27 Nov 2020 09:38:12 +0000 (10:38 +0100)
commitcbab54d9c2b2a73abe541790df28add14b2385bd
tree8705297c5a3252dd37a0ae5ac267570b77f7665f
parentf0e82242b16826077a2775eacfe201d803bb7a22
MIPS: No need to check CPU 0 in {loongson3,bmips,octeon}_cpu_disable()

After commit 9cce844abf07 ("MIPS: CPU#0 is not hotpluggable"),
c->hotpluggable is 0 for CPU 0 and it will not generate a control
file in sysfs for this CPU:

[root@linux loongson]# cat /sys/devices/system/cpu/cpu0/online
cat: /sys/devices/system/cpu/cpu0/online: No such file or directory
[root@linux loongson]# echo 0 > /sys/devices/system/cpu/cpu0/online
bash: /sys/devices/system/cpu/cpu0/online: Permission denied

So no need to check CPU 0 in {loongson3,bmips,octeon}_cpu_disable(),
just remove them.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/cavium-octeon/smp.c
arch/mips/kernel/smp-bmips.c
arch/mips/loongson64/smp.c