Hi Claire,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.11-rc6 next-20210125]
[cannot apply to swiotlb/linux-next robh/for-next xen-tip/linux-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Claire-Chang/Restricted-DMA/2021...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
61556703b610a104de324e4f061dc6cf7b218b46
config: powerpc64-randconfig-r013-20210209 (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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://github.com/0day-ci/linux/commit/6efc25e988b76cfd9934a78fbd2f096b8...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review Claire-Chang/Restricted-DMA/20210209-142608
git checkout 6efc25e988b76cfd9934a78fbd2f096b89182fac
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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:59:23: error: incompatible
pointer to integer conversion passing 'unsigned char *' to parameter of type
'phys_addr_t' (aka 'unsigned long long') [-Werror,-Wint-conversion]
memblock_free_early(vstart,
^~~~~~
include/linux/memblock.h:443:52: note: passing argument to parameter 'base'
here
static inline void memblock_free_early(phys_addr_t base,
^
1 error generated.
vim +59 arch/powerpc/platforms/pseries/svm.c
38
39 /*
40 * Initialize SWIOTLB. Essentially the same as swiotlb_init(), except that it
41 * can allocate the buffer anywhere in memory. Since the hypervisor doesn't
have
42 * any addressing limitation, we don't need to allocate it in low addresses.
43 */
44 void __init svm_swiotlb_init(void)
45 {
46 unsigned char *vstart;
47 unsigned long bytes, io_tlb_nslabs;
48
49 io_tlb_nslabs = (swiotlb_size_or_default() >> IO_TLB_SHIFT);
50 io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
51
52 bytes = io_tlb_nslabs << IO_TLB_SHIFT;
53
54 vstart = memblock_alloc(PAGE_ALIGN(bytes), PAGE_SIZE);
55 if (vstart && !swiotlb_init_with_tbl(vstart, io_tlb_nslabs, false))
56 return;
57
58 if (vstart)
59 memblock_free_early(vstart,
60
PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT));
61 panic("SVM: Cannot allocate SWIOTLB buffer");
62 }
63
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org