tree:
https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git for-next
head: e4bdb161fbb94e741a060e6dc69ab690ab5624da
commit: 512022c8fb5ff1fe7c734b00d1bab0f9485dcf01 [2/11] riscv: use vDSO common flow to
reduce the latency of the time-related functions
config: riscv-randconfig-r001-20200606 (attached as .config)
compiler: riscv32-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
git checkout 512022c8fb5ff1fe7c734b00d1bab0f9485dcf01
# 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(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
| ^~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:314:17: note: in definition of macro '__READ_ONCE'
314 | union { typeof(x) __val; char __c[1]; } __u; | ^
include/asm-generic/preempt.h:11:9: note: in expansion of macro 'READ_ONCE'
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~~~~~~~~
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have
'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
include/linux/compiler.h:314:17: note: in definition of macro '__READ_ONCE'
314 | union { typeof(x) __val; char __c[1]; } __u; | ^
include/asm-generic/preempt.h:11:9: note: in expansion of macro 'READ_ONCE'
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~~~~~~~~
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have
'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
include/linux/compiler.h:316:22: note: in definition of macro '__READ_ONCE'
316 | __read_once_size(&(x), __u.__c, sizeof(x)); |
^
include/asm-generic/preempt.h:11:9: note: in expansion of macro 'READ_ONCE'
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~~~~~~~~
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have
'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
include/linux/compiler.h:316:42: note: in definition of macro '__READ_ONCE'
316 | __read_once_size(&(x), __u.__c, sizeof(x)); |
^
include/asm-generic/preempt.h:11:9: note: in expansion of macro 'READ_ONCE'
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~~~~~~~~
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have
'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
include/linux/compiler.h:318:30: note: in definition of macro '__READ_ONCE'
318 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); |
^
include/asm-generic/preempt.h:11:9: note: in expansion of macro 'READ_ONCE'
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~~~~~~~~
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have
'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
include/linux/compiler.h:318:50: note: in definition of macro '__READ_ONCE'
318 | __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); |
^
include/asm-generic/preempt.h:11:9: note: in expansion of macro 'READ_ONCE'
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~~~~~~~~
In file included from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
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 ¤t_thread_info()->preempt_count;
| ^~
In file included from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/riscv/kernel/asm-offsets.c:10:
include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test':
include/linux/thread_info.h:98:22: warning: passing argument 1 of
'test_ti_thread_flag' makes pointer from integer without a cast
[-Wint-conversion]
98 | test_ti_thread_flag(current_thread_info(), flag)
| ^~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/thread_info.h:100:28: note: in expansion of macro
'test_thread_flag'
100 | #define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
| ^~~~~~~~~~~~~~~~
include/asm-generic/preempt.h:69:36: note: in expansion of macro
'tif_need_resched'
69 | return !--*preempt_count_ptr() && tif_need_resched();
| ^~~~~~~~~~~~~~~~
include/linux/thread_info.h:82:59: note: expected 'struct thread_info *' but
argument is of type 'int'
82 | static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
| ~~~~~~~~~~~~~~~~~~~~^~
In file included from arch/riscv/include/asm/bug.h:9,
from include/linux/bug.h:5,
from arch/riscv/include/asm/current.h:13,
from include/linux/sched.h:12,
from arch/riscv/kernel/asm-offsets.c:10:
include/asm-generic/preempt.h: In function 'should_resched':
include/linux/thread_info.h:98:22: warning: passing argument 1 of
'test_ti_thread_flag' makes pointer from integer without a cast
[-Wint-conversion]
98 | test_ti_thread_flag(current_thread_info(), flag)
| ^~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
33 | ______r = __builtin_expect(!!(x), expect); |
^
> include/asm-generic/preempt.h:77:9: note: in expansion of macro
'unlikely'
77 | return unlikely(preempt_count() == preempt_offset
&&
| ^~~~~~~~
include/linux/thread_info.h:100:28: note: in expansion of macro
'test_thread_flag'
100 | #define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
| ^~~~~~~~~~~~~~~~
include/asm-generic/preempt.h:78:4: note: in expansion of macro
'tif_need_resched'
78 | tif_need_resched());
| ^~~~~~~~~~~~~~~~
In file included from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/riscv/kernel/asm-offsets.c:10:
include/linux/thread_info.h:82:59: note: expected 'struct thread_info *' but
argument is of type 'int'
82 | static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
| ~~~~~~~~~~~~~~~~~~~~^~
In file included from arch/riscv/include/asm/bug.h:9,
from include/linux/bug.h:5,
from arch/riscv/include/asm/current.h:13,
from include/linux/sched.h:12,
from arch/riscv/kernel/asm-offsets.c:10:
include/linux/thread_info.h:98:22: warning: passing argument 1 of
'test_ti_thread_flag' makes pointer from integer without a cast
[-Wint-conversion]
98 | test_ti_thread_flag(current_thread_info(), flag)
| ^~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/compiler.h:35:19: note: in definition of macro '__branch_check__'
35 | expect, is_constant); | ^~~~~~~~~~~
> include/asm-generic/preempt.h:77:9: note: in expansion of macro
'unlikely'
77 | return unlikely(preempt_count() == preempt_offset
&&
| ^~~~~~~~
include/linux/thread_info.h:100:28: note: in expansion of macro
'test_thread_flag'
100 | #define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
| ^~~~~~~~~~~~~~~~
include/asm-generic/preempt.h:78:4: note: in expansion of macro
'tif_need_resched'
78 | tif_need_resched());
| ^~~~~~~~~~~~~~~~
In file included from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/riscv/kernel/asm-offsets.c:10:
include/linux/thread_info.h:82:59: note: expected 'struct thread_info *' but
argument is of type 'int'
82 | static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
| ~~~~~~~~~~~~~~~~~~~~^~
In file included from include/linux/compiler_types.h:68,
from <command-line>:
include/asm-generic/mmiowb.h: In function 'mmiowb_set_pending':
arch/riscv/include/asm/smp.h:44:54: error: invalid type argument of '->' (have
'int')
44 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:58:26: note: in definition of macro 'RELOC_HIDE'
58 | (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/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'this_cpu_ptr'
30 | #define __mmiowb_state() this_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:44:54: error: invalid type argument of '->' (have
'int')
44 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:58:26: note: in definition of macro 'RELOC_HIDE'
58 | (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/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'this_cpu_ptr'
30 | #define __mmiowb_state() this_cpu_ptr(&__mmiowb_state)
| ^~~~~~~~~~~~
include/asm-generic/mmiowb.h:43:28: note: in expansion of macro '__mmiowb_state'
43 | struct mmiowb_state *ms = __mmiowb_state();
| ^~~~~~~~~~~~~~
include/asm-generic/mmiowb.h: In function 'mmiowb_spin_unlock':
arch/riscv/include/asm/smp.h:44:54: error: invalid type argument of '->' (have
'int')
44 | #define raw_smp_processor_id() (current_thread_info()->cpu)
| ^~
include/linux/compiler-gcc.h:58:26: note: in definition of macro 'RELOC_HIDE'
58 | (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/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/asm-generic/mmiowb.h:30:26: note: in expansion of macro 'this_cpu_ptr'
30 | #define __mmiowb_state() this_cpu_ptr(&__mmiowb_state)
| ^~~~~~~~~~~~
include/asm-generic/mmiowb.h:49:28: note: in expansion of macro '__mmiowb_state'
49 | struct mmiowb_state *ms = __mmiowb_state();
| ^~~~~~~~~~~~~~
In file included from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/riscv/kernel/asm-offsets.c:10:
include/linux/sched.h: In function 'scheduler_ipi':
include/linux/thread_info.h:98:22: warning: passing argument 1 of
'test_ti_thread_flag' makes pointer from integer without a cast
[-Wint-conversion]
98 | test_ti_thread_flag(current_thread_info(), flag)
| ^~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/thread_info.h:100:28: note: in expansion of macro
'test_thread_flag'
100 | #define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
| ^~~~~~~~~~~~~~~~
include/linux/preempt.h:271:6: note: in expansion of macro 'tif_need_resched'
271 | if (tif_need_resched()) | ^~~~~~~~~~~~~~~~
include/linux/sched.h:1745:2: note: in expansion of macro
'preempt_fold_need_resched'
1745 | preempt_fold_need_resched();
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/thread_info.h:82:59: note: expected 'struct thread_info *' but
argument is of type 'int'
82 | static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
| ~~~~~~~~~~~~~~~~~~~~^~
In file included from arch/riscv/include/asm/bug.h:9,
from include/linux/bug.h:5,
from arch/riscv/include/asm/current.h:13,
from include/linux/sched.h:12,
from arch/riscv/kernel/asm-offsets.c:10:
include/linux/sched.h: In function 'need_resched':
include/linux/thread_info.h:98:22: warning: passing argument 1 of
'test_ti_thread_flag' makes pointer from integer without a cast
[-Wint-conversion]
98 | test_ti_thread_flag(current_thread_info(), flag)
| ^~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
33 | ______r = __builtin_expect(!!(x), expect); |
^
> include/linux/sched.h:1855:9: note: in expansion of macro
'unlikely'
1855 | return unlikely(tif_need_resched());
| ^~~~~~~~
include/linux/thread_info.h:100:28: note: in expansion of macro
'test_thread_flag'
100 | #define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
| ^~~~~~~~~~~~~~~~
include/linux/sched.h:1855:18: note: in expansion of macro 'tif_need_resched'
1855 | return unlikely(tif_need_resched());
| ^~~~~~~~~~~~~~~~
In file included from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/riscv/kernel/asm-offsets.c:10:
include/linux/thread_info.h:82:59: note: expected 'struct thread_info *' but
argument is of type 'int'
82 | static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
| ~~~~~~~~~~~~~~~~~~~~^~
In file included from arch/riscv/include/asm/bug.h:9,
from include/linux/bug.h:5,
from arch/riscv/include/asm/current.h:13,
from include/linux/sched.h:12,
from arch/riscv/kernel/asm-offsets.c:10:
include/linux/thread_info.h:98:22: warning: passing argument 1 of
'test_ti_thread_flag' makes pointer from integer without a cast
[-Wint-conversion]
98 | test_ti_thread_flag(current_thread_info(), flag)
| ^~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/compiler.h:35:19: note: in definition of macro '__branch_check__'
35 | expect, is_constant); | ^~~~~~~~~~~
> include/linux/sched.h:1855:9: note: in expansion of macro
'unlikely'
1855 | return unlikely(tif_need_resched());
| ^~~~~~~~
include/linux/thread_info.h:100:28: note: in expansion of macro
'test_thread_flag'
100 | #define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
| ^~~~~~~~~~~~~~~~
include/linux/sched.h:1855:18: note: in expansion of macro 'tif_need_resched'
1855 | return unlikely(tif_need_resched());
| ^~~~~~~~~~~~~~~~
In file included from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/riscv/kernel/asm-offsets.c:10:
include/linux/thread_info.h:82:59: note: expected 'struct thread_info *' but
argument is of type 'int'
82 | static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
| ~~~~~~~~~~~~~~~~~~~~^~
arch/riscv/kernel/asm-offsets.c: At top level:
arch/riscv/kernel/asm-offsets.c:14:6: warning: no previous prototype for
'asm_offsets' [-Wmissing-prototypes]
14 | void asm_offsets(void)
| ^~~~~~~~~~~
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:133:35: error: 'struct task_struct' has no member
named 'thread_info'
133 | #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, task_struct, thread_info);
| ^~~~~~
include/linux/compiler_types.h:133:35: error: 'struct task_struct' has no member
named 'thread_info'
133 | #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_FLAGS, task_struct, thread_info.flags);
| ^~~~~~
include/linux/compiler_types.h:133:35: error: 'struct task_struct' has no member
named 'thread_info'
133 | #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_PREEMPT_COUNT, task_struct, thread_info.preempt_count);
| ^~~~~~
include/linux/compiler_types.h:133:35: error: 'struct task_struct' has no member
named 'thread_info'
133 | #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_KERNEL_SP, task_struct, thread_info.kernel_sp);
| ^~~~~~
include/linux/compiler_types.h:133:35: error: 'struct task_struct' has no member
named 'thread_info'
133 | #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_USER_SP, task_struct, thread_info.user_sp);
| ^~~~~~
vim +/unlikely +77 include/asm-generic/preempt.h
bdb43806589096 Peter Zijlstra 2013-09-10 71
bdb43806589096 Peter Zijlstra 2013-09-10 72 /*
bdb43806589096 Peter Zijlstra 2013-09-10 73 * Returns true when we need to
resched and can (barring IRQ state).
bdb43806589096 Peter Zijlstra 2013-09-10 74 */
fe32d3cd5e8eb0 Konstantin Khlebnikov 2015-07-15 75 static __always_inline bool
should_resched(int preempt_offset)
bdb43806589096 Peter Zijlstra 2013-09-10 76 {
fe32d3cd5e8eb0 Konstantin Khlebnikov 2015-07-15 @77 return unlikely(preempt_count() ==
preempt_offset &&
fe32d3cd5e8eb0 Konstantin Khlebnikov 2015-07-15 78 tif_need_resched());
bdb43806589096 Peter Zijlstra 2013-09-10 79 }
bdb43806589096 Peter Zijlstra 2013-09-10 80
:::::: The code at line 77 was first introduced by commit
:::::: fe32d3cd5e8eb0f82e459763374aa80797023403 sched/preempt: Fix cond_resched_lock() and
cond_resched_softirq()
:::::: TO: Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org