Skip to contentSkip to conversation

riscv: remove redundant check for CONFIG_SMP

PATCH In review Hui Wang 2 participants 4 messages Mar 4 – Mar 23 RISC-V

lore
Share & tools
lore

Hui Wang

author
#0 lore raw

PATCH 1/2 riscv: remove redundant check for CONFIG_SMP

In the arch/riscv/Kconfig, the HOTPLUG_CPU depends on SMP, hence if the HOTPLUG_CPU is defined, the SMP has to be defined, it is not necessary to check SMP here.

---
 arch/riscv/include/asm/smp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/smp.h +1 -1
index 7ac80e9f2288..0ecc67641b09 100644
@@ -105,7 +105,7 @@ static inline void riscv_ipi_set_virq_range(int virq, int nr)
 
 #endif /* CONFIG_SMP */
 
-#if defined(CONFIG_HOTPLUG_CPU) && (CONFIG_SMP)
+#if defined(CONFIG_HOTPLUG_CPU)
 bool cpu_has_hotplug(unsigned int cpu);
 #else
 static inline bool cpu_has_hotplug(unsigned int cpu)
Signature · 7 lines
2.43.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
author
#1 lore raw

PATCH 2/2 riscv: remove redundant #ifdef check in cpu-hotplug

The cpu-hotplug.c only is built when CONFIG_HOTPLUG_CPU is defined, it is not needed to check HOTPLUG_CPU in this file.

---
 arch/riscv/kernel/cpu-hotplug.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/riscv/kernel/cpu-hotplug.c +1 -2
index 3f50d3dd76c6..e07564638b41 100644
@@ -43,7 +43,6 @@ int __cpu_disable(void)
 	return 0;
 }
 
-#ifdef CONFIG_HOTPLUG_CPU
 /*
  * Called on the thread which is asking for a CPU to be shutdown, if the
  * CPU reported dead to the hotplug core.
@@ -75,4 +74,4 @@ void __noreturn arch_cpu_idle_dead(void)
 	/* It should never reach here */
 	BUG();
 }
-#endif
+
Signature · 7 lines
2.43.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv