mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] Linker script cleanup for blackfin
@ 2009-09-22 17:10 Tim Abbott
  2009-09-22 17:10 ` [PATCH v2] blackfin: Cleanup linker script using new linker script macros Tim Abbott
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Abbott @ 2009-09-22 17:10 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Mike Frysinger, uclinux-dist-devel, linux-kernel, Sam Ravnborg,
	Tim Abbott

Hi Linux,

This patch series contains a patch cleaning up the linker script on
the blackfin architecture that's been approved by Mike Frysinger.
Please merge.

This cross-architecture linker script cleanup project is in
preparation for adding support for building the kernel with
-ffunction-sections -fdata-sections, which is a prerequisite for
Ksplice.

	-Tim Abbott

Tim Abbott (1):
  blackfin: Cleanup linker script using new linker script macros.

 arch/blackfin/kernel/vmlinux.lds.S |   56 ++++--------------------------------
 1 files changed, 6 insertions(+), 50 deletions(-)


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

* [PATCH v2] blackfin: Cleanup linker script using new linker script macros.
  2009-09-22 17:10 [PATCH v2] Linker script cleanup for blackfin Tim Abbott
@ 2009-09-22 17:10 ` Tim Abbott
  2009-09-23 17:41   ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Abbott @ 2009-09-22 17:10 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Mike Frysinger, uclinux-dist-devel, linux-kernel, Sam Ravnborg,
	Tim Abbott, Bryan Wu, Mike Frysinger

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
---
 arch/blackfin/kernel/vmlinux.lds.S |   56 ++++--------------------------------
 1 files changed, 6 insertions(+), 50 deletions(-)

diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index 21ac7c2..ffd90fb 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -96,8 +96,7 @@ SECTIONS
 	{
 		__sdata = .;
 		/* This gets done first, so the glob doesn't suck it in */
-		. = ALIGN(32);
-		*(.data.cacheline_aligned)
+		CACHELINE_ALIGNED_DATA(32)
 
 #if !L1_DATA_A_LENGTH
 		. = ALIGN(32);
@@ -116,12 +115,7 @@ SECTIONS
 		DATA_DATA
 		CONSTRUCTORS
 
-		/* make sure the init_task is aligned to the
-		 * kernel thread size so we can locate the kernel
-		 * stack properly and quickly.
-		 */
-		. = ALIGN(THREAD_SIZE);
-		*(.init_task.data)
+		INIT_TASK_DATA(THREAD_SIZE)
 
 		__edata = .;
 	}
@@ -134,39 +128,10 @@ SECTIONS
 	. = ALIGN(PAGE_SIZE);
 	___init_begin = .;
 
-	.init.text :
-	{
-		. = ALIGN(PAGE_SIZE);
-		__sinittext = .;
-		INIT_TEXT
-		__einittext = .;
-	}
-	.init.data :
-	{
-		. = ALIGN(16);
-		INIT_DATA
-	}
-	.init.setup :
-	{
-		. = ALIGN(16);
-		___setup_start = .;
-		*(.init.setup)
-		___setup_end = .;
-	}
-	.initcall.init :
-	{
-		___initcall_start = .;
-		INITCALLS
-		___initcall_end = .;
-	}
-	.con_initcall.init :
-	{
-		___con_initcall_start = .;
-		*(.con_initcall.init)
-		___con_initcall_end = .;
-	}
+	INIT_TEXT_SECTION(PAGE_SIZE)
+	. = ALIGN(16);
+	INIT_DATA_SECTION(16)
 	PERCPU(4)
