[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1608008846-27206-1-git-send-email-yangtiezhu@loongson.cn>
Date: Tue, 15 Dec 2020 13:07:26 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
Wei Li <liwei391@...wei.com>,
Xuefeng Li <lixuefeng@...ngson.cn>
Subject: [PATCH] MIPS: No need to check CPU 0 in cps_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@...ux loongson]# cat /sys/devices/system/cpu/cpu0/online
cat: /sys/devices/system/cpu/cpu0/online: No such file or directory
[root@...ux 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 cps_cpu_disable(), just remove it.
Reported-by: liwei (GF) <liwei391@...wei.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
cps_cpu_disable() is not done in the early similar patch,
sorry for that.
arch/mips/kernel/smp-cps.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index 8b027c7..bcd6a94 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -451,9 +451,6 @@ static int cps_cpu_disable(void)
unsigned cpu = smp_processor_id();
struct core_boot_config *core_cfg;
- if (!cpu)
- return -EBUSY;
-
if (!cps_pm_support_state(CPS_PM_POWER_GATED))
return -EINVAL;
--
2.1.0
Powered by blists - more mailing lists