Skip to content

Commit 1ec2dbd

Browse files
dcpleungcfriedt
authored andcommitted
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 <[email protected]>
1 parent abf8c74 commit 1ec2dbd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

arch/xtensa/core/xtensa-asm2.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,29 @@ __unused void *xtensa_int##l##_c(void *interrupted_stack) \
157157
return z_get_next_switch_handle(interrupted_stack); \
158158
}
159159

160+
#if XCHAL_NMILEVEL >= 2
160161
DEF_INT_C_HANDLER(2)
162+
#endif
163+
164+
#if XCHAL_NMILEVEL >= 3
161165
DEF_INT_C_HANDLER(3)
166+
#endif
167+
168+
#if XCHAL_NMILEVEL >= 4
162169
DEF_INT_C_HANDLER(4)
170+
#endif
171+
172+
#if XCHAL_NMILEVEL >= 5
163173
DEF_INT_C_HANDLER(5)
174+
#endif
175+
176+
#if XCHAL_NMILEVEL >= 6
164177
DEF_INT_C_HANDLER(6)
178+
#endif
179+
180+
#if XCHAL_NMILEVEL >= 7
165181
DEF_INT_C_HANDLER(7)
182+
#endif
166183

167184
static inline DEF_INT_C_HANDLER(1)
168185

0 commit comments

Comments
 (0)