Thread (9 messages) flat view 9 messages, 5 authors, 2008-02-14

Re: /proc/bus/pci and domains

From: Greg KH <hidden>
Date: 2008-02-14 05:00:00

On Wed, Feb 13, 2008 at 04:53:55PM +0100, Martin Mares wrote:
Hi Greg et al.,

I have noticed that lspci with the proc back-end does not work properly
on ppc64. The problem turned out to be a strange hack in drivers/pci/proc.c
causing the following behavior on machines with multiple PCI domains:
The directory names under /proc/bus/pci/ have a domain number added (which
is not backward compatible, but at least consistent), but on the other hand
/proc/bus/pci/devices contains bus numbers without the domains, happily
making multiple entries with the same bus and device number.

Is there any serious reason for this behavior?
I have no idea, it sounds like a PPC specific thing, not anything the
PCI core does, right?  So I'll add the ppc list to the cc: and ask if
anyone there has any ideas?

Rest of the original email follows...
The original /proc/bus/pci/ (as I have designed it years ago) does not
have any means of carrying the domain numbers, so it cannot be solved
in a backward-compatible way, but the inconsistency between the list of
devices and the actual directories leaves me puzzled.

Wouldn't it be better to make the same backward-incompatible change
in /proc/bus/pci/devices, so that at least new programs can use the
thing?

Of course, all this is of minor importance as all new programs know
how to use the sysfs anyway (I have found the problem only because
I forgot to mount sysfs to a chroot), but if we want to keep /proc/bus/pci/,
we should fix it.

				Have a nice fortnight
-- 
Martin `MJ' Mares                          [off-list ref]   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Entropy isn't what it used to be.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help