Re: [PATCH v2 3/4] Use generic io memcpy functions on the csky architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Julian,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-nonmm-unstable]
[also build test ERROR on arm64/for-next/core soc/for-next linus/master v6.11-rc7 next-20240909]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Julian-Vetter/Consolidate-__memcpy_-to-from-io-and-__memset_io-into-a-single-lib/20240909-213659
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-nonmm-unstable
patch link:    https://lore.kernel.org/r/20240909133159.2024688-4-jvetter%40kalrayinc.com
patch subject: [PATCH v2 3/4] Use generic io memcpy functions on the csky architecture
config: csky-allnoconfig (https://download.01.org/0day-ci/archive/20240910/202409101549.CyV0mJ2S-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240910/202409101549.CyV0mJ2S-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409101549.CyV0mJ2S-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

   In file included from ./arch/csky/include/generated/asm/unaligned.h:1,
                    from lib/io_copy.c:9:
   lib/io_copy.c: In function '__memcpy_fromio':
>> lib/io_copy.c:28:39: error: implicit declaration of function '__raw_readq'; did you mean '__raw_readl'? [-Wimplicit-function-declaration]
      28 |                         put_unaligned(__raw_readq(from), (uintptr_t *)to);
         |                                       ^~~~~~~~~~~
   include/asm-generic/unaligned.h:19:22: note: in definition of macro '__put_unaligned_t'
      19 |         __pptr->x = (val);                                                      \
         |                      ^~~
   lib/io_copy.c:28:25: note: in expansion of macro 'put_unaligned'
      28 |                         put_unaligned(__raw_readq(from), (uintptr_t *)to);
         |                         ^~~~~~~~~~~~~
   lib/io_copy.c: In function '__memcpy_toio':
>> lib/io_copy.c:57:25: error: implicit declaration of function '__raw_writeq'; did you mean '__raw_writel'? [-Wimplicit-function-declaration]
      57 |                         __raw_writeq(get_unaligned((uintptr_t *)from), to);
         |                         ^~~~~~~~~~~~
         |                         __raw_writel
   lib/io_copy.c: In function '__memset_io':
>> lib/io_copy.c:83:26: warning: left shift count >= width of type [-Wshift-count-overflow]
      83 |                 qc |= qc << 32;
         |                          ^~


vim +28 lib/io_copy.c

6a9bfa83709a84e Julian Vetter 2024-09-09  16  
6a9bfa83709a84e Julian Vetter 2024-09-09  17  void __memcpy_fromio(void *to, const volatile void __iomem *from, size_t count)
6a9bfa83709a84e Julian Vetter 2024-09-09  18  {
6a9bfa83709a84e Julian Vetter 2024-09-09  19  	while (count && !IS_ALIGNED((unsigned long)from, NATIVE_STORE_SIZE)) {
6a9bfa83709a84e Julian Vetter 2024-09-09  20  		*(u8 *)to = __raw_readb(from);
6a9bfa83709a84e Julian Vetter 2024-09-09  21  		from++;
6a9bfa83709a84e Julian Vetter 2024-09-09  22  		to++;
6a9bfa83709a84e Julian Vetter 2024-09-09  23  		count--;
6a9bfa83709a84e Julian Vetter 2024-09-09  24  	}
6a9bfa83709a84e Julian Vetter 2024-09-09  25  
6a9bfa83709a84e Julian Vetter 2024-09-09  26  	while (count >= NATIVE_STORE_SIZE) {
6a9bfa83709a84e Julian Vetter 2024-09-09  27  		if (IS_ENABLED(CONFIG_64BIT))
6a9bfa83709a84e Julian Vetter 2024-09-09 @28  			put_unaligned(__raw_readq(from), (uintptr_t *)to);
6a9bfa83709a84e Julian Vetter 2024-09-09  29  		else
6a9bfa83709a84e Julian Vetter 2024-09-09  30  			put_unaligned(__raw_readl(from), (uintptr_t *)to);
6a9bfa83709a84e Julian Vetter 2024-09-09  31  
6a9bfa83709a84e Julian Vetter 2024-09-09  32  		from += NATIVE_STORE_SIZE;
6a9bfa83709a84e Julian Vetter 2024-09-09  33  		to += NATIVE_STORE_SIZE;
6a9bfa83709a84e Julian Vetter 2024-09-09  34  		count -= NATIVE_STORE_SIZE;
6a9bfa83709a84e Julian Vetter 2024-09-09  35  	}
6a9bfa83709a84e Julian Vetter 2024-09-09  36  
6a9bfa83709a84e Julian Vetter 2024-09-09  37  	while (count) {
6a9bfa83709a84e Julian Vetter 2024-09-09  38  		*(u8 *)to = __raw_readb(from);
6a9bfa83709a84e Julian Vetter 2024-09-09  39  		from++;
6a9bfa83709a84e Julian Vetter 2024-09-09  40  		to++;
6a9bfa83709a84e Julian Vetter 2024-09-09  41  		count--;
6a9bfa83709a84e Julian Vetter 2024-09-09  42  	}
6a9bfa83709a84e Julian Vetter 2024-09-09  43  }
6a9bfa83709a84e Julian Vetter 2024-09-09  44  EXPORT_SYMBOL(__memcpy_fromio);
6a9bfa83709a84e Julian Vetter 2024-09-09  45  
6a9bfa83709a84e Julian Vetter 2024-09-09  46  void __memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
6a9bfa83709a84e Julian Vetter 2024-09-09  47  {
6a9bfa83709a84e Julian Vetter 2024-09-09  48  	while (count && !IS_ALIGNED((unsigned long)to, NATIVE_STORE_SIZE)) {
6a9bfa83709a84e Julian Vetter 2024-09-09  49  		__raw_writeb(*(u8 *)from, to);
6a9bfa83709a84e Julian Vetter 2024-09-09  50  		from++;
6a9bfa83709a84e Julian Vetter 2024-09-09  51  		to++;
6a9bfa83709a84e Julian Vetter 2024-09-09  52  		count--;
6a9bfa83709a84e Julian Vetter 2024-09-09  53  	}
6a9bfa83709a84e Julian Vetter 2024-09-09  54  
6a9bfa83709a84e Julian Vetter 2024-09-09  55  	while (count >= NATIVE_STORE_SIZE) {
6a9bfa83709a84e Julian Vetter 2024-09-09  56  		if (IS_ENABLED(CONFIG_64BIT))
6a9bfa83709a84e Julian Vetter 2024-09-09 @57  			__raw_writeq(get_unaligned((uintptr_t *)from), to);
6a9bfa83709a84e Julian Vetter 2024-09-09  58  		else
6a9bfa83709a84e Julian Vetter 2024-09-09  59  			__raw_writel(get_unaligned((uintptr_t *)from), to);
6a9bfa83709a84e Julian Vetter 2024-09-09  60  
6a9bfa83709a84e Julian Vetter 2024-09-09  61  		from += NATIVE_STORE_SIZE;
6a9bfa83709a84e Julian Vetter 2024-09-09  62  		to += NATIVE_STORE_SIZE;
6a9bfa83709a84e Julian Vetter 2024-09-09  63  		count -= NATIVE_STORE_SIZE;
6a9bfa83709a84e Julian Vetter 2024-09-09  64  	}
6a9bfa83709a84e Julian Vetter 2024-09-09  65  
6a9bfa83709a84e Julian Vetter 2024-09-09  66  	while (count) {
6a9bfa83709a84e Julian Vetter 2024-09-09  67  		__raw_writeb(*(u8 *)from, to);
6a9bfa83709a84e Julian Vetter 2024-09-09  68  		from++;
6a9bfa83709a84e Julian Vetter 2024-09-09  69  		to++;
6a9bfa83709a84e Julian Vetter 2024-09-09  70  		count--;
6a9bfa83709a84e Julian Vetter 2024-09-09  71  	}
6a9bfa83709a84e Julian Vetter 2024-09-09  72  }
6a9bfa83709a84e Julian Vetter 2024-09-09  73  EXPORT_SYMBOL(__memcpy_toio);
6a9bfa83709a84e Julian Vetter 2024-09-09  74  
6a9bfa83709a84e Julian Vetter 2024-09-09  75  void __memset_io(volatile void __iomem *dst, int c, size_t count)
6a9bfa83709a84e Julian Vetter 2024-09-09  76  {
6a9bfa83709a84e Julian Vetter 2024-09-09  77  	uintptr_t qc = (u8)c;
6a9bfa83709a84e Julian Vetter 2024-09-09  78  
6a9bfa83709a84e Julian Vetter 2024-09-09  79  	qc |= qc << 8;
6a9bfa83709a84e Julian Vetter 2024-09-09  80  	qc |= qc << 16;
6a9bfa83709a84e Julian Vetter 2024-09-09  81  
6a9bfa83709a84e Julian Vetter 2024-09-09  82  	if (IS_ENABLED(CONFIG_64BIT))
6a9bfa83709a84e Julian Vetter 2024-09-09 @83  		qc |= qc << 32;

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux