Skip to content

Commit 453dfed

Browse files
ycsinfabiobaltieri
authored andcommitted
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 <[email protected]> Signed-off-by: Yong Cong Sin <[email protected]>
1 parent 796b795 commit 453dfed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/core/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ void arch_secondary_cpu_init(int hartid)
7474
#endif
7575
#ifdef CONFIG_SMP
7676
irq_enable(RISCV_IRQ_MSOFT);
77+
#endif /* CONFIG_SMP */
7778
#ifdef CONFIG_PLIC_IRQ_AFFINITY
7879
/* Enable on secondary cores so that they can respond to PLIC */
7980
irq_enable(RISCV_IRQ_MEXT);
8081
#endif /* CONFIG_PLIC_IRQ_AFFINITY */
81-
#endif /* CONFIG_SMP */
8282
riscv_cpu_init[cpu_num].fn(riscv_cpu_init[cpu_num].arg);
8383
}
8484

0 commit comments

Comments
 (0)