[tip:tmp.tmp2 253/364] include/linux/kernel.h:72:21: error: a parameter list without types is only allowed in a function definition
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: d9c2c90ff3d122ee8c4bf9129c91eb741b5c6463 [253/364] sched/headers: Simplify <linux/kernel.h>
config: x86_64-randconfig-b001-20210613 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=d9...
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 d9c2c90ff3d122ee8c4bf9129c91eb741b5c6463
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
In file included from kernel/bounds.c:10:
In file included from include/linux/page-flags.h:10:
In file included from include/linux/bug.h:5:
In file included from arch/x86/include/asm/bug.h:84:
In file included from include/asm-generic/bug.h:20:
include/linux/kernel.h:72:1: warning: declaration specifier missing, defaulting to 'int'
DECLARE_STATIC_CALL(might_resched, __cond_resched);
^
int
>> include/linux/kernel.h:72:21: error: a parameter list without types is only allowed in a function definition
DECLARE_STATIC_CALL(might_resched, __cond_resched);
^
>> include/linux/kernel.h:76:2: error: implicit declaration of function 'static_call_mod' [-Werror,-Wimplicit-function-declaration]
static_call_mod(might_resched)();
^
>> include/linux/kernel.h:76:32: error: called object type 'int' is not a function or function pointer
static_call_mod(might_resched)();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1 warning and 3 errors generated.
--
In file included from kernel/bounds.c:10:
In file included from include/linux/page-flags.h:10:
In file included from include/linux/bug.h:5:
In file included from arch/x86/include/asm/bug.h:84:
In file included from include/asm-generic/bug.h:20:
include/linux/kernel.h:72:1: warning: declaration specifier missing, defaulting to 'int'
DECLARE_STATIC_CALL(might_resched, __cond_resched);
^
int
>> include/linux/kernel.h:72:21: error: a parameter list without types is only allowed in a function definition
DECLARE_STATIC_CALL(might_resched, __cond_resched);
^
>> include/linux/kernel.h:76:2: error: implicit declaration of function 'static_call_mod' [-Werror,-Wimplicit-function-declaration]
static_call_mod(might_resched)();
^
>> include/linux/kernel.h:76:32: error: called object type 'int' is not a function or function pointer
static_call_mod(might_resched)();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1 warning and 3 errors generated.
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1232: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from kernel/bounds.c:10:
In file included from include/linux/page-flags.h:10:
In file included from include/linux/bug.h:5:
In file included from arch/x86/include/asm/bug.h:84:
In file included from include/asm-generic/bug.h:20:
include/linux/kernel.h:72:1: warning: declaration specifier missing, defaulting to 'int'
DECLARE_STATIC_CALL(might_resched, __cond_resched);
^
int
>> include/linux/kernel.h:72:21: error: a parameter list without types is only allowed in a function definition
DECLARE_STATIC_CALL(might_resched, __cond_resched);
^
>> include/linux/kernel.h:76:2: error: implicit declaration of function 'static_call_mod' [-Werror,-Wimplicit-function-declaration]
static_call_mod(might_resched)();
^
>> include/linux/kernel.h:76:32: error: called object type 'int' is not a function or function pointer
static_call_mod(might_resched)();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1 warning and 3 errors generated.
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.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 +72 include/linux/kernel.h
b965f1ddb47daa Peter Zijlstra (Intel 2021-01-18 71)
b965f1ddb47daa Peter Zijlstra (Intel 2021-01-18 @72) DECLARE_STATIC_CALL(might_resched, __cond_resched);
b965f1ddb47daa Peter Zijlstra (Intel 2021-01-18 73)
b965f1ddb47daa Peter Zijlstra (Intel 2021-01-18 74) static __always_inline void might_resched(void)
b965f1ddb47daa Peter Zijlstra (Intel 2021-01-18 75) {
ef72661e28c64a Peter Zijlstra 2021-01-25 @76 static_call_mod(might_resched)();
b965f1ddb47daa Peter Zijlstra (Intel 2021-01-18 77) }
b965f1ddb47daa Peter Zijlstra (Intel 2021-01-18 78)
:::::: The code at line 72 was first introduced by commit
:::::: b965f1ddb47daa5b8b2e2bc9c921431236830367 preempt/dynamic: Provide cond_resched() and might_resched() static calls
:::::: TO: Peter Zijlstra (Intel) <peterz(a)infradead.org>
:::::: 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
1 year, 3 months
[tip:tmp.tmp2 255/364] arch/powerpc/include/asm/book3s/64/hash.h:248:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'hash__vmemmap_create_mapping'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: a490873e1d58c0b339bb50ee382dc1fe95c6d9a4 [255/364] sched/headers, printk: Reduce <linux/printk.h> header dependencies
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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=a4...
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 a490873e1d58c0b339bb50ee382dc1fe95c6d9a4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
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_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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_types.h:279:13: note: in definition of macro '__unqual_scalar_typeof'
279 | _Generic((x), \
| ^
include/asm-generic/rwonce.h:50:2: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(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/powerpc/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:248,
from include/asm-generic/div64.h:27,
from ./arch/powerpc/include/generated/asm/div64.h:1,
from include/linux/math64.h:7,
from include/linux/time.h:6,
from include/linux/compat.h:10,
from arch/powerpc/kernel/asm-offsets.c:14:
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have 'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
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))
| ^
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/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
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;
| ^~
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 arch/powerpc/include/asm/book3s/64/pgtable.h:296,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:31,
from arch/powerpc/include/asm/mmu.h:402,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/hw_irq.h:103,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/linux/spinlock.h:56,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/book3s/64/hash.h: At top level:
>> arch/powerpc/include/asm/book3s/64/hash.h:248:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'hash__vmemmap_create_mapping'
248 | extern int __meminit hash__vmemmap_create_mapping(unsigned long start,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/book3s/64/pgtable.h:297,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:31,
from arch/powerpc/include/asm/mmu.h:402,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/hw_irq.h:103,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/linux/spinlock.h:56,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
>> arch/powerpc/include/asm/book3s/64/radix.h:289:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'radix__vmemmap_create_mapping'
289 | extern int __meminit radix__vmemmap_create_mapping(unsigned long start,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:31,
from arch/powerpc/include/asm/mmu.h:402,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/hw_irq.h:103,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/linux/spinlock.h:56,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
>> arch/powerpc/include/asm/book3s/64/pgtable.h:1075:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'vmemmap_create_mapping'
1075 | static inline int __meminit vmemmap_create_mapping(unsigned long start,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/mmu.h:402,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/hw_irq.h:103,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/linux/spinlock.h:56,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
>> arch/powerpc/include/asm/book3s/64/mmu.h:210:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'early_init_mmu'
210 | static inline void __init early_init_mmu(void)
| ^~~~~~~~~~~~~~
In file included from include/linux/rculist.h:11,
from include/linux/dcache.h:8,
from include/linux/fs.h:10,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/kup.h:18,
from arch/powerpc/include/asm/uaccess.h:9,
from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/book3s/64/kup.h: In function 'current_thread_amr':
arch/powerpc/include/asm/book3s/64/kup.h:217:6: error: implicit declaration of function 'task_thread'; did you mean 'start_thread'? [-Werror=implicit-function-declaration]
217 | if (task_thread(current).regs)
| ^~~~~~~~~~~
| start_thread
arch/powerpc/include/asm/book3s/64/kup.h:217:26: error: request for member 'regs' in something not a structure or union
217 | if (task_thread(current).regs)
| ^
arch/powerpc/include/asm/book3s/64/kup.h:218:30: error: request for member 'regs' in something not a structure or union
218 | return task_thread(current).regs->amr;
| ^
arch/powerpc/include/asm/book3s/64/kup.h: In function 'current_thread_iamr':
arch/powerpc/include/asm/book3s/64/kup.h:224:26: error: request for member 'regs' in something not a structure or union
224 | if (task_thread(current).regs)
| ^
arch/powerpc/include/asm/book3s/64/kup.h:225:30: error: request for member 'regs' in something not a structure or union
225 | return task_thread(current).regs->iamr;
| ^
In file included from include/linux/compat.h:22,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/powerpc/include/asm/compat.h:99:45: error: request for member 'regs' in something not a structure or union
99 | struct pt_regs *regs = task_thread(current).regs;
| ^
In file included from include/linux/thread_info.h:50,
from include/linux/uio.h:10,
from include/linux/socket.h:8,
from include/linux/compat.h:15,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/thread_info.h:167:26: error: implicit declaration of function 'test_thread_flag'; did you mean 'test_thread_local_flags'? [-Werror=implicit-function-declaration]
167 | #define is_32bit_task() (test_thread_flag(TIF_32BIT))
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:107:7: note: in expansion of macro 'is_32bit_task'
107 | if (!is_32bit_task())
| ^~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/kvm_ppc.h:19,
from arch/powerpc/include/asm/dbell.h:17,
from arch/powerpc/kernel/asm-offsets.c:38:
include/linux/kvm_host.h: In function 'kvm_vcpu_can_poll':
include/linux/kvm_host.h:271:35: error: implicit declaration of function 'need_resched'; did you mean 'should_resched'? [-Werror=implicit-function-declaration]
271 | return single_task_running() && !need_resched() && ktime_before(cur, stop);
| ^~~~~~~~~~~~
| should_resched
In file included from arch/powerpc/kernel/asm-offsets.c:29:
arch/powerpc/kernel/asm-offsets.c: In function 'main':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
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/powerpc/kernel/asm-offsets.c:81:2: note: in expansion of macro 'OFFSET'
81 | OFFSET(THREAD, task_struct, thread);
| ^~~~~~
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'stack_canary'
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/powerpc/kernel/asm-offsets.c:84:2: note: in expansion of macro 'OFFSET'
84 | OFFSET(TASK_CANARY, task_struct, stack_canary);
| ^~~~~~
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'stack'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
--
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_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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_types.h:279:13: note: in definition of macro '__unqual_scalar_typeof'
279 | _Generic((x), \
| ^
include/asm-generic/rwonce.h:50:2: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(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/powerpc/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:248,
from include/asm-generic/div64.h:27,
from ./arch/powerpc/include/generated/asm/div64.h:1,
from include/linux/math64.h:7,
from include/linux/time.h:6,
from include/linux/compat.h:10,
from arch/powerpc/kernel/asm-offsets.c:14:
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have 'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
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))
| ^
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/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
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;
| ^~
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 arch/powerpc/include/asm/book3s/64/pgtable.h:296,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:31,
from arch/powerpc/include/asm/mmu.h:402,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/hw_irq.h:103,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/linux/spinlock.h:56,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/book3s/64/hash.h: At top level:
>> arch/powerpc/include/asm/book3s/64/hash.h:248:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'hash__vmemmap_create_mapping'
248 | extern int __meminit hash__vmemmap_create_mapping(unsigned long start,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/book3s/64/pgtable.h:297,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:31,
from arch/powerpc/include/asm/mmu.h:402,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/hw_irq.h:103,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/linux/spinlock.h:56,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
>> arch/powerpc/include/asm/book3s/64/radix.h:289:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'radix__vmemmap_create_mapping'
289 | extern int __meminit radix__vmemmap_create_mapping(unsigned long start,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:31,
from arch/powerpc/include/asm/mmu.h:402,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/hw_irq.h:103,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/linux/spinlock.h:56,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
>> arch/powerpc/include/asm/book3s/64/pgtable.h:1075:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'vmemmap_create_mapping'
1075 | static inline int __meminit vmemmap_create_mapping(unsigned long start,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/mmu.h:402,
from arch/powerpc/include/asm/lppaca.h:46,
from arch/powerpc/include/asm/paca.h:17,
from arch/powerpc/include/asm/hw_irq.h:103,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/linux/spinlock.h:56,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
>> arch/powerpc/include/asm/book3s/64/mmu.h:210:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'early_init_mmu'
210 | static inline void __init early_init_mmu(void)
| ^~~~~~~~~~~~~~
In file included from include/linux/rculist.h:11,
from include/linux/dcache.h:8,
from include/linux/fs.h:10,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/kup.h:18,
from arch/powerpc/include/asm/uaccess.h:9,
from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/book3s/64/kup.h: In function 'current_thread_amr':
arch/powerpc/include/asm/book3s/64/kup.h:217:6: error: implicit declaration of function 'task_thread'; did you mean 'start_thread'? [-Werror=implicit-function-declaration]
217 | if (task_thread(current).regs)
| ^~~~~~~~~~~
| start_thread
arch/powerpc/include/asm/book3s/64/kup.h:217:26: error: request for member 'regs' in something not a structure or union
217 | if (task_thread(current).regs)
| ^
arch/powerpc/include/asm/book3s/64/kup.h:218:30: error: request for member 'regs' in something not a structure or union
218 | return task_thread(current).regs->amr;
| ^
arch/powerpc/include/asm/book3s/64/kup.h: In function 'current_thread_iamr':
arch/powerpc/include/asm/book3s/64/kup.h:224:26: error: request for member 'regs' in something not a structure or union
224 | if (task_thread(current).regs)
| ^
arch/powerpc/include/asm/book3s/64/kup.h:225:30: error: request for member 'regs' in something not a structure or union
225 | return task_thread(current).regs->iamr;
| ^
In file included from include/linux/compat.h:22,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/powerpc/include/asm/compat.h:99:45: error: request for member 'regs' in something not a structure or union
99 | struct pt_regs *regs = task_thread(current).regs;
| ^
In file included from include/linux/thread_info.h:50,
from include/linux/uio.h:10,
from include/linux/socket.h:8,
from include/linux/compat.h:15,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/thread_info.h:167:26: error: implicit declaration of function 'test_thread_flag'; did you mean 'test_thread_local_flags'? [-Werror=implicit-function-declaration]
167 | #define is_32bit_task() (test_thread_flag(TIF_32BIT))
| ^~~~~~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:107:7: note: in expansion of macro 'is_32bit_task'
107 | if (!is_32bit_task())
| ^~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/kvm_ppc.h:19,
from arch/powerpc/include/asm/dbell.h:17,
from arch/powerpc/kernel/asm-offsets.c:38:
include/linux/kvm_host.h: In function 'kvm_vcpu_can_poll':
include/linux/kvm_host.h:271:35: error: implicit declaration of function 'need_resched'; did you mean 'should_resched'? [-Werror=implicit-function-declaration]
271 | return single_task_running() && !need_resched() && ktime_before(cur, stop);
| ^~~~~~~~~~~~
| should_resched
In file included from arch/powerpc/kernel/asm-offsets.c:29:
arch/powerpc/kernel/asm-offsets.c: In function 'main':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
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/powerpc/kernel/asm-offsets.c:81:2: note: in expansion of macro 'OFFSET'
81 | OFFSET(THREAD, task_struct, thread);
| ^~~~~~
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'stack_canary'
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/powerpc/kernel/asm-offsets.c:84:2: note: in expansion of macro 'OFFSET'
84 | OFFSET(TASK_CANARY, task_struct, stack_canary);
| ^~~~~~
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'stack'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
..
vim +248 arch/powerpc/include/asm/book3s/64/hash.h
c605782b1c3f1c1 arch/powerpc/include/asm/pte-hash64.h Benjamin Herrenschmidt 2009-03-10 245
31a14fae92b29b7 arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 246
c766ee72235d09b arch/powerpc/include/asm/book3s/64/hash.h Christophe Leroy 2018-10-09 247 int hash__map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t prot);
31a14fae92b29b7 arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 @248 extern int __meminit hash__vmemmap_create_mapping(unsigned long start,
31a14fae92b29b7 arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 249 unsigned long page_size,
31a14fae92b29b7 arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 250 unsigned long phys);
31a14fae92b29b7 arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 251 extern void hash__vmemmap_remove_mapping(unsigned long start,
31a14fae92b29b7 arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 252 unsigned long page_size);
32b53c012e0bfe2 arch/powerpc/include/asm/book3s/64/hash.h Reza Arbab 2017-01-03 253
:::::: The code at line 248 was first introduced by commit
:::::: 31a14fae92b29b7a7fcc65600f072bf448d3b0eb powerpc/mm: Abstraction for vmemmap and map_kernel_page()
:::::: TO: Aneesh Kumar K.V <aneesh.kumar(a)linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 348/364] include/linux/ww_mutex.h:150:2: error: implicit declaration of function 'DEBUG_LOCKS_WARN_ON'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 80b4a6d3c8c2325e072a36e473706f5165e0e9fb [348/364] sched/headers, locking/mutexes: Optimize <linux/mutex.h> header dependencies
config: ia64-allmodconfig (attached as .config)
compiler: ia64-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=80...
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 80b4a6d3c8c2325e072a36e473706f5165e0e9fb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 >>):
In file included from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:7,
from arch/ia64/kernel/asm-offsets.c:10:
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/seqlock.h:20,
from include/linux/mm_types.h:17,
from include/linux/page-flags.h:13,
from arch/ia64/include/asm/uaccess.h:37,
from include/linux/uaccess.h:13,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:12,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/ww_mutex.h: In function 'ww_acquire_done':
>> include/linux/ww_mutex.h:150:2: error: implicit declaration of function 'DEBUG_LOCKS_WARN_ON' [-Werror=implicit-function-declaration]
150 | DEBUG_LOCKS_WARN_ON(ctx->done_acquire);
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
include/linux/sched/task.h: In function 'arch_thread_struct_whitelist':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/task.h:154:34: note: in expansion of macro 'offsetof'
154 | *size = arch_task_struct_size - offsetof(struct task_struct, thread);
| ^~~~~~~~
In file included from include/linux/sched/signal.h:13,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/sched/thread_info_api.h: At top level:
include/linux/sched/thread_info_api.h:42:59: error: macro "current_thread_info" passed 1 arguments, but takes just 0
42 | static inline struct thread_info *current_thread_info(void)
| ^
In file included from include/linux/thread_info.h:52,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:7,
from arch/ia64/kernel/asm-offsets.c:10:
arch/ia64/include/asm/thread_info.h:62: note: macro "current_thread_info" defined here
62 | #define current_thread_info() ((struct thread_info *) 0)
|
In file included from include/linux/sched/signal.h:13,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/sched/thread_info_api.h:43:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
43 | {
| ^
In file included from include/linux/irq.h:21,
from arch/ia64/include/asm/hardirq.h:19,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from include/linux/kernel_stat.h:9,
from include/linux/sched/signal.h:21,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/slab.h:20:10: fatal error: asm/page_types.h: No such file or directory
20 | #include <asm/page_types.h>
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
--
In file included from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:7,
from arch/ia64/kernel/asm-offsets.c:10:
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/seqlock.h:20,
from include/linux/mm_types.h:17,
from include/linux/page-flags.h:13,
from arch/ia64/include/asm/uaccess.h:37,
from include/linux/uaccess.h:13,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:12,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/ww_mutex.h: In function 'ww_acquire_done':
>> include/linux/ww_mutex.h:150:2: error: implicit declaration of function 'DEBUG_LOCKS_WARN_ON' [-Werror=implicit-function-declaration]
150 | DEBUG_LOCKS_WARN_ON(ctx->done_acquire);
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
include/linux/sched/task.h: In function 'arch_thread_struct_whitelist':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/task.h:154:34: note: in expansion of macro 'offsetof'
154 | *size = arch_task_struct_size - offsetof(struct task_struct, thread);
| ^~~~~~~~
In file included from include/linux/sched/signal.h:13,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/sched/thread_info_api.h: At top level:
include/linux/sched/thread_info_api.h:42:59: error: macro "current_thread_info" passed 1 arguments, but takes just 0
42 | static inline struct thread_info *current_thread_info(void)
| ^
In file included from include/linux/thread_info.h:52,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:7,
from arch/ia64/kernel/asm-offsets.c:10:
arch/ia64/include/asm/thread_info.h:62: note: macro "current_thread_info" defined here
62 | #define current_thread_info() ((struct thread_info *) 0)
|
In file included from include/linux/sched/signal.h:13,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/sched/thread_info_api.h:43:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
43 | {
| ^
In file included from include/linux/irq.h:21,
from arch/ia64/include/asm/hardirq.h:19,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from include/linux/kernel_stat.h:9,
from include/linux/sched/signal.h:21,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/slab.h:20:10: fatal error: asm/page_types.h: No such file or directory
20 | #include <asm/page_types.h>
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
make[2]: *** [scripts/Makefile.build:117: arch/ia64/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 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:7,
from arch/ia64/kernel/asm-offsets.c:10:
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/seqlock.h:20,
from include/linux/mm_types.h:17,
from include/linux/page-flags.h:13,
from arch/ia64/include/asm/uaccess.h:37,
from include/linux/uaccess.h:13,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:12,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/ww_mutex.h: In function 'ww_acquire_done':
>> include/linux/ww_mutex.h:150:2: error: implicit declaration of function 'DEBUG_LOCKS_WARN_ON' [-Werror=implicit-function-declaration]
150 | DEBUG_LOCKS_WARN_ON(ctx->done_acquire);
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
include/linux/sched/task.h: In function 'arch_thread_struct_whitelist':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/task.h:154:34: note: in expansion of macro 'offsetof'
154 | *size = arch_task_struct_size - offsetof(struct task_struct, thread);
| ^~~~~~~~
In file included from include/linux/sched/signal.h:13,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/sched/thread_info_api.h: At top level:
include/linux/sched/thread_info_api.h:42:59: error: macro "current_thread_info" passed 1 arguments, but takes just 0
42 | static inline struct thread_info *current_thread_info(void)
| ^
In file included from include/linux/thread_info.h:52,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:7,
from arch/ia64/kernel/asm-offsets.c:10:
arch/ia64/include/asm/thread_info.h:62: note: macro "current_thread_info" defined here
62 | #define current_thread_info() ((struct thread_info *) 0)
|
In file included from include/linux/sched/signal.h:13,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/sched/thread_info_api.h:43:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
43 | {
| ^
In file included from include/linux/irq.h:21,
from arch/ia64/include/asm/hardirq.h:19,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from include/linux/kernel_stat.h:9,
from include/linux/sched/signal.h:21,
from arch/ia64/kernel/asm-offsets.c:10:
include/linux/slab.h:20:10: fatal error: asm/page_types.h: No such file or directory
20 | #include <asm/page_types.h>
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
make[2]: *** [scripts/Makefile.build:117: arch/ia64/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 +/DEBUG_LOCKS_WARN_ON +150 include/linux/ww_mutex.h
1b375dc3071018 Maarten Lankhorst 2013-07-05 133
1b375dc3071018 Maarten Lankhorst 2013-07-05 134 /**
1b375dc3071018 Maarten Lankhorst 2013-07-05 135 * ww_acquire_done - marks the end of the acquire phase
1b375dc3071018 Maarten Lankhorst 2013-07-05 136 * @ctx: the acquire context
1b375dc3071018 Maarten Lankhorst 2013-07-05 137 *
1b375dc3071018 Maarten Lankhorst 2013-07-05 138 * Marks the end of the acquire phase, any further w/w mutex lock calls using
1b375dc3071018 Maarten Lankhorst 2013-07-05 139 * this context are forbidden.
1b375dc3071018 Maarten Lankhorst 2013-07-05 140 *
1b375dc3071018 Maarten Lankhorst 2013-07-05 141 * Calling this function is optional, it is just useful to document w/w mutex
1b375dc3071018 Maarten Lankhorst 2013-07-05 142 * code and clearly designated the acquire phase from actually using the locked
1b375dc3071018 Maarten Lankhorst 2013-07-05 143 * data structures.
1b375dc3071018 Maarten Lankhorst 2013-07-05 144 */
1b375dc3071018 Maarten Lankhorst 2013-07-05 145 static inline void ww_acquire_done(struct ww_acquire_ctx *ctx)
1b375dc3071018 Maarten Lankhorst 2013-07-05 146 {
1b375dc3071018 Maarten Lankhorst 2013-07-05 147 #ifdef CONFIG_DEBUG_MUTEXES
1b375dc3071018 Maarten Lankhorst 2013-07-05 148 lockdep_assert_held(ctx);
1b375dc3071018 Maarten Lankhorst 2013-07-05 149
1b375dc3071018 Maarten Lankhorst 2013-07-05 @150 DEBUG_LOCKS_WARN_ON(ctx->done_acquire);
1b375dc3071018 Maarten Lankhorst 2013-07-05 151 ctx->done_acquire = 1;
1b375dc3071018 Maarten Lankhorst 2013-07-05 152 #endif
1b375dc3071018 Maarten Lankhorst 2013-07-05 153 }
1b375dc3071018 Maarten Lankhorst 2013-07-05 154
:::::: The code at line 150 was first introduced by commit
:::::: 1b375dc30710180c4b88cc59caba6e3481ec5c8b mutex: Move ww_mutex definitions to ww_mutex.h
:::::: TO: Maarten Lankhorst <maarten.lankhorst(a)canonical.com>
:::::: 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
1 year, 3 months
[tip:tmp.tmp2 267/364] include/linux/numa.h:35:46: error: unknown type name 'u64'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 7e059d796dca598292ff44d2359c8e16dbc9c96f [267/364] sched/headers, numa: Factor out <linux/numa_types.h> from <linux/numa.h>
config: i386-defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=7e...
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 7e059d796dca598292ff44d2359c8e16dbc9c96f
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
In file included from drivers/md/dm-stats.c:3:
>> include/linux/numa.h:35:46: error: unknown type name 'u64'
35 | static inline int memory_add_physaddr_to_nid(u64 start)
| ^~~
include/linux/numa.h:39:39: error: unknown type name 'u64'
39 | static inline int phys_to_target_node(u64 start)
| ^~~
In file included from include/linux/workqueue.h:16,
from include/linux/srcu_types.h:20,
from include/linux/srcu.h:19,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:7,
from include/linux/slab.h:15,
from drivers/md/dm-stats.c:4:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from drivers/md/dm-stats.c:10:
drivers/md/dm-stats.c: At top level:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
vim +/u64 +35 include/linux/numa.h
a927bd6ba952d1 Dan Williams 2020-11-21 13
a927bd6ba952d1 Dan Williams 2020-11-21 14 #ifndef memory_add_physaddr_to_nid
a927bd6ba952d1 Dan Williams 2020-11-21 15 static inline int memory_add_physaddr_to_nid(u64 start)
a927bd6ba952d1 Dan Williams 2020-11-21 16 {
a927bd6ba952d1 Dan Williams 2020-11-21 17 pr_info_once("Unknown online node for memory at 0x%llx, assuming node 0\n",
a927bd6ba952d1 Dan Williams 2020-11-21 18 start);
a927bd6ba952d1 Dan Williams 2020-11-21 19 return 0;
a927bd6ba952d1 Dan Williams 2020-11-21 20 }
a927bd6ba952d1 Dan Williams 2020-11-21 21 #endif
a927bd6ba952d1 Dan Williams 2020-11-21 22 #ifndef phys_to_target_node
a927bd6ba952d1 Dan Williams 2020-11-21 23 static inline int phys_to_target_node(u64 start)
a927bd6ba952d1 Dan Williams 2020-11-21 24 {
a927bd6ba952d1 Dan Williams 2020-11-21 25 pr_info_once("Unknown target node for memory at 0x%llx, assuming node 0\n",
a927bd6ba952d1 Dan Williams 2020-11-21 26 start);
a927bd6ba952d1 Dan Williams 2020-11-21 27 return 0;
a927bd6ba952d1 Dan Williams 2020-11-21 28 }
a927bd6ba952d1 Dan Williams 2020-11-21 29 #endif
a927bd6ba952d1 Dan Williams 2020-11-21 30 #else /* !CONFIG_NUMA */
b2ca916ce392a9 Dan Williams 2020-02-16 31 static inline int numa_map_to_online_node(int node)
b2ca916ce392a9 Dan Williams 2020-02-16 32 {
b2ca916ce392a9 Dan Williams 2020-02-16 33 return NUMA_NO_NODE;
b2ca916ce392a9 Dan Williams 2020-02-16 34 }
a927bd6ba952d1 Dan Williams 2020-11-21 @35 static inline int memory_add_physaddr_to_nid(u64 start)
a927bd6ba952d1 Dan Williams 2020-11-21 36 {
a927bd6ba952d1 Dan Williams 2020-11-21 37 return 0;
a927bd6ba952d1 Dan Williams 2020-11-21 38 }
a927bd6ba952d1 Dan Williams 2020-11-21 39 static inline int phys_to_target_node(u64 start)
a927bd6ba952d1 Dan Williams 2020-11-21 40 {
a927bd6ba952d1 Dan Williams 2020-11-21 41 return 0;
a927bd6ba952d1 Dan Williams 2020-11-21 42 }
b2ca916ce392a9 Dan Williams 2020-02-16 43 #endif
b2ca916ce392a9 Dan Williams 2020-02-16 44
:::::: The code at line 35 was first introduced by commit
:::::: a927bd6ba952d13c52b8b385030943032f659a3e mm: fix phys_to_target_node() and memory_add_physaddr_to_nid() exports
:::::: TO: Dan Williams <dan.j.williams(a)intel.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 181/364] arch/x86/include/asm/page_64_types.h:75:21: error: implicit declaration of function 'test_thread_flag'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: ce4bb9d9b7175b1ac35cc13dd65b06aed1cb4fdd [181/364] sched/headers, x86/mm: Remove <linux/thread_info_api.h> from <asm/elf.h>
config: x86_64-kexec (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=ce...
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 ce4bb9d9b7175b1ac35cc13dd65b06aed1cb4fdd
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
In file included from arch/x86/include/asm/page_types.h:46,
from arch/x86/include/asm/page.h:9,
from arch/x86/include/asm/spinlock.h:7,
from include/linux/spinlock.h:91,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:12,
from include/linux/mman.h:5,
from lib/test_user_copy.c:13:
lib/test_user_copy.c: In function 'test_user_copy_init':
>> arch/x86/include/asm/page_64_types.h:75:21: error: implicit declaration of function 'test_thread_flag' [-Werror=implicit-function-declaration]
75 | #define TASK_SIZE (test_thread_flag(TIF_ADDR32) ? \
| ^~~~~~~~~~~~~~~~
lib/test_user_copy.c:201:35: note: in expansion of macro 'TASK_SIZE'
201 | if (user_addr >= (unsigned long)(TASK_SIZE)) {
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/test_thread_flag +75 arch/x86/include/asm/page_64_types.h
999c83e8ffd90c Christoph Hellwig 2020-09-03 66
999c83e8ffd90c Christoph Hellwig 2020-09-03 67 /* This decides where the kernel will search for a free chunk of vm
999c83e8ffd90c Christoph Hellwig 2020-09-03 68 * space during mmap's.
999c83e8ffd90c Christoph Hellwig 2020-09-03 69 */
999c83e8ffd90c Christoph Hellwig 2020-09-03 70 #define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? \
999c83e8ffd90c Christoph Hellwig 2020-09-03 71 0xc0000000 : 0xFFFFe000)
999c83e8ffd90c Christoph Hellwig 2020-09-03 72
999c83e8ffd90c Christoph Hellwig 2020-09-03 73 #define TASK_SIZE_LOW (test_thread_flag(TIF_ADDR32) ? \
999c83e8ffd90c Christoph Hellwig 2020-09-03 74 IA32_PAGE_OFFSET : DEFAULT_MAP_WINDOW)
999c83e8ffd90c Christoph Hellwig 2020-09-03 @75 #define TASK_SIZE (test_thread_flag(TIF_ADDR32) ? \
999c83e8ffd90c Christoph Hellwig 2020-09-03 76 IA32_PAGE_OFFSET : TASK_SIZE_MAX)
999c83e8ffd90c Christoph Hellwig 2020-09-03 77 #define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_ADDR32)) ? \
999c83e8ffd90c Christoph Hellwig 2020-09-03 78 IA32_PAGE_OFFSET : TASK_SIZE_MAX)
999c83e8ffd90c Christoph Hellwig 2020-09-03 79
:::::: The code at line 75 was first introduced by commit
:::::: 999c83e8ffd90caa00ee6caf054e037cf8a27d0e x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Al Viro <viro(a)zeniv.linux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 42/364] arch/powerpc/include/asm/book3s/64/kup.h:217:26: error: request for member 'regs' in something not a structure or union
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 0e04b3ebeb185beeb77ebc6f70f6a5eef9ecdb3d [42/364] sched/headers: Convert task_struct::thread to a per_task() field
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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=0e...
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 0e04b3ebeb185beeb77ebc6f70f6a5eef9ecdb3d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
| ^~~~~~~~~
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_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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_types.h:279:13: note: in definition of macro '__unqual_scalar_typeof'
279 | _Generic((x), \
| ^
include/asm-generic/rwonce.h:50:2: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(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/powerpc/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:248,
from include/asm-generic/div64.h:27,
from ./arch/powerpc/include/generated/asm/div64.h:1,
from include/linux/math64.h:7,
from include/linux/time.h:6,
from include/linux/compat.h:10,
from arch/powerpc/kernel/asm-offsets.c:14:
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have 'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
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))
| ^
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/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
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;
| ^~
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 arch/powerpc/include/asm/kup.h:18,
from arch/powerpc/include/asm/uaccess.h:9,
from include/linux/uaccess.h:12,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:11,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:35,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/book3s/64/kup.h: In function 'current_thread_amr':
arch/powerpc/include/asm/book3s/64/kup.h:217:6: error: implicit declaration of function 'task_thread'; did you mean 'start_thread'? [-Werror=implicit-function-declaration]
217 | if (task_thread(current).regs)
| ^~~~~~~~~~~
| start_thread
>> arch/powerpc/include/asm/book3s/64/kup.h:217:26: error: request for member 'regs' in something not a structure or union
217 | if (task_thread(current).regs)
| ^
arch/powerpc/include/asm/book3s/64/kup.h:218:30: error: request for member 'regs' in something not a structure or union
218 | return task_thread(current).regs->amr;
| ^
arch/powerpc/include/asm/book3s/64/kup.h: In function 'current_thread_iamr':
arch/powerpc/include/asm/book3s/64/kup.h:224:26: error: request for member 'regs' in something not a structure or union
224 | if (task_thread(current).regs)
| ^
arch/powerpc/include/asm/book3s/64/kup.h:225:30: error: request for member 'regs' in something not a structure or union
225 | return task_thread(current).regs->iamr;
| ^
In file included from <command-line>:
include/linux/sched/task.h: In function 'arch_thread_struct_whitelist':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/task.h:140:34: note: in expansion of macro 'offsetof'
140 | *size = arch_task_struct_size - offsetof(struct task_struct, thread);
| ^~~~~~~~
In file included from include/linux/sched/signal.h:12,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:35,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/sched/thread_info_api.h: At top level:
include/linux/sched/thread_info_api.h:38:35: error: conflicting types for 'current_thread_info'
38 | static inline struct thread_info *current_thread_info(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/thread_info.h:50,
from include/linux/uio.h:9,
from include/linux/socket.h:8,
from include/linux/compat.h:15,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/thread_info.h:156:27: note: previous implicit declaration of 'current_thread_info' was here
156 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/compat.h:22,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/powerpc/include/asm/compat.h:99:45: error: request for member 'regs' in something not a structure or union
99 | struct pt_regs *regs = task_thread(current).regs;
| ^
In file included from arch/powerpc/kernel/asm-offsets.c:29:
arch/powerpc/kernel/asm-offsets.c: In function 'main':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
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/powerpc/kernel/asm-offsets.c:81:2: note: in expansion of macro 'OFFSET'
81 | OFFSET(THREAD, task_struct, thread);
| ^~~~~~
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)
| ^~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/asm-offsets.c:206:6: note: in expansion of macro 'offsetof'
206 | offsetof(struct task_struct, thread_info));
| ^~~~~~~~
cc1: some warnings being treated as errors
--
| ^~~~~~~~~
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_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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_types.h:279:13: note: in definition of macro '__unqual_scalar_typeof'
279 | _Generic((x), \
| ^
include/asm-generic/rwonce.h:50:2: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(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/powerpc/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:248,
from include/asm-generic/div64.h:27,
from ./arch/powerpc/include/generated/asm/div64.h:1,
from include/linux/math64.h:7,
from include/linux/time.h:6,
from include/linux/compat.h:10,
from arch/powerpc/kernel/asm-offsets.c:14:
include/asm-generic/preempt.h:11:40: error: invalid type argument of '->' (have 'int')
11 | return READ_ONCE(current_thread_info()->preempt_count);
| ^~
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))
| ^
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/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/wait.h:12,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:8,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
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;
| ^~
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 arch/powerpc/include/asm/kup.h:18,
from arch/powerpc/include/asm/uaccess.h:9,
from include/linux/uaccess.h:12,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:11,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:35,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/book3s/64/kup.h: In function 'current_thread_amr':
arch/powerpc/include/asm/book3s/64/kup.h:217:6: error: implicit declaration of function 'task_thread'; did you mean 'start_thread'? [-Werror=implicit-function-declaration]
217 | if (task_thread(current).regs)
| ^~~~~~~~~~~
| start_thread
>> arch/powerpc/include/asm/book3s/64/kup.h:217:26: error: request for member 'regs' in something not a structure or union
217 | if (task_thread(current).regs)
| ^
arch/powerpc/include/asm/book3s/64/kup.h:218:30: error: request for member 'regs' in something not a structure or union
218 | return task_thread(current).regs->amr;
| ^
arch/powerpc/include/asm/book3s/64/kup.h: In function 'current_thread_iamr':
arch/powerpc/include/asm/book3s/64/kup.h:224:26: error: request for member 'regs' in something not a structure or union
224 | if (task_thread(current).regs)
| ^
arch/powerpc/include/asm/book3s/64/kup.h:225:30: error: request for member 'regs' in something not a structure or union
225 | return task_thread(current).regs->iamr;
| ^
In file included from <command-line>:
include/linux/sched/task.h: In function 'arch_thread_struct_whitelist':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/task.h:140:34: note: in expansion of macro 'offsetof'
140 | *size = arch_task_struct_size - offsetof(struct task_struct, thread);
| ^~~~~~~~
In file included from include/linux/sched/signal.h:12,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:35,
from include/linux/compat.h:17,
from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/sched/thread_info_api.h: At top level:
include/linux/sched/thread_info_api.h:38:35: error: conflicting types for 'current_thread_info'
38 | static inline struct thread_info *current_thread_info(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/thread_info.h:50,
from include/linux/uio.h:9,
from include/linux/socket.h:8,
from include/linux/compat.h:15,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/thread_info.h:156:27: note: previous implicit declaration of 'current_thread_info' was here
156 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/compat.h:22,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/powerpc/include/asm/compat.h:99:45: error: request for member 'regs' in something not a structure or union
99 | struct pt_regs *regs = task_thread(current).regs;
| ^
In file included from arch/powerpc/kernel/asm-offsets.c:29:
arch/powerpc/kernel/asm-offsets.c: In function 'main':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
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/powerpc/kernel/asm-offsets.c:81:2: note: in expansion of macro 'OFFSET'
81 | OFFSET(THREAD, task_struct, thread);
| ^~~~~~
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)
| ^~~~~~~~~~~~~~~~~~~
arch/powerpc/kernel/asm-offsets.c:206:6: note: in expansion of macro 'offsetof'
206 | offsetof(struct task_struct, thread_info));
| ^~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/powerpc/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 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
..
vim +/regs +217 arch/powerpc/include/asm/book3s/64/kup.h
68b34588e2027f arch/powerpc/include/asm/book3s/64/kup-radix.h Nicholas Piggin 2020-02-26 208
8c511eff182723 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2021-02-06 209 /* usage of kthread_use_mm() should inherit the
8c511eff182723 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2021-02-06 210 * AMR value of the operating address space. But, the AMR value is
8c511eff182723 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2021-02-06 211 * thread-specific and we inherit the address space and not thread
8c511eff182723 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2021-02-06 212 * access restrictions. Because of this ignore AMR value when accessing
8c511eff182723 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2021-02-06 213 * userspace via kernel thread.
48a8ab4eeb8271 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2020-11-27 214 */
48a8ab4eeb8271 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2020-11-27 215 static inline u64 current_thread_amr(void)
48a8ab4eeb8271 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2020-11-27 216 {
62c86dcbb11b4c arch/powerpc/include/asm/book3s/64/kup.h Ingo Molnar 2021-06-13 @217 if (task_thread(current).regs)
62c86dcbb11b4c arch/powerpc/include/asm/book3s/64/kup.h Ingo Molnar 2021-06-13 218 return task_thread(current).regs->amr;
8c511eff182723 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2021-02-06 219 return default_amr;
48a8ab4eeb8271 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2020-11-27 220 }
48a8ab4eeb8271 arch/powerpc/include/asm/book3s/64/kup.h Aneesh Kumar K.V 2020-11-27 221
:::::: The code at line 217 was first introduced by commit
:::::: 62c86dcbb11b4cc62b2407dc70e8cefda6e46bfe sched/headers: Automated conversion of task->thread accessors to task_thread()
:::::: TO: Ingo Molnar <mingo(a)kernel.org>
:::::: 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
1 year, 3 months
[tip:tmp.tmp2 351/364] include/linux/seqlock.h:239:76: error: implicit declaration of function 'mutex_unlock'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 6c13131b6a385211160e6bd8a211e5ed72e780a8 [351/364] sched/headers, locking/seqlocks: Optimize <linux/seqlock.h>
config: sparc64-randconfig-r015-20210613 (attached as .config)
compiler: sparc64-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=6c...
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 6c13131b6a385211160e6bd8a211e5ed72e780a8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64
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 >>):
In file included from arch/sparc/kernel/asm-offsets.c:14:
include/linux/sched.h:475:20: error: array type has incomplete element type 'struct held_lock'
475 | struct held_lock held_locks[MAX_LOCK_DEPTH];
| ^~~~~~~~~~
In file included from ./arch/sparc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/mm_types.h:9,
from arch/sparc/kernel/asm-offsets.c:15:
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/mm_types.h:17,
from arch/sparc/kernel/asm-offsets.c:15:
include/linux/seqlock.h: In function '__seqprop_mutex_sequence':
include/linux/seqlock.h:239:86: error: implicit declaration of function 'mutex_lock' [-Werror=implicit-function-declaration]
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
>> include/linux/seqlock.h:239:76: error: implicit declaration of function 'mutex_unlock'; did you mean 'write_unlock'? [-Werror=implicit-function-declaration]
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_mutex_assert':
include/linux/lockdep.h:286:52: error: dereferencing pointer to incomplete type 'struct mutex'
286 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
| ^~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON'
310 | WARN_ON(debug_locks && \
| ^~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \
| ^~~~~~~~~~~~~~~
include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held'
231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); \
| ^~~~~~~~~~~~~~~~~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_ww_mutex_sequence':
>> include/linux/seqlock.h:240:86: error: implicit declaration of function 'ww_mutex_lock'; did you mean 'write_lock'? [-Werror=implicit-function-declaration]
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
>> include/linux/seqlock.h:240:76: error: implicit declaration of function 'ww_mutex_unlock'; did you mean 'write_unlock'? [-Werror=implicit-function-declaration]
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_ww_mutex_assert':
include/linux/seqlock.h:240:68: error: dereferencing pointer to incomplete type 'struct ww_mutex'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON'
310 | WARN_ON(debug_locks && \
| ^~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \
| ^~~~~~~~~~~~~~~
include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held'
231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); \
| ^~~~~~~~~~~~~~~~~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c: At top level:
arch/sparc/kernel/asm-offsets.c:29:5: warning: no previous prototype for 'sparc64_foo' [-Wmissing-prototypes]
29 | int sparc64_foo(void)
| ^~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c:48:5: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
48 | int foo(void)
| ^~~
In file included from arch/sparc/kernel/asm-offsets.c:17:
arch/sparc/kernel/asm-offsets.c: In function 'foo':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
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)
| ^~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c:51:27: note: in expansion of macro 'offsetof'
51 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
| ^~~~~~~~
cc1: some warnings being treated as errors
--
In file included from arch/sparc/kernel/asm-offsets.c:14:
include/linux/sched.h:475:20: error: array type has incomplete element type 'struct held_lock'
475 | struct held_lock held_locks[MAX_LOCK_DEPTH];
| ^~~~~~~~~~
In file included from ./arch/sparc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/mm_types.h:9,
from arch/sparc/kernel/asm-offsets.c:15:
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/mm_types.h:17,
from arch/sparc/kernel/asm-offsets.c:15:
include/linux/seqlock.h: In function '__seqprop_mutex_sequence':
include/linux/seqlock.h:239:86: error: implicit declaration of function 'mutex_lock' [-Werror=implicit-function-declaration]
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
>> include/linux/seqlock.h:239:76: error: implicit declaration of function 'mutex_unlock'; did you mean 'write_unlock'? [-Werror=implicit-function-declaration]
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_mutex_assert':
include/linux/lockdep.h:286:52: error: dereferencing pointer to incomplete type 'struct mutex'
286 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
| ^~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON'
310 | WARN_ON(debug_locks && \
| ^~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \
| ^~~~~~~~~~~~~~~
include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held'
231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); \
| ^~~~~~~~~~~~~~~~~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_ww_mutex_sequence':
>> include/linux/seqlock.h:240:86: error: implicit declaration of function 'ww_mutex_lock'; did you mean 'write_lock'? [-Werror=implicit-function-declaration]
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
>> include/linux/seqlock.h:240:76: error: implicit declaration of function 'ww_mutex_unlock'; did you mean 'write_unlock'? [-Werror=implicit-function-declaration]
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_ww_mutex_assert':
include/linux/seqlock.h:240:68: error: dereferencing pointer to incomplete type 'struct ww_mutex'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON'
310 | WARN_ON(debug_locks && \
| ^~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \
| ^~~~~~~~~~~~~~~
include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held'
231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); \
| ^~~~~~~~~~~~~~~~~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c: At top level:
arch/sparc/kernel/asm-offsets.c:29:5: warning: no previous prototype for 'sparc64_foo' [-Wmissing-prototypes]
29 | int sparc64_foo(void)
| ^~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c:48:5: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
48 | int foo(void)
| ^~~
In file included from arch/sparc/kernel/asm-offsets.c:17:
arch/sparc/kernel/asm-offsets.c: In function 'foo':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
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)
| ^~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c:51:27: note: in expansion of macro 'offsetof'
51 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
| ^~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/sparc/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 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
In file included from arch/sparc/kernel/asm-offsets.c:14:
include/linux/sched.h:475:20: error: array type has incomplete element type 'struct held_lock'
475 | struct held_lock
| ^~~~~~~~~~
In file included from ./arch/sparc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/mm_types.h:9,
from arch/sparc/kernel/asm-offsets.c:15:
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'
69 | return && tif_need_resched();
| ^~~~~~~~~~~~~~~~
In file included from include/linux/mm_types.h:17,
from arch/sparc/kernel/asm-offsets.c:15:
include/linux/seqlock.h: In function '__seqprop_mutex_sequence':
include/linux/seqlock.h:239:86: error: implicit declaration of function 'mutex_lock'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
>> include/linux/seqlock.h:239:76: error: implicit declaration of function 'mutex_unlock'; did you mean
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_mutex_assert':
include/linux/lockdep.h:286:52: error: dereferencing pointer to incomplete type 'struct mutex'
286 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
| ^~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON'
310 | WARN_ON(debug_locks && | ^~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); | ^~~~~~~~~~~~~~~
include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held'
231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); | ^~~~~~~~~~~~~~~~~~~
include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_ww_mutex_sequence':
>> include/linux/seqlock.h:240:86: error: implicit declaration of function 'ww_mutex_lock'; did you mean
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
>> include/linux/seqlock.h:240:76: error: implicit declaration of function 'ww_mutex_unlock'; did you mean
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function '__seqprop_ww_mutex_assert':
include/linux/seqlock.h:240:68: error: dereferencing pointer to incomplete type 'struct ww_mutex'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~
include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK'
136 | #define __SEQ_LOCK(expr) expr
| ^~~~
include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON'
310 | WARN_ON(debug_locks && | ^~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); | ^~~~~~~~~~~~~~~
include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held'
231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); | ^~~~~~~~~~~~~~~~~~~
include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME'
240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
| ^~~~~~~~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c: At top level:
arch/sparc/kernel/asm-offsets.c:29:5: warning: no previous prototype for 'sparc64_foo'
29 | int sparc64_foo(void)
| ^~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c:48:5: warning: no previous prototype for 'foo'
48 | int foo(void)
| ^~~
In file included from arch/sparc/kernel/asm-offsets.c:17:
arch/sparc/kernel/asm-offsets.c: In function 'foo':
include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread'
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)
| ^~~~~~~~~~~~~~~~~~~
arch/sparc/kernel/asm-offsets.c:51:27: note: in expansion of macro 'offsetof'
51 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
| ^~~~~~~~
cc1: some warnings being treated as errors
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt [scripts/Makefile.build:117: arch/sparc/kernel/asm-offsets.s] Error 1
Target '__build' not remade because of errors.
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt [Makefile:1232: prepare0] Error 2
Target 'prepare' not remade because of errors.
make: Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by
- LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
- DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +/mutex_unlock +239 include/linux/seqlock.h
267580db047ef42 peterz(a)infradead.org 2020-09-15 172
55f3560df975f55 Ahmed S. Darwish 2020-07-20 173 /*
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 174 * SEQCOUNT_LOCKNAME() - Instantiate seqcount_LOCKNAME_t and helpers
5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 175 * seqprop_LOCKNAME_*() - Property accessors for seqcount_LOCKNAME_t
5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 176 *
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 177 * @lockname: "LOCKNAME" part of seqcount_LOCKNAME_t
6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 178 * @locktype: LOCKNAME canonical C data type
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 179 * @preemptible: preemptibility of above locktype
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 180 * @lockmember: argument for lockdep_assert_held()
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 181 * @lockbase: associated lock release function (prefix only)
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 182 * @lock_acquire: associated lock acquisition function (full call)
55f3560df975f55 Ahmed S. Darwish 2020-07-20 183 */
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 184 #define SEQCOUNT_LOCKNAME(lockname, locktype, preemptible, lockmember, lockbase, lock_acquire) \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 185 typedef struct seqcount_##lockname { \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 186 seqcount_t seqcount; \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 187 __SEQ_LOCK(locktype *lock); \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 188 } seqcount_##lockname##_t; \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 189 \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 190 static __always_inline seqcount_t * \
5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 191 __seqprop_##lockname##_ptr(seqcount_##lockname##_t *s) \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 192 { \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 193 return &s->seqcount; \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 194 } \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 195 \
52ac39e5db5148f Ahmed S. Darwish 2020-09-04 196 static __always_inline unsigned \
52ac39e5db5148f Ahmed S. Darwish 2020-09-04 197 __seqprop_##lockname##_sequence(const seqcount_##lockname##_t *s) \
52ac39e5db5148f Ahmed S. Darwish 2020-09-04 198 { \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 199 unsigned seq = READ_ONCE(s->seqcount.sequence); \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 200 \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 201 if (!IS_ENABLED(CONFIG_PREEMPT_RT)) \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 202 return seq; \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 203 \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 204 if (preemptible && unlikely(seq & 1)) { \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 205 __SEQ_LOCK(lock_acquire); \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 206 __SEQ_LOCK(lockbase##_unlock(s->lock)); \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 207 \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 208 /* \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 209 * Re-read the sequence counter since the (possibly \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 210 * preempted) writer made progress. \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 211 */ \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 212 seq = READ_ONCE(s->seqcount.sequence); \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 213 } \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 214 \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 215 return seq; \
52ac39e5db5148f Ahmed S. Darwish 2020-09-04 216 } \
52ac39e5db5148f Ahmed S. Darwish 2020-09-04 217 \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 218 static __always_inline bool \
5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 219 __seqprop_##lockname##_preemptible(const seqcount_##lockname##_t *s) \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 220 { \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 221 if (!IS_ENABLED(CONFIG_PREEMPT_RT)) \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 222 return preemptible; \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 223 \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 224 /* PREEMPT_RT relies on the above LOCK+UNLOCK */ \
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 225 return false; \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 226 } \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 227 \
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 228 static __always_inline void \
5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 229 __seqprop_##lockname##_assert(const seqcount_##lockname##_t *s) \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 230 { \
e55687fe5c1e484 Peter Zijlstra 2020-07-23 @231 __SEQ_LOCK(lockdep_assert_held(lockmember)); \
55f3560df975f55 Ahmed S. Darwish 2020-07-20 232 }
55f3560df975f55 Ahmed S. Darwish 2020-07-20 233
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 234 #define __SEQ_RT IS_ENABLED(CONFIG_PREEMPT_RT)
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 235
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 236 SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t, false, s->lock, raw_spin, raw_spin_lock(s->lock))
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 237 SEQCOUNT_LOCKNAME(spinlock, spinlock_t, __SEQ_RT, s->lock, spin, spin_lock(s->lock))
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 238 SEQCOUNT_LOCKNAME(rwlock, rwlock_t, __SEQ_RT, s->lock, read, read_lock(s->lock))
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 @239 SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
8117ab508f9c476 Ahmed S. Darwish 2020-09-04 @240 SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))
a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 241
:::::: The code at line 239 was first introduced by commit
:::::: 8117ab508f9c476e0a10b9db7f4818f784cf3176 seqlock: seqcount_LOCKNAME_t: Introduce PREEMPT_RT support
:::::: TO: Ahmed S. Darwish <a.darwish(a)linutronix.de>
:::::: CC: Peter Zijlstra <peterz(a)infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 108/364] arch/x86/include/asm/uaccess.h:47:16: error: implicit declaration of function 'in_task'; did you mean 'rt_task'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: a8bbfcd6b3ffac4ebcc0deb770d628fe6b8f2d05 [108/364] sched/headers: Remove <linux/mutex.h> from <linux/sched.h>
config: i386-defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=a8...
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 a8bbfcd6b3ffac4ebcc0deb770d628fe6b8f2d05
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/kernel.h:10,
from kernel/locking/rwsem.c:19:
arch/x86/include/asm/uaccess.h: In function 'user_access_begin':
>> arch/x86/include/asm/uaccess.h:47:16: error: implicit declaration of function 'in_task'; did you mean 'rt_task'? [-Werror=implicit-function-declaration]
47 | WARN_ON_ONCE(!in_task() && !pagefault_disabled())
| ^~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
arch/x86/include/asm/uaccess.h:47:2: note: in expansion of macro 'WARN_ON_ONCE'
47 | WARN_ON_ONCE(!in_task() && !pagefault_disabled())
| ^~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:71:2: note: in expansion of macro 'WARN_ON_IN_IRQ'
71 | WARN_ON_IN_IRQ(); \
| ^~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:476:16: note: in expansion of macro 'access_ok'
476 | if (unlikely(!access_ok(ptr,len)))
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +47 arch/x86/include/asm/uaccess.h
ca23386216b9d4 include/asm-x86/uaccess.h Glauber Costa 2008-06-13 43
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 44 #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
2d8d8fac3b4eab arch/x86/include/asm/uaccess.h Masami Hiramatsu 2019-05-15 45 static inline bool pagefault_disabled(void);
2d8d8fac3b4eab arch/x86/include/asm/uaccess.h Masami Hiramatsu 2019-05-15 46 # define WARN_ON_IN_IRQ() \
2d8d8fac3b4eab arch/x86/include/asm/uaccess.h Masami Hiramatsu 2019-05-15 @47 WARN_ON_ONCE(!in_task() && !pagefault_disabled())
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 48 #else
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 49 # define WARN_ON_IN_IRQ()
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 50 #endif
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 51
:::::: The code at line 47 was first introduced by commit
:::::: 2d8d8fac3b4eab035dcd0068e1f5a746a697fbb3 x86/uaccess: Allow access_ok() in irq context if pagefault_disabled
:::::: TO: Masami Hiramatsu <mhiramat(a)kernel.org>
:::::: CC: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[djwong-xfs:deferred-inactivation-5.14 20/24] fs/xfs/xfs_mount.c:373:2: error: incompatible pointer types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'uint64_t *' (aka 'unsigned long long *')
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git deferred-inactivation-5.14
head: 77e8ee4ef7dcff86e0848e876cff8de28808a253
commit: ff61fd32f3a0f1bb9794d9f8fc02de5ec9c2fb40 [20/24] xfs: parallelize inode inactivation
config: arm-randconfig-r006-20210613 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs deferred-inactivation-5.14
git checkout ff61fd32f3a0f1bb9794d9f8fc02de5ec9c2fb40
# 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 error/warnings (new ones prefixed by >>):
>> fs/xfs/xfs_mount.c:373:2: warning: comparison of distinct pointer types ('typeof ((ag_space)) *' (aka 'unsigned int *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types]
do_div(ag_space, 100);
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:228:28: note: expanded from macro 'do_div'
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
>> fs/xfs/xfs_mount.c:373:2: error: incompatible pointer types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
do_div(ag_space, 100);
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:245:22: note: expanded from macro 'do_div'
__rem = __div64_32(&(n), __base); \
^~~~
arch/arm/include/asm/div64.h:24:45: note: passing argument to parameter 'n' here
static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
^
>> fs/xfs/xfs_mount.c:373:2: warning: shift count >= width of type [-Wshift-count-overflow]
do_div(ag_space, 100);
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:241:25: note: expanded from macro 'do_div'
} else if (likely(((n) >> 32) == 0)) { \
^ ~~
include/linux/compiler.h:45:39: note: expanded from macro 'likely'
# define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
^
include/linux/compiler.h:33:34: note: expanded from macro '__branch_check__'
______r = __builtin_expect(!!(x), expect); \
^
>> fs/xfs/xfs_mount.c:373:2: warning: shift count >= width of type [-Wshift-count-overflow]
do_div(ag_space, 100);
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:241:25: note: expanded from macro 'do_div'
} else if (likely(((n) >> 32) == 0)) { \
^ ~~
include/linux/compiler.h:45:66: note: expanded from macro 'likely'
# define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
^
include/linux/compiler.h:35:19: note: expanded from macro '__branch_check__'
expect, is_constant); \
^~~~~~~~~~~
3 warnings and 1 error generated.
vim +373 fs/xfs/xfs_mount.c
360
361 /*
362 * precalculate the low space thresholds for dynamic speculative preallocation.
363 */
364 void
365 xfs_set_low_space_thresholds(
366 struct xfs_mount *mp)
367 {
368 uint64_t space = mp->m_sb.sb_dblocks;
369 uint32_t ag_space = mp->m_sb.sb_agblocks;
370 int i;
371
372 do_div(space, 100);
> 373 do_div(ag_space, 100);
374
375 for (i = 0; i < XFS_LOWSP_MAX; i++) {
376 mp->m_low_space[i] = space * (i + 1);
377 mp->m_ag_low_space[i] = ag_space * (i + 1);
378 }
379 }
380
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 108/364] arch/riscv/kernel/asm-offsets.c:32:2: error: no member named 'thread_info' in 'task_struct'
by kernel test robot
Hi Ingo,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: a8bbfcd6b3ffac4ebcc0deb770d628fe6b8f2d05 [108/364] sched/headers: Remove <linux/mutex.h> from <linux/sched.h>
config: riscv-randconfig-r016-20210613 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=a8...
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 a8bbfcd6b3ffac4ebcc0deb770d628fe6b8f2d05
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 errors (new ones prefixed by >>):
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:26:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S6, task_struct, thread.s[6]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:27:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S7, task_struct, thread.s[7]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:28:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S8, task_struct, thread.s[8]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:29:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S9, task_struct, thread.s[9]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:30:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S10, task_struct, thread.s[10]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:31:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S11, task_struct, thread.s[11]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
>> arch/riscv/kernel/asm-offsets.c:32:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:33:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_PREEMPT_COUNT, task_struct, thread_info.preempt_count);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:34:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:35:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:36:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
--
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:26:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S6, task_struct, thread.s[6]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:27:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S7, task_struct, thread.s[7]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:28:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S8, task_struct, thread.s[8]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:29:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S9, task_struct, thread.s[9]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:30:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S10, task_struct, thread.s[10]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:31:2: error: no member named 'thread' in 'task_struct'
OFFSET(TASK_THREAD_S11, task_struct, thread.s[11]);
^ ~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
>> arch/riscv/kernel/asm-offsets.c:32:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:33:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_PREEMPT_COUNT, task_struct, thread_info.preempt_count);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:34:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:35:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
arch/riscv/kernel/asm-offsets.c:36:2: error: no member named 'thread_info' in 'task_struct'
OFFSET(TASK_TI_CPU, task_struct, thread_info.cpu);
^ ~~~~~~~~~~~
include/linux/kbuild.h:11:14: note: expanded from macro 'OFFSET'
DEFINE(sym, offsetof(struct str, mem))
^ ~~~
include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^ ~~~~~~
include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^ ~
include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
^~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
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 +32 arch/riscv/kernel/asm-offsets.c
3ae9c3cde51abc Souptick Joarder 2020-12-09 15
7db91e57a0acde Palmer Dabbelt 2017-07-10 16 void asm_offsets(void)
7db91e57a0acde Palmer Dabbelt 2017-07-10 17 {
7db91e57a0acde Palmer Dabbelt 2017-07-10 18 OFFSET(TASK_THREAD_RA, task_struct, thread.ra);
7db91e57a0acde Palmer Dabbelt 2017-07-10 19 OFFSET(TASK_THREAD_SP, task_struct, thread.sp);
7db91e57a0acde Palmer Dabbelt 2017-07-10 20 OFFSET(TASK_THREAD_S0, task_struct, thread.s[0]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 21 OFFSET(TASK_THREAD_S1, task_struct, thread.s[1]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 22 OFFSET(TASK_THREAD_S2, task_struct, thread.s[2]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 23 OFFSET(TASK_THREAD_S3, task_struct, thread.s[3]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 24 OFFSET(TASK_THREAD_S4, task_struct, thread.s[4]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 25 OFFSET(TASK_THREAD_S5, task_struct, thread.s[5]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 26 OFFSET(TASK_THREAD_S6, task_struct, thread.s[6]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 27 OFFSET(TASK_THREAD_S7, task_struct, thread.s[7]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 28 OFFSET(TASK_THREAD_S8, task_struct, thread.s[8]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 29 OFFSET(TASK_THREAD_S9, task_struct, thread.s[9]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 30 OFFSET(TASK_THREAD_S10, task_struct, thread.s[10]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 31 OFFSET(TASK_THREAD_S11, task_struct, thread.s[11]);
7db91e57a0acde Palmer Dabbelt 2017-07-10 @32 OFFSET(TASK_TI_FLAGS, task_struct, thread_info.flags);
:::::: The code at line 32 was first introduced by commit
:::::: 7db91e57a0acde126a162ababfb1e0ab190130cb RISC-V: Task implementation
:::::: TO: Palmer Dabbelt <palmer(a)dabbelt.com>
:::::: CC: Palmer Dabbelt <palmer(a)dabbelt.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months