Oops, this was a mis-merge that I incorrectly commited.
On Tue, Sep 15, 2020 at 01:34:50AM +0800, kernel test robot wrote:
tree:
git://git.infradead.org/users/hch/misc.git dma-ranges.3
head: e65920d7e325dcfaa9c560553c007cddfa199868
commit: e65920d7e325dcfaa9c560553c007cddfa199868 [25/25] dma-mapping: introduce DMA range
map, supplanting dma_pfn_offset
config: arm64-randconfig-r024-20200914 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
b2c32c90bab09a6e2c1f370429db26017a182143)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout e65920d7e325dcfaa9c560553c007cddfa199868
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/arm64/mm/init.c:23:
>> include/linux/dma-direct.h:82:38: error: use of undeclared identifier
'dma_addr'; did you mean 'dev_addr'?
paddr = translate_dma_to_phys(dev, dma_addr);
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
include/linux/dma-direct.h:84:11: error: use of undeclared identifier
'dma_addr'; did you mean 'dev_addr'?
paddr = dma_addr;
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
2 errors generated.
--
In file included from kernel/dma/direct.c:10:
>> include/linux/dma-direct.h:82:38: error: use of undeclared identifier
'dma_addr'; did you mean 'dev_addr'?
paddr = translate_dma_to_phys(dev, dma_addr);
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
include/linux/dma-direct.h:84:11: error: use of undeclared identifier
'dma_addr'; did you mean 'dev_addr'?
paddr = dma_addr;
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
>> kernel/dma/direct.c:135:20: warning: shift count >= width of type
[-Wshift-count-overflow]
phys_limit < DMA_BIT_MASK(64) &&
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 2 errors generated.
--
In file included from kernel/dma/swiotlb.c:24:
>> include/linux/dma-direct.h:82:38: error: use of undeclared identifier
'dma_addr'; did you mean 'dev_addr'?
paddr = translate_dma_to_phys(dev, dma_addr);
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
include/linux/dma-direct.h:84:11: error: use of undeclared identifier
'dma_addr'; did you mean 'dev_addr'?
paddr = dma_addr;
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
kernel/dma/swiotlb.c:278:1: warning: no previous prototype for function
'swiotlb_late_init_with_default_size' [-Wmissing-prototypes]
swiotlb_late_init_with_default_size(size_t default_size)
^
kernel/dma/swiotlb.c:277:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int
^
static
1 warning and 2 errors generated.
git remote add hch-misc
git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc dma-ranges.3
git checkout e65920d7e325dcfaa9c560553c007cddfa199868
vim +82 include/linux/dma-direct.h
76
77 static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
78 {
79 phys_addr_t paddr;
80
81 if (dev->dma_range_map)
> 82 paddr = translate_dma_to_phys(dev, dma_addr);
83 else
84 paddr = dma_addr;
85
86 return __sme_clr(paddr);
87 }
88 #endif /* !CONFIG_ARCH_HAS_PHYS_TO_DMA */
89
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org