Messages in this thread | | | Date | Wed, 20 Jul 2022 03:38:17 +0800 | From | kernel test robot <> | Subject | [atishp04:kvm_perf_rfc 15/24] arch/openrisc/include/asm/cmpxchg.h:131:24: error: call to '__cmpxchg_called_with_bad_pointer' declared with attribute error: Bad argument size for cmpxchg |
| |
tree: https://github.com/atishp04/linux kvm_perf_rfc head: f7c410879b9a723ff8fbc32e4acb668b7fee423a commit: 20c5f15d297fb5a842bb1488be2781826b65a1dd [15/24] COVER config: openrisc-randconfig-c024-20220718 (https://download.01.org/0day-ci/archive/20220720/202207200317.VLiEV0Zq-lkp@intel.com/config) compiler: or1k-linux-gcc (GCC) 12.1.0 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 # https://github.com/atishp04/linux/commit/20c5f15d297fb5a842bb1488be2781826b65a1dd git remote add atishp04 https://github.com/atishp04/linux git fetch --no-tags atishp04 kvm_perf_rfc git checkout 20c5f15d297fb5a842bb1488be2781826b65a1dd # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=openrisc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from arch/openrisc/include/asm/atomic.h:131, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/openrisc/include/asm/bitops.h:41, from include/linux/bitops.h:33, from include/linux/kernel.h:22, from lib/atomic64_test.c:12: arch/openrisc/include/asm/cmpxchg.h: In function '__cmpxchg': >> arch/openrisc/include/asm/cmpxchg.h:131:24: error: call to '__cmpxchg_called_with_bad_pointer' declared with attribute error: Bad argument size for cmpxchg 131 | return __cmpxchg_called_with_bad_pointer(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/__cmpxchg_called_with_bad_pointer +131 arch/openrisc/include/asm/cmpxchg.h
489e0f802db708 Stafford Horne 2017-03-23 113 489e0f802db708 Stafford Horne 2017-03-23 114 /* 489e0f802db708 Stafford Horne 2017-03-23 115 * This function doesn't exist, so you'll get a linker error 489e0f802db708 Stafford Horne 2017-03-23 116 * if something tries to do an invalid cmpxchg(). 489e0f802db708 Stafford Horne 2017-03-23 117 */ 489e0f802db708 Stafford Horne 2017-03-23 118 extern unsigned long __cmpxchg_called_with_bad_pointer(void) 489e0f802db708 Stafford Horne 2017-03-23 119 __compiletime_error("Bad argument size for cmpxchg"); 489e0f802db708 Stafford Horne 2017-03-23 120 489e0f802db708 Stafford Horne 2017-03-23 121 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, 489e0f802db708 Stafford Horne 2017-03-23 122 unsigned long new, int size) 489e0f802db708 Stafford Horne 2017-03-23 123 { 489e0f802db708 Stafford Horne 2017-03-23 124 switch (size) { 489e0f802db708 Stafford Horne 2017-03-23 125 case 1: 489e0f802db708 Stafford Horne 2017-03-23 126 case 2: 489e0f802db708 Stafford Horne 2017-03-23 127 return cmpxchg_small(ptr, old, new, size); 489e0f802db708 Stafford Horne 2017-03-23 128 case 4: 489e0f802db708 Stafford Horne 2017-03-23 129 return cmpxchg_u32(ptr, old, new); 489e0f802db708 Stafford Horne 2017-03-23 130 default: 489e0f802db708 Stafford Horne 2017-03-23 @131 return __cmpxchg_called_with_bad_pointer(); 489e0f802db708 Stafford Horne 2017-03-23 132 } 489e0f802db708 Stafford Horne 2017-03-23 133 } 489e0f802db708 Stafford Horne 2017-03-23 134
:::::: The code at line 131 was first introduced by commit :::::: 489e0f802db708c69004f64d92a3e1b70731614a openrisc: add 1 and 2 byte cmpxchg support
:::::: TO: Stafford Horne <shorne@gmail.com> :::::: CC: Stafford Horne <shorne@gmail.com>
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |