LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] x86: fix section mismatch in reference from native_play_dead
@ 2011-02-03 13:13 Sergey Senozhatsky
  2011-02-14 12:25 ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Sergey Senozhatsky @ 2011-02-03 13:13 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, H. Peter Anvin, x86, Tejun Heo, Borislav Petkov,
	Suresh Siddha, linux-kernel

Fix 

WARNING: arch/x86/kernel/built-in.o(.text+0x19cde): Section mismatch in reference from 
the function native_play_dead() to the function .cpuinit.text:mwait_usable()
The function native_play_dead() references the function __cpuinit mwait_usable().


Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

---

 arch/x86/kernel/smpboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 0cbe8c0..0b8c6c9 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1467,7 +1467,7 @@ static inline void hlt_play_dead(void)
 	}
 }
 
-void native_play_dead(void)
+void __cpuinit native_play_dead(void)
 {
 	play_dead_common();
 	tboot_shutdown(TB_SHUTDOWN_WFS);


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

* Re: [PATCH] x86: fix section mismatch in reference from native_play_dead
  2011-02-03 13:13 [PATCH] x86: fix section mismatch in reference from native_play_dead Sergey Senozhatsky
@ 2011-02-14 12:25 ` Ingo Molnar
  2011-02-14 12:32   ` Sergey Senozhatsky
  0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2011-02-14 12:25 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Tejun Heo,
	Borislav Petkov, Suresh Siddha, linux-kernel, Borislav Petkov


* Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote:

> Fix 
> 
> WARNING: arch/x86/kernel/built-in.o(.text+0x19cde): Section mismatch in reference from 
> the function native_play_dead() to the function .cpuinit.text:mwait_usable()
> The function native_play_dead() references the function __cpuinit mwait_usable().
> 
> 
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> 
> ---
> 
>  arch/x86/kernel/smpboot.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 0cbe8c0..0b8c6c9 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -1467,7 +1467,7 @@ static inline void hlt_play_dead(void)
>  	}
>  }
>  
> -void native_play_dead(void)
> +void __cpuinit native_play_dead(void)
>  {
>  	play_dead_common();
>  	tboot_shutdown(TB_SHUTDOWN_WFS);

I think the right fix is Boris's fix below. Agreed?

Thanks,

	Ingo

>From 1c9d16e35911090dee3f9313e6af13af623d66ee Mon Sep 17 00:00:00 2001
From: Borislav Petkov <bp@amd64.org>
Date: Fri, 11 Feb 2011 18:17:54 +0100
Subject: [PATCH] x86: Fix mwait_usable section mismatch

We use it in non __cpuinit code now too so drop marker.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20110211171754.GA21047@aftab>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/cpu.h |    2 +-
 arch/x86/kernel/process.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
index 6e6e755..4564c8e 100644
--- a/arch/x86/include/asm/cpu.h
+++ b/arch/x86/include/asm/cpu.h
@@ -32,6 +32,6 @@ extern void arch_unregister_cpu(int);
 
 DECLARE_PER_CPU(int, cpu_state);
 
-int __cpuinit mwait_usable(const struct cpuinfo_x86 *);
+int mwait_usable(const struct cpuinfo_x86 *);
 
 #endif /* _ASM_X86_CPU_H */
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index e764fc0..3c189e9 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -506,7 +506,7 @@ static void poll_idle(void)
 #define MWAIT_ECX_EXTENDED_INFO		0x01
 #define MWAIT_EDX_C1			0xf0
 
-int __cpuinit mwait_usable(const struct cpuinfo_x86 *c)
+int mwait_usable(const struct cpuinfo_x86 *c)
 {
 	u32 eax, ebx, ecx, edx;
 

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

* Re: [PATCH] x86: fix section mismatch in reference from native_play_dead
  2011-02-14 12:25 ` Ingo Molnar
@ 2011-02-14 12:32   ` Sergey Senozhatsky
  2011-02-14 13:32     ` Borislav Petkov
  0 siblings, 1 reply; 6+ messages in thread
From: Sergey Senozhatsky @ 2011-02-14 12:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Sergey Senozhatsky, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Tejun Heo, Borislav Petkov, Suresh Siddha, linux-kernel,
	Borislav Petkov

[-- Attachment #1: Type: text/plain, Size: 2148 bytes --]

Hello,

On (02/14/11 13:25), Ingo Molnar wrote:
> * Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote:
> 
> > Fix 
> > 
> > WARNING: arch/x86/kernel/built-in.o(.text+0x19cde): Section mismatch in reference from 
> > the function native_play_dead() to the function .cpuinit.text:mwait_usable()
> > The function native_play_dead() references the function __cpuinit mwait_usable().
> > 
> > 
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> > 
> > ---
> > 
> >  arch/x86/kernel/smpboot.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> > index 0cbe8c0..0b8c6c9 100644
> > --- a/arch/x86/kernel/smpboot.c
> > +++ b/arch/x86/kernel/smpboot.c
> > @@ -1467,7 +1467,7 @@ static inline void hlt_play_dead(void)
> >  	}
> >  }
> >  
> > -void native_play_dead(void)
> > +void __cpuinit native_play_dead(void)
> >  {
> >  	play_dead_common();
> >  	tboot_shutdown(TB_SHUTDOWN_WFS);
> 
> I think the right fix is Boris's fix below. Agreed?
> 
[..]
> diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
> index 6e6e755..4564c8e 100644
> --- a/arch/x86/include/asm/cpu.h
> +++ b/arch/x86/include/asm/cpu.h
> @@ -32,6 +32,6 @@ extern void arch_unregister_cpu(int);
>  
>  DECLARE_PER_CPU(int, cpu_state);
>  
> -int __cpuinit mwait_usable(const struct cpuinfo_x86 *);
> +int mwait_usable(const struct cpuinfo_x86 *);
>  
>  #endif /* _ASM_X86_CPU_H */
> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
> index e764fc0..3c189e9 100644
> --- a/arch/x86/kernel/process.c
> +++ b/arch/x86/kernel/process.c
> @@ -506,7 +506,7 @@ static void poll_idle(void)
>  #define MWAIT_ECX_EXTENDED_INFO		0x01
>  #define MWAIT_EDX_C1			0xf0
>  
> -int __cpuinit mwait_usable(const struct cpuinfo_x86 *c)
> +int mwait_usable(const struct cpuinfo_x86 *c)
>  {
>  	u32 eax, ebx, ecx, edx;
>  
> 

`int mwait_usable(..)' is called from `void __cpuinit select_idle_routine(...)'

I think we still have section mismatch in this case. Is it correct?


	Sergey

[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]

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

* Re: [PATCH] x86: fix section mismatch in reference from native_play_dead
  2011-02-14 12:32   ` Sergey Senozhatsky
@ 2011-02-14 13:32     ` Borislav Petkov
  2011-02-14 13:52       ` Sergey Senozhatsky
  0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2011-02-14 13:32 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Ingo Molnar, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Tejun Heo, Petkov, Borislav, Suresh Siddha, linux-kernel

On Mon, Feb 14, 2011 at 07:32:44AM -0500, Sergey Senozhatsky wrote:
> > -int __cpuinit mwait_usable(const struct cpuinfo_x86 *c)
> > +int mwait_usable(const struct cpuinfo_x86 *c)
> >  {
> >  	u32 eax, ebx, ecx, edx;
> >  
> > 
> 
> `int mwait_usable(..)' is called from `void __cpuinit select_idle_routine(...)'
> 
> I think we still have section mismatch in this case. Is it correct?

Right, but mwait_usable() is not __cpuinit anymore and __cpuinit
functions should be able to call other functions without annotation,
methinks, no?

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

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

* Re: [PATCH] x86: fix section mismatch in reference from native_play_dead
  2011-02-14 13:32     ` Borislav Petkov
@ 2011-02-14 13:52       ` Sergey Senozhatsky
  2011-02-14 14:21         ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Sergey Senozhatsky @ 2011-02-14 13:52 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Ingo Molnar, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Tejun Heo, Petkov, Borislav, Suresh Siddha, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

On (02/14/11 14:32), Borislav Petkov wrote:
> Right, but mwait_usable() is not __cpuinit anymore and __cpuinit
> functions should be able to call other functions without annotation,
> methinks, no?
> 

Right,
Agreed, Borislav's fix is the correct one.

Thanks,
	Sergey

[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]

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

* Re: [PATCH] x86: fix section mismatch in reference from native_play_dead
  2011-02-14 13:52       ` Sergey Senozhatsky
@ 2011-02-14 14:21         ` Ingo Molnar
  0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2011-02-14 14:21 UTC (permalink / raw)
  To: Sergey Senozhatsky
  Cc: Borislav Petkov, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Tejun Heo, Petkov, Borislav, Suresh Siddha, linux-kernel


* Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote:

> On (02/14/11 14:32), Borislav Petkov wrote:
> > Right, but mwait_usable() is not __cpuinit anymore and __cpuinit
> > functions should be able to call other functions without annotation,
> > methinks, no?
> > 
> 
> Right,
> Agreed, Borislav's fix is the correct one.

Ok, thanks guys!

	Ingo

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

end of thread, other threads:[~2011-02-14 14:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 13:13 [PATCH] x86: fix section mismatch in reference from native_play_dead Sergey Senozhatsky
2011-02-14 12:25 ` Ingo Molnar
2011-02-14 12:32   ` Sergey Senozhatsky
2011-02-14 13:32     ` Borislav Petkov
2011-02-14 13:52       ` Sergey Senozhatsky
2011-02-14 14:21         ` Ingo Molnar

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).