values from pci_dev or read from config space - pci

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Tue Aug 26 09:39:50 EDT 2014


On Tue, 26 Aug 2014 08:33:18 +0200, Oscar Salvador said:

> If I get the IRQ from the pci_dev, I get a X, but if I get the IRQ
> from the config space, I get another different number Y.
>
> Would be you so kind to explain:
>
> 1- Why it's better use the values stored in pci_dev structure instead
> of read from config space.
> 2- Why the IRQ number is different? (Maybe this question is answered
> with the first question hehe)

The Linux kernel keeps track of both physical and logical IRQ numbers.
So physical IRQ 0 is often wired to a timer on x86 systems, but logical
IRQ 0 is used for NO_IRQ  in dev->irq  type usages.

Screw it, I'll let Linus explain from a decade ago:

http://yarchive.net/comp/linux/no_irq.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140826/039041e6/attachment.bin 


More information about the Kernelnewbies mailing list