mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] section name cleanup for xtensa
@ 2009-05-01  0:00 Tim Abbott
  2009-05-01  0:00 ` [PATCH 1/3] xtensa: Use macros for .bss.page_aligned section Tim Abbott
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-05-01  0:00 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Chris Zankel, Tim Abbott

This patch series cleans up the section names on the xtensa
architecture.  It requires the architecture-independent macro
definitions from this patch series:

<http://www.spinics.net/lists/mips/msg33499.html>

The long-term goal here is to add support for building the kernel with
-ffunction-sections -fdata-sections.  This requires renaming all the
magic section names in the kernel of the form .text.foo, .data.foo,
.bss.foo, and .rodata.foo to not have collisions with sections
generated for code like:

static int nosave = 0; /* -fdata-sections places in .data.nosave */
static void head(); /* -ffunction-sections places in .text.head */

Note that these patches have not been boot-tested (aside from testing
the analogous changes on x86), since I don't have access to the
appropriate hardware.

	-Tim Abbott


Tim Abbott (3):
  xtensa: Use macros for .bss.page_aligned section.
  xtensa: use new macro for .data.cacheline_aligned section.
  xtensa: use new macros for .data.init_task.

 arch/xtensa/kernel/head.S        |    2 +-
 arch/xtensa/kernel/init_task.c   |    3 +--
 arch/xtensa/kernel/vmlinux.lds.S |   10 +++-------
 3 files changed, 5 insertions(+), 10 deletions(-)


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

* [PATCH 1/3] xtensa: Use macros for .bss.page_aligned section.
  2009-05-01  0:00 [PATCH 0/3] section name cleanup for xtensa Tim Abbott
@ 2009-05-01  0:00 ` Tim Abbott
  2009-05-01  0:00   ` [PATCH 2/3] xtensa: use new macro for .data.cacheline_aligned section Tim Abbott
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-05-01  0:00 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Chris Zankel, Tim Abbott

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Chris Zankel <chris@zankel.net>
---
 arch/xtensa/kernel/head.S        |    2 +-
 arch/xtensa/kernel/vmlinux.lds.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index d9ddc1b..d215adc 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -235,7 +235,7 @@ should_never_return:
  * BSS section
  */
 	
-.section ".bss.page_aligned", "w"
+__PAGE_ALIGNED_BSS
 #ifdef CONFIG_MMU
 ENTRY(swapper_pg_dir)
 	.fill	PAGE_SIZE, 1, 0
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index 5accf51..f96f354 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -262,7 +262,7 @@ SECTIONS
 
   /* BSS section */
   _bss_start = .;
-  .bss : { *(.bss.page_aligned) *(.bss) }
+  .bss : { PAGE_ALIGNED_BSS *(.bss) }
   _bss_end = .;
 
   _end = .;
-- 
1.6.2.1


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

* [PATCH 2/3] xtensa: use new macro for .data.cacheline_aligned section.
  2009-05-01  0:00 ` [PATCH 1/3] xtensa: Use macros for .bss.page_aligned section Tim Abbott
@ 2009-05-01  0:00   ` Tim Abbott
  2009-05-01  0:00     ` [PATCH 3/3] xtensa: use new macros for .data.init_task Tim Abbott
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-05-01  0:00 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Chris Zankel, Tim Abbott

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Chris Zankel <chris@zankel.net>
---
 arch/xtensa/kernel/vmlinux.lds.S |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index f96f354..165a980 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -123,8 +123,7 @@ SECTIONS
   {
     DATA_DATA
     CONSTRUCTORS
-    . = ALIGN(XCHAL_ICACHE_LINESIZE);
-    *(.data.cacheline_aligned)
+    CACHELINE_ALIGNED_DATA(XCHAL_ICACHE_LINESIZE)
   }
 
   _edata = .;
-- 
1.6.2.1


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

* [PATCH 3/3] xtensa: use new macros for .data.init_task.
  2009-05-01  0:00   ` [PATCH 2/3] xtensa: use new macro for .data.cacheline_aligned section Tim Abbott
@ 2009-05-01  0:00     ` Tim Abbott
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Abbott @ 2009-05-01  0:00 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
	Denys Vlasenko, Jeff Arnold, Chris Zankel, Tim Abbott

.data.init_task should not need a separate output section; this change
moves it into the .data section.  Also replace aligment of 8192 with
THREAD_SIZE (=8192).

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Chris Zankel <chris@zankel.net>
---
 arch/xtensa/kernel/init_task.c   |    3 +--
 arch/xtensa/kernel/vmlinux.lds.S |    5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c
index e07f5c9..dfda282 100644
--- a/arch/xtensa/kernel/init_task.c
+++ b/arch/xtensa/kernel/init_task.c
@@ -27,8 +27,7 @@ struct mm_struct init_mm = INIT_MM(init_mm);
 
 EXPORT_SYMBOL(init_mm);
 
-union thread_union init_thread_union
-	__attribute__((__section__(".data.init_task"))) =
+union thread_union init_thread_union __init_task_data =
 { INIT_THREAD_INFO(init_task) };
 
 struct task_struct init_task = INIT_TASK(init_task);
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index 165a980..3eacf74 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -121,6 +121,7 @@ SECTIONS
   _fdata = .;
   .data :
   {
+    INIT_TASK_DATA(THREAD_SIZE)
     DATA_DATA
     CONSTRUCTORS
     CACHELINE_ALIGNED_DATA(XCHAL_ICACHE_LINESIZE)
@@ -128,10 +129,6 @@ SECTIONS
 
   _edata = .;
 
-  /* The initial task */
-  . = ALIGN(8192);
-  .data.init_task : { *(.data.init_task) }
-
   /* Initialization code and data: */
 
   . = ALIGN(1 << 12);
-- 
1.6.2.1


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

end of thread, other threads:[~2009-05-01  0:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-01  0:00 [PATCH 0/3] section name cleanup for xtensa Tim Abbott
2009-05-01  0:00 ` [PATCH 1/3] xtensa: Use macros for .bss.page_aligned section Tim Abbott
2009-05-01  0:00   ` [PATCH 2/3] xtensa: use new macro for .data.cacheline_aligned section Tim Abbott
2009-05-01  0:00     ` [PATCH 3/3] xtensa: use new macros for .data.init_task Tim Abbott

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®