how to trace bus_* functions?

Chuck Tuffli ctuffli at gmail.com
Mon Jun 12 18:05:36 PDT 2006


I'm trying to decipher the object hierarchy for bus_setup_intr() and
am getting lost. Adding printf's to bus_setup_intr, pci_setup_intr,
bus_generic_setup_intr, and nexus_setup_intr both cleared up and
confused the situation a bit. Here is the calling chain as derived
from the printf's:
1) bus_setup_intr(dev->desc="(null)")
2) pci_setup_intr(dev->desc="PCI bus", child->desc="(null)")
3) bus_generic_setup_intr(dev->desc="PCI to PCI bridge")
4) pci_setup_intr(dev->desc="PCI bus", child->desc="(null)")
5) bus_generic_setup_intr(dev->desc="Host to PCI bridge")
6) bus_generic_setup_intr(dev->desc="(null)")
7) nexus_setup_intr(bus->desc="(null)" child->desc="(null)")
So does this mean the heirarchy is

 nexus
     |
host bus
     |
PCI - PCI bridge
     |
PCI device
Also, I think I understand the flow up through step 5 but don't
understand how the BUS_SETUP_INTR() macro in bus_generic_setup_intr()
resolves to pci_setup_intr(), itself, and nexus_setup_intr().
Is there a better way to go about this? TIA.
---chuck





More information about the Kernel mailing list