diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2020-11-25 11:11:30 +0100 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2020-11-27 10:38:12 +0100 |
commit | cbab54d9c2b2a73abe541790df28add14b2385bd (patch) | |
tree | 8705297c5a3252dd37a0ae5ac267570b77f7665f /arch/mips/loongson64 | |
parent | mips: cdmm: fix use-after-free in mips_cdmm_bus_discover (diff) | |
download | linux-cbab54d9c2b2a73abe541790df28add14b2385bd.tar.xz linux-cbab54d9c2b2a73abe541790df28add14b2385bd.zip |
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>
Diffstat (limited to 'arch/mips/loongson64')
-rw-r--r-- | arch/mips/loongson64/smp.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/mips/loongson64/smp.c b/arch/mips/loongson64/smp.c index aa0cd723e61d..b8c1fc3158fd 100644 --- a/arch/mips/loongson64/smp.c +++ b/arch/mips/loongson64/smp.c @@ -544,9 +544,6 @@ static int loongson3_cpu_disable(void) unsigned long flags; unsigned int cpu = smp_processor_id(); - if (cpu == 0) - return -EBUSY; - set_cpu_online(cpu, false); calculate_cpu_foreign_map(); local_irq_save(flags); |