* [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning
@ 2020-09-16 11:56 Michael Ellerman
2020-09-16 11:56 ` [PATCH 2/2] powerpc/perf: Add declarations to fix sparse warnings Michael Ellerman
2020-09-24 12:27 ` [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning Michael Ellerman
0 siblings, 2 replies; 4+ messages in thread
From: Michael Ellerman @ 2020-09-16 11:56 UTC (permalink / raw)
To: linuxppc-dev
Sparse says:
symbol slb_setup_new_exec was not declared. Should it be static?
No, it should have a declaration in a header, add one.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/mm/book3s64/internal.h | 2 ++
arch/powerpc/mm/book3s64/mmu_context.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/internal.h b/arch/powerpc/mm/book3s64/internal.h
index 7eda0d30d765..c12d78ee42f5 100644
--- a/arch/powerpc/mm/book3s64/internal.h
+++ b/arch/powerpc/mm/book3s64/internal.h
@@ -13,4 +13,6 @@ static inline bool stress_slb(void)
return static_branch_unlikely(&stress_slb_key);
}
+void slb_setup_new_exec(void);
+
#endif /* ARCH_POWERPC_MM_BOOK3S64_INTERNAL_H */
diff --git a/arch/powerpc/mm/book3s64/mmu_context.c b/arch/powerpc/mm/book3s64/mmu_context.c
index 0ba30b8b935b..1c54821de7bf 100644
--- a/arch/powerpc/mm/book3s64/mmu_context.c
+++ b/arch/powerpc/mm/book3s64/mmu_context.c
@@ -21,6 +21,8 @@
#include <asm/mmu_context.h>
#include <asm/pgalloc.h>
+#include "internal.h"
+
static DEFINE_IDA(mmu_context_ida);
static int alloc_context_id(int min_id, int max_id)
@@ -48,8 +50,6 @@ int hash__alloc_context_id(void)
}
EXPORT_SYMBOL_GPL(hash__alloc_context_id);
-void slb_setup_new_exec(void);
-
static int realloc_context_ids(mm_context_t *ctx)
{
int i, id;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] powerpc/perf: Add declarations to fix sparse warnings
2020-09-16 11:56 [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning Michael Ellerman
@ 2020-09-16 11:56 ` Michael Ellerman
2020-09-17 4:30 ` Madhavan Srinivasan
2020-09-24 12:27 ` [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning Michael Ellerman
1 sibling, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2020-09-16 11:56 UTC (permalink / raw)
To: linuxppc-dev
Sparse warns about all the init functions:
symbol init_ppc970_pmu was not declared. Should it be static?
symbol init_power5p_pmu was not declared. Should it be static?
symbol init_power5_pmu was not declared. Should it be static?
symbol init_power6_pmu was not declared. Should it be static?
symbol init_power7_pmu was not declared. Should it be static?
symbol init_power9_pmu was not declared. Should it be static?
symbol init_power8_pmu was not declared. Should it be static?
symbol init_generic_compat_pmu was not declared. Should it be static?
They're already declared in internal.h, so just make sure all the C
files include that directly or indirectly.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/perf/isa207-common.h | 2 ++
arch/powerpc/perf/power10-pmu.c | 1 -
arch/powerpc/perf/power5+-pmu.c | 2 ++
arch/powerpc/perf/power5-pmu.c | 2 ++
arch/powerpc/perf/power6-pmu.c | 2 ++
arch/powerpc/perf/power7-pmu.c | 2 ++
arch/powerpc/perf/ppc970-pmu.c | 2 ++
7 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/perf/isa207-common.h b/arch/powerpc/perf/isa207-common.h
index 044de65e96b9..7025de5e60e7 100644
--- a/arch/powerpc/perf/isa207-common.h
+++ b/arch/powerpc/perf/isa207-common.h
@@ -13,6 +13,8 @@
#include <asm/firmware.h>
#include <asm/cputable.h>
+#include "internal.h"
+
#define EVENT_EBB_MASK 1ull
#define EVENT_EBB_SHIFT PERF_EVENT_CONFIG_EBB_SHIFT
#define EVENT_BHRB_MASK 1ull
diff --git a/arch/powerpc/perf/power10-pmu.c b/arch/powerpc/perf/power10-pmu.c
index 83148656b524..9dbe8f9b89b4 100644
--- a/arch/powerpc/perf/power10-pmu.c
+++ b/arch/powerpc/perf/power10-pmu.c
@@ -9,7 +9,6 @@
#define pr_fmt(fmt) "power10-pmu: " fmt
#include "isa207-common.h"
-#include "internal.h"
/*
* Raw event encoding for Power10:
diff --git a/arch/powerpc/perf/power5+-pmu.c b/arch/powerpc/perf/power5+-pmu.c
index a62b2cd7914f..3e64b4a1511f 100644
--- a/arch/powerpc/perf/power5+-pmu.c
+++ b/arch/powerpc/perf/power5+-pmu.c
@@ -10,6 +10,8 @@
#include <asm/reg.h>
#include <asm/cputable.h>
+#include "internal.h"
+
/*
* Bits in event code for POWER5+ (POWER5 GS) and POWER5++ (POWER5 GS DD3)
*/
diff --git a/arch/powerpc/perf/power5-pmu.c b/arch/powerpc/perf/power5-pmu.c
index 8732b587cf71..017bb19b73fb 100644
--- a/arch/powerpc/perf/power5-pmu.c
+++ b/arch/powerpc/perf/power5-pmu.c
@@ -10,6 +10,8 @@
#include <asm/reg.h>
#include <asm/cputable.h>
+#include "internal.h"
+
/*
* Bits in event code for POWER5 (not POWER5++)
*/
diff --git a/arch/powerpc/perf/power6-pmu.c b/arch/powerpc/perf/power6-pmu.c
index 0e318cf87129..189974478e9f 100644
--- a/arch/powerpc/perf/power6-pmu.c
+++ b/arch/powerpc/perf/power6-pmu.c
@@ -10,6 +10,8 @@
#include <asm/reg.h>
#include <asm/cputable.h>
+#include "internal.h"
+
/*
* Bits in event code for POWER6
*/
diff --git a/arch/powerpc/perf/power7-pmu.c b/arch/powerpc/perf/power7-pmu.c
index 5e0bf09cf077..bacfab104a1a 100644
--- a/arch/powerpc/perf/power7-pmu.c
+++ b/arch/powerpc/perf/power7-pmu.c
@@ -10,6 +10,8 @@
#include <asm/reg.h>
#include <asm/cputable.h>
+#include "internal.h"
+
/*
* Bits in event code for POWER7
*/
diff --git a/arch/powerpc/perf/ppc970-pmu.c b/arch/powerpc/perf/ppc970-pmu.c
index d35223fb112c..7d78df97f272 100644
--- a/arch/powerpc/perf/ppc970-pmu.c
+++ b/arch/powerpc/perf/ppc970-pmu.c
@@ -9,6 +9,8 @@
#include <asm/reg.h>
#include <asm/cputable.h>
+#include "internal.h"
+
/*
* Bits in event code for PPC970
*/
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] powerpc/perf: Add declarations to fix sparse warnings
2020-09-16 11:56 ` [PATCH 2/2] powerpc/perf: Add declarations to fix sparse warnings Michael Ellerman
@ 2020-09-17 4:30 ` Madhavan Srinivasan
0 siblings, 0 replies; 4+ messages in thread
From: Madhavan Srinivasan @ 2020-09-17 4:30 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
On 9/16/20 5:26 PM, Michael Ellerman wrote:
> Sparse warns about all the init functions:
> symbol init_ppc970_pmu was not declared. Should it be static?
> symbol init_power5p_pmu was not declared. Should it be static?
> symbol init_power5_pmu was not declared. Should it be static?
> symbol init_power6_pmu was not declared. Should it be static?
> symbol init_power7_pmu was not declared. Should it be static?
> symbol init_power9_pmu was not declared. Should it be static?
> symbol init_power8_pmu was not declared. Should it be static?
> symbol init_generic_compat_pmu was not declared. Should it be static?
>
> They're already declared in internal.h, so just make sure all the C
> files include that directly or indirectly.
Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
> arch/powerpc/perf/isa207-common.h | 2 ++
> arch/powerpc/perf/power10-pmu.c | 1 -
> arch/powerpc/perf/power5+-pmu.c | 2 ++
> arch/powerpc/perf/power5-pmu.c | 2 ++
> arch/powerpc/perf/power6-pmu.c | 2 ++
> arch/powerpc/perf/power7-pmu.c | 2 ++
> arch/powerpc/perf/ppc970-pmu.c | 2 ++
> 7 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/perf/isa207-common.h b/arch/powerpc/perf/isa207-common.h
> index 044de65e96b9..7025de5e60e7 100644
> --- a/arch/powerpc/perf/isa207-common.h
> +++ b/arch/powerpc/perf/isa207-common.h
> @@ -13,6 +13,8 @@
> #include <asm/firmware.h>
> #include <asm/cputable.h>
>
> +#include "internal.h"
> +
> #define EVENT_EBB_MASK 1ull
> #define EVENT_EBB_SHIFT PERF_EVENT_CONFIG_EBB_SHIFT
> #define EVENT_BHRB_MASK 1ull
> diff --git a/arch/powerpc/perf/power10-pmu.c b/arch/powerpc/perf/power10-pmu.c
> index 83148656b524..9dbe8f9b89b4 100644
> --- a/arch/powerpc/perf/power10-pmu.c
> +++ b/arch/powerpc/perf/power10-pmu.c
> @@ -9,7 +9,6 @@
> #define pr_fmt(fmt) "power10-pmu: " fmt
>
> #include "isa207-common.h"
> -#include "internal.h"
>
> /*
> * Raw event encoding for Power10:
> diff --git a/arch/powerpc/perf/power5+-pmu.c b/arch/powerpc/perf/power5+-pmu.c
> index a62b2cd7914f..3e64b4a1511f 100644
> --- a/arch/powerpc/perf/power5+-pmu.c
> +++ b/arch/powerpc/perf/power5+-pmu.c
> @@ -10,6 +10,8 @@
> #include <asm/reg.h>
> #include <asm/cputable.h>
>
> +#include "internal.h"
> +
> /*
> * Bits in event code for POWER5+ (POWER5 GS) and POWER5++ (POWER5 GS DD3)
> */
> diff --git a/arch/powerpc/perf/power5-pmu.c b/arch/powerpc/perf/power5-pmu.c
> index 8732b587cf71..017bb19b73fb 100644
> --- a/arch/powerpc/perf/power5-pmu.c
> +++ b/arch/powerpc/perf/power5-pmu.c
> @@ -10,6 +10,8 @@
> #include <asm/reg.h>
> #include <asm/cputable.h>
>
> +#include "internal.h"
> +
> /*
> * Bits in event code for POWER5 (not POWER5++)
> */
> diff --git a/arch/powerpc/perf/power6-pmu.c b/arch/powerpc/perf/power6-pmu.c
> index 0e318cf87129..189974478e9f 100644
> --- a/arch/powerpc/perf/power6-pmu.c
> +++ b/arch/powerpc/perf/power6-pmu.c
> @@ -10,6 +10,8 @@
> #include <asm/reg.h>
> #include <asm/cputable.h>
>
> +#include "internal.h"
> +
> /*
> * Bits in event code for POWER6
> */
> diff --git a/arch/powerpc/perf/power7-pmu.c b/arch/powerpc/perf/power7-pmu.c
> index 5e0bf09cf077..bacfab104a1a 100644
> --- a/arch/powerpc/perf/power7-pmu.c
> +++ b/arch/powerpc/perf/power7-pmu.c
> @@ -10,6 +10,8 @@
> #include <asm/reg.h>
> #include <asm/cputable.h>
>
> +#include "internal.h"
> +
> /*
> * Bits in event code for POWER7
> */
> diff --git a/arch/powerpc/perf/ppc970-pmu.c b/arch/powerpc/perf/ppc970-pmu.c
> index d35223fb112c..7d78df97f272 100644
> --- a/arch/powerpc/perf/ppc970-pmu.c
> +++ b/arch/powerpc/perf/ppc970-pmu.c
> @@ -9,6 +9,8 @@
> #include <asm/reg.h>
> #include <asm/cputable.h>
>
> +#include "internal.h"
> +
> /*
> * Bits in event code for PPC970
> */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning
2020-09-16 11:56 [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning Michael Ellerman
2020-09-16 11:56 ` [PATCH 2/2] powerpc/perf: Add declarations to fix sparse warnings Michael Ellerman
@ 2020-09-24 12:27 ` Michael Ellerman
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2020-09-24 12:27 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman
On Wed, 16 Sep 2020 21:56:36 +1000, Michael Ellerman wrote:
> Sparse says:
> symbol slb_setup_new_exec was not declared. Should it be static?
>
> No, it should have a declaration in a header, add one.
Applied to powerpc/next.
[1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning
https://git.kernel.org/powerpc/c/ef1edbba52883907caf02ab85e0d00a2e4648f05
[2/2] powerpc/perf: Add declarations to fix sparse warnings
https://git.kernel.org/powerpc/c/d10ebe79dfae7dc59b6cf77ffa615f0b8dae21bf
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-24 12:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16 11:56 [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning Michael Ellerman
2020-09-16 11:56 ` [PATCH 2/2] powerpc/perf: Add declarations to fix sparse warnings Michael Ellerman
2020-09-17 4:30 ` Madhavan Srinivasan
2020-09-24 12:27 ` [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox