arch: riscv: smp: prevent nested #ifdef

The `CONFIG_PLIC_IRQ_AFFINITY` depends on `CONFIG_SMP` in the
Kconfig layer, nested #ifdef can be avoided for readability.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
Yong Cong Sin 2024-10-04 01:38:33 +08:00 committed by Fabio Baltieri
parent 796b795cda
commit 453dfed3ad
1 changed files with 1 additions and 1 deletions

View File

@ -74,11 +74,11 @@ void arch_secondary_cpu_init(int hartid)
#endif
#ifdef CONFIG_SMP
irq_enable(RISCV_IRQ_MSOFT);
#endif /* CONFIG_SMP */
#ifdef CONFIG_PLIC_IRQ_AFFINITY
/* Enable on secondary cores so that they can respond to PLIC */
irq_enable(RISCV_IRQ_MEXT);
#endif /* CONFIG_PLIC_IRQ_AFFINITY */
#endif /* CONFIG_SMP */
riscv_cpu_init[cpu_num].fn(riscv_cpu_init[cpu_num].arg);
}