interrupt chip controller drivers - #5954
Conversation
|
This is interesting. It would help with a picture and some description in the documentation to better understand how fits together. I don't think we should need two sets of functions, with a good abstraction layer we should be able to have only one set of functions. |
Ok
This series preserves legacy API functions |
|
I think we should make the API what we'd like it to be, that way it's easier to understand and use. If we need to change all the users in the tree, so be it. |
|
Rebased on matser tip. I've created OP-TEE/optee_docs#192 to address #5954 (comment) about documentation. |
|
This series is not ready to use. I did not address deprecation of legacy function |
|
By the way, I think config switch |
|
I have updated the series, squashing the fixup commits, changing all Note the serie introduces dt_driver support for description of interrupt controller chains from a DT blob. The series is still long, at least it gives the big picture. If we agree on moving forward, i'll extract the first commits from this series and create dedicated P-Rs to ease step by step review. |
|
May I rebase on mater tip and squash the fixup commits? Once done, as the series is quite long (19 patches), maybe I should create smaller P-Rs to ease review. |
Yes, please. |
de8438c to
bc63a33
Compare
|
Fixup commit squashed and series rebased on master branch tip. |
|
But I see I missed a lot of comments I posted. |
|
Series is now back ready for review. |
|
For "core: interrupt: rename internal itr_chip to itr_main_chip" please apply: For "core: dt_driver: define interrupt controller drivers identifier" please apply: Comment on commit message for "drivers: move to interrupt_call_handlers()": For the entire PR: |
Okay, i'll go for 'interrupt'. |
|
Feel free to squash in the updates. |
|
Sorry I missed your last comment. |
|
I've squashed the fixup commits and applied review tag on 3 commits (#5954 (review), #5954 (review) and #5954 (review)). The previously reviewed series can be found here: branch itr-chip-prev. For commit: "core: interrupt: interrupt chip framework", I updated the commit message according to #5954 (review) and #5954 (comment)) and I addressed review comments with an new appended 1st fixup commit: Fixed Atmel driver issues (#5954 (comment)) with 2 fixup commits: I appended 3 new commits to remove the old interrupt API functions Last, I appendeded another fixup commit "[review] core: interrupt: interrupt chip framework" to mask unhandled interrupt instead of disabling them. This is needed as mask operation handler is expected to be atomic while disable operation handler does not. @tprrt: cuold you test this updated series? Atmel SAIC controller shoulld be provided the expect configuration data now. |
|
Should I create smaller P-Rs to help this series (~22 commits) review? |
Rename dt_register_interrupt_provider() to interrupt_register_provider() for consistency with other function. Rename type dt_get_itr_func to itr_dt_get_func for consistency with other dt driver callback function types. Fix buggy reference to clock in interrupt API function inline description comments. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Struct dt_get_itr_func is renamed struct itr_dt_get_func. dt_register_interrupt_provider() is renamed interrupt_register_provider(). Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
jenswikl
left a comment
There was a problem hiding this comment.
Comment for "core: dt_driver: add helper for old fashion interrupt bindings". With that addressed
please apply:
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
jenswikl
left a comment
There was a problem hiding this comment.
Comment for "core: dt_driver: add helper for old fashion interrupt bindings". With that addressed
please apply:
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
|
For commit "core: interrupt: interrupt_get_main_chip() returns main controller": |
Sure, feel free to chip off a few patches. :-) |
Hello @etienne-lms, |
Adds missing test of fdt_getprop() returned error code or property size. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
|
thanks @jenswi-linaro for the review. |
Return TEE_ERROR_ITEM_NOT_FOUND instead of TEE_ERROR_GENERIC when the interrupt index used by consumer is too high regarding the number of interrupts describe in the consumer node. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Adds a debug trace when platform mixes shared and non-shared handlers on the same interrupt. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
|
As #6096 has been merged, I created #6113 to finalize the new interrupt API. The part related to use of DT means to register interrupt driver providers and for consumer to get their interrupt is still pending: once #6097 is merged, I will create a P-R for a last commit to make GIC driver to register as a Once, done, all change proposed in this P-R will have been addressed. The next step regarding interrupt management wil likely be support for bottom half interrupt handlers, see OP-TEE/optee_docs#198. |
|
|
||
| assert(hdl && hdl->chip->ops); | ||
|
|
||
| SLIST_FOREACH(h, &hdl->chip->handlers, link) { |
There was a problem hiding this comment.
Should it be a SAFE loop has the remove will update the list?
There was a problem hiding this comment.
This part was merged with #6096.
That said, I agree, theree should be some protection here in case interrupt handlers are added/removed at runtime.
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
This P-R proposes a interrupt (controller) chip framework and moves GIC driver to that framework.
These change allows to integrate interrupt chip that multiplex interrupts on an interrupt of a parent interrupt controller (as the GIC or another interrupt chip). Interrupt consumer drivers can use generic DT bindings (properties "interrupts" and "interrupts-extended") to get their interrupt resources.
These changes preserve exiting
itr_xxx()API functions and friends related to the unique root CPU interrupt controller (likely GIC based on Arm arch). They addinterrupt_xxx()functions where interrupt controller is anstruct itr_chip, not specifically the GIC.Comments are welcome. Later addition should bring some dt_driver tests means for this interrupt chip framework.