linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] microcode: Fix mc_cpu_notifier section warning
@ 2006-12-17 16:36 Jean Delvare
  2006-12-18 10:04 ` Tigran Aivazian
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2006-12-17 16:36 UTC (permalink / raw)
  To: Tigran Aivazian; +Cc: LKML

Structure mc_cpu_notifier references a __cpuinit function, but
isn't declared __cpuinitdata itself:

WARNING: arch/i386/kernel/microcode.o - Section mismatch: reference
to .init.text: from .data after 'mc_cpu_notifier' (at offset 0x118)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
 arch/i386/kernel/microcode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.20-rc1.orig/arch/i386/kernel/microcode.c	2006-12-15 09:05:20.000000000 +0100
+++ linux-2.6.20-rc1/arch/i386/kernel/microcode.c	2006-12-17 15:23:40.000000000 +0100
@@ -722,7 +722,7 @@
 	return NOTIFY_OK;
 }
 
-static struct notifier_block mc_cpu_notifier = {
+static struct notifier_block __cpuinitdata mc_cpu_notifier = {
 	.notifier_call = mc_cpu_callback,
 };
 


-- 
Jean Delvare

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

* Re: [PATCH] microcode: Fix mc_cpu_notifier section warning
  2006-12-17 16:36 [PATCH] microcode: Fix mc_cpu_notifier section warning Jean Delvare
@ 2006-12-18 10:04 ` Tigran Aivazian
  2006-12-19  7:33   ` Jean Delvare
  0 siblings, 1 reply; 5+ messages in thread
From: Tigran Aivazian @ 2006-12-18 10:04 UTC (permalink / raw)
  To: Jean Delvare; +Cc: LKML

Hi Jean,

Ok, your patch is correct, although I assume you realize that it does 
nothing --- both the function and the data it operates on are inside 
CONFIG_HOTPLUG_CPU and checking include/linux/init.h I see that 
__cpuinitdata is nothing in this case. E.g. msr_class_cpu_notifier in the 
msr driver isn't declared __cpuinitdata...

But to tidy up one should add __cpuinitdata as you suggest (to guard for 
the case if these two slip out of CONFIG_HOTPLUG_CPU, although they are 
meaningless if cpu hotplug support is not configured in).

Kind regards
Tigran

On Sun, 17 Dec 2006, Jean Delvare wrote:

> Structure mc_cpu_notifier references a __cpuinit function, but
> isn't declared __cpuinitdata itself:
>
> WARNING: arch/i386/kernel/microcode.o - Section mismatch: reference
> to .init.text: from .data after 'mc_cpu_notifier' (at offset 0x118)
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> ---
> arch/i386/kernel/microcode.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2.6.20-rc1.orig/arch/i386/kernel/microcode.c	2006-12-15 09:05:20.000000000 +0100
> +++ linux-2.6.20-rc1/arch/i386/kernel/microcode.c	2006-12-17 15:23:40.000000000 +0100
> @@ -722,7 +722,7 @@
> 	return NOTIFY_OK;
> }
>
> -static struct notifier_block mc_cpu_notifier = {
> +static struct notifier_block __cpuinitdata mc_cpu_notifier = {
> 	.notifier_call = mc_cpu_callback,
> };
>
>
>
> -- 
> Jean Delvare
>

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

* Re: [PATCH] microcode: Fix mc_cpu_notifier section warning
  2006-12-18 10:04 ` Tigran Aivazian
@ 2006-12-19  7:33   ` Jean Delvare
  2006-12-19  9:10     ` Tigran Aivazian
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2006-12-19  7:33 UTC (permalink / raw)
  To: Tigran Aivazian; +Cc: LKML

Hi Tigran,

On Mon, 18 Dec 2006 10:04:39 +0000 (GMT), Tigran Aivazian wrote:
> Ok, your patch is correct, although I assume you realize that it does 
> nothing --- both the function and the data it operates on are inside 
> CONFIG_HOTPLUG_CPU and checking include/linux/init.h I see that 
> __cpuinitdata is nothing in this case. E.g. msr_class_cpu_notifier in the 
> msr driver isn't declared __cpuinitdata...

