• Arnd Bergmann's avatar
    perf: arm_spe: include linux/vmalloc.h for vmap() · fcd9f831
    Arnd Bergmann authored
    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: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    [will: add additional missing #includes reported by Mark]
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    fcd9f831
arm_spe_pmu.c 33.8 KB