From: Jon Smirl <jonsmirl@gmail.com>
To: lkml <linux-kernel@vger.kernel.org>
Subject: structure of /sys/class/pci_bus
Date: Sat, 4 Sep 2004 19:39:00 -0400 [thread overview]
Message-ID: <9e4733910409041639457fd46b@mail.gmail.com> (raw)
I'm having some trouble with the way sysfs is structured for multiple
PCI busses.
[jonsmirl@smirl /]$ ls sys/class/pci_bus
0000:00 0000:01 0000:02
I have three busses in my system. It is Intel i875P.
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:00
bridge cpuaffinity
Normal pci_bus entry
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:00/bridge -l
lrwxrwxrwx 1 root root 0 Sep 4 13:10
sys/class/pci_bus/0000:00/bridge -> ../../../devices/pci0000:00
bridge for bus 0 is pci0000:00
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:01/bridge -l
lrwxrwxrwx 1 root root 0 Sep 4 13:10
sys/class/pci_bus/0000:01/bridge ->
../../../devices/pci0000:00/0000:00:01.0
bridge for bus 0 is pci0000:00/0000:00:01.0
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:02/bridge -l
lrwxrwxrwx 1 root root 0 Sep 4 13:10
sys/class/pci_bus/0000:02/bridge ->
../../../devices/pci0000:00/0000:00:1e.0
bridge for bus 2 is pci0000:00/0000:00:1e.0
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:00/bridge
0000:00:00.0 0000:00:1d.0 0000:00:1d.2 0000:00:1d.7 0000:00:1f.0
0000:00:1f.2 0000:00:1f.5 power
0000:00:01.0 0000:00:1d.1 0000:00:1d.3 0000:00:1e.0 0000:00:1f.1
0000:00:1f.3 detach_state
But bridge 0 is not linked to a bridge node. It is linked to the host
device node instead. This is not symetrical with bus 1 and 2.
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:01/bridge
0000:01:00.0 class detach_state irq resource subsystem_vendor
0000:01:00.1 config device power subsystem_device vendor
This is what a normal bridge node looks like
[jonsmirl@smirl /]$ cat sys/class/pci_bus/0000:01/bridge/class
0x060400
Bridge is a PCI bridge
[jonsmirl@smirl /]$ ls sys/class/pci_bus/0000:00/bridge/0000:00:00.0
class config detach_state device irq power resource
subsystem_device subsystem_vendor vendor
This is the real bridge node for bus 0.
[jonsmirl@smirl /]$ cat sys/class/pci_bus/0000:00/bridge/0000:00:00.0/class
0x060000
Class is Host bridge. Host bridge has two nodes in sysfs, a device
node, pci0000:00, and a pci_device node, 0000:00:00.0.
[jonsmirl@smirl /]$ ls sys/devices
pci0000:00 platform system
This shows the top level Host bridge.
Starting from here, how I am supposed to figure out that 0000:00:00.0
is the PCI device for controlling this bridge?
--
Jon Smirl
jonsmirl@gmail.com
reply other threads:[~2004-09-04 23:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e4733910409041639457fd46b@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox