soc: riscv: privilege: define __soc_handle_irq as weak symbol

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

This allows overriding __soc_handle_irq 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 15:41:43 +02:00 committed by Anas Nashif
commit d8e0027082

View file

@ -14,8 +14,11 @@
#include <linker/sections.h>
#include <soc.h>
/* exports */
GTEXT(__soc_handle_irq)
/*
* __soc_handle_irq is defined as .weak to allow re-implementation by
* SOCs that do not truly follow the riscv privilege specification.
*/
WTEXT(__soc_handle_irq)
/*
* SOC-specific function to handle pending IRQ number generating the interrupt.
@ -32,7 +35,7 @@ SECTION_FUNC(exception.other, __soc_handle_irq)
/*
* __soc_is_irq is defined as .weak to allow re-implementation by
* SOCs that does not truly follow the riscv privilege specification.
* SOCs that do not truly follow the riscv privilege specification.
*/
WTEXT(__soc_is_irq)