public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH tip] perf/x86/uncore: Add __init for uncore_cpumask_init().
@ 2014-03-05  9:58 Dongsheng Yang
  2014-03-05 21:23 ` Stephane Eranian
  2014-03-11 12:38 ` [tip:perf/core] " tip-bot for Dongsheng Yang
  0 siblings, 2 replies; 4+ messages in thread
From: Dongsheng Yang @ 2014-03-05  9:58 UTC (permalink / raw)
  To: x86, linux-kernel
  Cc: Dongsheng Yang, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin,
	Stephane Eranian

Commit 411cf180f introduce function uncore_cpumask_init() and it is only
called in __init intel_uncore_init(). But it is not marked with __init,
then the following warning is there when building.

WARNING: vmlinux.o(.text+0x2464a): Section mismatch in reference from the function uncore_cpumask_init() to the function .init.text:uncore_cpu_setup()
The function uncore_cpumask_init() references
the function __init uncore_cpu_setup().
This is often because uncore_cpumask_init lacks a __init
annotation or the annotation of uncore_cpu_setup is wrong.

This patch add __init for uncore_cpumask_init() function.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
cc: Paul Mackerras <paulus@samba.org>
cc: Ingo Molnar <mingo@redhat.com>
cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
cc: Thomas Gleixner <tglx@linutronix.de>
cc: "H. Peter Anvin" <hpa@zytor.com>
cc: Stephane Eranian <eranian@google.com>
---
 arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index b262c61..5c2537a 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -4229,7 +4229,7 @@ static int __init uncore_pmus_register(void)
 	return 0;
 }
 
