tree:
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git sched/lazymm
head: ecc3992c36cb88087df9c537e2326efb51c95e31
commit: 764be33e0b82bdce7e245d86561d85db9604e2c1 [4/10] membarrier: Make the
post-switch-mm barrier explicit
config: arm-randconfig-r034-20210617 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
#
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto sched/lazymm
git checkout 764be33e0b82bdce7e245d86561d85db9604e2c1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro
'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:328:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:316:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:308:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
kernel/kthread.c:1328:47: error: no member named 'membarrier_state' in
'struct mm_struct'
membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
~~ ^
arch/arm/include/asm/atomic.h:25:35: note: expanded from macro 'atomic_read'
#define atomic_read(v) READ_ONCE((v)->counter)
^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro
'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:328:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:316:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:308:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
kernel/kthread.c:1328:47: error: no member named 'membarrier_state' in
'struct mm_struct'
membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
~~ ^
arch/arm/include/asm/atomic.h:25:35: note: expanded from macro 'atomic_read'
#define atomic_read(v) READ_ONCE((v)->counter)
^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:48: note: expanded from macro
'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:328:22: note: expanded from macro
'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:316:23: note: expanded from macro
'_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:308:9: note: expanded from macro
'__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
kernel/kthread.c:1328:47: error: no member named 'membarrier_state' in
'struct mm_struct'
membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
~~ ^
arch/arm/include/asm/atomic.h:25:35: note: expanded from macro 'atomic_read'
#define atomic_read(v) READ_ONCE((v)->counter)
^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:279:13: note: expanded from macro
'__unqual_scalar_typeof'
_Generic((x), \
^
kernel/kthread.c:1328:47: error: no member named 'membarrier_state' in
'struct mm_struct'
membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
~~ ^
arch/arm/include/asm/atomic.h:25:35: note: expanded from macro 'atomic_read'
#define atomic_read(v) READ_ONCE((v)->counter)
^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:286:15: note: expanded from macro
'__unqual_scalar_typeof'
default: (x)))
^
kernel/kthread.c:1328:47: error: no member named 'membarrier_state' in
'struct mm_struct'
membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
~~ ^
arch/arm/include/asm/atomic.h:25:35: note: expanded from macro 'atomic_read'
#define atomic_read(v) READ_ONCE((v)->counter)
^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
> kernel/kthread.c:1328:30: error: passing 'void' to
parameter of incompatible type 'int'
membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/include/asm/atomic.h:25:24: note: expanded from macro 'atomic_read'
#define atomic_read(v) READ_ONCE((v)->counter)
^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:47:28: note: expanded from macro 'READ_ONCE'
#define READ_ONCE(x) \
^
include/linux/sched/mm.h:372:52: note: passing argument to parameter
'membarrier_state' here
static inline void membarrier_finish_switch_mm(int membarrier_state)
^
9 errors generated.
vim +1328 kernel/kthread.c
1304
1305 /**
1306 * kthread_use_mm - make the calling kthread operate on an address space
1307 * @mm: address space to operate on
1308 */
1309 void kthread_use_mm(struct mm_struct *mm)
1310 {
1311 struct mm_struct *active_mm;
1312 struct task_struct *tsk = current;
1313
1314 WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD));
1315 WARN_ON_ONCE(tsk->mm);
1316
1317 task_lock(tsk);
1318 /* Hold off tlb flush IPIs while switching mm's */
1319 local_irq_disable();
1320 active_mm = tsk->active_mm;
1321 if (active_mm != mm) {
1322 mmgrab(mm);
1323 tsk->active_mm = mm;
1324 }
1325 tsk->mm = mm;
1326 membarrier_update_current_mm(mm);
1327 switch_mm_irqs_off(active_mm, mm, tsk);
1328 membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
1329 local_irq_enable();
1330 task_unlock(tsk);
1331 #ifdef finish_arch_post_lock_switch
1332 finish_arch_post_lock_switch();
1333 #endif
1334
1335 if (active_mm != mm)
1336 mmdrop(active_mm);
1337
1338 to_kthread(tsk)->oldfs = force_uaccess_begin();
1339 }
1340 EXPORT_SYMBOL_GPL(kthread_use_mm);
1341
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org