public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparc: correct section of current_pc()
@ 2008-10-18 16:32 Frederic Weisbecker
  2008-10-22  4:57 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Frederic Weisbecker @ 2008-10-18 16:32 UTC (permalink / raw)
  To: David S. Miller, Linux Kernel

Latest mainline gives this section mismatch on sparc:

The function current_pc() references
the variable __init no_sun4u_here.
This is often because current_pc lacks a __init 
annotation or the annotation of no_sun4u_here is wrong.

Since current_pc() is used only in early time, it is correct to
put it in .init section.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
index 2d325fd..2fe2c11 100644
--- a/arch/sparc/kernel/head.S
+++ b/arch/sparc/kernel/head.S
@@ -465,6 +465,7 @@ gokernel:
 		mov	%o7, %g4		! Save %o7
 
 		/* Jump to it, and pray... */
+		__INIT
 current_pc:
 		call	1f
 		 nop

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

* Re: [PATCH] sparc: correct section of current_pc()
       [not found] <48FA0F7C.9040507@gmail.com>
@ 2008-10-21  0:26 ` Frédéric Weisbecker
  0 siblings, 0 replies; 3+ messages in thread
From: Frédéric Weisbecker @ 2008-10-21  0:26 UTC (permalink / raw)
  To: David S. Miller, Linux Kernel; +Cc: William L. Irwin, Sparc

2008/10/18 Frederic Weisbecker <fweisbec@gmail.com>:
> Latest mainline gives this section mismatch on sparc:
>
> The function current_pc() references
> the variable __init no_sun4u_here.
> This is often because current_pc lacks a __init
> annotation or the annotation of no_sun4u_here is wrong.
>
> Since current_pc() is used only in early time, it is correct to
> put it in .init section.
>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
> diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
> index 2d325fd..2fe2c11 100644
> --- a/arch/sparc/kernel/head.S
> +++ b/arch/sparc/kernel/head.S
> @@ -465,6 +465,7 @@ gokernel:
>                mov     %o7, %g4                ! Save %o7
>
>                /* Jump to it, and pray... */
> +               __INIT
>  current_pc:
>                call    1f
>                 nop
>
>

(Adding William and sparclinux in cc)

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

* Re: [PATCH] sparc: correct section of current_pc()
  2008-10-18 16:32 [PATCH] sparc: correct section of current_pc() Frederic Weisbecker
@ 2008-10-22  4:57 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-10-22  4:57 UTC (permalink / raw)
  To: fweisbec; +Cc: linux-kernel, sparclinux

From: Frederic Weisbecker <fweisbec@gmail.com>
Date: Sat, 18 Oct 2008 18:32:45 +0200

[ sparclinux@vger.kernel.org CC:'d ]

> Latest mainline gives this section mismatch on sparc:
> 
> The function current_pc() references
> the variable __init no_sun4u_here.
> This is often because current_pc lacks a __init 
> annotation or the annotation of no_sun4u_here is wrong.
> 
> Since current_pc() is used only in early time, it is correct to
> put it in .init section.
> 
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>

Also applied, thanks.

> diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
> index 2d325fd..2fe2c11 100644
> --- a/arch/sparc/kernel/head.S
> +++ b/arch/sparc/kernel/head.S
> @@ -465,6 +465,7 @@ gokernel:
>  		mov	%o7, %g4		! Save %o7
>  
>  		/* Jump to it, and pray... */
> +		__INIT
>  current_pc:
>  		call	1f
>  		 nop

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

end of thread, other threads:[~2008-10-22  4:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-18 16:32 [PATCH] sparc: correct section of current_pc() Frederic Weisbecker
2008-10-22  4:57 ` David Miller
     [not found] <48FA0F7C.9040507@gmail.com>
2008-10-21  0:26 ` Frédéric Weisbecker

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