Can't understand /proc/interrupts output for GICv3 case

Greg KH greg at kroah.com
Mon Apr 11 08:49:31 EDT 2022


On Mon, Apr 11, 2022 at 09:36:14PM +0900, Chan Kim wrote:
> Hi, 
> nobody's replying to my question.. so sad..
> I found the kernel makes an array (actually a radix tree) of 'irq_desc's. 
> And my hwirq (SPI 15) is assigned to one of these irq_descs while processing
> device tree.
> In my case it was assigned irq 6 (this irq is what is called virtual irq).
> So I registered the handler by request_irq(6,...) and the interrupt works
> fine.
> So now my question is : how can find my irq number (correct irq_desc number)
> in kernel driver module?

You ask the system for it.  It depends on the bus type your driver is
written for for how to do this.

For example, if you have a platform driver, you would call
platform_get_irq().  If you are a pci driver, the irq for your device is
already stored in the pci device structure passed into your probe
function.

What bus type is your driver written for?

hope this helps,

greg k-h



More information about the Kernelnewbies mailing list