[tip:tmp.tmp2 313/364] include/linux/compat.h:953:30: error: storage size of 'tv' isn't known
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: ab8b6c16e1f4f3a3fa41752685ce49a89c616ca8 [313/364] sched/headers, compat: Simplify <linux/compat.h> dependencies even more
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=ab...
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 ab8b6c16e1f4f3a3fa41752685ce49a89c616ca8
# 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 >>):
arch/powerpc/include/asm/compat.h:99:25: error: implicit declaration of function 'task_thread' [-Werror=implicit-function-declaration]
99 | struct pt_regs *regs = task_thread(current).regs;
| ^~~~~~~~~~~
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;
| ^
arch/powerpc/include/asm/compat.h:100:26: error: dereferencing pointer to incomplete type 'struct pt_regs'
100 | unsigned long usp = regs->gpr[1];
| ^~
arch/powerpc/include/asm/compat.h:107:7: error: implicit declaration of function 'is_32bit_task' [-Werror=implicit-function-declaration]
107 | if (!is_32bit_task())
| ^~~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:108:10: error: 'USER_REDZONE_SIZE' undeclared (first use in this function); did you mean 'USER_REGION_ID'?
108 | usp -= USER_REDZONE_SIZE;
| ^~~~~~~~~~~~~~~~~
| USER_REGION_ID
arch/powerpc/include/asm/compat.h:108:10: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/compat.h: At top level:
include/linux/compat.h:263:23: error: field 'ru_utime' has incomplete type
263 | struct old_timeval32 ru_utime;
| ^~~~~~~~
include/linux/compat.h:264:23: error: field 'ru_stime' has incomplete type
264 | struct old_timeval32 ru_stime;
| ^~~~~~~~
include/linux/compat.h: In function 'put_compat_sigset':
include/linux/compat.h:441:9: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
441 | return copy_to_user(compat, &v, size) ? -EFAULT : 0;
| ^~~~~~~~~~~~
include/linux/compat.h: At top level:
include/linux/compat.h:560:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
560 | struct old_timespec32 __user *timeout,
| ^~~~~~~~~~~~~~
include/linux/compat.h:559:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
559 | struct io_event __user *events,
| ^~~~~~~~
include/linux/compat.h:566:13: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
566 | struct __kernel_timespec __user *timeout,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:565:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
565 | struct io_event __user *events,
| ^~~~~~~~
include/linux/compat.h:581:17: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
581 | const struct __kernel_timespec __user *timeout,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:620:16: warning: 'struct iovec' declared inside parameter list will not be visible outside of this definition or declaration
620 | const struct iovec __user *vec,
| ^~~~~
include/linux/compat.h:623:16: warning: 'struct iovec' declared inside parameter list will not be visible outside of this definition or declaration
623 | const struct iovec __user *vec,
| ^~~~~
include/linux/compat.h:647:16: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
647 | struct old_timespec32 __user *tsp,
| ^~~~~~~~~~~~~~
include/linux/compat.h:652:16: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
652 | struct __kernel_timespec __user *tsp,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:656:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
656 | struct old_timespec32 __user *tsp,
| ^~~~~~~~~~~~~~
include/linux/compat.h:654:48: warning: 'struct pollfd' declared inside parameter list will not be visible outside of this definition or declaration
654 | asmlinkage long compat_sys_ppoll_time32(struct pollfd __user *ufds,
| ^~~~~~
include/linux/compat.h:661:13: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
661 | struct __kernel_timespec __user *tsp,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:659:48: warning: 'struct pollfd' declared inside parameter list will not be visible outside of this definition or declaration
659 | asmlinkage long compat_sys_ppoll_time64(struct pollfd __user *ufds,
| ^~~~~~
include/linux/compat.h:743:10: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
743 | struct old_timespec32 __user *uts, compat_size_t sigsetsize);
| ^~~~~~~~~~~~~~
include/linux/compat.h:746:10: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
746 | struct __kernel_timespec __user *uts, compat_size_t sigsetsize);
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:761:10: warning: 'struct timezone' declared inside parameter list will not be visible outside of this definition or declaration
761 | struct timezone __user *tz);
| ^~~~~~~~
include/linux/compat.h:763:10: warning: 'struct timezone' declared inside parameter list will not be visible outside of this definition or declaration
763 | struct timezone __user *tz);
| ^~~~~~~~
include/linux/compat.h:839:16: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
839 | struct __kernel_timespec __user *timeout);
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:842:16: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
842 | struct old_timespec32 __user *timeout);
| ^~~~~~~~~~~~~~
include/linux/compat.h:849:18: warning: 'struct file_handle' declared inside parameter list will not be visible outside of this definition or declaration
849 | struct file_handle __user *handle,
| ^~~~~~~~~~~
include/linux/compat.h:858:51: error: unknown type name 'rwf_t'
858 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:861:51: error: unknown type name 'rwf_t'
861 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:951:36: error: return type is an incomplete type
951 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h: In function 'ns_to_old_timeval32':
>> include/linux/compat.h:953:30: error: storage size of 'tv' isn't known
953 | struct __kernel_old_timeval tv;
| ^~
include/linux/compat.h:954:23: error: storage size of 'ctv' isn't known
954 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:956:7: error: implicit declaration of function 'ns_to_kernel_old_timeval' [-Werror=implicit-function-declaration]
956 | tv = ns_to_kernel_old_timeval(nsec);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:960:9: error: 'return' with a value, in function returning void [-Werror=return-type]
960 | return ctv;
| ^~~
include/linux/compat.h:951:36: note: declared here
951 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h:954:23: warning: unused variable 'ctv' [-Wunused-variable]
954 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:953:30: warning: unused variable 'tv' [-Wunused-variable]
953 | struct __kernel_old_timeval tv;
| ^~
In file included from include/linux/thread_info.h:52,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:8,
from include/linux/mm.h:12,
from include/linux/mman.h:5,
from arch/powerpc/kernel/asm-offsets.c:21:
arch/powerpc/include/asm/thread_info.h: In function 'clear_thread_local_flags':
arch/powerpc/include/asm/thread_info.h:156:27: error: implicit declaration of function 'current_thread_info' [-Werror=implicit-function-declaration]
156 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:156:27: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
arch/powerpc/include/asm/thread_info.h: In function 'test_thread_local_flags':
arch/powerpc/include/asm/thread_info.h:162:27: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
162 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
include/asm-generic/preempt.h: In function '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: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: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:36:21: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
--
arch/powerpc/include/asm/compat.h:99:25: error: implicit declaration of function 'task_thread' [-Werror=implicit-function-declaration]
99 | struct pt_regs *regs = task_thread(current).regs;
| ^~~~~~~~~~~
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;
| ^
arch/powerpc/include/asm/compat.h:100:26: error: dereferencing pointer to incomplete type 'struct pt_regs'
100 | unsigned long usp = regs->gpr[1];
| ^~
arch/powerpc/include/asm/compat.h:107:7: error: implicit declaration of function 'is_32bit_task' [-Werror=implicit-function-declaration]
107 | if (!is_32bit_task())
| ^~~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:108:10: error: 'USER_REDZONE_SIZE' undeclared (first use in this function); did you mean 'USER_REGION_ID'?
108 | usp -= USER_REDZONE_SIZE;
| ^~~~~~~~~~~~~~~~~
| USER_REGION_ID
arch/powerpc/include/asm/compat.h:108:10: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/compat.h: At top level:
include/linux/compat.h:263:23: error: field 'ru_utime' has incomplete type
263 | struct old_timeval32 ru_utime;
| ^~~~~~~~
include/linux/compat.h:264:23: error: field 'ru_stime' has incomplete type
264 | struct old_timeval32 ru_stime;
| ^~~~~~~~
include/linux/compat.h: In function 'put_compat_sigset':
include/linux/compat.h:441:9: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
441 | return copy_to_user(compat, &v, size) ? -EFAULT : 0;
| ^~~~~~~~~~~~
include/linux/compat.h: At top level:
include/linux/compat.h:560:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
560 | struct old_timespec32 __user *timeout,
| ^~~~~~~~~~~~~~
include/linux/compat.h:559:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
559 | struct io_event __user *events,
| ^~~~~~~~
include/linux/compat.h:566:13: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
566 | struct __kernel_timespec __user *timeout,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:565:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
565 | struct io_event __user *events,
| ^~~~~~~~
include/linux/compat.h:581:17: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
581 | const struct __kernel_timespec __user *timeout,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:620:16: warning: 'struct iovec' declared inside parameter list will not be visible outside of this definition or declaration
620 | const struct iovec __user *vec,
| ^~~~~
include/linux/compat.h:623:16: warning: 'struct iovec' declared inside parameter list will not be visible outside of this definition or declaration
623 | const struct iovec __user *vec,
| ^~~~~
include/linux/compat.h:647:16: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
647 | struct old_timespec32 __user *tsp,
| ^~~~~~~~~~~~~~
include/linux/compat.h:652:16: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
652 | struct __kernel_timespec __user *tsp,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:656:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
656 | struct old_timespec32 __user *tsp,
| ^~~~~~~~~~~~~~
include/linux/compat.h:654:48: warning: 'struct pollfd' declared inside parameter list will not be visible outside of this definition or declaration
654 | asmlinkage long compat_sys_ppoll_time32(struct pollfd __user *ufds,
| ^~~~~~
include/linux/compat.h:661:13: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
661 | struct __kernel_timespec __user *tsp,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:659:48: warning: 'struct pollfd' declared inside parameter list will not be visible outside of this definition or declaration
659 | asmlinkage long compat_sys_ppoll_time64(struct pollfd __user *ufds,
| ^~~~~~
include/linux/compat.h:743:10: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
743 | struct old_timespec32 __user *uts, compat_size_t sigsetsize);
| ^~~~~~~~~~~~~~
include/linux/compat.h:746:10: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
746 | struct __kernel_timespec __user *uts, compat_size_t sigsetsize);
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:761:10: warning: 'struct timezone' declared inside parameter list will not be visible outside of this definition or declaration
761 | struct timezone __user *tz);
| ^~~~~~~~
include/linux/compat.h:763:10: warning: 'struct timezone' declared inside parameter list will not be visible outside of this definition or declaration
763 | struct timezone __user *tz);
| ^~~~~~~~
include/linux/compat.h:839:16: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
839 | struct __kernel_timespec __user *timeout);
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:842:16: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
842 | struct old_timespec32 __user *timeout);
| ^~~~~~~~~~~~~~
include/linux/compat.h:849:18: warning: 'struct file_handle' declared inside parameter list will not be visible outside of this definition or declaration
849 | struct file_handle __user *handle,
| ^~~~~~~~~~~
include/linux/compat.h:858:51: error: unknown type name 'rwf_t'
858 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:861:51: error: unknown type name 'rwf_t'
861 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:951:36: error: return type is an incomplete type
951 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h: In function 'ns_to_old_timeval32':
>> include/linux/compat.h:953:30: error: storage size of 'tv' isn't known
953 | struct __kernel_old_timeval tv;
| ^~
include/linux/compat.h:954:23: error: storage size of 'ctv' isn't known
954 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:956:7: error: implicit declaration of function 'ns_to_kernel_old_timeval' [-Werror=implicit-function-declaration]
956 | tv = ns_to_kernel_old_timeval(nsec);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:960:9: error: 'return' with a value, in function returning void [-Werror=return-type]
960 | return ctv;
| ^~~
include/linux/compat.h:951:36: note: declared here
951 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h:954:23: warning: unused variable 'ctv' [-Wunused-variable]
954 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:953:30: warning: unused variable 'tv' [-Wunused-variable]
953 | struct __kernel_old_timeval tv;
| ^~
In file included from include/linux/thread_info.h:52,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:8,
from include/linux/mm.h:12,
from include/linux/mman.h:5,
from arch/powerpc/kernel/asm-offsets.c:21:
arch/powerpc/include/asm/thread_info.h: In function 'clear_thread_local_flags':
arch/powerpc/include/asm/thread_info.h:156:27: error: implicit declaration of function 'current_thread_info' [-Werror=implicit-function-declaration]
156 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:156:27: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
arch/powerpc/include/asm/thread_info.h: In function 'test_thread_local_flags':
arch/powerpc/include/asm/thread_info.h:162:27: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
162 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
include/asm-generic/preempt.h: In function '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: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: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: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); \
..
vim +953 include/linux/compat.h
c679a08983db7c Dominik Brodowski 2018-03-25 812
c679a08983db7c Dominik Brodowski 2018-03-25 813 /* mm/, CONFIG_MMU only */
c679a08983db7c Dominik Brodowski 2018-03-25 814 asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len,
c679a08983db7c Dominik Brodowski 2018-03-25 815 compat_ulong_t mode,
c679a08983db7c Dominik Brodowski 2018-03-25 816 compat_ulong_t __user *nmask,
c679a08983db7c Dominik Brodowski 2018-03-25 817 compat_ulong_t maxnode, compat_ulong_t flags);
c679a08983db7c Dominik Brodowski 2018-03-25 818 asmlinkage long compat_sys_get_mempolicy(int __user *policy,
c679a08983db7c Dominik Brodowski 2018-03-25 819 compat_ulong_t __user *nmask,
c679a08983db7c Dominik Brodowski 2018-03-25 820 compat_ulong_t maxnode,
c679a08983db7c Dominik Brodowski 2018-03-25 821 compat_ulong_t addr,
c679a08983db7c Dominik Brodowski 2018-03-25 822 compat_ulong_t flags);
c679a08983db7c Dominik Brodowski 2018-03-25 823 asmlinkage long compat_sys_set_mempolicy(int mode, compat_ulong_t __user *nmask,
c679a08983db7c Dominik Brodowski 2018-03-25 824 compat_ulong_t maxnode);
c679a08983db7c Dominik Brodowski 2018-03-25 825 asmlinkage long compat_sys_migrate_pages(compat_pid_t pid,
c679a08983db7c Dominik Brodowski 2018-03-25 826 compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes,
c679a08983db7c Dominik Brodowski 2018-03-25 827 const compat_ulong_t __user *new_nodes);
c679a08983db7c Dominik Brodowski 2018-03-25 828 asmlinkage long compat_sys_move_pages(pid_t pid, compat_ulong_t nr_pages,
c679a08983db7c Dominik Brodowski 2018-03-25 829 __u32 __user *pages,
c679a08983db7c Dominik Brodowski 2018-03-25 830 const int __user *nodes,
c679a08983db7c Dominik Brodowski 2018-03-25 831 int __user *status,
c679a08983db7c Dominik Brodowski 2018-03-25 832 int flags);
c679a08983db7c Dominik Brodowski 2018-03-25 833
c679a08983db7c Dominik Brodowski 2018-03-25 834 asmlinkage long compat_sys_rt_tgsigqueueinfo(compat_pid_t tgid,
c679a08983db7c Dominik Brodowski 2018-03-25 835 compat_pid_t pid, int sig,
c679a08983db7c Dominik Brodowski 2018-03-25 836 struct compat_siginfo __user *uinfo);
e11d4284e2f4de Arnd Bergmann 2018-04-18 837 asmlinkage long compat_sys_recvmmsg_time64(int fd, struct compat_mmsghdr __user *mmsg,
e11d4284e2f4de Arnd Bergmann 2018-04-18 838 unsigned vlen, unsigned int flags,
e11d4284e2f4de Arnd Bergmann 2018-04-18 839 struct __kernel_timespec __user *timeout);
8dabe7245bbc13 Arnd Bergmann 2019-01-07 840 asmlinkage long compat_sys_recvmmsg_time32(int fd, struct compat_mmsghdr __user *mmsg,
c679a08983db7c Dominik Brodowski 2018-03-25 841 unsigned vlen, unsigned int flags,
9afc5eee65ca7d Arnd Bergmann 2018-07-13 842 struct old_timespec32 __user *timeout);
c679a08983db7c Dominik Brodowski 2018-03-25 843 asmlinkage long compat_sys_wait4(compat_pid_t pid,
c679a08983db7c Dominik Brodowski 2018-03-25 844 compat_uint_t __user *stat_addr, int options,
c679a08983db7c Dominik Brodowski 2018-03-25 845 struct compat_rusage __user *ru);
c679a08983db7c Dominik Brodowski 2018-03-25 846 asmlinkage long compat_sys_fanotify_mark(int, unsigned int, __u32, __u32,
c679a08983db7c Dominik Brodowski 2018-03-25 847 int, const char __user *);
c679a08983db7c Dominik Brodowski 2018-03-25 848 asmlinkage long compat_sys_open_by_handle_at(int mountdirfd,
c679a08983db7c Dominik Brodowski 2018-03-25 849 struct file_handle __user *handle,
c679a08983db7c Dominik Brodowski 2018-03-25 850 int flags);
c679a08983db7c Dominik Brodowski 2018-03-25 851 asmlinkage long compat_sys_sendmmsg(int fd, struct compat_mmsghdr __user *mmsg,
c679a08983db7c Dominik Brodowski 2018-03-25 852 unsigned vlen, unsigned int flags);
c679a08983db7c Dominik Brodowski 2018-03-25 853 asmlinkage long compat_sys_execveat(int dfd, const char __user *filename,
c679a08983db7c Dominik Brodowski 2018-03-25 854 const compat_uptr_t __user *argv,
c679a08983db7c Dominik Brodowski 2018-03-25 855 const compat_uptr_t __user *envp, int flags);
c679a08983db7c Dominik Brodowski 2018-03-25 856 asmlinkage ssize_t compat_sys_preadv2(compat_ulong_t fd,
3523a9d4547898 Christoph Hellwig 2020-09-25 857 const struct iovec __user *vec,
c679a08983db7c Dominik Brodowski 2018-03-25 858 compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
c679a08983db7c Dominik Brodowski 2018-03-25 859 asmlinkage ssize_t compat_sys_pwritev2(compat_ulong_t fd,
3523a9d4547898 Christoph Hellwig 2020-09-25 860 const struct iovec __user *vec,
c679a08983db7c Dominik Brodowski 2018-03-25 @861 compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
c679a08983db7c Dominik Brodowski 2018-03-25 862 #ifdef __ARCH_WANT_COMPAT_SYS_PREADV64V2
576d0703a81217 Christoph Hellwig 2020-09-25 863 asmlinkage long compat_sys_preadv64v2(unsigned long fd,
3523a9d4547898 Christoph Hellwig 2020-09-25 864 const struct iovec __user *vec,
c679a08983db7c Dominik Brodowski 2018-03-25 865 unsigned long vlen, loff_t pos, rwf_t flags);
c679a08983db7c Dominik Brodowski 2018-03-25 866 #endif
a67ba43d30bf8c Chris Metcalf 2011-12-01 867
c679a08983db7c Dominik Brodowski 2018-03-25 868 #ifdef __ARCH_WANT_COMPAT_SYS_PWRITEV64V2
c679a08983db7c Dominik Brodowski 2018-03-25 869 asmlinkage long compat_sys_pwritev64v2(unsigned long fd,
3523a9d4547898 Christoph Hellwig 2020-09-25 870 const struct iovec __user *vec,
c679a08983db7c Dominik Brodowski 2018-03-25 871 unsigned long vlen, loff_t pos, rwf_t flags);
c679a08983db7c Dominik Brodowski 2018-03-25 872 #endif
c679a08983db7c Dominik Brodowski 2018-03-25 873
c679a08983db7c Dominik Brodowski 2018-03-25 874
c679a08983db7c Dominik Brodowski 2018-03-25 875 /*
c679a08983db7c Dominik Brodowski 2018-03-25 876 * Deprecated system calls which are still defined in
c679a08983db7c Dominik Brodowski 2018-03-25 877 * include/uapi/asm-generic/unistd.h and wanted by >= 1 arch
c679a08983db7c Dominik Brodowski 2018-03-25 878 */
9026843952adac Al Viro 2012-12-14 879
c679a08983db7c Dominik Brodowski 2018-03-25 880 /* __ARCH_WANT_SYSCALL_NO_AT */
c679a08983db7c Dominik Brodowski 2018-03-25 881 asmlinkage long compat_sys_open(const char __user *filename, int flags,
c679a08983db7c Dominik Brodowski 2018-03-25 882 umode_t mode);
c679a08983db7c Dominik Brodowski 2018-03-25 883
c679a08983db7c Dominik Brodowski 2018-03-25 884 /* __ARCH_WANT_SYSCALL_NO_FLAGS */
c679a08983db7c Dominik Brodowski 2018-03-25 885 asmlinkage long compat_sys_signalfd(int ufd,
c679a08983db7c Dominik Brodowski 2018-03-25 886 const compat_sigset_t __user *sigmask,
c679a08983db7c Dominik Brodowski 2018-03-25 887 compat_size_t sigsetsize);
c679a08983db7c Dominik Brodowski 2018-03-25 888
c679a08983db7c Dominik Brodowski 2018-03-25 889 /* __ARCH_WANT_SYSCALL_OFF_T */
c679a08983db7c Dominik Brodowski 2018-03-25 890 asmlinkage long compat_sys_newstat(const char __user *filename,
c679a08983db7c Dominik Brodowski 2018-03-25 891 struct compat_stat __user *statbuf);
c679a08983db7c Dominik Brodowski 2018-03-25 892 asmlinkage long compat_sys_newlstat(const char __user *filename,
c679a08983db7c Dominik Brodowski 2018-03-25 893 struct compat_stat __user *statbuf);
c679a08983db7c Dominik Brodowski 2018-03-25 894
c679a08983db7c Dominik Brodowski 2018-03-25 895 /* __ARCH_WANT_SYSCALL_DEPRECATED */
c679a08983db7c Dominik Brodowski 2018-03-25 896 asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
c679a08983db7c Dominik Brodowski 2018-03-25 897 compat_ulong_t __user *outp, compat_ulong_t __user *exp,
9afc5eee65ca7d Arnd Bergmann 2018-07-13 898 struct old_timeval32 __user *tvp);
c679a08983db7c Dominik Brodowski 2018-03-25 899 asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
c679a08983db7c Dominik Brodowski 2018-03-25 900 asmlinkage long compat_sys_recv(int fd, void __user *buf, compat_size_t len,
c679a08983db7c Dominik Brodowski 2018-03-25 901 unsigned flags);
c679a08983db7c Dominik Brodowski 2018-03-25 902
c679a08983db7c Dominik Brodowski 2018-03-25 903 /* obsolete: fs/readdir.c */
c679a08983db7c Dominik Brodowski 2018-03-25 904 asmlinkage long compat_sys_old_readdir(unsigned int fd,
c679a08983db7c Dominik Brodowski 2018-03-25 905 struct compat_old_linux_dirent __user *,
c679a08983db7c Dominik Brodowski 2018-03-25 906 unsigned int count);
c679a08983db7c Dominik Brodowski 2018-03-25 907
c679a08983db7c Dominik Brodowski 2018-03-25 908 /* obsolete: fs/select.c */
c679a08983db7c Dominik Brodowski 2018-03-25 909 asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg);
c679a08983db7c Dominik Brodowski 2018-03-25 910
c679a08983db7c Dominik Brodowski 2018-03-25 911 /* obsolete: ipc */
c679a08983db7c Dominik Brodowski 2018-03-25 912 asmlinkage long compat_sys_ipc(u32, int, int, u32, compat_uptr_t, u32);
c679a08983db7c Dominik Brodowski 2018-03-25 913
c679a08983db7c Dominik Brodowski 2018-03-25 914 /* obsolete: kernel/signal.c */
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 915 #ifdef __ARCH_WANT_SYS_SIGPENDING
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 916 asmlinkage long compat_sys_sigpending(compat_old_sigset_t __user *set);
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 917 #endif
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 918
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 919 #ifdef __ARCH_WANT_SYS_SIGPROCMASK
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 920 asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t __user *nset,
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 921 compat_old_sigset_t __user *oset);
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 922 #endif
c679a08983db7c Dominik Brodowski 2018-03-25 923 #ifdef CONFIG_COMPAT_OLD_SIGACTION
c679a08983db7c Dominik Brodowski 2018-03-25 924 asmlinkage long compat_sys_sigaction(int sig,
c679a08983db7c Dominik Brodowski 2018-03-25 925 const struct compat_old_sigaction __user *act,
c679a08983db7c Dominik Brodowski 2018-03-25 926 struct compat_old_sigaction __user *oact);
c679a08983db7c Dominik Brodowski 2018-03-25 927 #endif
e9fb8b7e4f6af1 Catalin Marinas 2015-01-06 928
c679a08983db7c Dominik Brodowski 2018-03-25 929 /* obsolete: net/socket.c */
c679a08983db7c Dominik Brodowski 2018-03-25 930 asmlinkage long compat_sys_socketcall(int call, u32 __user *args);
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 931
7303e30ec1d8fb Dominik Brodowski 2018-04-05 932 #endif /* CONFIG_ARCH_HAS_SYSCALL_WRAPPER */
7303e30ec1d8fb Dominik Brodowski 2018-04-05 933
79170fda313ed5 Kyle Huey 2017-03-20 934
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 935 /*
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 936 * For most but not all architectures, "am I in a compat syscall?" and
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 937 * "am I a compat task?" are the same question. For architectures on which
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 938 * they aren't the same question, arch code can override in_compat_syscall.
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 939 */
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 940
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 941 #ifndef in_compat_syscall
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 942 static inline bool in_compat_syscall(void) { return is_compat_task(); }
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 943 #endif
5180e3e24fd3e8 Andy Lutomirski 2016-03-22 944
cd19c364b313c1 Frederic Weisbecker 2017-01-31 945 /**
9afc5eee65ca7d Arnd Bergmann 2018-07-13 946 * ns_to_old_timeval32 - Compat version of ns_to_timeval
cd19c364b313c1 Frederic Weisbecker 2017-01-31 947 * @nsec: the nanoseconds value to be converted
cd19c364b313c1 Frederic Weisbecker 2017-01-31 948 *
9afc5eee65ca7d Arnd Bergmann 2018-07-13 949 * Returns the old_timeval32 representation of the nsec parameter.
cd19c364b313c1 Frederic Weisbecker 2017-01-31 950 */
9afc5eee65ca7d Arnd Bergmann 2018-07-13 951 static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
cd19c364b313c1 Frederic Weisbecker 2017-01-31 952 {
693737b6cc2edc Arnd Bergmann 2017-11-23 @953 struct __kernel_old_timeval tv;
9afc5eee65ca7d Arnd Bergmann 2018-07-13 954 struct old_timeval32 ctv;
cd19c364b313c1 Frederic Weisbecker 2017-01-31 955
693737b6cc2edc Arnd Bergmann 2017-11-23 956 tv = ns_to_kernel_old_timeval(nsec);
cd19c364b313c1 Frederic Weisbecker 2017-01-31 957 ctv.tv_sec = tv.tv_sec;
cd19c364b313c1 Frederic Weisbecker 2017-01-31 958 ctv.tv_usec = tv.tv_usec;
cd19c364b313c1 Frederic Weisbecker 2017-01-31 959
cd19c364b313c1 Frederic Weisbecker 2017-01-31 960 return ctv;
cd19c364b313c1 Frederic Weisbecker 2017-01-31 961 }
cd19c364b313c1 Frederic Weisbecker 2017-01-31 962
:::::: The code at line 953 was first introduced by commit
:::::: 693737b6cc2edc258040b28462a90b63503394d9 y2038: make ns_to_compat_timeval use __kernel_old_timeval
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Arnd Bergmann <arnd(a)arndb.de>
---
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 260/364] drivers/scsi/sg.c:1567:11: error: implicit declaration of function 'sysfs_create_link'; did you mean 'kernfs_create_link'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 7fa6225737e4d872b612659345f0ece8922ba765 [260/364] sched/headers, kobject: Use <linux/sysfs_types.h> in <linux/kobject.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=7f...
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 7fa6225737e4d872b612659345f0ece8922ba765
# 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 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/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:15,
from drivers/scsi/sg.c:24:
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);
| ^~~~~~~~~~~~~~~~~~
drivers/scsi/sg.c: In function 'sg_add_device':
>> drivers/scsi/sg.c:1567:11: error: implicit declaration of function 'sysfs_create_link'; did you mean 'kernfs_create_link'? [-Werror=implicit-function-declaration]
1567 | error = sysfs_create_link(&scsidp->sdev_gendev.kobj,
| ^~~~~~~~~~~~~~~~~
| kernfs_create_link
drivers/scsi/sg.c: In function 'sg_remove_device':
>> drivers/scsi/sg.c:1644:2: error: implicit declaration of function 'sysfs_remove_link' [-Werror=implicit-function-declaration]
1644 | sysfs_remove_link(&scsidp->sdev_gendev.kobj, "generic");
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:12,
from drivers/scsi/sg.c:28:
drivers/scsi/sg.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);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/rculist.h:11,
from include/linux/dcache.h:8,
from include/linux/fs.h:10,
from include/linux/backing-dev.h:13,
from drivers/nvme/host/multipath.c:6:
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);
| ^~~~~~~~~~~~~~~~~~
drivers/nvme/host/multipath.c: In function 'nvme_subsys_iopolicy_show':
>> drivers/nvme/host/multipath.c:675:9: error: implicit declaration of function 'sysfs_emit' [-Werror=implicit-function-declaration]
675 | return sysfs_emit(buf, "%s\n",
| ^~~~~~~~~~
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 include/linux/bvec.h:14,
from include/linux/blk_types.h:10,
from include/linux/genhd.h:19,
from include/linux/blkdev.h:6,
from include/linux/backing-dev.h:15,
from drivers/nvme/host/multipath.c:6:
drivers/nvme/host/multipath.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);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/radix-tree.h:16,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/kobject.h:20,
from include/linux/of.h:18,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/nvme/host/pci.c:7:
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);
| ^~~~~~~~~~~~~~~~~~
drivers/nvme/host/pci.c: In function 'nvme_map_cmb':
>> drivers/nvme/host/pci.c:1872:6: error: implicit declaration of function 'sysfs_add_file_to_group' [-Werror=implicit-function-declaration]
1872 | if (sysfs_add_file_to_group(&dev->ctrl.device->kobj,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/pci.c: In function 'nvme_release_cmb':
>> drivers/nvme/host/pci.c:1881:3: error: implicit declaration of function 'sysfs_remove_file_from_group' [-Werror=implicit-function-declaration]
1881 | sysfs_remove_file_from_group(&dev->ctrl.device->kobj,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 include/linux/bvec.h:14,
from include/linux/blk_types.h:10,
from include/linux/genhd.h:19,
from include/linux/blkdev.h:6,
from drivers/nvme/host/pci.c:10:
drivers/nvme/host/pci.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);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1567 drivers/scsi/sg.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1516
^1da177e4c3f41 Linus Torvalds 2005-04-16 1517 static int
cc833acbee9db5 Douglas Gilbert 2014-06-25 1518 sg_add_device(struct device *cl_dev, struct class_interface *cl_intf)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1519 {
ee959b00c335d7 Tony Jones 2008-02-22 1520 struct scsi_device *scsidp = to_scsi_device(cl_dev->parent);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1521 struct gendisk *disk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1522 Sg_device *sdp = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1523 struct cdev * cdev = NULL;
7c07d613d22680 James Bottomley 2007-08-05 1524 int error;
454e8957eb6084 Ishai Rabinovitz 2006-06-29 1525 unsigned long iflags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1526
^1da177e4c3f41 Linus Torvalds 2005-04-16 1527 disk = alloc_disk(1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1528 if (!disk) {
cc833acbee9db5 Douglas Gilbert 2014-06-25 1529 pr_warn("%s: alloc_disk failed\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1530 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1531 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1532 disk->major = SCSI_GENERIC_MAJOR;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1533
^1da177e4c3f41 Linus Torvalds 2005-04-16 1534 error = -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1535 cdev = cdev_alloc();
^1da177e4c3f41 Linus Torvalds 2005-04-16 1536 if (!cdev) {
cc833acbee9db5 Douglas Gilbert 2014-06-25 1537 pr_warn("%s: cdev_alloc failed\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1538 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1539 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1540 cdev->owner = THIS_MODULE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1541 cdev->ops = &sg_fops;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1542
7c07d613d22680 James Bottomley 2007-08-05 1543 sdp = sg_alloc(disk, scsidp);
7c07d613d22680 James Bottomley 2007-08-05 1544 if (IS_ERR(sdp)) {
cc833acbee9db5 Douglas Gilbert 2014-06-25 1545 pr_warn("%s: sg_alloc failed\n", __func__);
7c07d613d22680 James Bottomley 2007-08-05 1546 error = PTR_ERR(sdp);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1547 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1548 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1549
7c07d613d22680 James Bottomley 2007-08-05 1550 error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, sdp->index), 1);
5e3c34c1e988a0 Greg Kroah-Hartman 2006-01-18 1551 if (error)
454e8957eb6084 Ishai Rabinovitz 2006-06-29 1552 goto cdev_add_err;
5e3c34c1e988a0 Greg Kroah-Hartman 2006-01-18 1553
^1da177e4c3f41 Linus Torvalds 2005-04-16 1554 sdp->cdev = cdev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1555 if (sg_sysfs_valid) {
ee959b00c335d7 Tony Jones 2008-02-22 1556 struct device *sg_class_member;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1557
d73a1a674b5383 Greg Kroah-Hartman 2008-07-21 1558 sg_class_member = device_create(sg_sysfs_class, cl_dev->parent,
ee959b00c335d7 Tony Jones 2008-02-22 1559 MKDEV(SCSI_GENERIC_MAJOR,
ee959b00c335d7 Tony Jones 2008-02-22 1560 sdp->index),
d73a1a674b5383 Greg Kroah-Hartman 2008-07-21 1561 sdp, "%s", disk->disk_name);
d07e03610ca1f4 FUJITA Tomonori 2008-01-15 1562 if (IS_ERR(sg_class_member)) {
cc833acbee9db5 Douglas Gilbert 2014-06-25 1563 pr_err("%s: device_create failed\n", __func__);
d07e03610ca1f4 FUJITA Tomonori 2008-01-15 1564 error = PTR_ERR(sg_class_member);
d07e03610ca1f4 FUJITA Tomonori 2008-01-15 1565 goto cdev_add_err;
d07e03610ca1f4 FUJITA Tomonori 2008-01-15 1566 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 @1567 error = sysfs_create_link(&scsidp->sdev_gendev.kobj,
^1da177e4c3f41 Linus Torvalds 2005-04-16 1568 &sg_class_member->kobj, "generic");
^1da177e4c3f41 Linus Torvalds 2005-04-16 1569 if (error)
cc833acbee9db5 Douglas Gilbert 2014-06-25 1570 pr_err("%s: unable to make symlink 'generic' back "
cc833acbee9db5 Douglas Gilbert 2014-06-25 1571 "to sg%d\n", __func__, sdp->index);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1572 } else
cc833acbee9db5 Douglas Gilbert 2014-06-25 1573 pr_warn("%s: sg_sys Invalid\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1574
cc833acbee9db5 Douglas Gilbert 2014-06-25 1575 sdev_printk(KERN_NOTICE, scsidp, "Attached scsi generic sg%d "
cc833acbee9db5 Douglas Gilbert 2014-06-25 1576 "type %d\n", sdp->index, scsidp->type);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1577
ee959b00c335d7 Tony Jones 2008-02-22 1578 dev_set_drvdata(cl_dev, sdp);
a24484f281dda1 FUJITA Tomonori 2008-01-15 1579
^1da177e4c3f41 Linus Torvalds 2005-04-16 1580 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1581
454e8957eb6084 Ishai Rabinovitz 2006-06-29 1582 cdev_add_err:
7c07d613d22680 James Bottomley 2007-08-05 1583 write_lock_irqsave(&sg_index_lock, iflags);
7c07d613d22680 James Bottomley 2007-08-05 1584 idr_remove(&sg_index_idr, sdp->index);
7c07d613d22680 James Bottomley 2007-08-05 1585 write_unlock_irqrestore(&sg_index_lock, iflags);
7c07d613d22680 James Bottomley 2007-08-05 1586 kfree(sdp);
454e8957eb6084 Ishai Rabinovitz 2006-06-29 1587
^1da177e4c3f41 Linus Torvalds 2005-04-16 1588 out:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1589 put_disk(disk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1590 if (cdev)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1591 cdev_del(cdev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1592 return error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1593 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1594
cc833acbee9db5 Douglas Gilbert 2014-06-25 1595 static void
cc833acbee9db5 Douglas Gilbert 2014-06-25 1596 sg_device_destroy(struct kref *kref)
c6517b7942fad6 Tony Battersby 2009-01-21 1597 {
c6517b7942fad6 Tony Battersby 2009-01-21 1598 struct sg_device *sdp = container_of(kref, struct sg_device, d_ref);
c6517b7942fad6 Tony Battersby 2009-01-21 1599 unsigned long flags;
c6517b7942fad6 Tony Battersby 2009-01-21 1600
c6517b7942fad6 Tony Battersby 2009-01-21 1601 /* CAUTION! Note that the device can still be found via idr_find()
c6517b7942fad6 Tony Battersby 2009-01-21 1602 * even though the refcount is 0. Therefore, do idr_remove() BEFORE
c6517b7942fad6 Tony Battersby 2009-01-21 1603 * any other cleanup.
c6517b7942fad6 Tony Battersby 2009-01-21 1604 */
c6517b7942fad6 Tony Battersby 2009-01-21 1605
c6517b7942fad6 Tony Battersby 2009-01-21 1606 write_lock_irqsave(&sg_index_lock, flags);
c6517b7942fad6 Tony Battersby 2009-01-21 1607 idr_remove(&sg_index_idr, sdp->index);
c6517b7942fad6 Tony Battersby 2009-01-21 1608 write_unlock_irqrestore(&sg_index_lock, flags);
c6517b7942fad6 Tony Battersby 2009-01-21 1609
c6517b7942fad6 Tony Battersby 2009-01-21 1610 SCSI_LOG_TIMEOUT(3,
95e159d6dd808b Hannes Reinecke 2014-06-25 1611 sg_printk(KERN_INFO, sdp, "sg_device_destroy\n"));
c6517b7942fad6 Tony Battersby 2009-01-21 1612
c6517b7942fad6 Tony Battersby 2009-01-21 1613 put_disk(sdp->disk);
c6517b7942fad6 Tony Battersby 2009-01-21 1614 kfree(sdp);
c6517b7942fad6 Tony Battersby 2009-01-21 1615 }
c6517b7942fad6 Tony Battersby 2009-01-21 1616
cc833acbee9db5 Douglas Gilbert 2014-06-25 1617 static void
cc833acbee9db5 Douglas Gilbert 2014-06-25 1618 sg_remove_device(struct device *cl_dev, struct class_interface *cl_intf)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1619 {
ee959b00c335d7 Tony Jones 2008-02-22 1620 struct scsi_device *scsidp = to_scsi_device(cl_dev->parent);
ee959b00c335d7 Tony Jones 2008-02-22 1621 Sg_device *sdp = dev_get_drvdata(cl_dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1622 unsigned long iflags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1623 Sg_fd *sfp;
cc833acbee9db5 Douglas Gilbert 2014-06-25 1624 int val;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1625
cc833acbee9db5 Douglas Gilbert 2014-06-25 1626 if (!sdp)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1627 return;
cc833acbee9db5 Douglas Gilbert 2014-06-25 1628 /* want sdp->detaching non-zero as soon as possible */
cc833acbee9db5 Douglas Gilbert 2014-06-25 1629 val = atomic_inc_return(&sdp->detaching);
cc833acbee9db5 Douglas Gilbert 2014-06-25 1630 if (val > 1)
cc833acbee9db5 Douglas Gilbert 2014-06-25 1631 return; /* only want to do following once per device */
7c07d613d22680 James Bottomley 2007-08-05 1632
95e159d6dd808b Hannes Reinecke 2014-06-25 1633 SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp,
95e159d6dd808b Hannes Reinecke 2014-06-25 1634 "%s\n", __func__));
c6517b7942fad6 Tony Battersby 2009-01-21 1635
cc833acbee9db5 Douglas Gilbert 2014-06-25 1636 read_lock_irqsave(&sdp->sfd_lock, iflags);
3442f802a8169a FUJITA Tomonori 2009-02-16 1637 list_for_each_entry(sfp, &sdp->sfds, sfd_siblings) {
cc833acbee9db5 Douglas Gilbert 2014-06-25 1638 wake_up_interruptible_all(&sfp->read_wait);
c6517b7942fad6 Tony Battersby 2009-01-21 1639 kill_fasync(&sfp->async_qp, SIGPOLL, POLL_HUP);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1640 }
cc833acbee9db5 Douglas Gilbert 2014-06-25 1641 wake_up_interruptible_all(&sdp->open_wait);
cc833acbee9db5 Douglas Gilbert 2014-06-25 1642 read_unlock_irqrestore(&sdp->sfd_lock, iflags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1643
^1da177e4c3f41 Linus Torvalds 2005-04-16 @1644 sysfs_remove_link(&scsidp->sdev_gendev.kobj, "generic");
ee959b00c335d7 Tony Jones 2008-02-22 1645 device_destroy(sg_sysfs_class, MKDEV(SCSI_GENERIC_MAJOR, sdp->index));
^1da177e4c3f41 Linus Torvalds 2005-04-16 1646 cdev_del(sdp->cdev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1647 sdp->cdev = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1648
cc833acbee9db5 Douglas Gilbert 2014-06-25 1649 kref_put(&sdp->d_ref, sg_device_destroy);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1650 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1651
:::::: The code at line 1567 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.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 50/364] include/linux/kernel.h:706:51: error: 'struct task_struct' has no member named 'rt'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 6528e8a95a1c2683f8a4c93b4a945175f89fdc3d [50/364] sched/headers, sched/rt: Move task_struct::rt to per_task(), finish
config: x86_64-rhel-8.3 (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=65...
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 6528e8a95a1c2683f8a4c93b4a945175f89fdc3d
# 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 <command-line>:
kernel/sched/rt.c: In function 'rt_task_of':
>> include/linux/kernel.h:706:51: error: 'struct task_struct' has no member named 'rt'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~
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/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:706:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:706:20: note: in expansion of macro '__same_type'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
kernel/sched/rt.c:121:9: note: in expansion of macro 'container_of'
121 | return container_of(rt_se, struct task_struct, rt);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'rt'
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/kernel.h:709:21: note: in expansion of macro 'offsetof'
709 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
kernel/sched/rt.c:121:9: note: in expansion of macro 'container_of'
121 | return container_of(rt_se, struct task_struct, rt);
| ^~~~~~~~~~~~
kernel/sched/rt.c: At top level:
kernel/sched/rt.c:670:6: warning: no previous prototype for 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
670 | bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c: In function 'rt_task_of':
kernel/sched/rt.c:122:1: error: control reaches end of non-void function [-Werror=return-type]
122 | }
| ^
cc1: some warnings being treated as errors
vim +706 include/linux/kernel.h
cf14f27f82af78 Alexei Starovoitov 2018-03-28 696
^1da177e4c3f41 Linus Torvalds 2005-04-16 697 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 698 * container_of - cast a member of a structure out to the containing structure
^1da177e4c3f41 Linus Torvalds 2005-04-16 699 * @ptr: the pointer to the member.
^1da177e4c3f41 Linus Torvalds 2005-04-16 700 * @type: the type of the container struct this is embedded in.
^1da177e4c3f41 Linus Torvalds 2005-04-16 701 * @member: the name of the member within the struct.
^1da177e4c3f41 Linus Torvalds 2005-04-16 702 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 703 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 704 #define container_of(ptr, type, member) ({ \
c7acec713d14c6 Ian Abbott 2017-07-12 705 void *__mptr = (void *)(ptr); \
c7acec713d14c6 Ian Abbott 2017-07-12 @706 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
c7acec713d14c6 Ian Abbott 2017-07-12 707 !__same_type(*(ptr), void), \
c7acec713d14c6 Ian Abbott 2017-07-12 708 "pointer type mismatch in container_of()"); \
c7acec713d14c6 Ian Abbott 2017-07-12 709 ((type *)(__mptr - offsetof(type, member))); })
^1da177e4c3f41 Linus Torvalds 2005-04-16 710
:::::: The code at line 706 was first introduced by commit
:::::: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
:::::: TO: Ian Abbott <abbotti(a)mev.co.uk>
:::::: 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
[jimc:dd-diet-6 36/37] lib/dynamic_debug.c:1319:34: warning: unknown attribute 'optimize' ignored
by kernel test robot
tree: https://github.com/jimc/linux.git dd-diet-6
head: 02405228312e180cda1d5c7a5c784bef1540197e
commit: 272e0af356f3c076132cffeb729b5435387d82bd [36/37] dyndbg: try to release unneeded memory (panics)
config: powerpc-randconfig-r026-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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/jimc/linux/commit/272e0af356f3c076132cffeb729b5435387d...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-diet-6
git checkout 272e0af356f3c076132cffeb729b5435387d82bd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 warnings (new ones prefixed by >>):
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:45:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:47:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:49:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:51:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:53:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from lib/dynamic_debug.c:35:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:55:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> lib/dynamic_debug.c:1319:34: warning: unknown attribute 'optimize' ignored [-Wunknown-attributes]
static int __init __attribute__((optimize(0)))
^~~~~~~~~~~
lib/dynamic_debug.c:1332:21: warning: unused variable 'addr' [-Wunused-variable]
unsigned long pfn, addr;
^
9 warnings generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for HOTPLUG_CPU
Depends on SMP && (PPC_PSERIES || PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE
Selected by
- PM_SLEEP_SMP && SMP && (ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE && PM_SLEEP
vim +/optimize +1319 lib/dynamic_debug.c
1318
> 1319 static int __init __attribute__((optimize(0)))
1320 dynamic_debug_init(void)
1321 {
1322 struct _ddebug *iter, *iter_mod_start;
1323 struct _ddebug_site *site, *site_mod_start;
1324
1325 const char *modname = NULL;
1326 char *cmdline;
1327 int ret = 0;
1328 int i, site_ct = 0, modct = 0, mod_index = 0;
1329 unsigned int site_base;
1330 // volatile
1331 struct page *pg;
1332 unsigned long pfn, addr;
1333
1334 if (&__start___dyndbg == &__stop___dyndbg) {
1335 if (IS_ENABLED(CONFIG_DYNAMIC_DEBUG)) {
1336 pr_warn("_ddebug table is empty in a CONFIG_DYNAMIC_DEBUG build\n");
1337 return 1;
1338 }
1339 pr_info("Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build\n");
1340 ddebug_init_success = 1;
1341 return 0;
1342 }
1343
1344 iter = iter_mod_start = __start___dyndbg;
1345 site = site_mod_start = __start___dyndbg_sites;
1346 modname = site->modname;
1347
1348 for (site_base = i = 0; iter < __stop___dyndbg; iter++, site++, i++) {
1349
1350 SITE_CHK_(BUG_ON(site != iter->site));
1351
1352 if (strcmp(modname, site->modname)) {
1353 modct++;
1354
1355 ret = __ddebug_add_module(iter_mod_start, site_mod_start,
1356 site_ct, mod_index, modname,
1357 __start___dyndbg_sites, &site_base);
1358 if (ret)
1359 goto out_err;
1360
1361 modname = site->modname;
1362 iter_mod_start = iter;
1363 site_mod_start = site;
1364 mod_index += site_ct;
1365 site_ct = 0;
1366 }
1367 site_ct++;
1368 }
1369 ret = __ddebug_add_module(iter_mod_start, site_mod_start,
1370 site_ct, mod_index, modname,
1371 __start___dyndbg_sites, &site_base);
1372 if (ret)
1373 goto out_err;
1374
1375 vpr_info("page: %px %px, %px %px, %px %px %d/%d\n",
1376 virt_to_page(__start___dyndbg_sites), __start___dyndbg_sites,
1377 virt_to_page(site), site,
1378 virt_to_page(__stop___dyndbg_sites), __stop___dyndbg_sites,
1379 site_base, i);
1380
1381 pg = virt_to_page(__start___dyndbg_sites);
1382 vpr_info("page: %px\n", pg);
1383
1384 pg = virt_to_page(site);
1385 vpr_info("page: %px\n", pg);
1386
1387 pg = virt_to_page(__stop___dyndbg_sites);
1388 vpr_info("page: %px\n", pg);
1389
1390 pg = virt_to_page(__stop___dyndbg_sites - PAGE_SIZE);
1391 vpr_info("page: %px\n", pg);
1392 /*
1393 for (addr = site; addr < __stop___dyndbg_sites; addr += PAGE_SIZE) {
1394 pg = pfn_to_page(addr >> PAGE_SHIFT);
1395 vpr_info("freeing page: %px\n", pg);
1396 free_reserved_page(pg);
1397 }
1398 */
1399 for (pfn = PFN_UP((long)site);
1400 pfn < PFN_DOWN((long)__stop___dyndbg_sites); pfn++) {
1401 struct page *page = pfn_to_page(pfn);
1402 vpr_info("freeing page: %px %ld\n", page, pfn);
1403 free_reserved_page(page);
1404 }
1405 /*
1406 for (pg = virt_to_page(__stop___dyndbg_sites - PAGE_SIZE);
1407 pg > virt_to_page(site);
1408 pg = virt_to_page(site - PAGE_SIZE)) {
1409 vpr_info("freeing page: %px\n", pg);
1410 free_reserved_page(pg);
1411 }
1412 */
1413 ddebug_init_success = 1;
1414 vpr_info("%d prdebugs in %d modules, %d KiB in ddebug tables, %d KiB in __dyndbg section, %d KiB in __dyndbg_sites section\n",
1415 i, modct, (int)((modct * sizeof(struct ddebug_table)) >> 10),
1416 (int)((i * sizeof(struct _ddebug)) >> 10),
1417 (int)((i * sizeof(struct _ddebug_site)) >> 10));
1418
1419 /* apply ddebug_query boot param, dont unload tables on err */
1420 if (ddebug_setup_string[0] != '\0') {
1421 pr_warn("ddebug_query param name is deprecated, change it to dyndbg\n");
1422 ret = ddebug_exec_queries(ddebug_setup_string, NULL);
1423 if (ret < 0)
1424 pr_warn("Invalid ddebug boot param %s\n",
1425 ddebug_setup_string);
1426 else
1427 pr_info("%d changes by ddebug_query\n", ret);
1428 }
1429 /* now that ddebug tables are loaded, process all boot args
1430 * again to find and activate queries given in dyndbg params.
1431 * While this has already been done for known boot params, it
1432 * ignored the unknown ones (dyndbg in particular). Reusing
1433 * parse_args avoids ad-hoc parsing. This will also attempt
1434 * to activate queries for not-yet-loaded modules, which is
1435 * slightly noisy if verbose, but harmless.
1436 */
1437 cmdline = kstrdup(saved_command_line, GFP_KERNEL);
1438 parse_args("dyndbg params", cmdline, NULL,
1439 0, 0, 0, NULL, &ddebug_dyndbg_boot_param_cb);
1440 kfree(cmdline);
1441 return 0;
1442
1443 out_err:
1444 ddebug_remove_all_tables();
1445 return 0;
1446 }
1447 /* Allow early initialization for boot messages via boot param */
1448 early_initcall(dynamic_debug_init);
1449
---
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 313/364] include/linux/compat.h:560:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: ab8b6c16e1f4f3a3fa41752685ce49a89c616ca8 [313/364] sched/headers, compat: Simplify <linux/compat.h> dependencies even more
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=ab...
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 ab8b6c16e1f4f3a3fa41752685ce49a89c616ca8
# 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 warnings (new ones prefixed by >>):
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
from arch/powerpc/kernel/asm-offsets.c:14:
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
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 arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/sched.h:459:26: error: field 'irqtrace' has incomplete type
459 | struct irqtrace_events irqtrace;
| ^~~~~~~~
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 include/linux/compat.h:9,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/compat.h:42:2: error: unknown type name 'old_time32_t'
42 | old_time32_t st_atime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:44:2: error: unknown type name 'old_time32_t'
44 | old_time32_t st_mtime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:46:2: error: unknown type name 'old_time32_t'
46 | old_time32_t st_ctime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/powerpc/include/asm/compat.h:99:25: error: implicit declaration of function 'task_thread' [-Werror=implicit-function-declaration]
99 | struct pt_regs *regs = task_thread(current).regs;
| ^~~~~~~~~~~
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;
| ^
arch/powerpc/include/asm/compat.h:100:26: error: dereferencing pointer to incomplete type 'struct pt_regs'
100 | unsigned long usp = regs->gpr[1];
| ^~
arch/powerpc/include/asm/compat.h:107:7: error: implicit declaration of function 'is_32bit_task' [-Werror=implicit-function-declaration]
107 | if (!is_32bit_task())
| ^~~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:108:10: error: 'USER_REDZONE_SIZE' undeclared (first use in this function); did you mean 'USER_REGION_ID'?
108 | usp -= USER_REDZONE_SIZE;
| ^~~~~~~~~~~~~~~~~
| USER_REGION_ID
arch/powerpc/include/asm/compat.h:108:10: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/compat.h: At top level:
include/linux/compat.h:263:23: error: field 'ru_utime' has incomplete type
263 | struct old_timeval32 ru_utime;
| ^~~~~~~~
include/linux/compat.h:264:23: error: field 'ru_stime' has incomplete type
264 | struct old_timeval32 ru_stime;
| ^~~~~~~~
include/linux/compat.h: In function 'put_compat_sigset':
include/linux/compat.h:441:9: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
441 | return copy_to_user(compat, &v, size) ? -EFAULT : 0;
| ^~~~~~~~~~~~
include/linux/compat.h: At top level:
>> include/linux/compat.h:560:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
560 | struct old_timespec32 __user *timeout,
| ^~~~~~~~~~~~~~
include/linux/compat.h:559:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
559 | struct io_event __user *events,
| ^~~~~~~~
>> include/linux/compat.h:566:13: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
566 | struct __kernel_timespec __user *timeout,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:565:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
565 | struct io_event __user *events,
| ^~~~~~~~
include/linux/compat.h:581:17: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
581 | const struct __kernel_timespec __user *timeout,
| ^~~~~~~~~~~~~~~~~
>> include/linux/compat.h:620:16: warning: 'struct iovec' declared inside parameter list will not be visible outside of this definition or declaration
620 | const struct iovec __user *vec,
| ^~~~~
include/linux/compat.h:623:16: warning: 'struct iovec' declared inside parameter list will not be visible outside of this definition or declaration
623 | const struct iovec __user *vec,
| ^~~~~
include/linux/compat.h:647:16: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
647 | struct old_timespec32 __user *tsp,
| ^~~~~~~~~~~~~~
include/linux/compat.h:652:16: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
652 | struct __kernel_timespec __user *tsp,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:656:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
656 | struct old_timespec32 __user *tsp,
| ^~~~~~~~~~~~~~
>> include/linux/compat.h:654:48: warning: 'struct pollfd' declared inside parameter list will not be visible outside of this definition or declaration
654 | asmlinkage long compat_sys_ppoll_time32(struct pollfd __user *ufds,
| ^~~~~~
include/linux/compat.h:661:13: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
661 | struct __kernel_timespec __user *tsp,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:659:48: warning: 'struct pollfd' declared inside parameter list will not be visible outside of this definition or declaration
659 | asmlinkage long compat_sys_ppoll_time64(struct pollfd __user *ufds,
| ^~~~~~
include/linux/compat.h:743:10: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
743 | struct old_timespec32 __user *uts, compat_size_t sigsetsize);
| ^~~~~~~~~~~~~~
include/linux/compat.h:746:10: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
746 | struct __kernel_timespec __user *uts, compat_size_t sigsetsize);
| ^~~~~~~~~~~~~~~~~
>> include/linux/compat.h:761:10: warning: 'struct timezone' declared inside parameter list will not be visible outside of this definition or declaration
761 | struct timezone __user *tz);
| ^~~~~~~~
include/linux/compat.h:763:10: warning: 'struct timezone' declared inside parameter list will not be visible outside of this definition or declaration
763 | struct timezone __user *tz);
| ^~~~~~~~
include/linux/compat.h:839:16: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
839 | struct __kernel_timespec __user *timeout);
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:842:16: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
842 | struct old_timespec32 __user *timeout);
| ^~~~~~~~~~~~~~
include/linux/compat.h:849:18: warning: 'struct file_handle' declared inside parameter list will not be visible outside of this definition or declaration
849 | struct file_handle __user *handle,
| ^~~~~~~~~~~
include/linux/compat.h:858:51: error: unknown type name 'rwf_t'
858 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:861:51: error: unknown type name 'rwf_t'
861 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:951:36: error: return type is an incomplete type
951 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h: In function 'ns_to_old_timeval32':
include/linux/compat.h:953:30: error: storage size of 'tv' isn't known
953 | struct __kernel_old_timeval tv;
| ^~
include/linux/compat.h:954:23: error: storage size of 'ctv' isn't known
954 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:956:7: error: implicit declaration of function 'ns_to_kernel_old_timeval' [-Werror=implicit-function-declaration]
956 | tv = ns_to_kernel_old_timeval(nsec);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:960:9: error: 'return' with a value, in function returning void [-Werror=return-type]
960 | return ctv;
| ^~~
include/linux/compat.h:951:36: note: declared here
951 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h:954:23: warning: unused variable 'ctv' [-Wunused-variable]
954 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:953:30: warning: unused variable 'tv' [-Wunused-variable]
953 | struct __kernel_old_timeval tv;
| ^~
In file included from include/linux/thread_info.h:52,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:8,
from include/linux/mm.h:12,
from include/linux/mman.h:5,
from arch/powerpc/kernel/asm-offsets.c:21:
arch/powerpc/include/asm/thread_info.h: In function 'clear_thread_local_flags':
arch/powerpc/include/asm/thread_info.h:156:27: error: implicit declaration of function 'current_thread_info' [-Werror=implicit-function-declaration]
156 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:156:27: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
arch/powerpc/include/asm/thread_info.h: In function 'test_thread_local_flags':
arch/powerpc/include/asm/thread_info.h:162:27: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
162 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
include/asm-generic/preempt.h: In function '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: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:36:21: note: in expansion of macro '__native_word'
--
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
from arch/powerpc/kernel/asm-offsets.c:14:
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
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 arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:9,
from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/sched.h:459:26: error: field 'irqtrace' has incomplete type
459 | struct irqtrace_events irqtrace;
| ^~~~~~~~
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 include/linux/compat.h:9,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/compat.h:42:2: error: unknown type name 'old_time32_t'
42 | old_time32_t st_atime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:44:2: error: unknown type name 'old_time32_t'
44 | old_time32_t st_mtime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:46:2: error: unknown type name 'old_time32_t'
46 | old_time32_t st_ctime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/powerpc/include/asm/compat.h:99:25: error: implicit declaration of function 'task_thread' [-Werror=implicit-function-declaration]
99 | struct pt_regs *regs = task_thread(current).regs;
| ^~~~~~~~~~~
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;
| ^
arch/powerpc/include/asm/compat.h:100:26: error: dereferencing pointer to incomplete type 'struct pt_regs'
100 | unsigned long usp = regs->gpr[1];
| ^~
arch/powerpc/include/asm/compat.h:107:7: error: implicit declaration of function 'is_32bit_task' [-Werror=implicit-function-declaration]
107 | if (!is_32bit_task())
| ^~~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:108:10: error: 'USER_REDZONE_SIZE' undeclared (first use in this function); did you mean 'USER_REGION_ID'?
108 | usp -= USER_REDZONE_SIZE;
| ^~~~~~~~~~~~~~~~~
| USER_REGION_ID
arch/powerpc/include/asm/compat.h:108:10: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/compat.h: At top level:
include/linux/compat.h:263:23: error: field 'ru_utime' has incomplete type
263 | struct old_timeval32 ru_utime;
| ^~~~~~~~
include/linux/compat.h:264:23: error: field 'ru_stime' has incomplete type
264 | struct old_timeval32 ru_stime;
| ^~~~~~~~
include/linux/compat.h: In function 'put_compat_sigset':
include/linux/compat.h:441:9: error: implicit declaration of function 'copy_to_user' [-Werror=implicit-function-declaration]
441 | return copy_to_user(compat, &v, size) ? -EFAULT : 0;
| ^~~~~~~~~~~~
include/linux/compat.h: At top level:
>> include/linux/compat.h:560:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
560 | struct old_timespec32 __user *timeout,
| ^~~~~~~~~~~~~~
include/linux/compat.h:559:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
559 | struct io_event __user *events,
| ^~~~~~~~
>> include/linux/compat.h:566:13: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
566 | struct __kernel_timespec __user *timeout,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:565:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
565 | struct io_event __user *events,
| ^~~~~~~~
include/linux/compat.h:581:17: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
581 | const struct __kernel_timespec __user *timeout,
| ^~~~~~~~~~~~~~~~~
>> include/linux/compat.h:620:16: warning: 'struct iovec' declared inside parameter list will not be visible outside of this definition or declaration
620 | const struct iovec __user *vec,
| ^~~~~
include/linux/compat.h:623:16: warning: 'struct iovec' declared inside parameter list will not be visible outside of this definition or declaration
623 | const struct iovec __user *vec,
| ^~~~~
include/linux/compat.h:647:16: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
647 | struct old_timespec32 __user *tsp,
| ^~~~~~~~~~~~~~
include/linux/compat.h:652:16: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
652 | struct __kernel_timespec __user *tsp,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:656:13: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
656 | struct old_timespec32 __user *tsp,
| ^~~~~~~~~~~~~~
>> include/linux/compat.h:654:48: warning: 'struct pollfd' declared inside parameter list will not be visible outside of this definition or declaration
654 | asmlinkage long compat_sys_ppoll_time32(struct pollfd __user *ufds,
| ^~~~~~
include/linux/compat.h:661:13: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
661 | struct __kernel_timespec __user *tsp,
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:659:48: warning: 'struct pollfd' declared inside parameter list will not be visible outside of this definition or declaration
659 | asmlinkage long compat_sys_ppoll_time64(struct pollfd __user *ufds,
| ^~~~~~
include/linux/compat.h:743:10: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
743 | struct old_timespec32 __user *uts, compat_size_t sigsetsize);
| ^~~~~~~~~~~~~~
include/linux/compat.h:746:10: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
746 | struct __kernel_timespec __user *uts, compat_size_t sigsetsize);
| ^~~~~~~~~~~~~~~~~
>> include/linux/compat.h:761:10: warning: 'struct timezone' declared inside parameter list will not be visible outside of this definition or declaration
761 | struct timezone __user *tz);
| ^~~~~~~~
include/linux/compat.h:763:10: warning: 'struct timezone' declared inside parameter list will not be visible outside of this definition or declaration
763 | struct timezone __user *tz);
| ^~~~~~~~
include/linux/compat.h:839:16: warning: 'struct __kernel_timespec' declared inside parameter list will not be visible outside of this definition or declaration
839 | struct __kernel_timespec __user *timeout);
| ^~~~~~~~~~~~~~~~~
include/linux/compat.h:842:16: warning: 'struct old_timespec32' declared inside parameter list will not be visible outside of this definition or declaration
842 | struct old_timespec32 __user *timeout);
| ^~~~~~~~~~~~~~
include/linux/compat.h:849:18: warning: 'struct file_handle' declared inside parameter list will not be visible outside of this definition or declaration
849 | struct file_handle __user *handle,
| ^~~~~~~~~~~
include/linux/compat.h:858:51: error: unknown type name 'rwf_t'
858 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:861:51: error: unknown type name 'rwf_t'
861 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:951:36: error: return type is an incomplete type
951 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h: In function 'ns_to_old_timeval32':
include/linux/compat.h:953:30: error: storage size of 'tv' isn't known
953 | struct __kernel_old_timeval tv;
| ^~
include/linux/compat.h:954:23: error: storage size of 'ctv' isn't known
954 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:956:7: error: implicit declaration of function 'ns_to_kernel_old_timeval' [-Werror=implicit-function-declaration]
956 | tv = ns_to_kernel_old_timeval(nsec);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:960:9: error: 'return' with a value, in function returning void [-Werror=return-type]
960 | return ctv;
| ^~~
include/linux/compat.h:951:36: note: declared here
951 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h:954:23: warning: unused variable 'ctv' [-Wunused-variable]
954 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:953:30: warning: unused variable 'tv' [-Wunused-variable]
953 | struct __kernel_old_timeval tv;
| ^~
In file included from include/linux/thread_info.h:52,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:53,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:8,
from include/linux/mm.h:12,
from include/linux/mman.h:5,
from arch/powerpc/kernel/asm-offsets.c:21:
arch/powerpc/include/asm/thread_info.h: In function 'clear_thread_local_flags':
arch/powerpc/include/asm/thread_info.h:156:27: error: implicit declaration of function 'current_thread_info' [-Werror=implicit-function-declaration]
156 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/thread_info.h:156:27: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
arch/powerpc/include/asm/thread_info.h: In function 'test_thread_local_flags':
arch/powerpc/include/asm/thread_info.h:162:27: warning: initialization of 'struct thread_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
162 | struct thread_info *ti = current_thread_info();
| ^~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
include/asm-generic/preempt.h: In function '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: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:36:21: note: in expansion of macro '__native_word'
..
vim +560 include/linux/compat.h
c679a08983db7c Dominik Brodowski 2018-03-25 538
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 539 /*
c679a08983db7c Dominik Brodowski 2018-03-25 540 * These syscall function prototypes are kept in the same order as
3e2052e5dd4062 Dominik Brodowski 2018-03-22 541 * include/uapi/asm-generic/unistd.h. Deprecated or obsolete system calls
3e2052e5dd4062 Dominik Brodowski 2018-03-22 542 * go below.
c679a08983db7c Dominik Brodowski 2018-03-25 543 *
c679a08983db7c Dominik Brodowski 2018-03-25 544 * Please note that these prototypes here are only provided for information
c679a08983db7c Dominik Brodowski 2018-03-25 545 * purposes, for static analysis, and for linking from the syscall table.
c679a08983db7c Dominik Brodowski 2018-03-25 546 * These functions should not be called elsewhere from kernel code.
7303e30ec1d8fb Dominik Brodowski 2018-04-05 547 *
7303e30ec1d8fb Dominik Brodowski 2018-04-05 548 * As the syscall calling convention may be different from the default
7303e30ec1d8fb Dominik Brodowski 2018-04-05 549 * for architectures overriding the syscall calling convention, do not
7303e30ec1d8fb Dominik Brodowski 2018-04-05 550 * include the prototypes if CONFIG_ARCH_HAS_SYSCALL_WRAPPER is enabled.
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 551 */
7303e30ec1d8fb Dominik Brodowski 2018-04-05 552 #ifndef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
c679a08983db7c Dominik Brodowski 2018-03-25 553 asmlinkage long compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p);
c679a08983db7c Dominik Brodowski 2018-03-25 554 asmlinkage long compat_sys_io_submit(compat_aio_context_t ctx_id, int nr,
c679a08983db7c Dominik Brodowski 2018-03-25 555 u32 __user *iocb);
7a074e96dee625 Christoph Hellwig 2018-05-02 556 asmlinkage long compat_sys_io_pgetevents(compat_aio_context_t ctx_id,
7a074e96dee625 Christoph Hellwig 2018-05-02 557 compat_long_t min_nr,
7a074e96dee625 Christoph Hellwig 2018-05-02 558 compat_long_t nr,
7a074e96dee625 Christoph Hellwig 2018-05-02 559 struct io_event __user *events,
9afc5eee65ca7d Arnd Bergmann 2018-07-13 @560 struct old_timespec32 __user *timeout,
7a074e96dee625 Christoph Hellwig 2018-05-02 561 const struct __compat_aio_sigset __user *usig);
7a35397f8c06bf Deepa Dinamani 2018-09-19 562 asmlinkage long compat_sys_io_pgetevents_time64(compat_aio_context_t ctx_id,
7a35397f8c06bf Deepa Dinamani 2018-09-19 563 compat_long_t min_nr,
7a35397f8c06bf Deepa Dinamani 2018-09-19 564 compat_long_t nr,
7a35397f8c06bf Deepa Dinamani 2018-09-19 565 struct io_event __user *events,
7a35397f8c06bf Deepa Dinamani 2018-09-19 @566 struct __kernel_timespec __user *timeout,
7a35397f8c06bf Deepa Dinamani 2018-09-19 567 const struct __compat_aio_sigset __user *usig);
c679a08983db7c Dominik Brodowski 2018-03-25 568
c679a08983db7c Dominik Brodowski 2018-03-25 569 /* fs/cookies.c */
c679a08983db7c Dominik Brodowski 2018-03-25 570 asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t);
c679a08983db7c Dominik Brodowski 2018-03-25 571
c679a08983db7c Dominik Brodowski 2018-03-25 572 /* fs/eventpoll.c */
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 573 asmlinkage long compat_sys_epoll_pwait(int epfd,
35280bd4a3fa84 Al Viro 2013-02-24 574 struct epoll_event __user *events,
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 575 int maxevents, int timeout,
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 576 const compat_sigset_t __user *sigmask,
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 577 compat_size_t sigsetsize);
b0a0c2615f6f19 Willem de Bruijn 2020-12-18 578 asmlinkage long compat_sys_epoll_pwait2(int epfd,
b0a0c2615f6f19 Willem de Bruijn 2020-12-18 579 struct epoll_event __user *events,
b0a0c2615f6f19 Willem de Bruijn 2020-12-18 580 int maxevents,
b0a0c2615f6f19 Willem de Bruijn 2020-12-18 581 const struct __kernel_timespec __user *timeout,
b0a0c2615f6f19 Willem de Bruijn 2020-12-18 582 const compat_sigset_t __user *sigmask,
b0a0c2615f6f19 Willem de Bruijn 2020-12-18 583 compat_size_t sigsetsize);
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 584
c679a08983db7c Dominik Brodowski 2018-03-25 585 /* fs/fcntl.c */
c679a08983db7c Dominik Brodowski 2018-03-25 586 asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,
c679a08983db7c Dominik Brodowski 2018-03-25 587 compat_ulong_t arg);
c679a08983db7c Dominik Brodowski 2018-03-25 588 asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd,
c679a08983db7c Dominik Brodowski 2018-03-25 589 compat_ulong_t arg);
97416ce82e20a9 Stephen Rothwell 2007-05-09 590
c679a08983db7c Dominik Brodowski 2018-03-25 591 /* fs/ioctl.c */
c679a08983db7c Dominik Brodowski 2018-03-25 592 asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
c679a08983db7c Dominik Brodowski 2018-03-25 593 compat_ulong_t arg);
140ff8b0459cac Stephen Rothwell 2007-05-14 594
c679a08983db7c Dominik Brodowski 2018-03-25 595 /* fs/open.c */
be84cb43833ee4 Chris Metcalf 2011-05-09 596 asmlinkage long compat_sys_statfs(const char __user *pathname,
be84cb43833ee4 Chris Metcalf 2011-05-09 597 struct compat_statfs __user *buf);
be84cb43833ee4 Chris Metcalf 2011-05-09 598 asmlinkage long compat_sys_statfs64(const char __user *pathname,
be84cb43833ee4 Chris Metcalf 2011-05-09 599 compat_size_t sz,
be84cb43833ee4 Chris Metcalf 2011-05-09 600 struct compat_statfs64 __user *buf);
c679a08983db7c Dominik Brodowski 2018-03-25 601 asmlinkage long compat_sys_fstatfs(unsigned int fd,
c679a08983db7c Dominik Brodowski 2018-03-25 602 struct compat_statfs __user *buf);
be84cb43833ee4 Chris Metcalf 2011-05-09 603 asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz,
be84cb43833ee4 Chris Metcalf 2011-05-09 604 struct compat_statfs64 __user *buf);
c679a08983db7c Dominik Brodowski 2018-03-25 605 asmlinkage long compat_sys_truncate(const char __user *, compat_off_t);
c679a08983db7c Dominik Brodowski 2018-03-25 606 asmlinkage long compat_sys_ftruncate(unsigned int, compat_ulong_t);
c679a08983db7c Dominik Brodowski 2018-03-25 607 /* No generic prototype for truncate64, ftruncate64, fallocate */
c679a08983db7c Dominik Brodowski 2018-03-25 608 asmlinkage long compat_sys_openat(int dfd, const char __user *filename,
c679a08983db7c Dominik Brodowski 2018-03-25 609 int flags, umode_t mode);
c679a08983db7c Dominik Brodowski 2018-03-25 610
c679a08983db7c Dominik Brodowski 2018-03-25 611 /* fs/readdir.c */
be84cb43833ee4 Chris Metcalf 2011-05-09 612 asmlinkage long compat_sys_getdents(unsigned int fd,
be84cb43833ee4 Chris Metcalf 2011-05-09 613 struct compat_linux_dirent __user *dirent,
be84cb43833ee4 Chris Metcalf 2011-05-09 614 unsigned int count);
c679a08983db7c Dominik Brodowski 2018-03-25 615
c679a08983db7c Dominik Brodowski 2018-03-25 616 /* fs/read_write.c */
c679a08983db7c Dominik Brodowski 2018-03-25 617 asmlinkage long compat_sys_lseek(unsigned int, compat_off_t, unsigned int);
c679a08983db7c Dominik Brodowski 2018-03-25 618 /* No generic prototype for pread64 and pwrite64 */
c679a08983db7c Dominik Brodowski 2018-03-25 619 asmlinkage ssize_t compat_sys_preadv(compat_ulong_t fd,
3523a9d4547898 Christoph Hellwig 2020-09-25 @620 const struct iovec __user *vec,
c679a08983db7c Dominik Brodowski 2018-03-25 621 compat_ulong_t vlen, u32 pos_low, u32 pos_high);
c679a08983db7c Dominik Brodowski 2018-03-25 622 asmlinkage ssize_t compat_sys_pwritev(compat_ulong_t fd,
3523a9d4547898 Christoph Hellwig 2020-09-25 623 const struct iovec __user *vec,
c679a08983db7c Dominik Brodowski 2018-03-25 624 compat_ulong_t vlen, u32 pos_low, u32 pos_high);
c679a08983db7c Dominik Brodowski 2018-03-25 625 #ifdef __ARCH_WANT_COMPAT_SYS_PREADV64
c679a08983db7c Dominik Brodowski 2018-03-25 626 asmlinkage long compat_sys_preadv64(unsigned long fd,
3523a9d4547898 Christoph Hellwig 2020-09-25 627 const struct iovec __user *vec,
c679a08983db7c Dominik Brodowski 2018-03-25 628 unsigned long vlen, loff_t pos);
c679a08983db7c Dominik Brodowski 2018-03-25 629 #endif
c679a08983db7c Dominik Brodowski 2018-03-25 630
c679a08983db7c Dominik Brodowski 2018-03-25 631 #ifdef __ARCH_WANT_COMPAT_SYS_PWRITEV64
c679a08983db7c Dominik Brodowski 2018-03-25 632 asmlinkage long compat_sys_pwritev64(unsigned long fd,
3523a9d4547898 Christoph Hellwig 2020-09-25 633 const struct iovec __user *vec,
c679a08983db7c Dominik Brodowski 2018-03-25 634 unsigned long vlen, loff_t pos);
c679a08983db7c Dominik Brodowski 2018-03-25 635 #endif
c679a08983db7c Dominik Brodowski 2018-03-25 636
c679a08983db7c Dominik Brodowski 2018-03-25 637 /* fs/sendfile.c */
c679a08983db7c Dominik Brodowski 2018-03-25 638 asmlinkage long compat_sys_sendfile(int out_fd, int in_fd,
c679a08983db7c Dominik Brodowski 2018-03-25 639 compat_off_t __user *offset, compat_size_t count);
c679a08983db7c Dominik Brodowski 2018-03-25 640 asmlinkage long compat_sys_sendfile64(int out_fd, int in_fd,
c679a08983db7c Dominik Brodowski 2018-03-25 641 compat_loff_t __user *offset, compat_size_t count);
c679a08983db7c Dominik Brodowski 2018-03-25 642
c679a08983db7c Dominik Brodowski 2018-03-25 643 /* fs/select.c */
8dabe7245bbc13 Arnd Bergmann 2019-01-07 644 asmlinkage long compat_sys_pselect6_time32(int n, compat_ulong_t __user *inp,
be84cb43833ee4 Chris Metcalf 2011-05-09 645 compat_ulong_t __user *outp,
be84cb43833ee4 Chris Metcalf 2011-05-09 646 compat_ulong_t __user *exp,
9afc5eee65ca7d Arnd Bergmann 2018-07-13 @647 struct old_timespec32 __user *tsp,
be84cb43833ee4 Chris Metcalf 2011-05-09 648 void __user *sig);
e024707bccae15 Deepa Dinamani 2018-09-19 649 asmlinkage long compat_sys_pselect6_time64(int n, compat_ulong_t __user *inp,
e024707bccae15 Deepa Dinamani 2018-09-19 650 compat_ulong_t __user *outp,
e024707bccae15 Deepa Dinamani 2018-09-19 651 compat_ulong_t __user *exp,
e024707bccae15 Deepa Dinamani 2018-09-19 652 struct __kernel_timespec __user *tsp,
e024707bccae15 Deepa Dinamani 2018-09-19 653 void __user *sig);
8dabe7245bbc13 Arnd Bergmann 2019-01-07 @654 asmlinkage long compat_sys_ppoll_time32(struct pollfd __user *ufds,
be84cb43833ee4 Chris Metcalf 2011-05-09 655 unsigned int nfds,
9afc5eee65ca7d Arnd Bergmann 2018-07-13 656 struct old_timespec32 __user *tsp,
be84cb43833ee4 Chris Metcalf 2011-05-09 657 const compat_sigset_t __user *sigmask,
be84cb43833ee4 Chris Metcalf 2011-05-09 658 compat_size_t sigsetsize);
8bd27a3004e80d Deepa Dinamani 2018-09-19 @659 asmlinkage long compat_sys_ppoll_time64(struct pollfd __user *ufds,
8bd27a3004e80d Deepa Dinamani 2018-09-19 660 unsigned int nfds,
8bd27a3004e80d Deepa Dinamani 2018-09-19 661 struct __kernel_timespec __user *tsp,
8bd27a3004e80d Deepa Dinamani 2018-09-19 662 const compat_sigset_t __user *sigmask,
8bd27a3004e80d Deepa Dinamani 2018-09-19 663 compat_size_t sigsetsize);
c679a08983db7c Dominik Brodowski 2018-03-25 664
:::::: The code at line 560 was first introduced by commit
:::::: 9afc5eee65ca7d717a99d6fe8f4adfe32a40940a y2038: globally rename compat_time to old_time32
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Arnd Bergmann <arnd(a)arndb.de>
---
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 306/364] include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 1cff92601f676592d29e12546cb17fac9c0d78ca [306/364] sched/headers, mm/highmem: Remove <linux/fs.h> inclusion from <linux/highmem.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=1c...
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 1cff92601f676592d29e12546cb17fac9c0d78ca
# 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 lib/scatterlist.c:7:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/scatterlist.h:8,
from lib/scatterlist.c:9:
lib/scatterlist.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/printk.h:8,
from include/linux/kernel.h:7,
from include/linux/highmem.h:5,
from include/linux/bio.h:8,
from drivers/md/dm-bio-record.h:10,
from drivers/md/dm-raid1.c:8:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/highmem.h:7,
from include/linux/bio.h:8,
from drivers/md/dm-bio-record.h:10,
from drivers/md/dm-raid1.c:8:
drivers/md/dm-raid1.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/printk.h:8,
from include/linux/kernel.h:7,
from include/linux/highmem.h:5,
from include/linux/bio.h:8,
from include/linux/device-mapper.h:11,
from include/linux/dm-dirty-log.h:16,
from drivers/md/dm-region-hash.c:8:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/highmem.h:7,
from include/linux/bio.h:8,
from include/linux/device-mapper.h:11,
from include/linux/dm-dirty-log.h:16,
from drivers/md/dm-region-hash.c:8:
drivers/md/dm-region-hash.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/printk.h:8,
from include/linux/kernel.h:7,
from include/linux/highmem.h:5,
from include/linux/bio.h:8,
from include/linux/device-mapper.h:11,
from drivers/md/dm-zero.c:7:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/highmem.h:7,
from include/linux/bio.h:8,
from include/linux/device-mapper.h:11,
from drivers/md/dm-zero.c:7:
drivers/md/dm-zero.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/preempt.h:12,
from include/linux/spinlock.h:53,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:8,
from include/linux/slab.h:15,
from drivers/firmware/efi/capsule.c:10:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/highmem.h:7,
from drivers/firmware/efi/capsule.c:12:
drivers/firmware/efi/capsule.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/atomic.h:5,
from include/linux/atomic.h:10,
from include/linux/crypto.h:15,
from include/crypto/aead.h:11,
from include/crypto/internal/aead.h:11,
from crypto/ccm.c:8:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/highmem.h:7,
from include/crypto/scatterwalk.h:15,
from crypto/ccm.c:12:
crypto/ccm.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/atomic.h:5,
from include/linux/atomic.h:10,
from include/linux/crypto.h:15,
from include/crypto/aead.h:11,
from include/crypto/internal/aead.h:11,
from crypto/authenc.c:8:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/highmem.h:7,
from include/crypto/scatterwalk.h:15,
from crypto/authenc.c:13:
crypto/authenc.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/atomic.h:5,
from include/linux/atomic.h:10,
from include/linux/crypto.h:15,
from include/crypto/aead.h:11,
from include/crypto/internal/aead.h:11,
from crypto/authencesn.c:11:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/highmem.h:7,
from include/crypto/scatterwalk.h:15,
from crypto/authencesn.c:16:
crypto/authencesn.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/atomic.h:5,
from include/linux/atomic.h:10,
from include/linux/crypto.h:15,
from include/crypto/algapi.h:10,
from include/crypto/scatterwalk.h:14,
from crypto/scatterwalk.c:12:
include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
58 | #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
| ^~~~~~~~~~
include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
27 | DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
| ^~~~~~~~
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 include/linux/highmem.h:7,
from include/crypto/scatterwalk.h:15,
from crypto/scatterwalk.c:12:
crypto/scatterwalk.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 +58 include/linux/sched/per_task.h
c3aff7aa01ea38 Ingo Molnar 2021-06-02 57
fd8bcb1ba81bb9 Ingo Molnar 2021-06-05 @58 #define per_task(task, name) (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
c3aff7aa01ea38 Ingo Molnar 2021-06-02 59
:::::: The code at line 58 was first introduced by commit
:::::: fd8bcb1ba81bb9f572f174a03af322ac9137ebd8 sched/headers, per_task: Implement 0-offset linker logic
:::::: 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 308/364] include/linux/compat.h:548:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 120c6121adeaa43021433af501c9a1111c70d8f8 [308/364] sched/headers, compat: Simplify <linux/compat.h>
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=12...
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 120c6121adeaa43021433af501c9a1111c70d8f8
# 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 warnings (new ones prefixed by >>):
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
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 arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/sched.h:459:26: error: field 'irqtrace' has incomplete type
459 | struct irqtrace_events irqtrace;
| ^~~~~~~~
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 include/linux/compat.h:10,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/compat.h:42:2: error: unknown type name 'old_time32_t'
42 | old_time32_t st_atime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:44:2: error: unknown type name 'old_time32_t'
44 | old_time32_t st_mtime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:46:2: error: unknown type name 'old_time32_t'
46 | old_time32_t st_ctime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/powerpc/include/asm/compat.h:99:25: error: implicit declaration of function 'task_thread'; did you mean 'start_thread'? [-Werror=implicit-function-declaration]
99 | struct pt_regs *regs = task_thread(current).regs;
| ^~~~~~~~~~~
| start_thread
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:52,
from include/linux/uio.h:10,
from include/linux/socket.h:8,
from include/uapi/linux/if.h:25,
from include/linux/compat.h:9,
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/kernel/asm-offsets.c:14:
include/linux/compat.h: At top level:
include/linux/compat.h:253:23: error: field 'ru_utime' has incomplete type
253 | struct old_timeval32 ru_utime;
| ^~~~~~~~
include/linux/compat.h:254:23: error: field 'ru_stime' has incomplete type
254 | struct old_timeval32 ru_stime;
| ^~~~~~~~
include/linux/compat.h: In function 'put_compat_sigset':
include/linux/compat.h:431:9: error: implicit declaration of function 'copy_to_user'; did you mean 'copy_to_iter'? [-Werror=implicit-function-declaration]
431 | return copy_to_user(compat, &v, size) ? -EFAULT : 0;
| ^~~~~~~~~~~~
| copy_to_iter
include/linux/compat.h: At top level:
>> include/linux/compat.h:548:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
548 | struct io_event __user *events,
| ^~~~~~~~
include/linux/compat.h:554:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
554 | struct io_event __user *events,
| ^~~~~~~~
>> include/linux/compat.h:838:18: warning: 'struct file_handle' declared inside parameter list will not be visible outside of this definition or declaration
838 | struct file_handle __user *handle,
| ^~~~~~~~~~~
include/linux/compat.h:847:51: error: unknown type name 'rwf_t'
847 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:850:51: error: unknown type name 'rwf_t'
850 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:940:36: error: return type is an incomplete type
940 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h: In function 'ns_to_old_timeval32':
include/linux/compat.h:943:23: error: storage size of 'ctv' isn't known
943 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:945:7: error: implicit declaration of function 'ns_to_kernel_old_timeval' [-Werror=implicit-function-declaration]
945 | tv = ns_to_kernel_old_timeval(nsec);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:945:7: error: incompatible types when assigning to type 'struct __kernel_old_timeval' from type 'int'
include/linux/compat.h:949:9: error: 'return' with a value, in function returning void [-Werror=return-type]
949 | return ctv;
| ^~~
include/linux/compat.h:940:36: note: declared here
940 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h:943:23: warning: unused variable 'ctv' [-Wunused-variable]
943 | struct old_timeval32 ctv;
| ^~~
In file included from <command-line>:
include/asm-generic/preempt.h: In function '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: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: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: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'
--
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
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/current.h:13,
from include/linux/sched.h:18,
from arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
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 arch/powerpc/include/asm/compat.h:9,
from include/linux/compat.h:10,
from arch/powerpc/kernel/asm-offsets.c:14:
include/linux/sched.h:459:26: error: field 'irqtrace' has incomplete type
459 | struct irqtrace_events irqtrace;
| ^~~~~~~~
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 include/linux/compat.h:10,
from arch/powerpc/kernel/asm-offsets.c:14:
arch/powerpc/include/asm/compat.h:42:2: error: unknown type name 'old_time32_t'
42 | old_time32_t st_atime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:44:2: error: unknown type name 'old_time32_t'
44 | old_time32_t st_mtime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h:46:2: error: unknown type name 'old_time32_t'
46 | old_time32_t st_ctime;
| ^~~~~~~~~~~~
arch/powerpc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/powerpc/include/asm/compat.h:99:25: error: implicit declaration of function 'task_thread'; did you mean 'start_thread'? [-Werror=implicit-function-declaration]
99 | struct pt_regs *regs = task_thread(current).regs;
| ^~~~~~~~~~~
| start_thread
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:52,
from include/linux/uio.h:10,
from include/linux/socket.h:8,
from include/uapi/linux/if.h:25,
from include/linux/compat.h:9,
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/kernel/asm-offsets.c:14:
include/linux/compat.h: At top level:
include/linux/compat.h:253:23: error: field 'ru_utime' has incomplete type
253 | struct old_timeval32 ru_utime;
| ^~~~~~~~
include/linux/compat.h:254:23: error: field 'ru_stime' has incomplete type
254 | struct old_timeval32 ru_stime;
| ^~~~~~~~
include/linux/compat.h: In function 'put_compat_sigset':
include/linux/compat.h:431:9: error: implicit declaration of function 'copy_to_user'; did you mean 'copy_to_iter'? [-Werror=implicit-function-declaration]
431 | return copy_to_user(compat, &v, size) ? -EFAULT : 0;
| ^~~~~~~~~~~~
| copy_to_iter
include/linux/compat.h: At top level:
>> include/linux/compat.h:548:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
548 | struct io_event __user *events,
| ^~~~~~~~
include/linux/compat.h:554:13: warning: 'struct io_event' declared inside parameter list will not be visible outside of this definition or declaration
554 | struct io_event __user *events,
| ^~~~~~~~
>> include/linux/compat.h:838:18: warning: 'struct file_handle' declared inside parameter list will not be visible outside of this definition or declaration
838 | struct file_handle __user *handle,
| ^~~~~~~~~~~
include/linux/compat.h:847:51: error: unknown type name 'rwf_t'
847 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:850:51: error: unknown type name 'rwf_t'
850 | compat_ulong_t vlen, u32 pos_low, u32 pos_high, rwf_t flags);
| ^~~~~
include/linux/compat.h:940:36: error: return type is an incomplete type
940 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h: In function 'ns_to_old_timeval32':
include/linux/compat.h:943:23: error: storage size of 'ctv' isn't known
943 | struct old_timeval32 ctv;
| ^~~
include/linux/compat.h:945:7: error: implicit declaration of function 'ns_to_kernel_old_timeval' [-Werror=implicit-function-declaration]
945 | tv = ns_to_kernel_old_timeval(nsec);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:945:7: error: incompatible types when assigning to type 'struct __kernel_old_timeval' from type 'int'
include/linux/compat.h:949:9: error: 'return' with a value, in function returning void [-Werror=return-type]
949 | return ctv;
| ^~~
include/linux/compat.h:940:36: note: declared here
940 | static inline struct old_timeval32 ns_to_old_timeval32(s64 nsec)
| ^~~~~~~~~~~~~~~~~~~
include/linux/compat.h:943:23: warning: unused variable 'ctv' [-Wunused-variable]
943 | struct old_timeval32 ctv;
| ^~~
In file included from <command-line>:
include/asm-generic/preempt.h: In function '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: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: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: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'
..
vim +548 include/linux/compat.h
c679a08983db7c Dominik Brodowski 2018-03-25 527
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 528 /*
c679a08983db7c Dominik Brodowski 2018-03-25 529 * These syscall function prototypes are kept in the same order as
3e2052e5dd4062 Dominik Brodowski 2018-03-22 530 * include/uapi/asm-generic/unistd.h. Deprecated or obsolete system calls
3e2052e5dd4062 Dominik Brodowski 2018-03-22 531 * go below.
c679a08983db7c Dominik Brodowski 2018-03-25 532 *
c679a08983db7c Dominik Brodowski 2018-03-25 533 * Please note that these prototypes here are only provided for information
c679a08983db7c Dominik Brodowski 2018-03-25 534 * purposes, for static analysis, and for linking from the syscall table.
c679a08983db7c Dominik Brodowski 2018-03-25 535 * These functions should not be called elsewhere from kernel code.
7303e30ec1d8fb Dominik Brodowski 2018-04-05 536 *
7303e30ec1d8fb Dominik Brodowski 2018-04-05 537 * As the syscall calling convention may be different from the default
7303e30ec1d8fb Dominik Brodowski 2018-04-05 538 * for architectures overriding the syscall calling convention, do not
7303e30ec1d8fb Dominik Brodowski 2018-04-05 539 * include the prototypes if CONFIG_ARCH_HAS_SYSCALL_WRAPPER is enabled.
f6dfb4fd7dd944 Davide Libenzi 2007-03-07 540 */
7303e30ec1d8fb Dominik Brodowski 2018-04-05 541 #ifndef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
c679a08983db7c Dominik Brodowski 2018-03-25 542 asmlinkage long compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p);
c679a08983db7c Dominik Brodowski 2018-03-25 543 asmlinkage long compat_sys_io_submit(compat_aio_context_t ctx_id, int nr,
c679a08983db7c Dominik Brodowski 2018-03-25 544 u32 __user *iocb);
7a074e96dee625 Christoph Hellwig 2018-05-02 545 asmlinkage long compat_sys_io_pgetevents(compat_aio_context_t ctx_id,
7a074e96dee625 Christoph Hellwig 2018-05-02 546 compat_long_t min_nr,
7a074e96dee625 Christoph Hellwig 2018-05-02 547 compat_long_t nr,
7a074e96dee625 Christoph Hellwig 2018-05-02 @548 struct io_event __user *events,
9afc5eee65ca7d Arnd Bergmann 2018-07-13 549 struct old_timespec32 __user *timeout,
7a074e96dee625 Christoph Hellwig 2018-05-02 550 const struct __compat_aio_sigset __user *usig);
7a35397f8c06bf Deepa Dinamani 2018-09-19 551 asmlinkage long compat_sys_io_pgetevents_time64(compat_aio_context_t ctx_id,
7a35397f8c06bf Deepa Dinamani 2018-09-19 552 compat_long_t min_nr,
7a35397f8c06bf Deepa Dinamani 2018-09-19 553 compat_long_t nr,
7a35397f8c06bf Deepa Dinamani 2018-09-19 554 struct io_event __user *events,
7a35397f8c06bf Deepa Dinamani 2018-09-19 555 struct __kernel_timespec __user *timeout,
7a35397f8c06bf Deepa Dinamani 2018-09-19 556 const struct __compat_aio_sigset __user *usig);
c679a08983db7c Dominik Brodowski 2018-03-25 557
:::::: The code at line 548 was first introduced by commit
:::::: 7a074e96dee62586c935c80cecd931431bfdd0be aio: implement io_pgetevents
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Christoph Hellwig <hch(a)lst.de>
---
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 299/364] include/asm-generic/memory_model.h:34:55: error: 'mem_map' undeclared; did you mean 'memcmp'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 4392e2ebf7f46654e0f80914a847a293fbbb3e11 [299/364] sched/headers, fs: Simplify <linux/fs.h> dependencies
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=43...
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 4392e2ebf7f46654e0f80914a847a293fbbb3e11
# 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 arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/processor.h:23,
from include/linux/mutex.h:21,
from include/linux/notifier.h:14,
from include/linux/reboot.h:6,
from arch/x86/kernel/crash.c:19:
include/linux/kexec.h: In function 'page_to_boot_pfn':
>> include/asm-generic/memory_model.h:34:55: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/asm-generic/memory_model.h:34:55: note: each undeclared identifier is reported only once for each function it appears in
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/linux/kexec.h: In function 'boot_pfn_to_page':
include/asm-generic/memory_model.h:33:29: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~~~~~
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
82 | #define pfn_to_page __pfn_to_page
| ^~~~~~~~~~~~~
include/linux/kexec.h:380:9: note: in expansion of macro 'pfn_to_page'
380 | return pfn_to_page(boot_pfn);
| ^~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from include/linux/kexec.h:25,
from arch/x86/kernel/crash.c:20:
arch/x86/kernel/crash.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/user_32.h:5,
from arch/x86/include/asm/user.h:6,
from include/linux/user.h:1,
from include/linux/elfcore.h:5,
from include/linux/crash_core.h:6,
from include/linux/kexec.h:18,
from include/linux/crash_dump.h:5,
from arch/x86/kernel/e820.c:12:
include/linux/kexec.h: In function 'page_to_boot_pfn':
>> include/asm-generic/memory_model.h:34:55: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/asm-generic/memory_model.h:34:55: note: each undeclared identifier is reported only once for each function it appears in
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/linux/kexec.h: In function 'boot_pfn_to_page':
include/asm-generic/memory_model.h:33:29: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~~~~~
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
82 | #define pfn_to_page __pfn_to_page
| ^~~~~~~~~~~~~
include/linux/kexec.h:380:9: note: in expansion of macro 'pfn_to_page'
380 | return pfn_to_page(boot_pfn);
| ^~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from include/linux/kexec.h:25,
from include/linux/crash_dump.h:5,
from arch/x86/kernel/e820.c:12:
arch/x86/kernel/e820.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/user_32.h:5,
from arch/x86/include/asm/user.h:6,
from include/linux/user.h:1,
from include/linux/elfcore.h:5,
from include/linux/crash_core.h:6,
from include/linux/kexec.h:18,
from include/linux/crash_dump.h:5,
from arch/x86/kernel/setup.c:9:
include/linux/kexec.h: In function 'page_to_boot_pfn':
>> include/asm-generic/memory_model.h:34:55: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/asm-generic/memory_model.h:34:55: note: each undeclared identifier is reported only once for each function it appears in
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/linux/kexec.h: In function 'boot_pfn_to_page':
include/asm-generic/memory_model.h:33:29: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~~~~~
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
82 | #define pfn_to_page __pfn_to_page
| ^~~~~~~~~~~~~
include/linux/kexec.h:380:9: note: in expansion of macro 'pfn_to_page'
380 | return pfn_to_page(boot_pfn);
| ^~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from include/linux/kexec.h:25,
from include/linux/crash_dump.h:5,
from arch/x86/kernel/setup.c:9:
arch/x86/kernel/setup.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/user_32.h:5,
from arch/x86/include/asm/user.h:6,
from include/linux/user.h:1,
from include/linux/elfcore.h:5,
from include/linux/crash_core.h:6,
from include/linux/kexec.h:18,
from kernel/reboot.c:12:
include/linux/kexec.h: In function 'page_to_boot_pfn':
>> include/asm-generic/memory_model.h:34:55: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/asm-generic/memory_model.h:34:55: note: each undeclared identifier is reported only once for each function it appears in
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/linux/kexec.h: In function 'boot_pfn_to_page':
include/asm-generic/memory_model.h:33:29: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~~~~~
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
82 | #define pfn_to_page __pfn_to_page
| ^~~~~~~~~~~~~
include/linux/kexec.h:380:9: note: in expansion of macro 'pfn_to_page'
380 | return pfn_to_page(boot_pfn);
| ^~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from include/linux/kexec.h:25,
from kernel/reboot.c:12:
kernel/reboot.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/user_32.h:5,
from arch/x86/include/asm/user.h:6,
from include/linux/user.h:1,
from include/linux/elfcore.h:5,
from include/linux/crash_core.h:6,
from include/linux/kexec.h:18,
from include/linux/crash_dump.h:5,
from kernel/crash_dump.c:3:
include/linux/kexec.h: In function 'page_to_boot_pfn':
>> include/asm-generic/memory_model.h:34:55: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/asm-generic/memory_model.h:34:55: note: each undeclared identifier is reported only once for each function it appears in
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/linux/kexec.h: In function 'boot_pfn_to_page':
include/asm-generic/memory_model.h:33:29: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~~~~~
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
82 | #define pfn_to_page __pfn_to_page
| ^~~~~~~~~~~~~
include/linux/kexec.h:380:9: note: in expansion of macro 'pfn_to_page'
380 | return pfn_to_page(boot_pfn);
| ^~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from include/linux/kexec.h:25,
from include/linux/crash_dump.h:5,
from kernel/crash_dump.c:3:
kernel/crash_dump.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);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/user_32.h:5,
from arch/x86/include/asm/user.h:6,
from include/linux/user.h:1,
from include/linux/elfcore.h:5,
from include/linux/crash_core.h:6,
from include/linux/kexec.h:18,
from lib/dump_stack.c:13:
include/linux/kexec.h: In function 'page_to_boot_pfn':
>> include/asm-generic/memory_model.h:34:55: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/asm-generic/memory_model.h:34:55: note: each undeclared identifier is reported only once for each function it appears in
34 | #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
| ^~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
include/linux/kexec.h:373:9: note: in expansion of macro 'page_to_pfn'
373 | return page_to_pfn(page);
| ^~~~~~~~~~~
include/linux/kexec.h: In function 'boot_pfn_to_page':
include/asm-generic/memory_model.h:33:29: error: 'mem_map' undeclared (first use in this function); did you mean 'memcmp'?
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~~~~~
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
82 | #define pfn_to_page __pfn_to_page
| ^~~~~~~~~~~~~
include/linux/kexec.h:380:9: note: in expansion of macro 'pfn_to_page'
380 | return pfn_to_page(boot_pfn);
| ^~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from include/linux/kexec.h:25,
from lib/dump_stack.c:13:
lib/dump_stack.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 +34 include/asm-generic/memory_model.h
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 32
67de648211fa04 Andy Whitcroft 2006-06-23 33 #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
67de648211fa04 Andy Whitcroft 2006-06-23 @34 #define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 35 ARCH_PFN_OFFSET)
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 36 #elif defined(CONFIG_DISCONTIGMEM)
a117e66ed45ac0 KAMEZAWA Hiroyuki 2006-03-27 37
:::::: The code at line 34 was first introduced by commit
:::::: 67de648211fa041fe08a0c25241a4980bbb90698 [PATCH] squash duplicate page_to_pfn and pfn_to_page
:::::: TO: Andy Whitcroft <apw(a)shadowen.org>
:::::: CC: Linus Torvalds <torvalds(a)g5.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months