From: kbuild test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Paul Walmsley <paul.walmsley@sifive.com>,
Anup Patel <anup@brainfault.org>
Subject: kernel/events/core.c:6524:41: error: 'VMALLOC_END' undeclared; did you mean 'VM_LOCKED'?
Date: Mon, 10 Feb 2020 10:22:41 +0800 [thread overview]
Message-ID: <202002101034.w6BP8DAn%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5576 bytes --]
Hi Christoph,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fdfa3a6778b194974df77b384cc71eb2e503639a
commit: 6bd33e1ece528f67646db33bf97406b747dafda0 riscv: add nommu support
date: 3 months ago
config: riscv-randconfig-a001-20200210 (attached as .config)
compiler: riscv64-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@intel.com>
All errors (new ones prefixed by >>):
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 kernel/events/core.c:33:
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
kernel/events/core.c: In function 'perf_virt_to_phys':
>> kernel/events/core.c:6524:41: error: 'VMALLOC_END' undeclared (first use in this function); did you mean 'VM_LOCKED'?
!(virt >= VMALLOC_START && virt < VMALLOC_END))
^~~~~~~~~~~
VM_LOCKED
kernel/events/core.c:6524:41: note: each undeclared identifier is reported only once for each function it appears in
vim +6524 kernel/events/core.c
5622f295b53fb60 kernel/perf_counter.c Markus Metzger 2009-09-15 6512
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6513 static u64 perf_virt_to_phys(u64 virt)
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6514 {
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6515 u64 phys_addr = 0;
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6516 struct page *p = NULL;
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6517
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6518 if (!virt)
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6519 return 0;
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6520
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6521 if (virt >= TASK_SIZE) {
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6522 /* If it's vmalloc()d memory, leave phys_addr as 0 */
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6523 if (virt_addr_valid((void *)(uintptr_t)virt) &&
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 @6524 !(virt >= VMALLOC_START && virt < VMALLOC_END))
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6525 phys_addr = (u64)virt_to_phys((void *)(uintptr_t)virt);
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6526 } else {
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6527 /*
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6528 * Walking the pages tables for user address.
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6529 * Interrupts are disabled, so it prevents any tear down
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6530 * of the page tables.
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6531 * Try IRQ-safe __get_user_pages_fast first.
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6532 * If failed, leave phys_addr as 0.
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6533 */
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6534 if ((current->mm != NULL) &&
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6535 (__get_user_pages_fast(virt, 1, 0, &p) == 1))
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6536 phys_addr = page_to_phys(p) + virt % PAGE_SIZE;
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6537
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6538 if (p)
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6539 put_page(p);
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6540 }
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6541
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6542 return phys_addr;
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6543 }
fc7ce9c74c3ad23 kernel/events/core.c Kan Liang 2017-08-28 6544
:::::: The code at line 6524 was first introduced by commit
:::::: fc7ce9c74c3ad232b084d80148654f926d01ece7 perf/core, x86: Add PERF_SAMPLE_PHYS_ADDR
:::::: TO: Kan Liang <kan.liang@intel.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>
---
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: 24431 bytes --]
reply other threads:[~2020-02-10 2:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202002101034.w6BP8DAn%lkp@intel.com \
--to=lkp@intel.com \
--cc=anup@brainfault.org \
--cc=hch@lst.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.walmsley@sifive.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