On Tue, 2008-11-11 at 01:12 -0800, David Miller wrote: > From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> > Date: Tue, 11 Nov 2008 18:46:48 +1100 > > > On Mon, 2008-11-10 at 22:07 -0800, David Miller wrote: > > > Only the hierarchy under the host-controller exists in the > > > Linux data structures. > > > > Or do you mean you don't have a pci_dev that represents the host > > controller ? In that case, yes, that's common and not an issue with the > > legacy files, they are under the directory of the bus classdev which is > > tied to the actual struct pci_bus (a slightly strange location tho, took > > me some time to actually find them the first time around). > > Ahh, ok, lack of pci_dev representing the root host controller > was indeed the sparc64 case I was talking about. > > Thanks for the clarification. Note that in any case, you won't get the legacy_io and legacy_mem file unless you implement the appropriate hooks and define HAVE_PCI_LEGACY. Until recently, I think only ia64 did :-) I did a powerpc implementation (while also adding support for mmap of IO space for archs where it makes sense). It shouldn't be hard I suppose to do a sparc64 one too. Once I've finished ironing out a couple of issues related to that, I'll start hacking X to -properly- use that once for all (at least on powerpc, even with libpciaccess, it still does horrible things to /dev/mem for IO space that are broken on various setups). BTW. To test that stuff, I've put together a little tool to POST PC video cards using x86emu that entirely relies on sysfs for HW access. It's a bit hackish, it doesn't do VGA arbitration (we -really- need the kernel to do it) but it's a good way to test that stuff. I'll put it online somewhere. Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html