public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] microblaze: Cleanup linker script using new linker script macros.
@ 2009-09-07  3:10 Tim Abbott
  2009-09-09 17:03 ` Michal Simek
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-09-07  3:10 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Sam Ravnborg, Tim Abbott, Michal Simek, microblaze-uclinux

I wasn't able to further clean up the linker script using the
INIT_DATA_SECTION macro because of the FIXME comment for the
.init.ramfs section; when that is resolved we should convert
microblaze to use INIT_DATA_SECTION.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/microblaze/kernel/vmlinux.lds.S |   39 +++++++---------------------------
 1 files changed, 8 insertions(+), 31 deletions(-)

diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
index d34d38d..5e95ee0 100644
--- a/arch/microblaze/kernel/vmlinux.lds.S
+++ b/arch/microblaze/kernel/vmlinux.lds.S
@@ -13,6 +13,8 @@ OUTPUT_ARCH(microblaze)
 ENTRY(_start)
 
 #include <asm-generic/vmlinux.lds.h>
+#include <asm/page.h>
+#include <asm/thread_info.h>
 
 jiffies = jiffies_64 + 4;
 
@@ -39,12 +41,7 @@ SECTIONS {
 
 	. = ALIGN(16);
 	RODATA
-	. = ALIGN(16);
-	__ex_table : {
-		__start___ex_table = .;
-		*(__ex_table)
-		__stop___ex_table = .;
-	}
+	EXCEPTION_TABLE(16)
 
 	/*
 	 * sdata2 section can go anywhere, but must be word aligned
@@ -61,12 +58,7 @@ SECTIONS {
 	}
 
 	_sdata = . ;
-	.data ALIGN (4096) : { /* page aligned when MMU used - origin 0x4 */
-		DATA_DATA
-		CONSTRUCTORS
-	}
-	. = ALIGN(32);
-	.data.cacheline_aligned : { *(.data.cacheline_aligned) }
+	RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
 	_edata = . ;
 
 	/* Reserve some low RAM for r0 based memory references */
@@ -74,10 +66,6 @@ SECTIONS {
 	r0_ram = . ;
 	. = . +  4096;	/* a page should be enough */
 
-	/* The initial task */
-	. = ALIGN(8192);
-	.data.init_task : { *(.data.init_task) }
-
 	/* Under the microblaze ABI, .sdata and .sbss must be contiguous */
 	. = ALIGN(8);
 	.sdata : {
@@ -96,12 +84,7 @@ SECTIONS {
 
 	__init_begin = .;
 
-	. = ALIGN(4096);
-	.init.text : {
-		_sinittext = . ;
-		INIT_TEXT
-		_einittext = .;
-	}
+	INIT_TEXT_SECTION(PAGE_SIZE)
 
 	.init.data : {
 		INIT_DATA
@@ -115,21 +98,15 @@ SECTIONS {
 	}
 
 	.init.setup : {
-		__setup_start = .;
-		*(.init.setup)
-		__setup_end = .;
+		INIT_SETUP(0)
 	}
 
 	.initcall.init : {
-		__initcall_start = .;
-		INITCALLS
-		__initcall_end = .;
+		INIT_CALLS
 	}
 
 	.con_initcall.init : {
-		__con_initcall_start = .;
-		*(.con_initcall.init)
-		__con_initcall_end = .;
+		CON_INITCALL
 	}
 
 	SECURITY_INIT
-- 
1.6.3.3


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

* Re: [PATCH] microblaze: Cleanup linker script using new linker script macros.
  2009-09-07  3:10 [PATCH] microblaze: Cleanup linker script using new linker script macros Tim Abbott
@ 2009-09-09 17:03 ` Michal Simek
  2009-09-09 22:42   ` Tim Abbott
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Simek @ 2009-09-09 17:03 UTC (permalink / raw)
  To: Tim Abbott; +Cc: Linux Kernel Mailing List, Sam Ravnborg, microblaze-uclinux

Hi Tim,

Tim Abbott wrote:
> I wasn't able to further clean up the linker script using the
> INIT_DATA_SECTION macro because of the FIXME comment for the
> .init.ramfs section; when that is resolved we should convert
> microblaze to use INIT_DATA_SECTION.
> 
> Signed-off-by: Tim Abbott <tabbott@ksplice.com>
> Cc: Michal Simek <monstr@monstr.eu>
> Cc: microblaze-uclinux@itee.uq.edu.au
> Cc: Sam Ravnborg <sam@ravnborg.org>

If you want to add this patch through microblaze tree, please let me know.

Tested-by: Michal Simek <monstr@monstr.eu>

Thanks,
Michal


> ---
>  arch/microblaze/kernel/vmlinux.lds.S |   39 +++++++---------------------------
>  1 files changed, 8 insertions(+), 31 deletions(-)
> 
> diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
> index d34d38d..5e95ee0 100644
> --- a/arch/microblaze/kernel/vmlinux.lds.S
> +++ b/arch/microblaze/kernel/vmlinux.lds.S
> @@ -13,6 +13,8 @@ OUTPUT_ARCH(microblaze)
>  ENTRY(_start)
>  
>  #include <asm-generic/vmlinux.lds.h>
> +#include <asm/page.h>
> +#include <asm/thread_info.h>
>  
>  jiffies = jiffies_64 + 4;
>  
> @@ -39,12 +41,7 @@ SECTIONS {
>  
>  	. = ALIGN(16);
>  	RODATA
> -	. = ALIGN(16);
> -	__ex_table : {
> -		__start___ex_table = .;
> -		*(__ex_table)
> -		__stop___ex_table = .;
> -	}
> +	EXCEPTION_TABLE(16)
>  
>  	/*
>  	 * sdata2 section can go anywhere, but must be word aligned
> @@ -61,12 +58,7 @@ SECTIONS {
>  	}
>  
>  	_sdata = . ;
> -	.data ALIGN (4096) : { /* page aligned when MMU used - origin 0x4 */
> -		DATA_DATA
> -		CONSTRUCTORS
> -	}
> -	. = ALIGN(32);
> -	.data.cacheline_aligned : { *(.data.cacheline_aligned) }
> +	RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
>  	_edata = . ;
>  
>  	/* Reserve some low RAM for r0 based memory references */
> @@ -74,10 +66,6 @@ SECTIONS {
>  	r0_ram = . ;
>  	. = . +  4096;	/* a page should be enough */
>  
> -	/* The initial task */
> -	. = ALIGN(8192);
> -	.data.init_task : { *(.data.init_task) }
> -
>  	/* Under the microblaze ABI, .sdata and .sbss must be contiguous */
>  	. = ALIGN(8);
>  	.sdata : {
> @@ -96,12 +84,7 @@ SECTIONS {
>  
>  	__init_begin = .;
>  
> -	. = ALIGN(4096);
> -	.init.text : {
> -		_sinittext = . ;
> -		INIT_TEXT
> -		_einittext = .;
> -	}
> +	INIT_TEXT_SECTION(PAGE_SIZE)
>  
>  	.init.data : {
>  		INIT_DATA
> @@ -115,21 +98,15 @@ SECTIONS {
>  	}
>  
>  	.init.setup : {
> -		__setup_start = .;
> -		*(.init.setup)
> -		__setup_end = .;
> +		INIT_SETUP(0)
>  	}
>  
>  	.initcall.init : {
> -		__initcall_start = .;
> -		INITCALLS
> -		__initcall_end = .;
> +		INIT_CALLS
>  	}
>  
>  	.con_initcall.init : {
> -		__con_initcall_start = .;
> -		*(.con_initcall.init)
> -		__con_initcall_end = .;
> +		CON_INITCALL
>  	}
>  
>  	SECURITY_INIT


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* Re: [PATCH] microblaze: Cleanup linker script using new linker script macros.
  2009-09-09 17:03 ` Michal Simek
