Skip to content

Commit ae87402

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
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/[email protected] [bhelgaas: squash in https://lore.kernel.org/r/[email protected]] Suggested-by: Danilo Krummrich <[email protected]> Signed-off-by: Philipp Stanner <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]>
1 parent 7626913 commit ae87402

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

Documentation/driver-api/device-io.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,3 @@ Public Functions Provided
517517

518518
.. kernel-doc:: arch/x86/include/asm/io.h
519519
:internal:
520-
521-
.. kernel-doc:: lib/pci_iomap.c
522-
:export:

Documentation/driver-api/pci/pci.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ PCI Support Library
44
.. kernel-doc:: drivers/pci/pci.c
55
:export:
66

7+
.. kernel-doc:: drivers/pci/iomap.c
8+
:export:
9+
710
.. kernel-doc:: drivers/pci/pci-driver.c
811
:export:
912

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16954,7 +16954,6 @@ F: include/asm-generic/pci*
1695416954
F: include/linux/of_pci.h
1695516955
F: include/linux/pci*
1695616956
F: include/uapi/linux/pci*
16957-
F: lib/pci*
1695816957

1695916958
PCIE DRIVER FOR AMAZON ANNAPURNA LABS
1696016959
M: Jonathan Chocron <[email protected]>

drivers/pci/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ config FORCE_PCI
1313
select HAVE_PCI
1414
select PCI
1515

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+
1621
menuconfig PCI
1722
bool "PCI support"
1823
depends on HAVE_PCI

drivers/pci/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ifdef CONFIG_PCI
1414
obj-$(CONFIG_PROC_FS) += proc.o
1515
obj-$(CONFIG_SYSFS) += slot.o
1616
obj-$(CONFIG_ACPI) += pci-acpi.o
17+
obj-$(CONFIG_GENERIC_PCI_IOMAP) += iomap.o
1718
endif
1819

1920
obj-$(CONFIG_OF) += of.o

lib/pci_iomap.c renamed to drivers/pci/iomap.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <linux/export.h>
1111

12-
#ifdef CONFIG_PCI
1312
/**
1413
* pci_iomap_range - create a virtual mapping cookie for a PCI BAR
1514
* @dev: PCI device that owns the BAR
@@ -176,5 +175,3 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *p)
176175
EXPORT_SYMBOL(pci_iounmap);
177176

178177
#endif /* ARCH_WANTS_GENERIC_PCI_IOUNMAP */
179-
180-
#endif /* CONFIG_PCI */

lib/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ source "lib/math/Kconfig"
7070
config NO_GENERIC_PCI_IOPORT_MAP
7171
bool
7272

73-
config GENERIC_PCI_IOMAP
74-
bool
75-
7673
config GENERIC_IOMAP
7774
bool
7875
select GENERIC_PCI_IOMAP

lib/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any)
153153
obj-y += math/ crypto/
154154

155155
obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
156-
obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o
157156
obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
158157
obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
159158
obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o

0 commit comments

Comments
 (0)