* [arnd-asm-generic:dma-sync-rework 5/20] arch/powerpc/mm/dma-noncoherent.c:91:59: error: must use 'enum' tag to refer to type 'dma_cache_op'
@ 2023-03-24 16:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-24 16:34 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: llvm, oe-kbuild-all, linux-arch
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git dma-sync-rework
head: 9a711fbea373208c1eeb2fafb0c744bc23a79a43
commit: 8c96c581a246a71ec30a3971cdf7b702b22bb537 [5/20] powerpc: dma-mapping: split out cache operation logic
config: powerpc-randconfig-r033-20230322 (https://download.01.org/0day-ci/archive/20230325/202303250004.IpEq1z41-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=8c96c581a246a71ec30a3971cdf7b702b22bb537
git remote add arnd-asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
git fetch --no-tags arnd-asm-generic dma-sync-rework
git checkout 8c96c581a246a71ec30a3971cdf7b702b22bb537
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303250004.IpEq1z41-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/dma-noncoherent.c:91:59: error: must use 'enum' tag to refer to type 'dma_cache_op'
static void __dma_phys_op(phys_addr_t paddr, size_t size, dma_cache_op op)
^
enum
arch/powerpc/mm/dma-noncoherent.c:107:10: error: use of undeclared identifier 'direction'
switch (direction) {
^
>> arch/powerpc/mm/dma-noncoherent.c:115:8: error: use of undeclared identifier 'start'; did you mean 'short'?
if ((start | end) & (L1_CACHE_BYTES - 1))
^~~~~
short
arch/powerpc/mm/dma-noncoherent.c:115:8: error: expected expression
arch/powerpc/mm/dma-noncoherent.c:116:18: error: use of undeclared identifier 'start'
__dma_phys_op(start, end, DMA_CACHE_FLUSH);
^
>> arch/powerpc/mm/dma-noncoherent.c:116:25: error: use of undeclared identifier 'end'
__dma_phys_op(start, end, DMA_CACHE_FLUSH);
^
arch/powerpc/mm/dma-noncoherent.c:118:18: error: use of undeclared identifier 'start'
__dma_phys_op(start, end, DMA_CACHE_INVAL);
^
arch/powerpc/mm/dma-noncoherent.c:118:25: error: use of undeclared identifier 'end'
__dma_phys_op(start, end, DMA_CACHE_INVAL);
^
arch/powerpc/mm/dma-noncoherent.c:121:17: error: use of undeclared identifier 'start'
__dma_phys_op(start, end, DMA_CACHE_CLEAN);
^
arch/powerpc/mm/dma-noncoherent.c:121:24: error: use of undeclared identifier 'end'
__dma_phys_op(start, end, DMA_CACHE_CLEAN);
^
arch/powerpc/mm/dma-noncoherent.c:124:17: error: use of undeclared identifier 'start'
__dma_phys_op(start, end, DMA_CACHE_FLUSH);
^
arch/powerpc/mm/dma-noncoherent.c:124:24: error: use of undeclared identifier 'end'
__dma_phys_op(start, end, DMA_CACHE_FLUSH);
^
arch/powerpc/mm/dma-noncoherent.c:132:10: error: use of undeclared identifier 'direction'
switch (direction) {
^
arch/powerpc/mm/dma-noncoherent.c:140:8: error: use of undeclared identifier 'start'; did you mean 'short'?
if ((start | end) & (L1_CACHE_BYTES - 1))
^~~~~
short
arch/powerpc/mm/dma-noncoherent.c:140:8: error: expected expression
arch/powerpc/mm/dma-noncoherent.c:141:18: error: use of undeclared identifier 'start'
__dma_phys_op(start, end, DMA_CACHE_FLUSH);
^
arch/powerpc/mm/dma-noncoherent.c:141:25: error: use of undeclared identifier 'end'
__dma_phys_op(start, end, DMA_CACHE_FLUSH);
^
arch/powerpc/mm/dma-noncoherent.c:143:18: error: use of undeclared identifier 'start'
__dma_phys_op(start, end, DMA_CACHE_INVAL);
^
arch/powerpc/mm/dma-noncoherent.c:143:25: error: use of undeclared identifier 'end'
__dma_phys_op(start, end, DMA_CACHE_INVAL);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +91 arch/powerpc/mm/dma-noncoherent.c
86
87 /*
88 * __dma_phys_op makes memory consistent. identical to __dma_op, but
89 * takes a phys_addr_t instead of a virtual address
90 */
> 91 static void __dma_phys_op(phys_addr_t paddr, size_t size, dma_cache_op op)
92 {
93 struct page *page = pfn_to_page(paddr >> PAGE_SHIFT);
94 unsigned offset = paddr & ~PAGE_MASK;
95
96 #ifdef CONFIG_HIGHMEM
97 __dma_highmem_op(page, offset, size, op);
98 #else
99 unsigned long start = (unsigned long)page_address(page) + offset;
100 __dma_op((void *)start, size, op);
101 #endif
102 }
103
104 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,
105 enum dma_data_direction dir)
106 {
107 switch (direction) {
108 case DMA_NONE:
109 BUG();
110 case DMA_FROM_DEVICE:
111 /*
112 * invalidate only when cache-line aligned otherwise there is
113 * the potential for discarding uncommitted data from the cache
114 */
> 115 if ((start | end) & (L1_CACHE_BYTES - 1))
> 116 __dma_phys_op(start, end, DMA_CACHE_FLUSH);
117 else
118 __dma_phys_op(start, end, DMA_CACHE_INVAL);
119 break;
120 case DMA_TO_DEVICE: /* writeback only */
121 __dma_phys_op(start, end, DMA_CACHE_CLEAN);
122 break;
123 case DMA_BIDIRECTIONAL: /* writeback and invalidate */
124 __dma_phys_op(start, end, DMA_CACHE_FLUSH);
125 break;
126 }
127 }
128
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-24 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 16:34 [arnd-asm-generic:dma-sync-rework 5/20] arch/powerpc/mm/dma-noncoherent.c:91:59: error: must use 'enum' tag to refer to type 'dma_cache_op' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.