I don't see anything in arch/i386/kernel/microcode.c depending on
CONFIG_HOTPLUG_CPU (in 2.6.20-rc1), sorry.

> But to tidy up one should add __cpuinitdata as you suggest (to guard for 
> the case if these two slip out of CONFIG_HOTPLUG_CPU, although they are 
> meaningless if cpu hotplug support is not configured in).
> 
> Kind regards
> Tigran
> 
> On Sun, 17 Dec 2006, Jean Delvare wrote:
> 
> > Structure mc_cpu_notifier references a __cpuinit function, but
> > isn't declared __cpuinitdata itself:
> >
> > WARNING: arch/i386/kernel/microcode.o - Section mismatch: reference
> > to .init.text: from .data after 'mc_cpu_notifier' (at offset 0x118)
> >
> > Signed-off-by: Jean Delvare <khali@linux-fr.org>
> > ---
> > arch/i386/kernel/microcode.c |    2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- linux-2.6.20-rc1.orig/arch/i386/kernel/microcode.c	2006-12-15 09:05:20.000000000 +0100
> > +++ linux-2.6.20-rc1/arch/i386/kernel/microcode.c	2006-12-17 15:23:40.000000000 +0100
> > @@ -722,7 +722,7 @@
> > 	return NOTIFY_OK;
> > }
> >
> > -static struct notifier_block mc_cpu_notifier = {
> > +static struct notifier_block __cpuinitdata mc_cpu_notifier = {
> > 	.notifier_call = mc_cpu_callback,
> > };

-- 
Jean Delvare

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

* Re: [PATCH] microcode: Fix mc_cpu_notifier section warning
  2006-12-19  7:33   ` Jean Delvare
@ 2006-12-19  9:10     ` Tigran Aivazian
  2006-12-21  0:49       ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Tigran Aivazian @ 2006-12-19  9:10 UTC (permalink / raw)
  To: Jean Delvare; +Cc: LKML

Hi Jean,

On Tue, 19 Dec 2006, Jean Delvare wrote:
> I don't see anything in arch/i386/kernel/microcode.c depending on
> CONFIG_HOTPLUG_CPU (in 2.6.20-rc1), sorry.

I run 2.6.19.1 and there both mc_cpu_notifier (which your patch modified) 
and mc_cpu_callback (which uses mc_cpu_notifier) are inside #ifdef 
CONFIG_HOTPLUG_CPU.

Kind regards
Tigran

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

* Re: [PATCH] microcode: Fix mc_cpu_notifier section warning
  2006-12-19  9:10     ` Tigran Aivazian
@ 2006-12-21  0:49       ` Andrew Morton
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2006-12-21  0:49 UTC (permalink / raw)
  To: Tigran Aivazian; +Cc: Jean Delvare, LKML

On Tue, 19 Dec 2006 09:10:25 +0000 (GMT)
Tigran Aivazian <tigran@aivazian.fsnet.co.uk> wrote:

> Hi Jean,
> 
> On Tue, 19 Dec 2006, Jean Delvare wrote:
> > I don't see anything in arch/i386/kernel/microcode.c depending on
> > CONFIG_HOTPLUG_CPU (in 2.6.20-rc1), sorry.
> 
> I run 2.6.19.1 and there both mc_cpu_notifier (which your patch modified) 
> and mc_cpu_callback (which uses mc_cpu_notifier) are inside #ifdef 
> CONFIG_HOTPLUG_CPU.

Yes, we now compile this code unconditionally and rely upon the linker to
throw it away.

Allegedly, this works.  How toolchain-version-dependent it is I don't know.

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

end of thread, other threads:[~2006-12-21  0:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-17 16:36 [PATCH] microcode: Fix mc_cpu_notifier section warning Jean Delvare
2006-12-18 10:04 ` Tigran Aivazian
2006-12-19  7:33   ` Jean Delvare
2006-12-19  9:10     ` Tigran Aivazian
2006-12-21  0:49       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).