Content-Type: multipart/mixed; boundary="===============4051548803640988797==" MIME-Version: 1.0 From: Bjorn Helgaas To: kbuild-all@lists.01.org Subject: Re: [PATCH] arm: ioremap: Fix compilation of code which use pci_remap_iospace() without CONFIG_MMU Date: Fri, 15 Jul 2022 11:48:35 -0500 Message-ID: <20220715164835.GA1138891@bhelgaas> In-Reply-To: List-Id: --===============4051548803640988797== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Jul 14, 2022 at 10:19:51PM +0200, Arnd Bergmann wrote: > On Thu, Jul 14, 2022 at 8:57 PM Pali Roh=C3=A1r wrote: > > Custom ARM version of pci_remap_iospace() is implemented only for MMU > > kernel builds. So do not define pci_remap_iospace() without CONFIG_MMU. > > > > See compilation failures: > > https://lore.kernel.org/r/202112040150.wvyJZIZO-lkp(a)intel.com/ > > https://lore.kernel.org/r/202112261802.u9iXqdWh-lkp(a)intel.com/ > > https://lore.kernel.org/r/202201131529.A2s7rKQc-lkp(a)intel.com/ > > https://lore.kernel.org/r/202203090147.24cUL0De-lkp(a)intel.com/ > > > > Fixes: bc02973a06a6 ("arm: ioremap: Implement standard PCI function pci= _remap_iospace()") > > Reported-by: kernel test robot > > Signed-off-by: Pali Roh=C3=A1r > > > > --- > > > > PING!!!! Is somebody interested in fixing these compile errors? As nobo= dy > > answered to my emails where I proposed this fix more than half year ago= and > > asked for opinion... > > > > https://lore.kernel.org/r/20211204022131.bmhla4gkph7s7hy2(a)pali/ > > https://lore.kernel.org/r/20211205123209.lyx76daqdwzqwex4(a)pali/ > > https://lore.kernel.org/r/20211226215135.blcnafbuwhrq5ram(a)pali/ > > https://lore.kernel.org/r/20220113134938.3tx7iiukphvazvsq(a)pali/ > > https://lore.kernel.org/r/20220308184851.jmw2xvrapy5wzwof(a)pali/ > = > Are you sure this still happens in mainline kernels? Since > commit 2f618d5ef5dd ("ARM: remove support for NOMMU ARMv4/v5") > it should no longer be possible to disable the MMU in any Arm machines > other than the Cortex-M based ones, which do not support PCI. I don't know whether it happens in mainline kernels either. But even if the 2f618d5ef5dd Kconfiggery makes MMU mostly obsolete for Arm, it seems a little weird that io.h unconditionally promises an arch-specific implementation of pci_remap_iospace(), but we only provide it when CONFIG_MMU=3Dy. It seems like it'd be a little cleaner if the same condition determined visibility of both the declaration and the definition. Bjorn --===============4051548803640988797==--