All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: arm_spe: include linux/vmalloc.h for vmap()
@ 2018-02-22 11:47 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-02-22 11:47 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I have not bisected what caused this problem, presumably some other
header stopped including vmlinux.h.
---
 drivers/perf/arm_spe_pmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index 51b40aecb776..f90672516ada 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -32,6 +32,7 @@
 #include <linux/perf_event.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
 
 #include <asm/sysreg.h>
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] perf: arm_spe: include linux/vmalloc.h for vmap()
@ 2018-02-22 11:47 ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-02-22 11:47 UTC (permalink / raw)
  To: Will Deacon, Mark Rutland
  Cc: Arnd Bergmann, Suzuki K Poulose, linux-arm-kernel, linux-kernel

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I have not bisected what caused this problem, presumably some other
header stopped including vmlinux.h.
---
 drivers/perf/arm_spe_pmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index 51b40aecb776..f90672516ada 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -32,6 +32,7 @@
 #include <linux/perf_event.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
 
 #include <asm/sysreg.h>
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] perf: arm_spe: include linux/vmalloc.h for vmap()
  2018-02-22 11:47 ` Arnd Bergmann
@ 2018-02-22 12:13   ` Will Deacon
  -1 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2018-02-22 12:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 22, 2018 at 12:47:05PM +0100, Arnd Bergmann wrote:
> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, Arnd. I'll pick this up for 4.17.

Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] perf: arm_spe: include linux/vmalloc.h for vmap()
@ 2018-02-22 12:13   ` Will Deacon
  0 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2018-02-22 12:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Rutland, Suzuki K Poulose, linux-arm-kernel, linux-kernel

On Thu, Feb 22, 2018 at 12:47:05PM +0100, Arnd Bergmann wrote:
> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, Arnd. I'll pick this up for 4.17.

Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] perf: arm_spe: include linux/vmalloc.h for vmap()
  2018-02-22 11:47 ` Arnd Bergmann
@ 2018-02-22 12:26   ` Mark Rutland
  -1 siblings, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2018-02-22 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 22, 2018 at 12:47:05PM +0100, Arnd Bergmann wrote:
> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I have not bisected what caused this problem, presumably some other
> header stopped including vmlinux.h.
> ---
>  drivers/perf/arm_spe_pmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
> index 51b40aecb776..f90672516ada 100644
> --- a/drivers/perf/arm_spe_pmu.c
> +++ b/drivers/perf/arm_spe_pmu.c
> @@ -32,6 +32,7 @@
>  #include <linux/perf_event.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
> +#include <linux/vmalloc.h>

This looks good. From a quick look, we're also missing explicit includes
for:

#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/capability.h>
#include <linux/cpumask.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/printk.h>
#include <linux/smp.h>

#include <asm/barrier.h>
#include <asm/cpufeature.h>
#include <asm/mmu.h>

... which would be worth sorting out at teh same time.

Will, are you happy to fold those in? Assuming so:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] perf: arm_spe: include linux/vmalloc.h for vmap()
@ 2018-02-22 12:26   ` Mark Rutland
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Rutland @ 2018-02-22 12:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Will Deacon, Suzuki K Poulose, linux-arm-kernel, linux-kernel

On Thu, Feb 22, 2018 at 12:47:05PM +0100, Arnd Bergmann wrote:
> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I have not bisected what caused this problem, presumably some other
> header stopped including vmlinux.h.
> ---
>  drivers/perf/arm_spe_pmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
> index 51b40aecb776..f90672516ada 100644
> --- a/drivers/perf/arm_spe_pmu.c
> +++ b/drivers/perf/arm_spe_pmu.c
> @@ -32,6 +32,7 @@
>  #include <linux/perf_event.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
> +#include <linux/vmalloc.h>

This looks good. From a quick look, we're also missing explicit includes
for:

#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/capability.h>
#include <linux/cpumask.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/printk.h>
#include <linux/smp.h>

#include <asm/barrier.h>
#include <asm/cpufeature.h>
#include <asm/mmu.h>

... which would be worth sorting out at teh same time.

Will, are you happy to fold those in? Assuming so:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-22 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-22 11:47 [PATCH] perf: arm_spe: include linux/vmalloc.h for vmap() Arnd Bergmann
2018-02-22 11:47 ` Arnd Bergmann
2018-02-22 12:13 ` Will Deacon
2018-02-22 12:13   ` Will Deacon
2018-02-22 12:26 ` Mark Rutland
2018-02-22 12:26   ` Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.