tree:
git://git.infradead.org/users/hch/misc.git swiotlb-struct
head: 2ca1328f0363ec245db5b5168ea393b1abd16688
commit: b9c42fcd034caf404312d0b2f42465654fbe6a2f [19/20] swiotlb: Add io_tlb_mem struct
config: powerpc-randconfig-r036-20210208 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
c9439ca36342fb6013187d0a69aef92736951476)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git remote add hch-misc
git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc swiotlb-struct
git checkout b9c42fcd034caf404312d0b2f42465654fbe6a2f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> arch/powerpc/platforms/pseries/svm.c:58:6: error: use of
undeclared identifier 'io_tlb_start'; did you mean 'io_tlb_nslabs'?
if (io_tlb_start)
^~~~~~~~~~~~
io_tlb_nslabs
arch/powerpc/platforms/pseries/svm.c:47:23: note: 'io_tlb_nslabs' declared
here
unsigned long bytes, io_tlb_nslabs;
^
1 error generated.
vim +58 arch/powerpc/platforms/pseries/svm.c
2efbc58f157a39 Anshuman Khandual 2019-08-19 38
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 39 /*
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 40 * Initialize SWIOTLB. Essentially
the same as swiotlb_init(), except that it
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 41 * can allocate the buffer anywhere
in memory. Since the hypervisor doesn't have
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 42 * any addressing limitation, we
don't need to allocate it in low addresses.
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 43 */
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 44 void __init svm_swiotlb_init(void)
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 45 {
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 46 unsigned char *vstart;
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 47 unsigned long bytes, io_tlb_nslabs;
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 48
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 49 io_tlb_nslabs =
(swiotlb_size_or_default() >> IO_TLB_SHIFT);
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 50 io_tlb_nslabs = ALIGN(io_tlb_nslabs,
IO_TLB_SEGSIZE);
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 51
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 52 bytes = io_tlb_nslabs <<
IO_TLB_SHIFT;
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 53
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 54 vstart =
memblock_alloc(PAGE_ALIGN(bytes), PAGE_SIZE);
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 55 if (vstart &&
!swiotlb_init_with_tbl(vstart, io_tlb_nslabs, false))
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 56 return;
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 57
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 @58 if (io_tlb_start)
5c8e6fff0b828a Christoph Hellwig 2021-02-05 59 memblock_free_early(__pa(vstart),
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 60 PAGE_ALIGN(io_tlb_nslabs
<< IO_TLB_SHIFT));
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 61 panic("SVM: Cannot allocate
SWIOTLB buffer");
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 62 }
eae9eec476d13f Thiago Jung Bauermann 2020-08-18 63
:::::: The code at line 58 was first introduced by commit
:::::: eae9eec476d13fad9af6da1f44a054ee02b7b161 powerpc/pseries/svm: Allocate SWIOTLB
buffer anywhere in memory
:::::: TO: Thiago Jung Bauermann <bauerman(a)linux.ibm.com>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org