tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e7b08814b16b80a0bf76eeca16317f8c2ed23b8c
commit: 12aa2587388de6697fd2e585ae6a90f70249540b [10017/14131] sched/cpuacct: Use __this_cpu_add() instead of this_cpu_ptr()
config: i386-randconfig-a012-20200601 (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project 2388a096e7865c043e83ece4e26654bd3d1a20d5)
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 i386 cross compiling tool for clang build
# apt-get install binutils-i386-linux-gnu
git checkout 12aa2587388de6697fd2e585ae6a90f70249540b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <
l...@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> kernel/sched/cpuacct.c:350:3: error: invalid input size for constraint 'qi'
__this_cpu_add(ca->cpuusage->usages[index], cputime);
^
include/linux/percpu-defs.h:458:2: note: expanded from macro '__this_cpu_add'
raw_cpu_add(pcp, val); ^
include/linux/percpu-defs.h:422:32: note: expanded from macro 'raw_cpu_add'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:377:11: note: expanded from macro '__pcpu_size_call'
case 1: stem##1(variable, __VA_ARGS__);break; ^
<scratch space>:35:1: note: expanded from here
raw_cpu_add_1
^
arch/x86/include/asm/percpu.h:401:34: note: expanded from macro 'raw_cpu_add_1'
#define raw_cpu_add_1(pcp, val) percpu_add_op(, (pcp), val)
^
arch/x86/include/asm/percpu.h:147:16: note: expanded from macro 'percpu_add_op'
: "qi" ((pao_T__)(val))); ^
>> kernel/sched/cpuacct.c:350:3: error: invalid input size for constraint 'qi'
include/linux/percpu-defs.h:458:2: note: expanded from macro '__this_cpu_add'
raw_cpu_add(pcp, val); ^
include/linux/percpu-defs.h:422:32: note: expanded from macro 'raw_cpu_add'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:378:11: note: expanded from macro '__pcpu_size_call'
case 2: stem##2(variable, __VA_ARGS__);break; ^
<scratch space>:60:1: note: expanded from here
raw_cpu_add_2
^
arch/x86/include/asm/percpu.h:402:34: note: expanded from macro 'raw_cpu_add_2'
#define raw_cpu_add_2(pcp, val) percpu_add_op(, (pcp), val)
^
arch/x86/include/asm/percpu.h:147:16: note: expanded from macro 'percpu_add_op'
: "qi" ((pao_T__)(val))); ^
>> kernel/sched/cpuacct.c:350:3: error: invalid input size for constraint 'qi'
include/linux/percpu-defs.h:458:2: note: expanded from macro '__this_cpu_add'
raw_cpu_add(pcp, val); ^
include/linux/percpu-defs.h:422:32: note: expanded from macro 'raw_cpu_add'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:379:11: note: expanded from macro '__pcpu_size_call'
case 4: stem##4(variable, __VA_ARGS__);break; ^
<scratch space>:85:1: note: expanded from here
raw_cpu_add_4
^
arch/x86/include/asm/percpu.h:403:34: note: expanded from macro 'raw_cpu_add_4'
#define raw_cpu_add_4(pcp, val) percpu_add_op(, (pcp), val)
^
arch/x86/include/asm/percpu.h:147:16: note: expanded from macro 'percpu_add_op'
: "qi" ((pao_T__)(val))); ^
kernel/sched/cpuacct.c:366:3: error: invalid input size for constraint 'qi'
__this_cpu_add(ca->cpustat->cpustat[index], val);
^
include/linux/percpu-defs.h:458:2: note: expanded from macro '__this_cpu_add'
raw_cpu_add(pcp, val); ^
include/linux/percpu-defs.h:422:32: note: expanded from macro 'raw_cpu_add'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:377:11: note: expanded from macro '__pcpu_size_call'
case 1: stem##1(variable, __VA_ARGS__);break; ^
<scratch space>:113:1: note: expanded from here
raw_cpu_add_1
^
arch/x86/include/asm/percpu.h:401:34: note: expanded from macro 'raw_cpu_add_1'
#define raw_cpu_add_1(pcp, val) percpu_add_op(, (pcp), val)
^
arch/x86/include/asm/percpu.h:147:16: note: expanded from macro 'percpu_add_op'
: "qi" ((pao_T__)(val))); ^
kernel/sched/cpuacct.c:366:3: error: invalid input size for constraint 'qi'
include/linux/percpu-defs.h:458:2: note: expanded from macro '__this_cpu_add'
raw_cpu_add(pcp, val); ^
include/linux/percpu-defs.h:422:32: note: expanded from macro 'raw_cpu_add'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:378:11: note: expanded from macro '__pcpu_size_call'
case 2: stem##2(variable, __VA_ARGS__);break; ^
<scratch space>:138:1: note: expanded from here
raw_cpu_add_2
^
arch/x86/include/asm/percpu.h:402:34: note: expanded from macro 'raw_cpu_add_2'
#define raw_cpu_add_2(pcp, val) percpu_add_op(, (pcp), val)
^
arch/x86/include/asm/percpu.h:147:16: note: expanded from macro 'percpu_add_op'
: "qi" ((pao_T__)(val))); ^
kernel/sched/cpuacct.c:366:3: error: invalid input size for constraint 'qi'
include/linux/percpu-defs.h:458:2: note: expanded from macro '__this_cpu_add'
raw_cpu_add(pcp, val); ^
include/linux/percpu-defs.h:422:32: note: expanded from macro 'raw_cpu_add'
#define raw_cpu_add(pcp, val) __pcpu_size_call(raw_cpu_add_, pcp, val)
^
include/linux/percpu-defs.h:379:11: note: expanded from macro '__pcpu_size_call'
case 4: stem##4(variable, __VA_ARGS__);break; ^
<scratch space>:163:1: note: expanded from here
raw_cpu_add_4
^
arch/x86/include/asm/percpu.h:403:34: note: expanded from macro 'raw_cpu_add_4'
#define raw_cpu_add_4(pcp, val) percpu_add_op(, (pcp), val)
^
arch/x86/include/asm/percpu.h:147:16: note: expanded from macro 'percpu_add_op'
: "qi" ((pao_T__)(val))); ^
6 errors generated.
vim +/qi +350 kernel/sched/cpuacct.c
332
333 /*
334 * charge this task's execution time to its accounting group.
335 *
336 * called with rq->lock held.
337 */
338 void cpuacct_charge(struct task_struct *tsk, u64 cputime)
339 {
340 struct cpuacct *ca;
341 int index = CPUACCT_STAT_SYSTEM;
342 struct pt_regs *regs = task_pt_regs(tsk);
343
344 if (regs && user_mode(regs))
345 index = CPUACCT_STAT_USER;
346
347 rcu_read_lock();
348
349 for (ca = task_ca(tsk); ca; ca = parent_ca(ca))
> 350 __this_cpu_add(ca->cpuusage->usages[index], cputime);
351
352 rcu_read_unlock();
353 }
354
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuil...@lists.01.org