-	SECURITY_INIT
 
 	/* we have to discard exit text and such at runtime, not link time, to
 	 * handle embedded cross-section references (alt instructions, bug
@@ -181,18 +146,9 @@ SECTIONS
 		EXIT_DATA
 	}
 
-	.init.ramfs :
-	{
-		. = ALIGN(4);
-		___initramfs_start = .;
-		*(.init.ramfs)
-		. = ALIGN(4);
-		___initramfs_end = .;
-	}
-
 	__l1_lma_start = .;
 
-	.text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
+	.text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data))
 	{
 		. = ALIGN(4);
 		__stext_l1 = .;
-- 
1.6.3.3


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

* Re: [PATCH v2] blackfin: Cleanup linker script using new linker script macros.
  2009-09-22 17:10 ` [PATCH v2] blackfin: Cleanup linker script using new linker script macros Tim Abbott
@ 2009-09-23 17:41   ` Sam Ravnborg
  0 siblings, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2009-09-23 17:41 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Mike Frysinger, uclinux-dist-devel, linux-kernel,
	Bryan Wu, Mike Frysinger

On Tue, Sep 22, 2009 at 01:10:02PM -0400, Tim Abbott wrote:
> Signed-off-by: Tim Abbott <tabbott@ksplice.com>
> Cc: Bryan Wu <cooloney@kernel.org>
> Cc: uclinux-dist-devel@blackfin.uclinux.org
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>

Looks good.
Acked-by: Sam Ravnborg <sam@ravnborg.org>

	Sam

> ---
>  arch/blackfin/kernel/vmlinux.lds.S |   56 ++++--------------------------------
>  1 files changed, 6 insertions(+), 50 deletions(-)
> 
> diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
> index 21ac7c2..ffd90fb 100644
> --- a/arch/blackfin/kernel/vmlinux.lds.S
> +++ b/arch/blackfin/kernel/vmlinux.lds.S
> @@ -96,8 +96,7 @@ SECTIONS
>  	{
>  		__sdata = .;
>  		/* This gets done first, so the glob doesn't suck it in */
> -		. = ALIGN(32);
> -		*(.data.cacheline_aligned)
> +		CACHELINE_ALIGNED_DATA(32)
>  
>  #if !L1_DATA_A_LENGTH
>  		. = ALIGN(32);
> @@ -116,12 +115,7 @@ SECTIONS
>  		DATA_DATA
>  		CONSTRUCTORS
>  
> -		/* make sure the init_task is aligned to the
> -		 * kernel thread size so we can locate the kernel
> -		 * stack properly and quickly.
> -		 */
> -		. = ALIGN(THREAD_SIZE);
> -		*(.init_task.data)
> +		INIT_TASK_DATA(THREAD_SIZE)
>  
>  		__edata = .;
>  	}
> @@ -134,39 +128,10 @@ SECTIONS
>  	. = ALIGN(PAGE_SIZE);
>  	___init_begin = .;
>  
> -	.init.text :
> -	{
> -		. = ALIGN(PAGE_SIZE);
> -		__sinittext = .;
> -		INIT_TEXT
> -		__einittext = .;
> -	}
> -	.init.data :
> -	{
> -		. = ALIGN(16);
> -		INIT_DATA
> -	}
> -	.init.setup :
> -	{
> -		. = ALIGN(16);
> -		___setup_start = .;
> -		*(.init.setup)
> -		___setup_end = .;
> -	}
> -	.initcall.init :
> -	{
> -		___initcall_start = .;
> -		INITCALLS
> -		___initcall_end = .;
> -	}
> -	.con_initcall.init :
> -	{
> -		___con_initcall_start = .;
> -		*(.con_initcall.init)
> -		___con_initcall_end = .;
> -	}
> +	INIT_TEXT_SECTION(PAGE_SIZE)
> +	. = ALIGN(16);
> +	INIT_DATA_SECTION(16)
>  	PERCPU(4)
> -	SECURITY_INIT
>  
>  	/* we have to discard exit text and such at runtime, not link time, to
>  	 * handle embedded cross-section references (alt instructions, bug
> @@ -181,18 +146,9 @@ SECTIONS
>  		EXIT_DATA
>  	}
>  
> -	.init.ramfs :
> -	{
> -		. = ALIGN(4);
> -		___initramfs_start = .;
> -		*(.init.ramfs)
> -		. = ALIGN(4);
> -		___initramfs_end = .;
> -	}
> -
>  	__l1_lma_start = .;
>  
> -	.text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
> +	.text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data))
>  	{
>  		. = ALIGN(4);
>  		__stext_l1 = .;
> -- 
> 1.6.3.3

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

end of thread, other threads:[~2009-09-23 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-22 17:10 [PATCH v2] Linker script cleanup for blackfin Tim Abbott
2009-09-22 17:10 ` [PATCH v2] blackfin: Cleanup linker script using new linker script macros Tim Abbott
2009-09-23 17:41   ` Sam Ravnborg

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

all inboxes | Powered by JetHome®