Skip to content

Commit 47c94b2

Browse files
committed
Merge branch 'pci/devres'
- Unmap MMIO mappings in pci_iounmap() to avoid a leak when ARCH_HAS_GENERIC_IOPORT_MAP is defined (Philipp Stanner) - Move pci_iomap.c to drivers/pci/ since it's all PCI-related (Philipp Stanner) - Move other PCI-related devres code from lib/devres.c to drivers/pci/ (Philipp Stanner) - Move other devres code from pci.c to devres.c (Philipp Stanner) * pci/devres: PCI: Move devres code from pci.c to devres.c PCI: Move PCI-specific devres code to drivers/pci/ PCI: Move pci_iomap.c to drivers/pci/ pci_iounmap(): Fix MMIO mapping leak
2 parents 239981b + 815a390 commit 47c94b2

File tree

12 files changed

+484
-469
lines changed

12 files changed

+484
-469
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ PCI Support Library
44
.. kernel-doc:: drivers/pci/pci.c
55
:export:
66

7+
.. kernel-doc:: drivers/pci/iomap.c
8+
:export:
9+
10+
.. kernel-doc:: drivers/pci/devres.c
11+
:export:
12+
713
.. kernel-doc:: drivers/pci/pci-driver.c
814
:export:
915

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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
obj-$(CONFIG_PCI) += access.o bus.o probe.o host-bridge.o \
66
remove.o pci.o pci-driver.o search.o \
77
pci-sysfs.o rom.o setup-res.o irq.o vpd.o \
8-
setup-bus.o vc.o mmap.o setup-irq.o
8+
setup-bus.o vc.o mmap.o setup-irq.o devres.o
99

1010
obj-$(CONFIG_PCI) += msi/
1111
obj-$(CONFIG_PCI) += pcie/
@@ -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

0 commit comments

Comments
 (0)