OSDN Git Service

perf: arm_spe: include linux/vmalloc.h for vmap()
authorArnd Bergmann <arnd@arndb.de>
Thu, 22 Feb 2018 11:47:05 +0000 (12:47 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 27 Mar 2018 12:13:11 +0000 (13:13 +0100)
commitfcd9f8315e6af1bbe6878c1084b142211f3d7e1f
treee5f9d8ab798c5cc30813026caa059db748f5bf07
parent3f251cf0abec2afb6eca67f71380670dd55bdebe
perf: arm_spe: include linux/vmalloc.h for vmap()

On linux-next, I get a build failure in some configurations:

drivers/perf/arm_spe_pmu.c: In function 'arm_spe_pmu_setup_aux':
drivers/perf/arm_spe_pmu.c:857:14: error: implicit declaration of function 'vmap'; did you mean 'swap'? [-Werror=implicit-function-declaration]
  buf->base = vmap(pglist, nr_pages, VM_MAP, PAGE_KERNEL);
              ^~~~
              swap
drivers/perf/arm_spe_pmu.c:857:37: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MPX'?
  buf->base = vmap(pglist, nr_pages, VM_MAP, PAGE_KERNEL);
                                     ^~~~~~
                                     VM_MPX
drivers/perf/arm_spe_pmu.c:857:37: note: each undeclared identifier is reported only once for each function it appears in
drivers/perf/arm_spe_pmu.c: In function 'arm_spe_pmu_free_aux':
drivers/perf/arm_spe_pmu.c:878:2: error: implicit declaration of function 'vunmap'; did you mean 'iounmap'? [-Werror=implicit-function-declaration]

vmap() is declared in linux/vmalloc.h, so we should include that header file.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[will: add additional missing #includes reported by Mark]
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/perf/arm_spe_pmu.c