Hello,
I have a dual core system. On Core 0 I use Linux and on Core 1 I use a Bare Metal System. I send a software generated interrupt from my Bare Metal System to Linux but I cannot catch the interrupt in Linux. How can I register a SGI interrupt in Linux? Request_irq() returns an error for SGI’s..
Thanks!
Did you solved this problem, I also encountered this problem
Yes, I got it. In the directory /arch/arm/kernel/smp.c you can find the function handle_IPI. There is a SWITCH CASE inside the function where you can add a new case for your IPI. The case number is equal to IPI number!
Regards
Chris
If I need to use SGI to capture an interrupt in both cores in AMP mode, do I need to register the interrupt function in both cores separately, will this interfere?
Thanks.
I use the IPI only in one direction from bare-metal to linux. Maybe you can search for something like send IPI in linux sources...
In my opinion you must register the interrupt function in both cores separately.
Hi Chris,
How did you registered the irq handler on Linux side? You have an example?
Is it correct to use SMP handle_IPI in AMP scheme?
I have the same requirements as the ones described in this topic.
request_irq does not work for me I get -22 error and I have the SGI defined in intc node in device tree.
I need to catch it in some device driver.
Best regards,
Mihaita
Thank you for your answer, and I would like to ask another question. What API to use in a linux system to interrupt a bare-metal system.
Thanks again.
Hi Chris
seems this is not supported in bsp, one can look at suggestions on
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thanks for your reply. I have looked at your link and I think the solution in the link was that they used the function set_ipi_handlers instead of request_irq. The function set_ipi_handlers is from XILINX BSP and not available in freescale's /smp.c. There should be a way to register an ISR for interrupt 0..15 (SGI).
Regards
Chris