arch/xtensa: xtensa_intgen.py: Emit handlers for all levels
The original code would (unsurprisingly) only emit handler functions for interrupt levels with interrupts associated with them. But it turns out that it's possible to configure an xtensa device with an empty-but-otherwise-real interrupt level (specifically mt8195 has a "Level 3" interrupt not associated with any input IRQS, it's one level above EXCM_LEVEL and one level below the DEBUG exception). This script is old, and not set up to parse the full core-isa.h directly, so modifying it to detect this condition is difficult. Instead, just emit all 15 possible interrupt handlers, even empty ones. The extra stubs are harmless as they'll be dropped if uncalled. Signed-off-by: Andy Ross <andyross@google.com>
This commit is contained in:
parent
03cafbdaef
commit
bcf6b27c6b
1 changed files with 5 additions and 7 deletions
|
@ -105,13 +105,11 @@ for l in ints_by_lvl:
|
||||||
cprint("#endif")
|
cprint("#endif")
|
||||||
cprint("")
|
cprint("")
|
||||||
|
|
||||||
# Populate empty levels just for sanity. The second-to-last interrupt
|
# Populate all theoretical levels just in case. Odd cores have been
|
||||||
# level (usually "debug") typically doesn't have any associated
|
# seen in the wild with "empty" interrupt levels that exist in the
|
||||||
# vectors, but we don't have any way to know that a-prioi.
|
# hardware but without any interrupts associated with them. The
|
||||||
max = 0
|
# unused handlers will be ignored if uncalled.
|
||||||
for lvl in ints_by_lvl:
|
max = 15
|
||||||
if lvl > max:
|
|
||||||
max = lvl
|
|
||||||
|
|
||||||
for lvl in range(0, max+1):
|
for lvl in range(0, max+1):
|
||||||
if not lvl in ints_by_lvl:
|
if not lvl in ints_by_lvl:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue