[mingo-tip:sched/headers 1518/2380] arch/powerpc/include/asm/book3s/64/hash.h:248:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'hash__vmemmap_create_mapping'

From: kernel test robot
Date: Mon Jan 10 2022 - 08:55:05 EST


tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 351bfbf7f1e8dce84b605c8007c98dd603c4ca4d
commit: 2df1932116ea94f774804fbd4fcfc0eb60704764 [1518/2380] headers/deps: printk: Reduce <linux/printk.h> header dependencies
config: powerpc64-randconfig-r001-20220109 (https://download.01.org/0day-ci/archive/20220110/202201102123.ZtrMza46-lkp@xxxxxxxxx/config)
compiler: powerpc64le-linux-gcc (GCC) 11.2.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/mingo/tip.git/commit/?id=2df1932116ea94f774804fbd4fcfc0eb60704764
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 2df1932116ea94f774804fbd4fcfc0eb60704764
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc prepare

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

All errors (new ones prefixed by >>):

In file included 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/preempt.h:10,
from arch/powerpc/kernel/asm-offsets.c:12:
arch/powerpc/include/asm/mmu.h: In function 'strict_kernel_rwx_enabled':
arch/powerpc/include/asm/mmu.h:340:16: error: 'rodata_enabled' undeclared (first use in this function); did you mean 'radix_enabled'?
340 | return rodata_enabled;
| ^~~~~~~~~~~~~~
| radix_enabled
arch/powerpc/include/asm/mmu.h:340:16: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/powerpc/include/asm/book3s/64/pgtable.h:299,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:33,
from arch/powerpc/include/asm/mmu.h:395,
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/preempt.h:10,
from arch/powerpc/kernel/asm-offsets.c:12:
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:300,
from arch/powerpc/include/asm/book3s/64/mmu-hash.h:20,
from arch/powerpc/include/asm/book3s/64/mmu.h:33,
from arch/powerpc/include/asm/mmu.h:395,
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/preempt.h:10,
from arch/powerpc/kernel/asm-offsets.c:12:
>> 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:33,
from arch/powerpc/include/asm/mmu.h:395,
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/preempt.h:10,
from arch/powerpc/kernel/asm-offsets.c:12:
>> arch/powerpc/include/asm/book3s/64/pgtable.h:1085:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'vmemmap_create_mapping'
1085 | static inline int __meminit vmemmap_create_mapping(unsigned long start,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/mmu.h:395,
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/preempt.h:10,
from arch/powerpc/kernel/asm-offsets.c:12:
>> arch/powerpc/include/asm/book3s/64/mmu.h:212:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'early_init_mmu'
212 | static inline void __init early_init_mmu(void)
| ^~~~~~~~~~~~~~
In file included from include/linux/sched.h:12,
from include/linux/sched/thread_info_api.h:5,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:79,
from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/sched/per_task.h:48:11: fatal error: generated/asm-offsets.h: No such file or directory
48 | # include <generated/asm-offsets.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:121: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1197: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.


vim +248 arch/powerpc/include/asm/book3s/64/hash.h

c605782b1c3f1c arch/powerpc/include/asm/pte-hash64.h Benjamin Herrenschmidt 2009-03-10 245
31a14fae92b29b arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 246
c766ee72235d09 arch/powerpc/include/asm/book3s/64/hash.h Christophe Leroy 2018-10-09 247 int hash__map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t prot);
31a14fae92b29b arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 @248 extern int __meminit hash__vmemmap_create_mapping(unsigned long start,
31a14fae92b29b arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 249 unsigned long page_size,
31a14fae92b29b arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 250 unsigned long phys);
31a14fae92b29b arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 251 extern void hash__vmemmap_remove_mapping(unsigned long start,
31a14fae92b29b arch/powerpc/include/asm/book3s/64/hash.h Aneesh Kumar K.V 2016-04-29 252 unsigned long page_size);
32b53c012e0bfe arch/powerpc/include/asm/book3s/64/hash.h Reza Arbab 2017-01-03 253

:::::: The code at line 248 was first introduced by commit
:::::: 31a14fae92b29b7a7fcc65600f072bf448d3b0eb powerpc/mm: Abstraction for vmemmap and map_kernel_page()

:::::: TO: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
:::::: CC: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

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