@ 2009-09-09 22:42   ` Tim Abbott
  2009-09-10  6:19     ` [microblaze-uclinux] " Michal Simek
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-09-09 22:42 UTC (permalink / raw)
  To: Michal Simek; +Cc: Linux Kernel Mailing List, Sam Ravnborg, microblaze-uclinux

On Wed, 9 Sep 2009, Michal Simek wrote:

> If you want to add this patch through microblaze tree, please let me know.

I think it would be best to add it via the microblaze tree (in general I 
have been adding these cleanup patches via the architecture trees when 
possible).

	-Tim Abbott

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

* Re: [microblaze-uclinux] Re: [PATCH] microblaze: Cleanup linker script using new linker script macros.
  2009-09-09 22:42   ` Tim Abbott
@ 2009-09-10  6:19     ` Michal Simek
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2009-09-10  6:19 UTC (permalink / raw)
  To: microblaze-uclinux; +Cc: Linux Kernel Mailing List, Sam Ravnborg



Tim Abbott wrote:
> On Wed, 9 Sep 2009, Michal Simek wrote:
> 
>> If you want to add this patch through microblaze tree, please let me know.
> 
> I think it would be best to add it via the microblaze tree (in general I 
> have been adding these cleanup patches via the architecture trees when 
> possible).

ok. Added to microblaze next branch.

Thanks,
Michal

> 
> 	-Tim Abbott
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@itee.uq.edu.au
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
> 
> 

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

end of thread, other threads:[~2009-09-10  6:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-07  3:10 [PATCH] microblaze: Cleanup linker script using new linker script macros Tim Abbott
2009-09-09 17:03 ` Michal Simek
2009-09-09 22:42   ` Tim Abbott
2009-09-10  6:19     ` [microblaze-uclinux] " Michal Simek

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