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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux