arch/arc/include/uapi/asm/page.h:17:20: error: 'CONFIG_PAGE_SHIFT' undeclared; did you mean 'CONFIG_HAVE_PCI'?
From: kernel test robot
Date: Tue Oct 01 2024 - 15:23:01 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: d3e5bab923d35f73c74f6dbbb761988d4f58f878 arch: simplify architecture specific page size configuration
date: 7 months ago
config: arc-axs103_smp_defconfig (https://download.01.org/0day-ci/archive/20241002/202410020340.RDSG1ej8-lkp@xxxxxxxxx/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020340.RDSG1ej8-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410020340.RDSG1ej8-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:31,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/lock.h:5,
from arch/arc/include/asm/bitops.h:188,
from include/linux/bitops.h:68,
from include/linux/thread_info.h:27,
from include/asm-generic/current.h:6,
from arch/arc/include/asm/current.h:20,
from <command-line>:
arch/arc/include/asm/atomic64-arcv2.h:13:3: error: conflicting types for 'atomic64_t'; have 'struct <anonymous>'
13 | } atomic64_t;
| ^~~~~~~~~~
In file included from include/linux/thread_info.h:11:
include/linux/types.h:184:3: note: previous declaration of 'atomic64_t' with type 'atomic64_t'
184 | } atomic64_t;
| ^~~~~~~~~~
In file included from arch/arc/include/asm/atomic.h:31,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/lock.h:5,
from arch/arc/include/asm/bitops.h:188,
from include/linux/bitops.h:68,
from include/linux/thread_info.h:27,
from include/asm-generic/current.h:6,
from arch/arc/include/asm/current.h:20,
from <command-line>:
arch/arc/include/asm/atomic64-arcv2.h:13:3: error: conflicting types for 'atomic64_t'; have 'struct <anonymous>'
13 | } atomic64_t;
| ^~~~~~~~~~
In file included from include/linux/thread_info.h:11:
include/linux/types.h:184:3: note: previous declaration of 'atomic64_t' with type 'atomic64_t'
184 | } atomic64_t;
| ^~~~~~~~~~
In file included from arch/arc/include/asm/page.h:8,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60:
arch/arc/include/asm/page.h: In function 'virt_to_pfn':
>> arch/arc/include/uapi/asm/page.h:17:20: error: 'CONFIG_PAGE_SHIFT' undeclared (first use in this function); did you mean 'CONFIG_HAVE_PCI'?
17 | #define PAGE_SHIFT CONFIG_PAGE_SHIFT
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/page.h:125:31: note: in expansion of macro 'PAGE_SHIFT'
125 | return __pa(kaddr) >> PAGE_SHIFT;
| ^~~~~~~~~~
arch/arc/include/uapi/asm/page.h:17:20: note: each undeclared identifier is reported only once for each function it appears in
17 | #define PAGE_SHIFT CONFIG_PAGE_SHIFT
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/page.h:125:31: note: in expansion of macro 'PAGE_SHIFT'
125 | return __pa(kaddr) >> PAGE_SHIFT;
| ^~~~~~~~~~
In file included from arch/arc/include/asm/page.h:8,
from arch/arc/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60:
arch/arc/include/asm/page.h: In function 'virt_to_pfn':
>> arch/arc/include/uapi/asm/page.h:17:20: error: 'CONFIG_PAGE_SHIFT' undeclared (first use in this function); did you mean 'CONFIG_HAVE_PCI'?
17 | #define PAGE_SHIFT CONFIG_PAGE_SHIFT
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/page.h:125:31: note: in expansion of macro 'PAGE_SHIFT'
125 | return __pa(kaddr) >> PAGE_SHIFT;
| ^~~~~~~~~~
arch/arc/include/uapi/asm/page.h:17:20: note: each undeclared identifier is reported only once for each function it appears in
17 | #define PAGE_SHIFT CONFIG_PAGE_SHIFT
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/page.h:125:31: note: in expansion of macro 'PAGE_SHIFT'
125 | return __pa(kaddr) >> PAGE_SHIFT;
| ^~~~~~~~~~
include/asm-generic/getorder.h: In function 'get_order':
>> arch/arc/include/uapi/asm/page.h:17:20: error: 'CONFIG_PAGE_SHIFT' undeclared (first use in this function); did you mean 'CONFIG_HAVE_PCI'?
17 | #define PAGE_SHIFT CONFIG_PAGE_SHIFT
| ^~~~~~~~~~~~~~~~~
include/asm-generic/getorder.h:33:48: note: in expansion of macro 'PAGE_SHIFT'
33 | return BITS_PER_LONG - PAGE_SHIFT;
| ^~~~~~~~~~
arch/arc/include/asm/thread_info.h: At top level:
arch/arc/include/asm/thread_info.h:59:79: error: macro "current_thread_info" passed 1 arguments, but takes just 0
59 | static inline __attribute_const__ struct thread_info *current_thread_info(void)
| ^
include/linux/thread_info.h:24: note: macro "current_thread_info" defined here
24 | #define current_thread_info() ((struct thread_info *)current)
|
arch/arc/include/asm/thread_info.h:60:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
60 | {
| ^
include/asm-generic/getorder.h: In function 'get_order':
>> arch/arc/include/uapi/asm/page.h:17:20: error: 'CONFIG_PAGE_SHIFT' undeclared (first use in this function); did you mean 'CONFIG_HAVE_PCI'?
17 | #define PAGE_SHIFT CONFIG_PAGE_SHIFT
| ^~~~~~~~~~~~~~~~~
include/asm-generic/getorder.h:33:48: note: in expansion of macro 'PAGE_SHIFT'
33 | return BITS_PER_LONG - PAGE_SHIFT;
| ^~~~~~~~~~
arch/arc/include/asm/thread_info.h: At top level:
arch/arc/include/asm/thread_info.h:59:79: error: macro "current_thread_info" passed 1 arguments, but takes just 0
59 | static inline __attribute_const__ struct thread_info *current_thread_info(void)
| ^
include/linux/thread_info.h:24: note: macro "current_thread_info" defined here
24 | #define current_thread_info() ((struct thread_info *)current)
|
arch/arc/include/asm/thread_info.h:60:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
60 | {
| ^
include/linux/thread_info.h: In function 'tif_need_resched':
include/linux/thread_info.h:24:54: error: 'current' undeclared (first use in this function)
24 | #define current_thread_info() ((struct thread_info *)current)
| ^~~~~~~
include/linux/bitops.h:50:44: note: in definition of macro 'bitop'
50 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \
| ^~~~
include/linux/thread_info.h:192:16: note: in expansion of macro 'test_bit'
192 | return test_bit(TIF_NEED_RESCHED,
| ^~~~~~~~
include/linux/thread_info.h:193:44: note: in expansion of macro 'current_thread_info'
193 | (unsigned long *)(¤t_thread_info()->flags));
| ^~~~~~~~~~~~~~~~~~~
include/linux/thread_info.h: In function 'tif_need_resched':
include/linux/thread_info.h:24:54: error: 'current' undeclared (first use in this function)
24 | #define current_thread_info() ((struct thread_info *)current)
| ^~~~~~~
include/linux/bitops.h:50:44: note: in definition of macro 'bitop'
50 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \
| ^~~~
include/linux/thread_info.h:192:16: note: in expansion of macro 'test_bit'
192 | return test_bit(TIF_NEED_RESCHED,
| ^~~~~~~~
include/linux/thread_info.h:193:44: note: in expansion of macro 'current_thread_info'
193 | (unsigned long *)(¤t_thread_info()->flags));
| ^~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:243: scripts/mod/empty.o] Error 1
make[3]: *** [scripts/Makefile.build:116: scripts/mod/devicetable-offsets.s] Error 1
make[3]: Target 'scripts/mod/' not remade because of errors.
make[2]: *** [Makefile:1198: prepare0] Error 2
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:240: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +17 arch/arc/include/uapi/asm/page.h
14
15 /* PAGE_SHIFT determines the page size */
16 #ifdef __KERNEL__
> 17 #define PAGE_SHIFT CONFIG_PAGE_SHIFT
18 #else
19 /*
20 * Default 8k
21 * done this way (instead of under CONFIG_ARC_PAGE_SIZE_8K) because adhoc
22 * user code (busybox appletlib.h) expects PAGE_SHIFT to be defined w/o
23 * using the correct uClibc header and in their build our autoconf.h is
24 * not available
25 */
26 #define PAGE_SHIFT 13
27 #endif
28
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki