Skip to content

Commit

Permalink
arch: riscv: smp: prevent nested #ifdef
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ycsin authored and fabiobaltieri committed Oct 4, 2024
1 parent 796b795 commit 453dfed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/core/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 453dfed

Please sign in to comment.