Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: Move pci_iomap.c to drivers/pci/

The entirety of pci_iomap.c is guarded by an #ifdef CONFIG_PCI. It,
consequently, does not belong to lib/ because it is not generic
infrastructure.

Move pci_iomap.c to drivers/pci/ and implement the necessary changes to
Makefiles and Kconfigs.

Update MAINTAINERS file.

Update Documentation.

Link: https://lore.kernel.org/r/20240131090023.12331-3-pstanner@redhat.com
[bhelgaas: squash in https://lore.kernel.org/r/20240212150934.24559-1-pstanner@redhat.com]
Suggested-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>

authored by

Philipp Stanner and committed by
Bjorn Helgaas
ae874027 76269136

+9 -11
-3
Documentation/driver-api/device-io.rst
··· 517 517 518 518 .. kernel-doc:: arch/x86/include/asm/io.h 519 519 :internal: 520 - 521 - .. kernel-doc:: lib/pci_iomap.c 522 - :export:
+3
Documentation/driver-api/pci/pci.rst
··· 4 4 .. kernel-doc:: drivers/pci/pci.c 5 5 :export: 6 6 7 + .. kernel-doc:: drivers/pci/iomap.c 8 + :export: 9 + 7 10 .. kernel-doc:: drivers/pci/pci-driver.c 8 11 :export: 9 12
-1
MAINTAINERS
··· 16954 16954 F: include/linux/of_pci.h 16955 16955 F: include/linux/pci* 16956 16956 F: include/uapi/linux/pci* 16957 - F: lib/pci* 16958 16957 16959 16958 PCIE DRIVER FOR AMAZON ANNAPURNA LABS 16960 16959 M: Jonathan Chocron <jonnyc@amazon.com>
+5
drivers/pci/Kconfig
··· 13 13 select HAVE_PCI 14 14 select PCI 15 15 16 + # select this to provide a generic PCI iomap, 17 + # without PCI itself having to be defined 18 + config GENERIC_PCI_IOMAP 19 + bool 20 + 16 21 menuconfig PCI 17 22 bool "PCI support" 18 23 depends on HAVE_PCI
+1
drivers/pci/Makefile
··· 14 14 obj-$(CONFIG_PROC_FS) += proc.o 15 15 obj-$(CONFIG_SYSFS) += slot.o 16 16 obj-$(CONFIG_ACPI) += pci-acpi.o 17 + obj-$(CONFIG_GENERIC_PCI_IOMAP) += iomap.o 17 18 endif 18 19 19 20 obj-$(CONFIG_OF) += of.o
-3
lib/Kconfig
··· 70 70 config NO_GENERIC_PCI_IOPORT_MAP 71 71 bool 72 72 73 - config GENERIC_PCI_IOMAP 74 - bool 75 - 76 73 config GENERIC_IOMAP 77 74 bool 78 75 select GENERIC_PCI_IOMAP
-1
lib/Makefile
··· 153 153 obj-y += math/ crypto/ 154 154 155 155 obj-$(CONFIG_GENERIC_IOMAP) += iomap.o 156 - obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o 157 156 obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o 158 157 obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o 159 158 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
-3
lib/pci_iomap.c drivers/pci/iomap.c
··· 9 9 10 10 #include <linux/export.h> 11 11 12 - #ifdef CONFIG_PCI 13 12 /** 14 13 * pci_iomap_range - create a virtual mapping cookie for a PCI BAR 15 14 * @dev: PCI device that owns the BAR ··· 175 176 EXPORT_SYMBOL(pci_iounmap); 176 177 177 178 #endif /* ARCH_WANTS_GENERIC_PCI_IOUNMAP */ 178 - 179 - #endif /* CONFIG_PCI */