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

risc-v/mpfs: ihc: cleanup DEBUGASSERTs and irq enabling #11247

Merged
merged 1 commit into from Nov 22, 2023

Conversation

eenurkka
Copy link
Contributor

Replace DEBUGASSERTs with sanity checks. DEBUGASSERT()s are not necessarily enabled at all, thus risking the functionality especially in that case. Remove PANICs as well.

Don't enable the ihc irq too early. If enabled, and the master is already up, the irq is being issued so that the system gets stuck or is severely slowed down. Master may be already up if this NuttX hart only is rebooted, for example.

Summary

IHC is supposed to work in parallel with Linux. In order to keep the whole system robust, remove all DEBUGASSERT()s and DEBUGPANIC()s from IHC. Replace them with more meaningful sanity checks.

IHC maybe already partly active, if one NuttX hart is rebooted, but Linux isn't. In that case, the system gets way too many interrupts before it even gets up to handle them. Thus, relocate the irq enabling so that it happens only when the internals (OpenAMP etc) are fully set up.

Impact

MPFS / Polarfire IHC

Testing

Polarfire based devices: 3x Linux harts, one NuttX hart, with fierce RPMSG traffic between them; and rebooting NuttX manually repeatedly.

Replace DEBUGASSERTs with sanity checks. DEBUGASSERT()s are
not necessarily enabled at all, thus risking the functionality
especially in that case. Remove PANICs as well.

Don't enable the ihc irq too early. If enabled, and the master
is already up, the irq is being issued so that the system gets
stuck or is severely slowed down. Master may be already up if
this NuttX hart only is rebooted, for example.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
@xiaoxiang781216 xiaoxiang781216 merged commit 83f5ca6 into apache:master Nov 22, 2023
26 checks passed
@jerpelea jerpelea added this to To-Add in Release Notes - 12.4.0 Dec 27, 2023
@jerpelea jerpelea moved this from To-Add to processed in Release Notes - 12.4.0 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants