xtensa: fix implicit declaration of _xtensa_handle_one_int*

Some Xtensa SoCs may not have that many levels of interrupts.
So limit the call to DEF_INT_C_HANDLER() to only supported
levels to avoid calling non-existent functions.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-09-21 13:37:31 -07:00 committed by Christopher Friedt
parent abf8c741e4
commit 1ec2dbd662

View file

@ -157,12 +157,29 @@ __unused void *xtensa_int##l##_c(void *interrupted_stack) \
return z_get_next_switch_handle(interrupted_stack); \ return z_get_next_switch_handle(interrupted_stack); \
} }
#if XCHAL_NMILEVEL >= 2
DEF_INT_C_HANDLER(2) DEF_INT_C_HANDLER(2)
#endif
#if XCHAL_NMILEVEL >= 3
DEF_INT_C_HANDLER(3) DEF_INT_C_HANDLER(3)
#endif
#if XCHAL_NMILEVEL >= 4
DEF_INT_C_HANDLER(4) DEF_INT_C_HANDLER(4)
#endif
#if XCHAL_NMILEVEL >= 5
DEF_INT_C_HANDLER(5) DEF_INT_C_HANDLER(5)
#endif
#if XCHAL_NMILEVEL >= 6
DEF_INT_C_HANDLER(6) DEF_INT_C_HANDLER(6)
#endif
#if XCHAL_NMILEVEL >= 7
DEF_INT_C_HANDLER(7) DEF_INT_C_HANDLER(7)
#endif
static inline DEF_INT_C_HANDLER(1) static inline DEF_INT_C_HANDLER(1)