* [luto:x86/fixes 8/13] kernel/kthread.c:1306:2: error: implicit declaration of function 'membarrier_finish_switch_mm'
@ 2021-03-21 1:14 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-21 1:14 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 14883 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/fixes
head: 825cc79966034d2ab820a693fcb3b84565edd715
commit: 2fa01daa924b6f5b2ed073acb27574b11e7c3e74 [8/13] membarrier: Make the post-switch-mm barrier explicit
config: h8300-randconfig-m031-20210321 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id=2fa01daa924b6f5b2ed073acb27574b11e7c3e74
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/fixes
git checkout 2fa01daa924b6f5b2ed073acb27574b11e7c3e74
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel/kthread.c: In function 'kthread_use_mm':
>> kernel/kthread.c:1306:2: error: implicit declaration of function 'membarrier_finish_switch_mm' [-Werror=implicit-function-declaration]
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
>> kernel/kthread.c:1306:45: error: 'struct mm_struct' has no member named 'membarrier_state'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~
include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
300 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:21: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/h8300/include/asm/atomic.h:15:25: note: in expansion of macro 'READ_ONCE'
15 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
kernel/kthread.c:1306:30: note: in expansion of macro 'atomic_read'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~~~~~~~~~~
>> kernel/kthread.c:1306:45: error: 'struct mm_struct' has no member named 'membarrier_state'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~
include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
300 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:21: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/h8300/include/asm/atomic.h:15:25: note: in expansion of macro 'READ_ONCE'
15 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
kernel/kthread.c:1306:30: note: in expansion of macro 'atomic_read'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~~~~~~~~~~
>> kernel/kthread.c:1306:45: error: 'struct mm_struct' has no member named 'membarrier_state'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~
include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
300 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:21: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/h8300/include/asm/atomic.h:15:25: note: in expansion of macro 'READ_ONCE'
15 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
kernel/kthread.c:1306:30: note: in expansion of macro 'atomic_read'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~~~~~~~~~~
>> kernel/kthread.c:1306:45: error: 'struct mm_struct' has no member named 'membarrier_state'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~
include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
300 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:21: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/h8300/include/asm/atomic.h:15:25: note: in expansion of macro 'READ_ONCE'
15 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
kernel/kthread.c:1306:30: note: in expansion of macro 'atomic_read'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~~~~~~~~~~
>> kernel/kthread.c:1306:45: error: 'struct mm_struct' has no member named 'membarrier_state'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~
include/linux/compiler_types.h:300:9: note: in definition of macro '__compiletime_assert'
300 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/h8300/include/asm/atomic.h:15:25: note: in expansion of macro 'READ_ONCE'
15 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
kernel/kthread.c:1306:30: note: in expansion of macro 'atomic_read'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~~~~~~~~~~
>> kernel/kthread.c:1306:45: error: 'struct mm_struct' has no member named 'membarrier_state'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~
include/linux/compiler_types.h:271:13: note: in definition of macro '__unqual_scalar_typeof'
271 | _Generic((x), \
| ^
include/asm-generic/rwonce.h:50:2: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(x); \
| ^~~~~~~~~~~
arch/h8300/include/asm/atomic.h:15:25: note: in expansion of macro 'READ_ONCE'
15 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
kernel/kthread.c:1306:30: note: in expansion of macro 'atomic_read'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~~~~~~~~~~
In file included from ./arch/h8300/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:248,
from include/asm-generic/bug.h:5,
from arch/h8300/include/asm/bug.h:8,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from kernel/kthread.c:11:
>> kernel/kthread.c:1306:45: error: 'struct mm_struct' has no member named 'membarrier_state'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~
include/asm-generic/rwonce.h:44:72: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
arch/h8300/include/asm/atomic.h:15:25: note: in expansion of macro 'READ_ONCE'
15 | #define atomic_read(v) READ_ONCE((v)->counter)
| ^~~~~~~~~
kernel/kthread.c:1306:30: note: in expansion of macro 'atomic_read'
1306 | membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/err.h:5,
from include/linux/kthread.h:5,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:89:50: warning: ordered comparison of pointer with null pointer [-Wextra]
89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
kernel/sched/core.c: In function 'schedule_tail':
kernel/sched/core.c:4235:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
4235 | struct rq *rq;
| ^~
kernel/sched/core.c: In function 'context_switch':
>> kernel/sched/core.c:4295:3: error: implicit declaration of function 'membarrier_finish_switch_mm'; did you mean 'membarrier_switch_mm'? [-Werror=implicit-function-declaration]
4295 | membarrier_finish_switch_mm(rq->membarrier_state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| membarrier_switch_mm
>> kernel/sched/core.c:4295:33: error: 'struct rq' has no member named 'membarrier_state'
4295 | membarrier_finish_switch_mm(rq->membarrier_state);
| ^~
cc1: some warnings being treated as errors
vim +/membarrier_finish_switch_mm +1306 kernel/kthread.c
1282
1283 /**
1284 * kthread_use_mm - make the calling kthread operate on an address space
1285 * @mm: address space to operate on
1286 */
1287 void kthread_use_mm(struct mm_struct *mm)
1288 {
1289 struct mm_struct *active_mm;
1290 struct task_struct *tsk = current;
1291
1292 WARN_ON_ONCE(!(tsk->flags & PF_KTHREAD));
1293 WARN_ON_ONCE(tsk->mm);
1294
1295 task_lock(tsk);
1296 /* Hold off tlb flush IPIs while switching mm's */
1297 local_irq_disable();
1298 active_mm = tsk->active_mm;
1299 if (active_mm != mm) {
1300 mmgrab(mm);
1301 tsk->active_mm = mm;
1302 }
1303 tsk->mm = mm;
1304 membarrier_update_current_mm(mm);
1305 switch_mm_irqs_off(active_mm, mm, tsk);
> 1306 membarrier_finish_switch_mm(atomic_read(&mm->membarrier_state));
1307 local_irq_enable();
1308 task_unlock(tsk);
1309 #ifdef finish_arch_post_lock_switch
1310 finish_arch_post_lock_switch();
1311 #endif
1312
1313 if (active_mm != mm)
1314 mmdrop(active_mm);
1315
1316 to_kthread(tsk)->oldfs = force_uaccess_begin();
1317 }
1318 EXPORT_SYMBOL_GPL(kthread_use_mm);
1319
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30255 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-21 1:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-21 1:14 [luto:x86/fixes 8/13] kernel/kthread.c:1306:2: error: implicit declaration of function 'membarrier_finish_switch_mm' 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.