build: gen_isr_tables.py: fix bad IRQ index computation for L3 interrupts #68781
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the Zephyr documentation, the multi-level interrupts are encoded as follows:
L1_ID | ((L2_ID + 1) << L2_BITS) | ((L3_ID + 1) << (L3_BITS + L2_BITS))
This means that when L3 interrupts are enabled, the gen_isr_table.py script will receive the value of L2_ID + 1. Currently, the script takes this value and directly compares it with the offsets set via
CONFIG_3RD_LVL_INTR_xx_OFFSET
. This is wrong because the values from said configurations are the same as L2_ID and because of that the script will generate an error. To fix this, use the value of L2_ID instead of L2_ID + 1.To test this out simply enable L2 and L3 interrupts and statically connect an L3 interrupt. The build should break.