Re: [RFC] PCI: add CONFIG_MMU dependency

From: Arnd Bergmann
Date: Tue Apr 08 2025 - 08:57:09 EST


On Tue, Apr 8, 2025, at 12:22, Geert Uytterhoeven wrote:
> On Mon, 7 Apr 2025 at 12:40, Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
>> --- a/drivers/pci/Kconfig
>> +++ b/drivers/pci/Kconfig
>> @@ -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.
>
> While having an MMU is a hardware feature, I consider disabling MMU
> support software configuration. So this change prevents people from
> disabling MMU support on a system that has both a PCI bus and an MMU.
> But other people may not agree, or care?

I created this patch after Greg said that the coldfire-v4 chips
that have an MMU are not really used without it any more, and
I had accidentally only build tested a patch without CONFIG_MMU.

On ARM, CONFIG_MMU can no longer be disabled on CPUs that have
one, this was a side-effect of the ARCH_MULTIPLATFORM conversion.

I just tried building an SH7751 kernel with MMU disabled but PCI
enable. This produces build errors in several files, clearly nobody
has tried this in a long time.

I'm not entirely sure about xtensa, but it seems that PCI is
only supported on the "virt" platform, which in turn cannot
turn off MMU, even if there are other platforms that can build
with out without MMU enabled.

Arnd