core interrupt: use device tree data - #6361
Conversation
|
Once you're done with the initial preparations of the PR, please squash in the fixups. |
77499da to
4eb3dc3
Compare
|
I've squashed the fixup commits. |
jforissier
left a comment
There was a problem hiding this comment.
One small comment for "core: interrupt: registering interrupt providers", with or without it:
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
jforissier
left a comment
There was a problem hiding this comment.
"core: dt_driver: don't enforce phandle 1st arg is a phandle":
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
jforissier
left a comment
There was a problem hiding this comment.
"core: interrupt: add interrupt_create_handler()":
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
jforissier
left a comment
There was a problem hiding this comment.
"drivers: gic: register to dt_driver":
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
jforissier
left a comment
There was a problem hiding this comment.
"drivers: gic: use DT bindings":
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
4eb3dc3 to
16df82c
Compare
|
#6361 (comment) addressed. I've created a P-R in optee_docs for these new API functions: OP-TEE/optee_docs#218. |
|
Please rebase onto master to fix the IBART error, thanks! |
|
right, thanks. |
16df82c to
5755be4
Compare
|
rebased |
|
Arrg! IBART still fails. |
Memory allocation error. Maybe a larger |
|
I did not expect this change would make such platforms to consume more heap. IBART does not use DT for OP-TEE drivers inits. |
|
Comment addressed. |
|
oups... needs some rebasing. |
a528603 to
7bddbfd
Compare
|
rebased. |
|
If "core: kernel: dt_driver: reference output device reference as void *" was possible before, why did we ever have pointer-pointers as arguments to those functions? |
|
My bad. The several driver frameworks use Note I will place commit "core: kernel: dt_driver: reference output device reference as void *" at the beginning of the series when I will squash the fixup commits. |
|
Feel free to squash the fixup commits now. I'll take another look once it's done. |
7bddbfd to
eac12f4
Compare
|
I've squashed the fixup commits and reordered the series. @jforissier, I removed your A-b tag from commits "core: interrupt: registering interrupt providers" |
|
|
|
257be21 to
bb1d48a
Compare
|
@jbech-linaro, could you help me understand why IBART fails with this series? #6361 (comment) mentions a core heap exhaustion but since the platform used by IBART does not embed any secure DTB, I don't understand why these changes make the platform to consume more core heap. (edited) |
|
I forgot to mention that i've applied the review tags. |
bb1d48a to
9e8ef57
Compare
|
As discussed in email. I've been able to reproduce the error on two difference machines. So, although I don't now that causes it, it at least seems reproducible. |
Changes local function device_from_provider_prop() to assume its argument @prop points to the first argument to pass with phandle. This change allows a later change to support other DT bindings ("interrupts" property) where 1st cell of the property is not a phandle but the 1st phandle argument to be passed. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Changes dt_driver API function to reference device reference as void * instead of void ** which could be confusing as the reference can be a pointer to a device pointer (e.g. in clk_dt.c) or a pointer to a structure (e.g. interrupt.c). Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Adds interrupt chip framework API functions for an interrupt controller to register as an interrupt provider in the driver probing sequence based on device tree. This allows interrupt consumer to be deferred when a dependent interrupt controller is not yet initialized. Interrupt controllers register a driver in DT_DRIVER providers list with: interrupt_register_provider(). Interrupt consumer can get their interrupt through DT data with interrupt_dt_get(), interrupt_dt_get_by_index() or interrupt_dt_get_by_name(). This change removes inclusion of interrupt.h from kernel/dt.h as it is not needed and conflicts with inclusion of kernel/dt.h from kernel/interrupt.h. Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Adds interrupt_create_handler() API function in interrupt framework. The function is to be used with interrupt controls obtained from the DT with interrupt_dt_get() interrupt_dt_get_by_index() or interrupt_dt_get_by_name(). The function differs from legacy interrupt_add_handler() in that this latter always reconfigure the interrupt while new interrupt_create_handler() function assumes the interrupt was configured from interrupt_dt_get() or friends. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Registers GIC driver as an interrupt controller in DT_DRIVER providers when DT is supported. This change allows interrupt consumer nodes to leverage interrupts and interrupts-extended properties DT bindings for their device drivers to retrieve their interrupts. Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Use DT bindings GIC_PPI and GIC_SIP instead of 1 and 0 raw values. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
f9bd1e0 to
9a670cd
Compare
|
IBART CI test failure should be fixed by OP-TEE/optee_test#711. |
|
IBART's happy! |
Following changes done recently in the interrupt framework, this P-R is based on #6097. It provides means to use DT bindings to describe interrupts and their controllers.
2nd commit adds an API function (
dt_register_interrupt_provider())for interrupt controller drivers to register as itr_chip providers into the DT_DRIVER framework and few API functions for consumer driver to use DT info to find their interrupt (interrupt_dt_get(),interrupt_dt_get_by_index(),interrupt_dt_get_by_name()).3rd commit Adds a API function to register a callback handler for an interrupt.
interrupt_create_handler()differs from existinginterrupt_add_handler()in that the former does not reconfigure the interrupt since already done byinterrupt_dt_get()or friend. Maybeinterrupt_add_handler2()would be a better label.Last commit registers GIC driver as a
DT_DRIVER_INTERRUPTdriver so that interrupt consumer drivers can useinterrupt_dt_get_by_index()and friends.