* [PATCH 0/3] section name cleanup for m32r
@ 2009-04-30 23:47 Tim Abbott
2009-04-30 23:47 ` [PATCH 1/3] m32r: use NOSAVE_DATA macro for .data.nosave section Tim Abbott
0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-04-30 23:47 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
Denys Vlasenko, Jeff Arnold, Hirokazu Takata, Tim Abbott
This patch series cleans up the section names on the m32r
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):
m32r: use NOSAVE_DATA macro for .data.nosave section.
m32r: use new macro for .data.cacheline_aligned section.
m32r: use new macros for .data.init_task.
arch/m32r/kernel/init_task.c | 3 +--
arch/m32r/kernel/vmlinux.lds.S | 16 +++-------------
2 files changed, 4 insertions(+), 15 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] m32r: use NOSAVE_DATA macro for .data.nosave section.
2009-04-30 23:47 [PATCH 0/3] section name cleanup for m32r Tim Abbott
@ 2009-04-30 23:47 ` Tim Abbott
2009-04-30 23:47 ` [PATCH 2/3] m32r: use new macro for .data.cacheline_aligned section Tim Abbott
0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-04-30 23:47 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
Denys Vlasenko, Jeff Arnold, Hirokazu Takata, Tim Abbott
This has the nice consequence of replacing the alignment of 4096 with
an alignment of PAGE_SIZE (=4096).
.data.nosave should not need a separate output section; this change
moves it into the .data section.
Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Hirokazu Takata <takata@linux-m32r.org>
---
arch/m32r/kernel/vmlinux.lds.S | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index 4179adf..1cfaff3 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -51,16 +51,11 @@ SECTIONS
.data : { /* Data */
*(.spu)
*(.spi)
+ NOSAVE_DATA
DATA_DATA
CONSTRUCTORS
}
- . = ALIGN(4096);
- __nosave_begin = .;
- .data_nosave : { *(.data.nosave) }
- . = ALIGN(4096);
- __nosave_end = .;
-
. = ALIGN(32);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
--
1.6.2.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/3] m32r: use new macro for .data.cacheline_aligned section.
2009-04-30 23:47 ` [PATCH 1/3] m32r: use NOSAVE_DATA macro for .data.nosave section Tim Abbott
@ 2009-04-30 23:47 ` Tim Abbott
2009-04-30 23:48 ` [PATCH 3/3] m32r: use new macros for .data.init_task Tim Abbott
0 siblings, 1 reply; 4+ messages in thread
From: Tim Abbott @ 2009-04-30 23:47 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
Denys Vlasenko, Jeff Arnold, Hirokazu Takata, Tim Abbott
.data.cacheline_aligned should not need a separate output section;
this change moves it into the .data section.
Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Hirokazu Takata <takata@linux-m32r.org>
---
arch/m32r/kernel/vmlinux.lds.S | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index 1cfaff3..3e2de1f 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -52,13 +52,10 @@ SECTIONS
*(.spu)
*(.spi)
NOSAVE_DATA
+ CACHELINE_ALIGNED_DATA(32)
DATA_DATA
CONSTRUCTORS
}
-
- . = ALIGN(32);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) }
-
_edata = .; /* End of data section */
. = ALIGN(8192); /* init_task */
--
1.6.2.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 3/3] m32r: use new macros for .data.init_task.
2009-04-30 23:47 ` [PATCH 2/3] m32r: use new macro for .data.cacheline_aligned section Tim Abbott
@ 2009-04-30 23:48 ` Tim Abbott
0 siblings, 0 replies; 4+ messages in thread
From: Tim Abbott @ 2009-04-30 23:48 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Linux kernel mailing list, Anders Kaseorg, Waseem Daher,
Denys Vlasenko, Jeff Arnold, Hirokazu Takata, Tim Abbott
Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Hirokazu Takata <takata@linux-m32r.org>
---
arch/m32r/kernel/init_task.c | 3 +--
arch/m32r/kernel/vmlinux.lds.S | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/m32r/kernel/init_task.c b/arch/m32r/kernel/init_task.c
index 016885c..a57c1e3 100644
--- a/arch/m32r/kernel/init_task.c
+++ b/arch/m32r/kernel/init_task.c
@@ -24,8 +24,7 @@ EXPORT_SYMBOL(init_mm);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-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) };
/*
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index 3e2de1f..655eaf1 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -51,6 +51,7 @@ SECTIONS
.data : { /* Data */
*(.spu)
*(.spi)
+ INIT_TASK_DATA(8192)
NOSAVE_DATA
CACHELINE_ALIGNED_DATA(32)
DATA_DATA
@@ -58,9 +59,6 @@ SECTIONS
}
_edata = .; /* End of data section */
- . = ALIGN(8192); /* init_task */
- .data.init_task : { *(.data.init_task) }
-
/* will be freed after init */
. = ALIGN(4096); /* Init code and data */
__init_begin = .;
--
1.6.2.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-30 23:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30 23:47 [PATCH 0/3] section name cleanup for m32r Tim Abbott
2009-04-30 23:47 ` [PATCH 1/3] m32r: use NOSAVE_DATA macro for .data.nosave section Tim Abbott
2009-04-30 23:47 ` [PATCH 2/3] m32r: use new macro for .data.cacheline_aligned section Tim Abbott
2009-04-30 23:48 ` [PATCH 3/3] m32r: 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®