Shuocheng Wang
Shuocheng Wang

Reputation: 37

How to know which core that send the inter-processor interrupt?

I am working on ARM64. I add an inter-processor interrupt (IPI) handler in void handle_IPI(int ipinr, struct pt_regs *regs) in linux/arch/arm64/kernel/smp.c.

When I get an IPI, I want to know which core sends this IPI. For example, core 3 sends an IPI to core 0, then core 0 gets the IPI, I want to know that this IPI is from core 3 in the IPI handler.

Is there a way to do it?

Thanks a lot.

Upvotes: 2

Views: 1085

Answers (1)

Nopkpeter
Nopkpeter

Reputation: 11

I'm recently working on IPI on cortex-A9 platform, which is using ARM GIC as the interrupt controller. After some code reading, I found the core information is lost in irq-gic.c. Maybe you should modify the handle_IPI prototype or call your specific IPI handler before handle_IPI. Both are the ugly way of adding customized IPI handler with trigger information.

Upvotes: 1

Related Questions