[tip:tmp.tmp2 16/364] include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'

From: kernel test robot
Date: Sun Jun 13 2021 - 16:18:17 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: afd3aae51f9e55c5e72f86f9344a7e73aa1039f1 [16/364] sched/headers: Move task->thread_info to per_task()
config: riscv-nommu_k210_defconfig (attached as .config)
compiler: riscv64-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/tip/tip.git/commit/?id=afd3aae51f9e55c5e72f86f9344a7e73aa1039f1
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip tmp.tmp2
git checkout afd3aae51f9e55c5e72f86f9344a7e73aa1039f1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:18,
from arch/riscv/kernel/asm-offsets.c:10:
include/asm-generic/preempt.h: In function 'preempt_count_ptr':
include/asm-generic/preempt.h:16:31: error: invalid type argument of '->' (have 'int')
16 | return &current_thread_info()->preempt_count;
| ^~
include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test':
include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' [-Werror=implicit-function-declaration]
69 | return !--*preempt_count_ptr() && tif_need_resched();
| ^~~~~~~~~~~~~~~~
In file included from include/linux/compiler_types.h:85,
from <command-line>:
include/asm-generic/mmiowb.h: In function 'mmiowb_set_pending':
arch/riscv/include/asm/smp.h:61:54: error: invalid type argument of '->' (have 'int')
61 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:35:26: note: in definition of macro 'RELOC_HIDE'
35 | (typeof(ptr)) (__ptr + (off)); \
| ^~~
include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:40: note: in expansion of macro 'raw_smp_processor_id'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~
include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
242 | arch_raw_cpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'raw_cpu_ptr'
30 | #define __mmiowb_state() raw_cpu_ptr(&__mmiowb_state)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:37:28: note: in expansion of macro '__mmiowb_state'
37 | struct mmiowb_state *ms = __mmiowb_state();
| ^~~~~~~~~~~~~~
include/asm-generic/mmiowb.h: In function 'mmiowb_spin_lock':
arch/riscv/include/asm/smp.h:61:54: error: invalid type argument of '->' (have 'int')
61 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:35:26: note: in definition of macro 'RELOC_HIDE'
35 | (typeof(ptr)) (__ptr + (off)); \
| ^~~
include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:40: note: in expansion of macro 'raw_smp_processor_id'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~
include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
242 | arch_raw_cpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'raw_cpu_ptr'
30 | #define __mmiowb_state() raw_cpu_ptr(&__mmiowb_state)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:45:28: note: in expansion of macro '__mmiowb_state'
45 | struct mmiowb_state *ms = __mmiowb_state();
| ^~~~~~~~~~~~~~
include/asm-generic/mmiowb.h: In function 'mmiowb_spin_unlock':
arch/riscv/include/asm/smp.h:61:54: error: invalid type argument of '->' (have 'int')
61 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:35:26: note: in definition of macro 'RELOC_HIDE'
35 | (typeof(ptr)) (__ptr + (off)); \
| ^~~
include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:40: note: in expansion of macro 'raw_smp_processor_id'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~
include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
242 | arch_raw_cpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'raw_cpu_ptr'
30 | #define __mmiowb_state() raw_cpu_ptr(&__mmiowb_state)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:51:28: note: in expansion of macro '__mmiowb_state'
51 | struct mmiowb_state *ms = __mmiowb_state();
| ^~~~~~~~~~~~~~
In file included from arch/riscv/kernel/asm-offsets.c:9:
arch/riscv/kernel/asm-offsets.c: In function 'asm_offsets':
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:32:2: note: in expansion of macro 'OFFSET'
32 | OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
| ^~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:33:2: note: in expansion of macro 'OFFSET'
33 | OFFSET(TASK_TI_PREEMPT_COUNT, task_struct, thread_info.preempt_count);
| ^~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:34:2: note: in expansion of macro 'OFFSET'
34 | OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
| ^~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:35:2: note: in expansion of macro 'OFFSET'
35 | OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);
| ^~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:36:2: note: in expansion of macro 'OFFSET'
36 | OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu);
| ^~~~~~
cc1: some warnings being treated as errors
--
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:18,
from arch/riscv/kernel/asm-offsets.c:10:
include/asm-generic/preempt.h: In function 'preempt_count_ptr':
include/asm-generic/preempt.h:16:31: error: invalid type argument of '->' (have 'int')
16 | return &current_thread_info()->preempt_count;
| ^~
include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test':
include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' [-Werror=implicit-function-declaration]
69 | return !--*preempt_count_ptr() && tif_need_resched();
| ^~~~~~~~~~~~~~~~
In file included from include/linux/compiler_types.h:85,
from <command-line>:
include/asm-generic/mmiowb.h: In function 'mmiowb_set_pending':
arch/riscv/include/asm/smp.h:61:54: error: invalid type argument of '->' (have 'int')
61 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:35:26: note: in definition of macro 'RELOC_HIDE'
35 | (typeof(ptr)) (__ptr + (off)); \
| ^~~
include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:40: note: in expansion of macro 'raw_smp_processor_id'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~
include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
242 | arch_raw_cpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'raw_cpu_ptr'
30 | #define __mmiowb_state() raw_cpu_ptr(&__mmiowb_state)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:37:28: note: in expansion of macro '__mmiowb_state'
37 | struct mmiowb_state *ms = __mmiowb_state();
| ^~~~~~~~~~~~~~
include/asm-generic/mmiowb.h: In function 'mmiowb_spin_lock':
arch/riscv/include/asm/smp.h:61:54: error: invalid type argument of '->' (have 'int')
61 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:35:26: note: in definition of macro 'RELOC_HIDE'
35 | (typeof(ptr)) (__ptr + (off)); \
| ^~~
include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:40: note: in expansion of macro 'raw_smp_processor_id'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~
include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
242 | arch_raw_cpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'raw_cpu_ptr'
30 | #define __mmiowb_state() raw_cpu_ptr(&__mmiowb_state)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:45:28: note: in expansion of macro '__mmiowb_state'
45 | struct mmiowb_state *ms = __mmiowb_state();
| ^~~~~~~~~~~~~~
include/asm-generic/mmiowb.h: In function 'mmiowb_spin_unlock':
arch/riscv/include/asm/smp.h:61:54: error: invalid type argument of '->' (have 'int')
61 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:35:26: note: in definition of macro 'RELOC_HIDE'
35 | (typeof(ptr)) (__ptr + (off)); \
| ^~~
include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~
include/asm-generic/percpu.h:31:40: note: in expansion of macro 'raw_smp_processor_id'
31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
| ^~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
| ^~~~~~~~~~~~~~~
include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
242 | arch_raw_cpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'raw_cpu_ptr'
30 | #define __mmiowb_state() raw_cpu_ptr(&__mmiowb_state)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:51:28: note: in expansion of macro '__mmiowb_state'
51 | struct mmiowb_state *ms = __mmiowb_state();
| ^~~~~~~~~~~~~~
In file included from arch/riscv/kernel/asm-offsets.c:9:
arch/riscv/kernel/asm-offsets.c: In function 'asm_offsets':
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:32:2: note: in expansion of macro 'OFFSET'
32 | OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
| ^~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:33:2: note: in expansion of macro 'OFFSET'
33 | OFFSET(TASK_TI_PREEMPT_COUNT, task_struct, thread_info.preempt_count);
| ^~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:34:2: note: in expansion of macro 'OFFSET'
34 | OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
| ^~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:35:2: note: in expansion of macro 'OFFSET'
35 | OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);
| ^~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread_info'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: in expansion of macro 'offsetof'
11 | DEFINE(sym, offsetof(struct str, mem))
| ^~~~~~~~
arch/riscv/kernel/asm-offsets.c:36:2: note: in expansion of macro 'OFFSET'
36 | OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu);
| ^~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/riscv/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1232: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.


vim +140 include/linux/compiler_types.h

71391bdd2e9aab Xiaozhou Liu 2018-12-14 139
71391bdd2e9aab Xiaozhou Liu 2018-12-14 @140 #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
71391bdd2e9aab Xiaozhou Liu 2018-12-14 141

:::::: The code at line 140 was first introduced by commit
:::::: 71391bdd2e9aab188f86bf1ecd9b232531ec7eea include/linux/compiler_types.h: don't pollute userspace with macro definitions

:::::: TO: Xiaozhou Liu <liuxiaozhou@xxxxxxxxxxxxx>
:::::: CC: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip