arch/arm/mach-dove/pcie.c:59: undefined reference to `pci_ioremap_io'

From: kernel test robot
Date: Mon Jun 15 2020 - 02:24:02 EST


Hi Peter,

It's probably a bug fix that unveils the link errors.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 08bf1a27c4c354b853fd81a79e953525bbcc8506
commit: 7a7a8f549ddd18126dfa3dedbe42d877614c7995 arm/patch: Fix !MMU compile
date: 4 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 4 months ago
config: arm-randconfig-r023-20200614 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
git checkout 7a7a8f549ddd18126dfa3dedbe42d877614c7995
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>, old ones prefixed by <<):

arm-linux-gnueabi-ld: arch/arm/mach-dove/pcie.o: in function `dove_pcie_setup':
>> arch/arm/mach-dove/pcie.c:59: undefined reference to `pci_ioremap_io'

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7a7a8f549ddd18126dfa3dedbe42d877614c7995
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 7a7a8f549ddd18126dfa3dedbe42d877614c7995
vim +59 arch/arm/mach-dove/pcie.c

edabd38e1a017e Saeed Bishara 2009-08-06 36
edabd38e1a017e Saeed Bishara 2009-08-06 37
edabd38e1a017e Saeed Bishara 2009-08-06 38 static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys)
edabd38e1a017e Saeed Bishara 2009-08-06 39 {
edabd38e1a017e Saeed Bishara 2009-08-06 40 struct pcie_port *pp;
edabd38e1a017e Saeed Bishara 2009-08-06 41
edabd38e1a017e Saeed Bishara 2009-08-06 42 if (nr >= num_pcie_ports)
edabd38e1a017e Saeed Bishara 2009-08-06 43 return 0;
edabd38e1a017e Saeed Bishara 2009-08-06 44
edabd38e1a017e Saeed Bishara 2009-08-06 45 pp = &pcie_port[nr];
43ba990bb7bf74 Russell King 2012-03-10 46 sys->private_data = pp;
edabd38e1a017e Saeed Bishara 2009-08-06 47 pp->root_bus_nr = sys->busnr;
edabd38e1a017e Saeed Bishara 2009-08-06 48
edabd38e1a017e Saeed Bishara 2009-08-06 49 /*
edabd38e1a017e Saeed Bishara 2009-08-06 50 * Generic PCIe unit setup.
edabd38e1a017e Saeed Bishara 2009-08-06 51 */
edabd38e1a017e Saeed Bishara 2009-08-06 52 orion_pcie_set_local_bus_nr(pp->base, sys->busnr);
edabd38e1a017e Saeed Bishara 2009-08-06 53
63a9332b232bda Andrew Lunn 2011-12-07 54 orion_pcie_setup(pp->base);
edabd38e1a017e Saeed Bishara 2009-08-06 55
d191bb6961ab5f Rob Herring 2012-02-28 56 if (pp->index == 0)
d191bb6961ab5f Rob Herring 2012-02-28 57 pci_ioremap_io(sys->busnr * SZ_64K, DOVE_PCIE0_IO_PHYS_BASE);
d191bb6961ab5f Rob Herring 2012-02-28 58 else
d191bb6961ab5f Rob Herring 2012-02-28 @59 pci_ioremap_io(sys->busnr * SZ_64K, DOVE_PCIE1_IO_PHYS_BASE);
edabd38e1a017e Saeed Bishara 2009-08-06 60
edabd38e1a017e Saeed Bishara 2009-08-06 61 /*
edabd38e1a017e Saeed Bishara 2009-08-06 62 * IORESOURCE_MEM
edabd38e1a017e Saeed Bishara 2009-08-06 63 */
edabd38e1a017e Saeed Bishara 2009-08-06 64 snprintf(pp->mem_space_name, sizeof(pp->mem_space_name),
edabd38e1a017e Saeed Bishara 2009-08-06 65 "PCIe %d MEM", pp->index);
edabd38e1a017e Saeed Bishara 2009-08-06 66 pp->mem_space_name[sizeof(pp->mem_space_name) - 1] = 0;
d191bb6961ab5f Rob Herring 2012-02-28 67 pp->res.name = pp->mem_space_name;
edabd38e1a017e Saeed Bishara 2009-08-06 68 if (pp->index == 0) {
d191bb6961ab5f Rob Herring 2012-02-28 69 pp->res.start = DOVE_PCIE0_MEM_PHYS_BASE;
d191bb6961ab5f Rob Herring 2012-02-28 70 pp->res.end = pp->res.start + DOVE_PCIE0_MEM_SIZE - 1;
edabd38e1a017e Saeed Bishara 2009-08-06 71 } else {
d191bb6961ab5f Rob Herring 2012-02-28 72 pp->res.start = DOVE_PCIE1_MEM_PHYS_BASE;
d191bb6961ab5f Rob Herring 2012-02-28 73 pp->res.end = pp->res.start + DOVE_PCIE1_MEM_SIZE - 1;
edabd38e1a017e Saeed Bishara 2009-08-06 74 }
d191bb6961ab5f Rob Herring 2012-02-28 75 pp->res.flags = IORESOURCE_MEM;
d191bb6961ab5f Rob Herring 2012-02-28 76 if (request_resource(&iomem_resource, &pp->res))
edabd38e1a017e Saeed Bishara 2009-08-06 77 panic("Request PCIe Memory resource failed\n");
d191bb6961ab5f Rob Herring 2012-02-28 78 pci_add_resource_offset(&sys->resources, &pp->res, sys->mem_offset);
edabd38e1a017e Saeed Bishara 2009-08-06 79
edabd38e1a017e Saeed Bishara 2009-08-06 80 return 1;
edabd38e1a017e Saeed Bishara 2009-08-06 81 }
edabd38e1a017e Saeed Bishara 2009-08-06 82

:::::: The code at line 59 was first introduced by commit
:::::: d191bb6961ab5f8de9b20b9540b81f352f5dd765 ARM: dove: use fixed PCI i/o mapping

:::::: TO: Rob Herring <rob.herring@xxxxxxxxxxx>
:::::: CC: Rob Herring <rob.herring@xxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@xxxxxxxxxxxx
To unsubscribe send an email to kbuild-leave@xxxxxxxxxxxx