include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared; did you mean 'mem_map'?
From: kbuild test robot
Date: Fri Dec 20 2019 - 07:51:34 EST
Hi Christoph,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7e0165b2f1a912a06e381e91f0f4e495f4ac3736
commit: 6bd33e1ece528f67646db33bf97406b747dafda0 riscv: add nommu support
date: 5 weeks ago
config: riscv-randconfig-a001-20191220 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 6bd33e1ece528f67646db33bf97406b747dafda0
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from arch/riscv/include/asm/page.h:131:0,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:38,
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/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:10,
from init/main.c:17:
arch/riscv/include/asm/pgtable.h: In function 'pmd_page':
>> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'mem_map'?
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:134:9: note: in expansion of macro 'pfn_to_page'
return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT);
^~~~~~~~~~~
include/asm-generic/memory_model.h:54:29: note: each undeclared identifier is reported only once for each function it appears in
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:134:9: note: in expansion of macro 'pfn_to_page'
return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT);
^~~~~~~~~~~
In file included from include/linux/perf_event.h:25:0,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from init/main.c:21:
arch/riscv/include/asm/perf_event.h: At top level:
arch/riscv/include/asm/perf_event.h:26:2: error: #error "Please provide a valid RISCV_MAX_COUNTERS for the PMU."
#error "Please provide a valid RISCV_MAX_COUNTERS for the PMU."
^~~~~
arch/riscv/include/asm/perf_event.h:54:28: error: 'RISCV_MAX_COUNTERS' undeclared here (not in a function); did you mean 'RISCV_BASE_COUNTERS'?
struct perf_event *events[RISCV_MAX_COUNTERS];
^~~~~~~~~~~~~~~~~~
RISCV_BASE_COUNTERS
--
In file included from arch/riscv/include/asm/page.h:131:0,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:38,
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/rcupdate.h:27,
from include/linux/init_task.h:5,
from init/init_task.c:2:
arch/riscv/include/asm/pgtable.h: In function 'pmd_page':
>> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'mem_map'?
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:134:9: note: in expansion of macro 'pfn_to_page'
return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT);
^~~~~~~~~~~
include/asm-generic/memory_model.h:54:29: note: each undeclared identifier is reported only once for each function it appears in
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:134:9: note: in expansion of macro 'pfn_to_page'
return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT);
^~~~~~~~~~~
--
In file included from arch/riscv/include/asm/page.h:131:0,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:38,
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/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from mm/shmem.c:24:
arch/riscv/include/asm/pgtable.h: In function 'pmd_page':
>> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'mem_map'?
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:134:9: note: in expansion of macro 'pfn_to_page'
return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT);
^~~~~~~~~~~
include/asm-generic/memory_model.h:54:29: note: each undeclared identifier is reported only once for each function it appears in
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:134:9: note: in expansion of macro 'pfn_to_page'
return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT);
^~~~~~~~~~~
In file included from include/linux/perf_event.h:25:0,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from mm/shmem.c:77:
arch/riscv/include/asm/perf_event.h: At top level:
arch/riscv/include/asm/perf_event.h:26:2: error: #error "Please provide a valid RISCV_MAX_COUNTERS for the PMU."
#error "Please provide a valid RISCV_MAX_COUNTERS for the PMU."
^~~~~
arch/riscv/include/asm/perf_event.h:54:28: error: 'RISCV_MAX_COUNTERS' undeclared here (not in a function); did you mean 'RISCV_BASE_COUNTERS'?
struct perf_event *events[RISCV_MAX_COUNTERS];
^~~~~~~~~~~~~~~~~~
RISCV_BASE_COUNTERS
In file included from include/linux/mm.h:99:0,
from include/linux/pagemap.h:8,
from mm/shmem.c:29:
arch/riscv/include/asm/pgtable.h: In function 'pmd_page':
arch/riscv/include/asm/pgtable.h:135:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
--
In file included from arch/riscv/include/asm/page.h:131:0,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:38,
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 mm/gup.c:5:
arch/riscv/include/asm/pgtable.h: In function 'pmd_page':
>> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'mem_map'?
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:134:9: note: in expansion of macro 'pfn_to_page'
return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT);
^~~~~~~~~~~
include/asm-generic/memory_model.h:54:29: note: each undeclared identifier is reported only once for each function it appears in
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:134:9: note: in expansion of macro 'pfn_to_page'
return pfn_to_page(pmd_val(pmd) >> _PAGE_PFN_SHIFT);
^~~~~~~~~~~
In file included from include/linux/mm.h:99:0,
from mm/gup.c:7:
arch/riscv/include/asm/pgtable.h:135:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
vim +54 include/asm-generic/memory_model.h
8f6aac419bd590 Christoph Lameter 2007-10-16 52
af901ca181d92a André Goddard Rosa 2009-11-14 53 /* memmap is virtually contiguous. */
8f6aac419bd590 Christoph Lameter 2007-10-16 @54 #define __pfn_to_page(pfn) (vmemmap + (pfn))
32272a26974d20 Martin Schwidefsky 2008-12-25 55 #define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
8f6aac419bd590 Christoph Lameter 2007-10-16 56
:::::: The code at line 54 was first introduced by commit
:::::: 8f6aac419bd590f535fb110875a51f7db2b62b5b Generic Virtual Memmap support for SPARSEMEM
:::::: TO: Christoph Lameter <clameter@xxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation
Attachment:
.config.gz
Description: application/gzip