soc: riscv: privilege: define soc_interrupt_init() as weak symbol

Define soc_interrupt_init as a weak symbol in the common RISC-V
privileged instruction set SoC support.

This allows overriding soc_interrupt_init for SoCs which are not fully
compliant with the RISC-V privileged specification.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
Henrik Brix Andersen 2021-08-22 17:04:05 +02:00 committed by Anas Nashif
commit e6a3e238b9

View file

@ -90,7 +90,7 @@ int arch_irq_is_enabled(unsigned int irq)
} }
#if defined(CONFIG_RISCV_SOC_INTERRUPT_INIT) #if defined(CONFIG_RISCV_SOC_INTERRUPT_INIT)
void soc_interrupt_init(void) __weak void soc_interrupt_init(void)
{ {
/* ensure that all interrupts are disabled */ /* ensure that all interrupts are disabled */
(void)irq_lock(); (void)irq_lock();