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

arch: arm: aarch32: Fix spurious interrupt handling #34396

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

bbolen
Copy link
Collaborator

@bbolen bbolen commented Apr 19, 2021

The GIC can return 0x3ff to indicate a spurious interrupt. Other
interrupt controllers could return something different. Check that the
pending interrupt is valid in order to avoid indexing past the end of
the isr_table.

This fixes #30465 and is based on the aarch64 fix in 9dd2731.

Signed-off-by: Bradley Bolen bbolen@lexmark.com

The GIC can return 0x3ff to indicate a spurious interrupt.  Other
interrupt controllers could return something different.  Check that the
pending interrupt is valid in order to avoid indexing past the end of
the isr_table.

This fixes zephyrproject-rtos#30465 and is based on the aarch64 fix in 9dd2731.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
@github-actions github-actions bot added the area: ARM ARM (32-bit) Architecture label Apr 19, 2021
@MaureenHelm MaureenHelm requested a review from carlocaione April 19, 2021 18:15
@ioannisg ioannisg self-assigned this Apr 20, 2021
@@ -183,6 +183,14 @@ _idle_state_cleared:
* interface function.
*/
cpsie i

/*
* Skip calling the isr if it is a spurious interrupt.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this comment is misleading, we don't really check for spurious interrupt, we just make sure we are not going out of bound which has the side effect of covering spurious interrupts from GIC.

@nashif nashif merged commit 6734c6e into zephyrproject-rtos:master Apr 20, 2021
@bbolen bbolen deleted the cortex_r_int_fix branch April 26, 2021 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spurious interrupts not handled in ARMv7-R code with GICv2.
5 participants