Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v3.6-branch] devicetree.h: switch to DT_IRQ_INTC_BY_IDX for L2 and L3 INTID encodings #69834

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

zephyrbot
Copy link
Collaborator

@zephyrbot zephyrbot commented Mar 6, 2024

Backport 8fec5f3~2..8fec5f3 from #68784.

Fixes #69820

Using `DT_IRQ_INTC()` to fetch the interrupt controller associated
with a node works well for nodes which consume interrupts from a
single aggregator. However, when specifying multiple (and different)
interrupt aggregators via the `interrupts-extended` property,
the L2 and L3 interrupts will no longer be encoded properly. This
is because `DT_IRQ_INTC(node_id)` uses `DT_IRQ_INTC_BY_IDX(node_id, 0)`
so all the interrupts will use the first aggregator as their parent.
To fix this, switch from using `DT_IRQ_INTC()` to `DT_IRQ_INTC_BY_IDX()`.

Signed-off-by: Laurentiu Mihalcea <[email protected]>
(cherry picked from commit 3799e0f)
Add some assert statements meant to check if L2 interrupts
are encoded right when dealing with nodes that consume interrupts
from multiple aggregators. For this to work, also add another
interrupt controller node which extends a different L1 interrupt
from `test_intc`.

Signed-off-by: Laurentiu Mihalcea <[email protected]>
(cherry picked from commit 8fec5f3)
@zephyrbot zephyrbot added Backport Backport PR and backport failure issues area: Devicetree labels Mar 6, 2024
@zephyrbot zephyrbot requested a review from galak March 6, 2024 02:21
@ycsin ycsin closed this Mar 6, 2024
@ycsin ycsin reopened this Mar 6, 2024
@ycsin ycsin requested review from dbaluta and iuliana-prodan March 6, 2024 02:38
@henrikbrixandersen henrikbrixandersen assigned ycsin and unassigned galak Mar 6, 2024
@henrikbrixandersen henrikbrixandersen added this to the v3.6.1 milestone Mar 6, 2024
@henrikbrixandersen henrikbrixandersen merged commit da2a9af into v3.6-branch Mar 8, 2024
32 of 38 checks passed
@nashif nashif deleted the backport-68784-to-v3.6-branch branch November 16, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Backport Backport PR and backport failure issues
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Bad multi-level interrupt encoding for nodes consuming interrupts from multiple aggregators
9 participants