-static void uncore_cpumask_init(void)
+static void __init uncore_cpumask_init(void)
 {
 	int cpu;
 
-- 
1.8.2.1


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

* Re: [PATCH tip] perf/x86/uncore: Add __init for uncore_cpumask_init().
  2014-03-05  9:58 [PATCH tip] perf/x86/uncore: Add __init for uncore_cpumask_init() Dongsheng Yang
@ 2014-03-05 21:23 ` Stephane Eranian
  2014-03-11  5:14   ` [PATCH for-tip V2] " Dongsheng Yang
  2014-03-11 12:38 ` [tip:perf/core] " tip-bot for Dongsheng Yang
  1 sibling, 1 reply; 4+ messages in thread
From: Stephane Eranian @ 2014-03-05 21:23 UTC (permalink / raw)
  To: Dongsheng Yang
  Cc: x86, LKML, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin

On Wed, Mar 5, 2014 at 10:58 AM, Dongsheng Yang
<yangds.fnst@cn.fujitsu.com> wrote:
> Commit 411cf180f introduce function uncore_cpumask_init() and it is only
> called in __init intel_uncore_init(). But it is not marked with __init,
> then the following warning is there when building.
>
I did not get this warning when building my kernels. But I agree
with the patch.

Acked-by: Stephane Eranian <eranian@google.com>

> WARNING: vmlinux.o(.text+0x2464a): Section mismatch in reference from the function uncore_cpumask_init() to the function .init.text:uncore_cpu_setup()
> The function uncore_cpumask_init() references
> the function __init uncore_cpu_setup().
> This is often because uncore_cpumask_init lacks a __init
> annotation or the annotation of uncore_cpu_setup is wrong.
>
> This patch add __init for uncore_cpumask_init() function.
>
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> cc: Paul Mackerras <paulus@samba.org>
> cc: Ingo Molnar <mingo@redhat.com>
> cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> cc: Thomas Gleixner <tglx@linutronix.de>
> cc: "H. Peter Anvin" <hpa@zytor.com>
> cc: Stephane Eranian <eranian@google.com>
> ---
>  arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
> index b262c61..5c2537a 100644
> --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
> +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
> @@ -4229,7 +4229,7 @@ static int __init uncore_pmus_register(void)
>         return 0;
>  }
>
> -static void uncore_cpumask_init(void)
> +static void __init uncore_cpumask_init(void)
>  {
>         int cpu;
>
> --
> 1.8.2.1
>

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

* [PATCH for-tip V2] perf/x86/uncore: Add __init for uncore_cpumask_init().
  2014-03-05 21:23 ` Stephane Eranian
@ 2014-03-11  5:14   ` Dongsheng Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Dongsheng Yang @ 2014-03-11  5:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: x86, a.p.zijlstra, paulus, mingo, acme, tglx, hpa, Dongsheng Yang

Commit 411cf180f introduce function uncore_cpumask_init() and it calls uncore_cpu_setup()
which is marked as __init. But it is not marked with __init, then the following warning
is there when building.

WARNING: vmlinux.o(.text+0x2464a): Section mismatch in reference from the function uncore_cpumask_init() to the function .init.text:uncore_cpu_setup()
The function uncore_cpumask_init() references
the function __init uncore_cpu_setup().
This is often because uncore_cpumask_init lacks a __init
annotation or the annotation of uncore_cpu_setup is wrong.

As function uncore_cpumask_init() is only called by __init intel_uncore_init(), then we can
free it after system initialization.

This patch add __init for uncore_cpumask_init() function.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Acked-by: Stephane Eranian <eranian@google.com>
---
Changlogs:
	-v1:
	   Add more commit message for this patch.

 arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index b262c61..5c2537a 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -4229,7 +4229,7 @@ static int __init uncore_pmus_register(void)
 	return 0;
 }
 
-static void uncore_cpumask_init(void)
+static void __init uncore_cpumask_init(void)
 {
 	int cpu;
 
-- 
1.8.2.1


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

* [tip:perf/core] perf/x86/uncore: Add __init for uncore_cpumask_init()
  2014-03-05  9:58 [PATCH tip] perf/x86/uncore: Add __init for uncore_cpumask_init() Dongsheng Yang
  2014-03-05 21:23 ` Stephane Eranian
@ 2014-03-11 12:38 ` tip-bot for Dongsheng Yang
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Dongsheng Yang @ 2014-03-11 12:38 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, paulus, eranian, hpa, mingo, acme, peterz, tglx,
	yangds.fnst

Commit-ID:  ef11dadb8373fcbe53bdd09ceb262b2f18da10c5
Gitweb:     http://git.kernel.org/tip/ef11dadb8373fcbe53bdd09ceb262b2f18da10c5
Author:     Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
AuthorDate: Wed, 5 Mar 2014 17:58:36 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 11 Mar 2014 11:57:56 +0100

perf/x86/uncore: Add __init for uncore_cpumask_init()

Commit:

  411cf180fa00 perf/x86/uncore: fix initialization of cpumask

introduced the function uncore_cpumask_init(), which is only
called in __init intel_uncore_init(). But it is not marked
with __init, which produces the following warning:

	WARNING: vmlinux.o(.text+0x2464a): Section mismatch in reference from the function uncore_cpumask_init() to the function .init.text:uncore_cpu_setup()
	The function uncore_cpumask_init() references
	the function __init uncore_cpu_setup().
	This is often because uncore_cpumask_init lacks a __init
	annotation or the annotation of uncore_cpu_setup is wrong.

This patch marks uncore_cpumask_init() with __init.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Acked-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: http://lkml.kernel.org/r/1394013516-4964-1-git-send-email-yangds.fnst@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index b262c61..5c2537a 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -4229,7 +4229,7 @@ static int __init uncore_pmus_register(void)
 	return 0;
 }
 
-static void uncore_cpumask_init(void)
+static void __init uncore_cpumask_init(void)
 {
 	int cpu;
 

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

end of thread, other threads:[~2014-03-11 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05  9:58 [PATCH tip] perf/x86/uncore: Add __init for uncore_cpumask_init() Dongsheng Yang
2014-03-05 21:23 ` Stephane Eranian
2014-03-11  5:14   ` [PATCH for-tip V2] " Dongsheng Yang
2014-03-11 12:38 ` [tip:perf/core] " tip-bot for Dongsheng Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox