Skip to content

Conversation

@carlescufi
Copy link
Member

The documentation did not state clearly that any zero-latency IRQ must also be declared as a direct ISR. This is critical because failure to do so may cause race conditions between the ZLI and regular ISRs when executing the preable/postamble code in regular interrupts.

ppryga-nordic
ppryga-nordic previously approved these changes Jun 4, 2025
@carlescufi
Copy link
Member Author

@andyross

Should probably just document that the return value is unused, or play some games to enable the function to be declared void.

It's tricker than that. The return value is not unused, it's actually used by the direct ISR framework, so the direct ISR of a ZLI must return 0, otherwise we will have kernel code executed in ZLI context. Documented that.

peter-mitsis
peter-mitsis previously approved these changes Jun 4, 2025
@carlescufi
Copy link
Member Author

carlescufi commented Jun 5, 2025

@ppryga-nordic @andyross @peter-mitsis @bjarki-andreasen @cvinayak
last push: Updated irq.h macros with warnings related to the use of ZLIs with them.
EDIT: one more push to update the Arm-specific dynamic direct macro

The documentation did not state clearly that any zero-latency IRQ must
also be declared as a direct ISR. This is critical because failure to do
so may cause race conditions between the ZLI and regular ISRs when
executing the preable/postamble code in regular interrupts.

Signed-off-by: Carles Cufi <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2025

@wearyzen
Copy link
Contributor

wearyzen commented Jun 5, 2025

Now that we expect more changes similar to #91119, should there be a small mention about this in either migration guide or release notes (whichever is the right place) to attract more attention to this?

@carlescufi
Copy link
Member Author

carlescufi commented Jun 5, 2025

Now that we expect more changes similar to #91119, should there be a small mention about this in either migration guide or release notes (whichever is the right place) to attract more attention to this?

I will add a note to the migration guide after this PR and #91078 are merged.

@fabiobaltieri fabiobaltieri merged commit 3b8e1fa into zephyrproject-rtos:main Jun 6, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants