Skip to content

irq: cortex-r: Fix wrong irq enabling #20243

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

Merged
merged 1 commit into from
Oct 31, 2019

Conversation

carlocaione
Copy link
Collaborator

@carlocaione carlocaione commented Oct 30, 2019

cc @stephanosio @bbolen @galak

I know this is going to be reworked soon but we have to be sure to merge this before #19860.

In the cortex-r port we are currently using GIC as a fake cascade
controller hooked to a fake parent IRQ #0. And in gic_init() we use
IRQ_CONNECT() to connect this dummy IRQ.

Unfortunately this value is shifted and offset when calling
irq_set_priority_next_level() that tries to set the IRQ priority on a
value of 0xffffffff.

This value is offset again in gic_irq_set_priority() that actually sets
the priority on the PPI zephyrproject-rtos#31.

Fix this avoiding to set any priority for IRQ #0.

Signed-off-by: Carlo Caione <[email protected]>
@ioannisg ioannisg requested a review from stephanosio October 30, 2019 13:51
@ioannisg ioannisg added the bug The issue is a bug, or the PR is fixing a bug label Oct 30, 2019
@zephyrbot zephyrbot added the area: ARM ARM (32-bit) Architecture label Oct 30, 2019
Copy link
Member

@stephanosio stephanosio left a comment

Choose a reason for hiding this comment

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

Definitely a bug that should be fixed.

This nonsensical multi-level interrupt controller scheme will be removed by #19698 when merged.

@wentongwu wentongwu self-requested a review October 31, 2019 12:33
@andrewboie andrewboie merged commit 1f6d4e2 into zephyrproject-rtos:master Oct 31, 2019
@carlocaione carlocaione deleted the fix_gic_irq_0 branch November 4, 2019 08:07
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 bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants