* what exactly does the kernel config var "PCIEPORTBUS" represent?
@ 2014-05-21 7:25 Robert P. J. Day
0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2014-05-21 7:25 UTC (permalink / raw)
To: Linux PCI mailing list
am currently writing a short tutorial on PCIe for an upcoming
drivers class, and i'm getting a bit confused by how the PCIe code is
laid out.
over in drivers/pci/, the Makefile contains the predictable lines:
# Build PCI Express stuff if needed
obj-$(CONFIG_PCIEPORTBUS) += pcie/
which initially suggested that that Kconfig variable is entirely
responsible for selecting PCIe support throughout the kernel. or so i
thought.
for the board i'm playing with, i have a PCIe slot and an intel
wireless Advanced-N 6235 wifi card, so decided to use that as an
example, so i popped over to drivers/net/wireless/iwlwifi/, and in the
Makefile, one finds:
obj-$(CONFIG_IWLWIFI) += iwlwifi.o
iwlwifi-objs += iwl-io.o
iwlwifi-objs += iwl-drv.o
iwlwifi-objs += iwl-debug.o
iwlwifi-objs += iwl-notif-wait.o
iwlwifi-objs += iwl-eeprom-read.o iwl-eeprom-parse.o
iwlwifi-objs += iwl-phy-db.o iwl-nvm-parse.o
iwlwifi-objs += pcie/drv.o pcie/rx.o pcie/tx.o pcie/trans.o
in other words, the pcie/ directory is compiled with no dependency on
PCIEPORTBUS, which i found confusing. i verified that by configuring a
kernel build without PCIEPORTBUS and, sure enough, everything in that
pcie/ directory was compiled.
i asked about this on the linux-wireless list and there was a bit of
confusion there as well. one person wrote:
"The whole driver depends on CONFIG_PCI, maybe it should depend on
something more PCIe specific, but that wasn't easy to sort out, and
the APIs it needs aren't PCIe specific afaict."
while someone else verified that, yes, this is indeed the case,
writing:
"A number of PCIe specific calls are under CONFIG_PCI, ie.
pcie_capability_*() et al."
is this clarified somewhere? it's kind of confusing to learn that,
even without PCIEPORTBUS, the kernel still needs some level of PCIe
support for certain drivers. or however one is supposed to read this.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-21 7:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 7:25 what exactly does the kernel config var "PCIEPORTBUS" represent? Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).