On Sat, 17 May 2014, Bjorn Helgaas wrote: > On Sat, May 17, 2014 at 5:29 AM, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> wrote: > > > > digging through the current PCI code and Kconfig files and it seems > > like some of that could be made simpler, but i'm willing to be > > convinced otherwise. > > I'm sure it could be cleaned up, and it would be great if you did! > > I don't know the reason why all the arches source > drivers/pci/pcie/Kconfig directly; it seems like that should be done > from drivers/pci/Kconfig. > > > first, from arch/x86/Kconfig, rather than simply sourcing the file > > "drivers/pci/Kconfig" (as is done with many other drivers > > directories), that Kconfig file defines: > > > > menu "Bus options (PCI etc.)" > > > > config PCI > > bool "PCI support" > > default y > > ... snip ... > > > > and later on, sources the Kconfig files for PCI and PCIe individually: > > > > source "drivers/pci/pcie/Kconfig" > > > > source "drivers/pci/Kconfig" > > > > and even further down, finally sources the file for PCI hotplug after > > PCMCIA: > > > > source "drivers/pcmcia/Kconfig" > > > > source "drivers/pci/hotplug/Kconfig" ... snip ... > I don't know all the history behind what we have now, so I can't > give you much advice. I think you just have to work through the > process of simplifying things and see whether it turns out to be > feasible. one of the quirky features of the current Kconfig layout is that, in some arch Kconfig files, the main PCI content is included, then pcmcia, *then* PCI hotplug, which means that when you pop into something like "make menuconfig" and wander over to the PCI menu, you see the majority of PCI selections, then the selection for PCCard, and *then* the choice for PCI hotplug, which strikes me as just, well, odd and confusing since, if you deselect PCI entirely, almost everything goes away except for (you guessed it) PCCard. (and that framebuffer selection as well.) as you say, there may be some historical inertia as to why things were done this way, but is there any *technical* reason why everything PCI-related can't just hang off of the drivers/pci/ directory via a single "source" directive? rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== -- 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