core interrupt: few new API functions - #6354
Conversation
|
Hello @etienne-lms For commit void plic_it_handle(void)
{
struct plic_data *pd = &plic_data;
uint32_t id = plic_claim_interrupt(pd);
if (id <= pd->max_it)
- itr_handle(id);
+ interrupt_call_handlers(&pd->chip, id);
else
DMSG("ignoring interrupt %" PRIu32, id);
plic_complete_interrupt(pd, id);
} |
Hello @gagachang, sure, I missed it. I'll do. Thanks for reporting. |
a16695b to
49b4c68
Compare
|
comment addressed |
|
Thanks! |
jforissier
left a comment
There was a problem hiding this comment.
One question, in any case:
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
| * @cpu_mask Mask of the CPUs targeted by the interrupt | ||
| */ | ||
| static inline void interrupt_raise_sgi(struct itr_chip *chip, size_t itr_num, | ||
| uint8_t cpu_mask) |
There was a problem hiding this comment.
Not strictly related to this PR, but... I notice that cpu_mask is an uint8_t, does it mean the API can only support at most 8 cores? Or perhaps a "CPU" is not a core? (the comment near itr_raise_sgi() mentions a "cpu interface").
There was a problem hiding this comment.
Actually I mimicked the existing GIC function API. As for a generic purpose interrupt controller framework, I don't think "raise SGI" or "raise PPI" really make sense but I propose to postpone this to later, once there's a need.
49b4c68 to
37aa907
Compare
|
Fixup commits squashed and review tags applied. |
jenswikl
left a comment
There was a problem hiding this comment.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Removes itr_handle() in favor to interrupt_call_handlers(). This changes updates all implemented main interrupt controller drivers that are the GIC driver, the HFIC driver and Atmel SAIC driver. Reviewed-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Adds interrupt API function interrupt_alloc_add_conf_handler() to allocate, configure and register an interrupt handler, providing interrupt type and priority. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Defines helper API functions to call .raise_pi, .raise_sgi and .set_affinity handlers of a chip controller. Defines API function to query support of these handlers in the interrupt controller. Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
37aa907 to
0b8c5dc
Compare
|
Tag applied. Thanks for the review. |
|
Thanks for the merge. |
Before summer, few P-Rs, incl. #6087, #6088 and #6096 were merged to introduce interrupt controller devices in OP-TEE core, for staged controllers and interrupts multiplexing.
I let P-R #6113 stall before summer. This P-R presents the 3 first commits from #6113, in order to finalize the integration of the interrupt framework APIs (goal: pass an itrchip reference).
On can see in #6113 the next changes that would follow this series: upgrading the few core/drivers/ source files to use the new API framework
interrupt_xxx()functions then remove the deprecateditr_xxx()functions.