-
Notifications
You must be signed in to change notification settings - Fork 7.3k
isr_tables: Support hardware interrupt vector table-only configuration. #22742
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
isr_tables: Support hardware interrupt vector table-only configuration. #22742
Conversation
663dc23
to
9750566
Compare
I'm not familiar enough with the irq handling to review, removing myself as reviewer. |
@stephanosio @andrewboie is this ready to go in, or you're waiting for more reviews? Btw, I just triggered a Shippable re-run since it was a month ago when it last happened. |
Given this patch's potential to break a lot of things, I suppose more reviews can't hurt before merging. This is not terribly urgent as it will take some time for me to upstream the TI Hercules SoC port and that will likely be the only user of it. @andyross @ioannisg your insight on this would be greatly appreciated. |
*/ | ||
#ifdef CONFIG_GEN_SW_ISR_TABLE | ||
#define IRQ_VECTOR_TABLE_DEFAULT_ISR _isr_wrapper | ||
#else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a comment here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about an inline comment here at the #else? This seems to be the differentiation brought in this patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if I understand what you mean by "inline comment" here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I'd like a comment as the one in lines 41-44, for the #else case, i.e. when only the vector tables are used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was quite self-explanatory -- that unconnected IRQs should have z_irq_spurious
, as you would in _sw_isr_table
.
I will add a comment explaining this anyway, since this might not be as obvious to the person reading this for the first time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* When both the IRQ vector table and the software ISR table are used, populate
* the IRQ vector table with the common software ISR by default, such that all
* indirect interrupt vectors are handled using the software ISR table;
* otherwise, populate the IRQ vector table with z_irq_spurious so that all
* un-connected IRQ vectors end up in the spurious IRQ handler.
*/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, some requests for comments' enhancements only.
9750566
to
5197e1b
Compare
@ioannisg Thanks for reviewing. I have addressed your comments and pushed a new commit. |
The existing isr_tables implementation does not allow enabling only hardware interrupt vector table without software isr table. This commit ensures that CONFIG_GEN_IRQ_VECTOR_TABLE can be used without setting CONFIG_GEN_SW_ISR_TABLE. Signed-off-by: Stephanos Ioannidis <[email protected]>
5197e1b
to
87d32cd
Compare
Let's merge this one - we are early in the 2.3 release cycle, so hopefully, there is enough time to detect and fix any bad effects of this PR |
The existing isr_tables implementation does not allow enabling only
hardware interrupt vector table without software isr table.
This commit ensures that CONFIG_GEN_IRQ_VECTOR_TABLE can be used
without setting CONFIG_GEN_SW_ISR_TABLE.
Signed-off-by: Stephanos Ioannidis [email protected]
NOTE: This is necessary to support the Cortex-R cores (Cortex-R4 and -R5) with the Vectored Interrupt Controller (VIC) port that allows direct interrupt vectoring.