PCI: add CONFIG_MMU dependency
Subsystems (23)
PATCH v2 1/1 PCI: add CONFIG_MMU dependency
From: Arnd Bergmann <[email protected]>
It turns out that there are no platforms that have PCI but don't have an MMU, so adding a Kconfig dependency on CONFIG_PCI simplifies build testing kernels for those platforms a lot, and avoids a lot of inadvertent build regressions.
Add a dependency for CONFIG_PCI and remove all the ones for PCI specific device drivers that are currently marked not having it.
There are a few platforms that have an optional MMU, but they usually cannot have PCI at all. The one exception is Coldfire MCF54xx, but this is mainly for historic reasons, and anyone using those chips should really use the MMU these days.
---
v2: update changelog text
Bjorn, can you take this through the PCI tree? I thought about splitting it up by subsystem, but it's really one thing that I'm doing here, and doing it in one bit makes more sense to me.
--- drivers/accel/qaic/Kconfig | 1 - drivers/firewire/Kconfig | 2 +- drivers/gpu/drm/Kconfig | 2 +- drivers/gpu/drm/amd/amdgpu/Kconfig | 3 +-- drivers/gpu/drm/ast/Kconfig | 2 +- drivers/gpu/drm/gma500/Kconfig | 2 +- drivers/gpu/drm/hisilicon/hibmc/Kconfig | 1 - drivers/gpu/drm/loongson/Kconfig | 2 +- drivers/gpu/drm/mgag200/Kconfig | 2 +- drivers/gpu/drm/nouveau/Kconfig | 3 +-- drivers/gpu/drm/qxl/Kconfig | 2 +- drivers/gpu/drm/radeon/Kconfig | 2 +- drivers/gpu/drm/tiny/Kconfig | 2 +- drivers/gpu/drm/vmwgfx/Kconfig | 2 +- drivers/gpu/drm/xe/Kconfig | 2 +- drivers/net/ethernet/broadcom/Kconfig | 1 - drivers/pci/Kconfig | 1 + drivers/pci/pci.c | 4 ++-- drivers/scsi/bnx2fc/Kconfig | 1 - drivers/scsi/bnx2i/Kconfig | 1 - drivers/vfio/pci/Kconfig | 2 +- 21 files changed, 17 insertions(+), 23 deletions(-)
drivers/accel/qaic/Kconfig +0 -1
@@ -8,7 +8,6 @@ config DRM_ACCEL_QAIC depends on DRM_ACCEL depends on PCI && HAS_IOMEM depends on MHI_BUS - depends on MMU select CRC32 help Enables driver for Qualcomm's Cloud AI accelerator PCIe cards that are
drivers/firewire/Kconfig +1 -1
@@ -83,7 +83,7 @@ config FIREWIRE_KUNIT_SELF_ID_SEQUENCE_HELPER_TEST config FIREWIRE_OHCI tristate "OHCI-1394 controllers" - depends on PCI && FIREWIRE && MMU + depends on PCI && FIREWIRE help Enable this driver if you have a FireWire controller based on the OHCI specification. For all practical purposes, this
drivers/gpu/drm/Kconfig +1 -1
@@ -393,7 +393,7 @@ source "drivers/gpu/drm/imagination/Kconfig" config DRM_HYPERV tristate "DRM Support for Hyper-V synthetic video device" - depends on DRM && PCI && MMU && HYPERV + depends on DRM && PCI && HYPERV select DRM_CLIENT_SELECTION select DRM_KMS_HELPER select DRM_GEM_SHMEM_HELPER
drivers/gpu/drm/amd/amdgpu/Kconfig +1 -2
@@ -2,7 +2,7 @@ config DRM_AMDGPU tristate "AMD GPU" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on !UML select FW_LOADER select DRM_CLIENT
@@ -68,7 +68,6 @@ config DRM_AMDGPU_CIK config DRM_AMDGPU_USERPTR bool "Always enable userptr write support" depends on DRM_AMDGPU - depends on MMU select HMM_MIRROR select MMU_NOTIFIER help
drivers/gpu/drm/ast/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_AST tristate "AST server chips" - depends on DRM && PCI && MMU + depends on DRM && PCI select DRM_CLIENT_SELECTION select DRM_GEM_SHMEM_HELPER select DRM_KMS_HELPER
drivers/gpu/drm/gma500/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_GMA500 tristate "Intel GMA500/600/3600/3650 KMS Framebuffer" - depends on DRM && PCI && X86 && MMU && HAS_IOPORT + depends on DRM && PCI && X86 && HAS_IOPORT select DRM_CLIENT_SELECTION depends on ACPI_VIDEO || !ACPI depends on I2C
drivers/gpu/drm/hisilicon/hibmc/Kconfig +0 -1
@@ -2,7 +2,6 @@ config DRM_HISI_HIBMC tristate "DRM Support for Hisilicon Hibmc" depends on DRM && PCI - depends on MMU select DRM_CLIENT_SELECTION select DRM_DISPLAY_HELPER select DRM_DISPLAY_DP_HELPER
drivers/gpu/drm/loongson/Kconfig +1 -1
@@ -2,7 +2,7 @@ config DRM_LOONGSON tristate "DRM support for Loongson Graphics" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on LOONGARCH || MIPS || COMPILE_TEST select DRM_CLIENT_SELECTION select DRM_KMS_HELPER
drivers/gpu/drm/mgag200/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_MGAG200 tristate "Matrox G200" - depends on DRM && PCI && MMU + depends on DRM && PCI select DRM_CLIENT_SELECTION select DRM_GEM_SHMEM_HELPER select DRM_KMS_HELPER
drivers/gpu/drm/nouveau/Kconfig +1 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_NOUVEAU tristate "Nouveau (NVIDIA) cards" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on (ACPI_VIDEO && ACPI_WMI && MXM_WMI) || !(ACPI && X86) depends on BACKLIGHT_CLASS_DEVICE select IOMMU_API
@@ -86,7 +86,6 @@ config DRM_NOUVEAU_SVM bool "(EXPERIMENTAL) Enable SVM (Shared Virtual Memory) support" depends on DEVICE_PRIVATE depends on DRM_NOUVEAU - depends on MMU depends on STAGING select HMM_MIRROR select MMU_NOTIFIER
drivers/gpu/drm/qxl/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_QXL tristate "QXL virtual GPU" - depends on DRM && PCI && MMU && HAS_IOPORT + depends on DRM && PCI && HAS_IOPORT select DRM_CLIENT_SELECTION select DRM_KMS_HELPER select DRM_TTM
drivers/gpu/drm/radeon/Kconfig +1 -1
@@ -2,7 +2,7 @@ config DRM_RADEON tristate "ATI Radeon" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on AGP || !AGP select FW_LOADER select DRM_CLIENT_SELECTION
drivers/gpu/drm/tiny/Kconfig +1 -1
@@ -37,7 +37,7 @@ config DRM_BOCHS config DRM_CIRRUS_QEMU tristate "Cirrus driver for QEMU emulated device" - depends on DRM && PCI && MMU + depends on DRM && PCI select DRM_CLIENT_SELECTION select DRM_KMS_HELPER select DRM_GEM_SHMEM_HELPER
drivers/gpu/drm/vmwgfx/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on (X86 && HYPERVISOR_GUEST) || ARM64 select DRM_CLIENT_SELECTION select DRM_TTM
drivers/gpu/drm/xe/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_XE tristate "Intel Xe Graphics" - depends on DRM && PCI && MMU && (m || (y && KUNIT=y)) + depends on DRM && PCI && (m || (y && KUNIT=y)) depends on INTEL_VSEC select INTERVAL_TREE # we need shmfs for the swappable backing store, and in particular
drivers/net/ethernet/broadcom/Kconfig +0 -1
@@ -98,7 +98,6 @@ config BNX2 config CNIC tristate "QLogic CNIC support" depends on PCI && (IPV6 || IPV6=n) - depends on MMU select BNX2 select UIO help
drivers/pci/Kconfig +1 -0
@@ -21,6 +21,7 @@ config GENERIC_PCI_IOMAP menuconfig PCI bool "PCI support" depends on HAVE_PCI + depends on MMU help This option enables support for the PCI local bus, including support for PCI-X and the foundations for PCI Express support.
drivers/pci/pci.c +2 -2
@@ -4257,7 +4257,7 @@ unsigned long __weak pci_address_to_pio(phys_addr_t address)#ifndef pci_remap_iospaceint pci_remap_iospace (const struct resource *res,phys_addr_t phys_addr) { -#if defined(PCI_IOBASE ) && defined(CONFIG_MMU ) +#if defined(PCI_IOBASE )unsigned long vaddr = (unsigned long )PCI_IOBASE + res->start;if (!(res->flags &IORESOURCE_IO ))
@@ -4290,7 +4290,7 @@ EXPORT_SYMBOL(pci_remap_iospace);*/ void pci_unmap_iospace (struct resource *res) { -#if defined(PCI_IOBASE ) && defined(CONFIG_MMU ) +#if defined(PCI_IOBASE )unsigned long vaddr = (unsigned long )PCI_IOBASE + res->start;vunmap_range (vaddr, vaddr +resource_size (res));
drivers/scsi/bnx2fc/Kconfig +0 -1
@@ -5,7 +5,6 @@ config SCSI_BNX2X_FCOE depends on (IPV6 || IPV6=n) depends on LIBFC depends on LIBFCOE - depends on MMU select NETDEVICES select ETHERNET select NET_VENDOR_BROADCOM
drivers/scsi/bnx2i/Kconfig +0 -1
@@ -4,7 +4,6 @@ config SCSI_BNX2_ISCSI depends on NET depends on PCI depends on (IPV6 || IPV6=n) - depends on MMU select SCSI_ISCSI_ATTRS select NETDEVICES select ETHERNET
drivers/vfio/pci/Kconfig +1 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only menu "VFIO support for PCI devices" - depends on PCI && MMU + depends on PCI config VFIO_PCI_CORE tristate
Signature · 1 line
2.39.5
Bjorn Helgaas
AppliedQuoted 20 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
It turns out that there are no platforms that have PCI but don't have an MMU, so adding a
Kconfigdependency onCONFIG_PCIsimplifies build testing kernels for those platforms a lot, and avoids a lot of inadvertent build regressions.Add a dependency for
CONFIG_PCIand remove all the ones for PCI specific device drivers that are currently marked not having it.There are a few platforms that have an optional MMU, but they usually cannot have PCI at all. The one exception is Coldfire MCF54xx, but this is mainly for historic reasons, and anyone using those chips should really use the MMU these days.
Reviewed-by Martin K. Petersen <[email protected]> # SCSIAcked-by Alex Deucher <[email protected]>Reviewed-by Thomas Zimmermann <[email protected]>Cc Bjorn Helgaas <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>
Quoted 6 lines
---
v2: update changelog textBjorn, can you take this through the PCI tree? I thought about splitting it up by subsystem, but it's really one thing that I'm doing here, and doing it in one bit makes more sense to me.
Applied to pci/misc for v6.16, thanks!
The PCI tree is based on -rc1, so there were a few minor merge conflicts, but they're obvious.
Quoted 318 lines
--- drivers/accel/qaic/Kconfig | 1 - drivers/firewire/Kconfig | 2 +- drivers/gpu/drm/Kconfig | 2 +- drivers/gpu/drm/amd/amdgpu/Kconfig | 3 +-- drivers/gpu/drm/ast/Kconfig | 2 +- drivers/gpu/drm/gma500/Kconfig | 2 +- drivers/gpu/drm/hisilicon/hibmc/Kconfig | 1 - drivers/gpu/drm/loongson/Kconfig | 2 +- drivers/gpu/drm/mgag200/Kconfig | 2 +- drivers/gpu/drm/nouveau/Kconfig | 3 +-- drivers/gpu/drm/qxl/Kconfig | 2 +- drivers/gpu/drm/radeon/Kconfig | 2 +- drivers/gpu/drm/tiny/Kconfig | 2 +- drivers/gpu/drm/vmwgfx/Kconfig | 2 +- drivers/gpu/drm/xe/Kconfig | 2 +- drivers/net/ethernet/broadcom/Kconfig | 1 - drivers/pci/Kconfig | 1 + drivers/pci/pci.c | 4 ++-- drivers/scsi/bnx2fc/Kconfig | 1 - drivers/scsi/bnx2i/Kconfig | 1 - drivers/vfio/pci/Kconfig | 2 +- 21 files changed, 17 insertions(+), 23 deletions(-)drivers/accel/qaic/Kconfig +0
-1@@ -8,7 +8,6 @@ config DRM_ACCEL_QAIC depends on DRM_ACCEL depends on PCI && HAS_IOMEM depends on MHI_BUS - depends on MMU select CRC32 help Enables driver for Qualcomm's Cloud AI accelerator PCIe cards that aredrivers/firewire/Kconfig +1
-1@@ -83,7 +83,7 @@ config FIREWIRE_KUNIT_SELF_ID_SEQUENCE_HELPER_TEST config FIREWIRE_OHCI tristate "OHCI-1394 controllers" - depends on PCI && FIREWIRE && MMU + depends on PCI && FIREWIRE help Enable this driver if you have a FireWire controller based on the OHCI specification. For all practical purposes, thisdrivers/gpu/drm/Kconfig +1
-1@@ -393,7 +393,7 @@ source "drivers/gpu/drm/imagination/Kconfig" config DRM_HYPERV tristate "DRM Support for Hyper-V synthetic video device" - depends on DRM && PCI && MMU && HYPERV + depends on DRM && PCI && HYPERV select DRM_CLIENT_SELECTION select DRM_KMS_HELPER select DRM_GEM_SHMEM_HELPERdrivers/gpu/drm/amd/amdgpu/Kconfig +1
-2@@ -2,7 +2,7 @@ config DRM_AMDGPU tristate "AMD GPU" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on !UML select FW_LOADER select DRM_CLIENT@@ -68,7 +68,6 @@ config DRM_AMDGPU_CIK config DRM_AMDGPU_USERPTR bool "Always enable userptr write support" depends on DRM_AMDGPU - depends on MMU select HMM_MIRROR select MMU_NOTIFIER helpdrivers/gpu/drm/ast/Kconfig +1
-1@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_AST tristate "AST server chips" - depends on DRM && PCI && MMU + depends on DRM && PCI select DRM_CLIENT_SELECTION select DRM_GEM_SHMEM_HELPER select DRM_KMS_HELPERdrivers/gpu/drm/gma500/Kconfig +1
-1@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_GMA500 tristate "Intel GMA500/600/3600/3650 KMS Framebuffer" - depends on DRM && PCI && X86 && MMU && HAS_IOPORT + depends on DRM && PCI && X86 && HAS_IOPORT select DRM_CLIENT_SELECTION depends on ACPI_VIDEO || !ACPI depends on I2Cdrivers/gpu/drm/hisilicon/hibmc/Kconfig +0
-1@@ -2,7 +2,6 @@ config DRM_HISI_HIBMC tristate "DRM Support for Hisilicon Hibmc" depends on DRM && PCI - depends on MMU select DRM_CLIENT_SELECTION select DRM_DISPLAY_HELPER select DRM_DISPLAY_DP_HELPERdrivers/gpu/drm/loongson/Kconfig +1
-1@@ -2,7 +2,7 @@ config DRM_LOONGSON tristate "DRM support for Loongson Graphics" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on LOONGARCH || MIPS || COMPILE_TEST select DRM_CLIENT_SELECTION select DRM_KMS_HELPERdrivers/gpu/drm/mgag200/Kconfig +1
-1@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_MGAG200 tristate "Matrox G200" - depends on DRM && PCI && MMU + depends on DRM && PCI select DRM_CLIENT_SELECTION select DRM_GEM_SHMEM_HELPER select DRM_KMS_HELPERdrivers/gpu/drm/nouveau/Kconfig +1
-2@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_NOUVEAU tristate "Nouveau (NVIDIA) cards" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on (ACPI_VIDEO && ACPI_WMI && MXM_WMI) || !(ACPI && X86) depends on BACKLIGHT_CLASS_DEVICE select IOMMU_API@@ -86,7 +86,6 @@ config DRM_NOUVEAU_SVM bool "(EXPERIMENTAL) Enable SVM (Shared Virtual Memory) support" depends on DEVICE_PRIVATE depends on DRM_NOUVEAU - depends on MMU depends on STAGING select HMM_MIRROR select MMU_NOTIFIERdrivers/gpu/drm/qxl/Kconfig +1
-1@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_QXL tristate "QXL virtual GPU" - depends on DRM && PCI && MMU && HAS_IOPORT + depends on DRM && PCI && HAS_IOPORT select DRM_CLIENT_SELECTION select DRM_KMS_HELPER select DRM_TTMdrivers/gpu/drm/radeon/Kconfig +1
-1@@ -2,7 +2,7 @@ config DRM_RADEON tristate "ATI Radeon" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on AGP || !AGP select FW_LOADER select DRM_CLIENT_SELECTIONdrivers/gpu/drm/tiny/Kconfig +1
-1@@ -37,7 +37,7 @@ config DRM_BOCHS config DRM_CIRRUS_QEMU tristate "Cirrus driver for QEMU emulated device" - depends on DRM && PCI && MMU + depends on DRM && PCI select DRM_CLIENT_SELECTION select DRM_KMS_HELPER select DRM_GEM_SHMEM_HELPERdrivers/gpu/drm/vmwgfx/Kconfig +1
-1@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" - depends on DRM && PCI && MMU + depends on DRM && PCI depends on (X86 && HYPERVISOR_GUEST) || ARM64 select DRM_CLIENT_SELECTION select DRM_TTMdrivers/gpu/drm/xe/Kconfig +1
-1@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_XE tristate "Intel Xe Graphics" - depends on DRM && PCI && MMU && (m || (y && KUNIT=y)) + depends on DRM && PCI && (m || (y && KUNIT=y)) depends on INTEL_VSEC select INTERVAL_TREE # we need shmfs for the swappable backing store, and in particulardrivers/net/ethernet/broadcom/Kconfig +0
-1@@ -98,7 +98,6 @@ config BNX2 config CNIC tristate "QLogic CNIC support" depends on PCI && (IPV6 || IPV6=n) - depends on MMU select BNX2 select UIO helpdrivers/pci/Kconfig +1
-0@@ -21,6 +21,7 @@ config GENERIC_PCI_IOMAP menuconfig PCI bool "PCI support" depends on HAVE_PCI + depends on MMU help This option enables support for the PCI local bus, including support for PCI-X and the foundations for PCI Express support.drivers/pci/pci.c +2
-2@@ -4257,7 +4257,7 @@ unsigned long __weak pci_address_to_pio(phys_addr_t address)#ifndef pci_remap_iospaceint pci_remap_iospace (const struct resource *res,phys_addr_t phys_addr) { -#if defined(PCI_IOBASE ) && defined(CONFIG_MMU ) +#if defined(PCI_IOBASE )unsigned long vaddr = (unsigned long )PCI_IOBASE + res->start;if (!(res->flags &IORESOURCE_IO ))@@ -4290,7 +4290,7 @@ EXPORT_SYMBOL(pci_remap_iospace);*/ void pci_unmap_iospace (struct resource *res) { -#if defined(PCI_IOBASE ) && defined(CONFIG_MMU ) +#if defined(PCI_IOBASE )unsigned long vaddr = (unsigned long )PCI_IOBASE + res->start;vunmap_range (vaddr, vaddr +resource_size (res));drivers/scsi/bnx2fc/Kconfig +0
-1@@ -5,7 +5,6 @@ config SCSI_BNX2X_FCOE depends on (IPV6 || IPV6=n) depends on LIBFC depends on LIBFCOE - depends on MMU select NETDEVICES select ETHERNET select NET_VENDOR_BROADCOMdrivers/scsi/bnx2i/Kconfig +0
-1@@ -4,7 +4,6 @@ config SCSI_BNX2_ISCSI depends on NET depends on PCI depends on (IPV6 || IPV6=n) - depends on MMU select SCSI_ISCSI_ATTRS select NETDEVICES select ETHERNETdrivers/vfio/pci/Kconfig +1
-1@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only menu "VFIO support for PCI devices" - depends on PCI && MMU + depends on PCI config VFIO_PCI_CORE tristateSignature · 1 line
2.39.5