how to trace bus_* functions?

Sepherosa Ziehau sepherosa at gmail.com
Mon Jun 12 21:17:34 PDT 2006


On 6/12/06, Chuck Tuffli <ctuffli at xxxxxxxxx> wrote:
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
       |
"legacypci"
      |
 host bus
      |
PCI - PCI bridge
      |
"pci"
  |
 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()
Take a look at sys/bus/pci/i386/pcibus.c, it will show you how
"pcib"(special one) "legacypci" and "nexus" are connected.
Best Regards,
sephe
--
Live Free or Die




More information about the Kernel mailing list