diff mbox

[

Message ID 20100713095024.GA10494@merkur.ravnborg.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Sam Ravnborg July 13, 2010, 9:50 a.m. UTC
From 851e645a7eee68380caaf026eb6d3be118876370 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Tue, 13 Jul 2010 11:39:42 +0200
Subject: [PATCH] vmlinux.lds: fix .data..init_task output section (fix popwerpc boot)

The .data..init_task output section was missing
a load offset causing a popwerpc target to fail to boot.

Sean MacLennan tracked it down to the definition of
INIT_TASK_DATA_SECTION().

There are only two users of INIT_TASK_DATA_SECTION()
in the kernel today: cris and popwerpc.
cris do not support relocatable kernels and is thus not
impacted by this change.

Fix INIT_TASK_DATA_SECTION() to specify load offset like
all other output sections.

Reported-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---

On the assumption that Sean reports that it fixes
the warnings/boot issue here is a real patch.

Ben - will you take it via the popwerpc tree
or shall I ask Michal to take it via kbuild?

	Sam

 include/asm-generic/vmlinux.lds.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Sean MacLennan July 22, 2010, 10:27 p.m. UTC | #1
On Tue, 13 Jul 2010 11:50:24 +0200
Sam Ravnborg <sam@ravnborg.org> wrote:

> Ben - will you take it via the popwerpc tree
> or shall I ask Michal to take it via kbuild?

Anything happening with this patch?

Cheers,
   Sean
Benjamin Herrenschmidt July 22, 2010, 10:33 p.m. UTC | #2
On Thu, 2010-07-22 at 18:27 -0400, Sean MacLennan wrote:
> On Tue, 13 Jul 2010 11:50:24 +0200
> Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > Ben - will you take it via the popwerpc tree
> > or shall I ask Michal to take it via kbuild?
> 
> Anything happening with this patch?

The subject line tripped my spam filter ... 

I'm happy to take it.

Sean, make sure it's on patchwork and it will be in one of my next
batches.

Cheers,
Ben.
Sean MacLennan July 22, 2010, 11:50 p.m. UTC | #3
On Tue, 13 Jul 2010 11:50:24 +0200
Sam Ravnborg <sam@ravnborg.org> wrote:

> From 851e645a7eee68380caaf026eb6d3be118876370 Mon Sep 17 00:00:00 2001
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Tue, 13 Jul 2010 11:39:42 +0200
> Subject: [PATCH] vmlinux.lds: fix .data..init_task output section
> (fix popwerpc boot)
> 
> The .data..init_task output section was missing
> a load offset causing a popwerpc target to fail to boot.
> 
> Sean MacLennan tracked it down to the definition of
> INIT_TASK_DATA_SECTION().
> 
> There are only two users of INIT_TASK_DATA_SECTION()
> in the kernel today: cris and popwerpc.
> cris do not support relocatable kernels and is thus not
> impacted by this change.
> 
> Fix INIT_TASK_DATA_SECTION() to specify load offset like
> all other output sections.
> 
> Reported-by: Sean MacLennan <smaclennan@pikatech.com>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> 
> On the assumption that Sean reports that it fixes
> the warnings/boot issue here is a real patch.
> 
> Ben - will you take it via the popwerpc tree
> or shall I ask Michal to take it via kbuild?
> 
> 	Sam
> 
>  include/asm-generic/vmlinux.lds.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/asm-generic/vmlinux.lds.h
> b/include/asm-generic/vmlinux.lds.h index 48c5299..cdfff74 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -435,7 +435,7 @@
>   */
>  #define
> INIT_TASK_DATA_SECTION(align)
> \ . = ALIGN(align);						\
> -	.data..init_task :
> {						\
> +	.data..init_task :  AT(ADDR(.data..init_task) - LOAD_OFFSET)
> {	\
> INIT_TASK_DATA(align)					\ }
>
Sam Ravnborg July 23, 2010, 1:58 p.m. UTC | #4
On Thu, Jul 22, 2010 at 07:50:08PM -0400, Sean MacLennan wrote:
> On Tue, 13 Jul 2010 11:50:24 +0200
> Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > From 851e645a7eee68380caaf026eb6d3be118876370 Mon Sep 17 00:00:00 2001
> > From: Sam Ravnborg <sam@ravnborg.org>
> > Date: Tue, 13 Jul 2010 11:39:42 +0200
> > Subject: [PATCH] vmlinux.lds: fix .data..init_task output section
> > (fix popwerpc boot)
> > 
> > The .data..init_task output section was missing
> > a load offset causing a popwerpc target to fail to boot.
> > 
> > Sean MacLennan tracked it down to the definition of
> > INIT_TASK_DATA_SECTION().
> > 
> > There are only two users of INIT_TASK_DATA_SECTION()
> > in the kernel today: cris and popwerpc.
> > cris do not support relocatable kernels and is thus not
> > impacted by this change.
> > 
> > Fix INIT_TASK_DATA_SECTION() to specify load offset like
> > all other output sections.
> > 
> > Reported-by: Sean MacLennan <smaclennan@pikatech.com>
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > ---
> > 
> > On the assumption that Sean reports that it fixes
> > the warnings/boot issue here is a real patch.
> > 
> > Ben - will you take it via the popwerpc tree
> > or shall I ask Michal to take it via kbuild?
> > 
> > 	Sam

Sorry for the bad initial subject line!
As Sean reported that the patch fixes his isuse it
deserves a:

Tested-by: Sean MacLennan <smaclennan@pikatech.com>

	Sam
Benjamin Herrenschmidt July 23, 2010, 10:16 p.m. UTC | #5
> > > 
> > > On the assumption that Sean reports that it fixes
> > > the warnings/boot issue here is a real patch.
> > > 
> > > Ben - will you take it via the popwerpc tree
> > > or shall I ask Michal to take it via kbuild?
> > > 
> > > 	Sam
> 
> Sorry for the bad initial subject line!
> As Sean reported that the patch fixes his isuse it
> deserves a:
> 
> Tested-by: Sean MacLennan <smaclennan@pikatech.com>

Heh. Too late, I already sent it to Linus :-)

Ben.
diff mbox

Patch

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 48c5299..cdfff74 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -435,7 +435,7 @@ 
  */
 #define INIT_TASK_DATA_SECTION(align)					\
 	. = ALIGN(align);						\
-	.data..init_task : {						\
+	.data..init_task :  AT(ADDR(.data..init_task) - LOAD_OFFSET) {	\
 		INIT_TASK_DATA(align)					\
 	}