From: kernel test robot <lkp@intel.com>
To: Jisheng Zhang <jszhang@kernel.org>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Palmer Dabbelt <palmerdabbelt@google.com>
Subject: [linux-next:master 5094/7430] arch/riscv/mm/init.c:454:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__inidata'
Date: Fri, 4 Jun 2021 20:59:42 +0800 [thread overview]
Message-ID: <202106042036.yyJtC9qB-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7957 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ccc252d2e818f6a479441119ad453c3ce7c7c461
commit: 010623568222bd144eb73aa9f3b46c79b63d7676 [5094/7430] riscv: mm: init: Consolidate vars, functions
config: riscv-randconfig-r002-20210604 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=010623568222bd144eb73aa9f3b46c79b63d7676
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 010623568222bd144eb73aa9f3b46c79b63d7676
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from arch/riscv/mm/init.c:10:
arch/riscv/include/asm/pgtable.h: In function 'mk_pmd':
arch/riscv/include/asm/pgtable.h:518:9: error: implicit declaration of function 'pfn_pmd'; did you mean 'pfn_pgd'? [-Werror=implicit-function-declaration]
518 | return pfn_pmd(page_to_pfn(page), prot);
| ^~~~~~~
| pfn_pgd
In file included from arch/riscv/include/asm/page.h:185,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:59,
from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from arch/riscv/mm/init.c:10:
include/asm-generic/memory_model.h:64:14: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
64 | int __sec = page_to_section(__pg); \
| ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:518:17: note: in expansion of macro 'page_to_pfn'
518 | return pfn_pmd(page_to_pfn(page), prot);
| ^~~~~~~~~~~
In file included from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from arch/riscv/mm/init.c:10:
arch/riscv/include/asm/pgtable.h:518:9: error: incompatible types when returning type 'int' but 'pmd_t' {aka 'struct <anonymous>'} was expected
518 | return pfn_pmd(page_to_pfn(page), prot);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/riscv/mm/init.c:10:
include/linux/mm.h: At top level:
include/linux/mm.h:1552:29: error: conflicting types for 'page_to_section'
1552 | static inline unsigned long page_to_section(const struct page *page)
| ^~~~~~~~~~~~~~~
In file included from arch/riscv/include/asm/page.h:185,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:59,
from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from arch/riscv/mm/init.c:10:
include/asm-generic/memory_model.h:64:14: note: previous implicit declaration of 'page_to_section' was here
64 | int __sec = page_to_section(__pg); \
| ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
81 | #define page_to_pfn __page_to_pfn
| ^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:518:17: note: in expansion of macro 'page_to_pfn'
518 | return pfn_pmd(page_to_pfn(page), prot);
| ^~~~~~~~~~~
In file included from include/linux/kexec.h:28,
from include/linux/crash_dump.h:5,
from arch/riscv/mm/init.c:20:
arch/riscv/include/asm/kexec.h:45:1: warning: 'extern' is not at beginning of declaration [-Wold-style-declaration]
45 | const extern unsigned char riscv_kexec_relocate[];
| ^~~~~
arch/riscv/include/asm/kexec.h:46:1: warning: 'extern' is not at beginning of declaration [-Wold-style-declaration]
46 | const extern unsigned int riscv_kexec_relocate_size;
| ^~~~~
>> arch/riscv/mm/init.c:454:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__inidata'
454 | static uintptr_t xiprom __inidata;
| ^~~~~~~~~
In file included from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from arch/riscv/mm/init.c:10:
arch/riscv/mm/init.c: In function 'create_kernel_page_table':
>> arch/riscv/mm/init.c:457:51: error: 'xiprom' undeclared (first use in this function); did you mean '_xiprom'?
457 | #define xiprom (*((uintptr_t *)XIP_FIXUP(&xiprom)))
| ^~~~~~
arch/riscv/include/asm/pgtable.h:98:30: note: in definition of macro 'XIP_FIXUP'
98 | uintptr_t __a = (uintptr_t)(addr); \
| ^~~~
arch/riscv/mm/init.c:467:8: note: in expansion of macro 'xiprom'
467 | xiprom + (va - kernel_virt_addr),
| ^~~~~~
arch/riscv/mm/init.c:457:51: note: each undeclared identifier is reported only once for each function it appears in
457 | #define xiprom (*((uintptr_t *)XIP_FIXUP(&xiprom)))
| ^~~~~~
arch/riscv/include/asm/pgtable.h:98:30: note: in definition of macro 'XIP_FIXUP'
98 | uintptr_t __a = (uintptr_t)(addr); \
| ^~~~
arch/riscv/mm/init.c:467:8: note: in expansion of macro 'xiprom'
467 | xiprom + (va - kernel_virt_addr),
| ^~~~~~
arch/riscv/mm/init.c: In function 'setup_vm':
>> arch/riscv/mm/init.c:457:51: error: 'xiprom' undeclared (first use in this function); did you mean '_xiprom'?
457 | #define xiprom (*((uintptr_t *)XIP_FIXUP(&xiprom)))
| ^~~~~~
arch/riscv/include/asm/pgtable.h:98:30: note: in definition of macro 'XIP_FIXUP'
98 | uintptr_t __a = (uintptr_t)(addr); \
| ^~~~
arch/riscv/mm/init.c:499:2: note: in expansion of macro 'xiprom'
499 | xiprom = (uintptr_t)CONFIG_XIP_PHYS_ADDR;
| ^~~~~~
cc1: some warnings being treated as errors
vim +454 arch/riscv/mm/init.c
452
453 #ifdef CONFIG_XIP_KERNEL
> 454 static uintptr_t xiprom __inidata;
455 static uintptr_t xiprom_sz __initdata;
456 #define xiprom_sz (*((uintptr_t *)XIP_FIXUP(&xiprom_sz)))
> 457 #define xiprom (*((uintptr_t *)XIP_FIXUP(&xiprom)))
458
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22266 bytes --]
next reply other threads:[~2021-06-04 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 12:59 kernel test robot [this message]
2021-06-04 14:08 ` Jisheng Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202106042036.yyJtC9qB-lkp@intel.com \
--to=lkp@intel.com \
--cc=jszhang@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=palmerdabbelt@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox