public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [i386/x86-64] Fix section mismatch
@ 2007-05-11 15:32 Bernhard Walle
  2007-05-20  1:22 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Walle @ 2007-05-11 15:32 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

This patch fixes following compile warning:

--------- >8 --------
WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to
.init.text:mtrr_bp_init from .text between 'id entify_cpu' (at offset 0x6571)
and 'IRQ0x20_interrupt'
--------- 8< --------

It's because identify_cpu() which is __cpuinit calls mtrr_bp_init() which is
__init(). __cpuinit() expands to nothing if CONFIG_HOTPLUG_CPU=y and so the
call is illegal.


Signed-off-by: Bernhard Walle <bwalle@suse.de>

---
 arch/i386/kernel/cpu/mtrr/generic.c |    2 +-
 arch/i386/kernel/cpu/mtrr/main.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/arch/i386/kernel/cpu/mtrr/generic.c
+++ b/arch/i386/kernel/cpu/mtrr/generic.c
@@ -78,7 +78,7 @@ static void __cpuinit print_fixed(unsign
 }
 
 /*  Grab all of the MTRR state for this CPU into *state  */
-void __init get_mtrr_state(void)
+void get_mtrr_state(void)
 {
 	unsigned int i;
 	struct mtrr_var_range *vrs;
--- a/arch/i386/kernel/cpu/mtrr/main.c
+++ b/arch/i386/kernel/cpu/mtrr/main.c
@@ -639,7 +639,7 @@ static struct sysdev_driver mtrr_sysdev_
  * initialized (i.e. before smp_init()).
  * 
  */
-void __init mtrr_bp_init(void)
+void mtrr_bp_init(void)
 {
 	init_ifs();
 

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

* Re: [PATCH] [i386/x86-64] Fix section mismatch
  2007-05-11 15:32 [PATCH] [i386/x86-64] Fix section mismatch Bernhard Walle
@ 2007-05-20  1:22 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2007-05-20  1:22 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel

On Fri, May 11, 2007 at 05:32:48PM +0200, Bernhard Walle wrote:
> This patch fixes following compile warning:
> 
> --------- >8 --------
> WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to
> .init.text:mtrr_bp_init from .text between 'id entify_cpu' (at offset 0x6571)
> and 'IRQ0x20_interrupt'
> --------- 8< --------
> 
> It's because identify_cpu() which is __cpuinit calls mtrr_bp_init() which is
> __init(). __cpuinit() expands to nothing if CONFIG_HOTPLUG_CPU=y and so the
> call is illegal.
> 
> 
> Signed-off-by: Bernhard Walle <bwalle@suse.de>
> 
I cannot see what goes wrong here and how your patch fixes this.
Can you please send me a copy of your .config.

[I have submitted a patch to add both __init tags today and
 needs to find out if that one is bogus].

	Sam


> ---
>  arch/i386/kernel/cpu/mtrr/generic.c |    2 +-
>  arch/i386/kernel/cpu/mtrr/main.c    |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/arch/i386/kernel/cpu/mtrr/generic.c
> +++ b/arch/i386/kernel/cpu/mtrr/generic.c
> @@ -78,7 +78,7 @@ static void __cpuinit print_fixed(unsign
>  }
>  
>  /*  Grab all of the MTRR state for this CPU into *state  */
> -void __init get_mtrr_state(void)
> +void get_mtrr_state(void)
>  {
>  	unsigned int i;
>  	struct mtrr_var_range *vrs;
> --- a/arch/i386/kernel/cpu/mtrr/main.c
> +++ b/arch/i386/kernel/cpu/mtrr/main.c
> @@ -639,7 +639,7 @@ static struct sysdev_driver mtrr_sysdev_
>   * initialized (i.e. before smp_init()).
>   * 
>   */
> -void __init mtrr_bp_init(void)
> +void mtrr_bp_init(void)
>  {
>  	init_ifs();
>  
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

end of thread, other threads:[~2007-05-20  1:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11 15:32 [PATCH] [i386/x86-64] Fix section mismatch Bernhard Walle
2007-05-20  1:22 ` Sam Ravnborg

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