[powerpc:next-test 14/40] pci.c:undefined reference to `pci_create_OF_bus_map'

Pali Rohár pali at kernel.org
Thu Feb 2 11:00:12 AEDT 2023


On Thursday 02 February 2023 07:51:23 kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
> head:   9ffcf6a19dbb2a24de2c2d7b2af1e130986cd565
> commit: 869363998da87c80c16ff1221e95b41b2d3cceb2 [14/40] powerpc/pci: Allow to disable filling deprecated pci-OF-bus-map
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20230202/202302020739.cLZQSxQV-lkp@intel.com/config)
> compiler: powerpc-linux-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/powerpc/linux.git/commit/?id=869363998da87c80c16ff1221e95b41b2d3cceb2
>         git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
>         git fetch --no-tags powerpc next-test
>         git checkout 869363998da87c80c16ff1221e95b41b2d3cceb2
>         # 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=powerpc olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp at intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    powerpc-linux-ld: arch/powerpc/platforms/chrp/pci.o: in function `chrp_find_bridges':
> >> pci.c:(.init.text+0xaec): undefined reference to `pci_create_OF_bus_map'
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests

Try this fix:

diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 6f6598e771ff..908d301d3272 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -320,7 +320,9 @@ chrp_find_bridges(void)
 	 */
 	hydra_init();		/* Mac I/O */
 
+#ifdef CONFIG_PPC_PCI_OF_BUS_MAP_FILL
 	pci_create_OF_bus_map();
+#endif
 }
 
 /* SL82C105 IDE Control/Status Register */


More information about the Linuxppc-dev mailing list