Re: [helgaas-pci:pci/misc 2/2] drivers/pcmcia/omap_cf.c:240:18: error: implicit declaration of function 'pci_remap_iospace'; did you mean 'pci_remap_cfgspace'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 22, 2022 at 10:19 PM Pali Rohár <pali@xxxxxxxxxx> wrote:
> On Friday 22 July 2022 14:40:23 Bjorn Helgaas wrote:
> > On Sun, Jul 17, 2022 at 12:21:13AM +0800, kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/misc
> > > head:   c86c8360959ec706576baf17237dec3004154d4b
> > > commit: c86c8360959ec706576baf17237dec3004154d4b [2/2] arm: ioremap: Fix pci_remap_iospace() when CONFIG_MMU unset
> > > config: arm-randconfig-r016-20220715 (https://download.01.org/0day-ci/archive/20220717/202207170012.RhbvYS0z-lkp@xxxxxxxxx/config)
> > > compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
> > > reproduce (this is a W=1 build):
> > >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > >         chmod +x ~/bin/make.cross
> > >         # https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?id=c86c8360959ec706576baf17237dec3004154d4b
> > >         git remote add helgaas-pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
> > >         git fetch --no-tags helgaas-pci pci/misc
> > >         git checkout c86c8360959ec706576baf17237dec3004154d4b
> > >         # save the config file
> > >         mkdir build_dir && cp config build_dir/.config
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/pcmcia/
> > >
> > > If you fix the issue, kindly add following tag where applicable
> > > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > >    drivers/pcmcia/omap_cf.c: In function 'omap_cf_set_socket':
> > >    drivers/pcmcia/omap_cf.c:127:25: warning: variable 'control' set but not used [-Wunused-but-set-variable]
> > >      127 |         u16             control;
> > >          |                         ^~~~~~~
> >
> > The above is a pre-existing warning, legitimate, but not our problem.
> >
> > >    drivers/pcmcia/omap_cf.c: In function 'omap_cf_probe':
> > > >> drivers/pcmcia/omap_cf.c:240:18: error: implicit declaration of function 'pci_remap_iospace'; did you mean 'pci_remap_cfgspace'? [-Werror=implicit-function-declaration]
> > >      240 |         status = pci_remap_iospace(&iospace, cf->phys_cf + SZ_4K);
> > >          |                  ^~~~~~~~~~~~~~~~~
> > >          |                  pci_remap_cfgspace
> >
> > This config (arm-randconfig-r016-20220715 above) has:
> >
> >   # CONFIG_MMU is not set
>
> Arnd, any idea what is happening here with pcmcia omap driver?

The OMAP PCMCIA driver can be enabled for non-MMU configurations when
compile testing, and it does not depend on PCI:

config OMAP_CF
        tristate "OMAP CompactFlash Controller"
        depends on PCMCIA
        depends on ARCH_OMAP16XX || (ARM && COMPILE_TEST)

> It is just missing some include header file, or broken dependences in
> Kconfig?

The problem is that the generic pci_remap_iospace() is only available
when PCI is enabled, both the function definition and the declaration are
guarded with CONFIG_PCI.

Since the I/O space accessors are shared between PCI, ISA and
PCMCIA, we have to use the same pci_remap_iospace() function to
map it when any of the three are in use. For some platforms,
we work around it using a static boot-time mapping to PCI_IOBASE
with iotable_init(), but pci_remap_iospace() is generally the cleaner
approach.

It's probably best to just mark this driver as depending on !MMU,
since we don't care about MMU-less OMAP kernels and the driver
is not usable elsewhere.

        Arnd



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux