2009-04-30 23:53:52

by Tim Abbott

[permalink] [raw]
Subject: [PATCH 0/2] section name cleanup for m68knommu

This patch series cleans up the section names on the m68knommu
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 (2):
m68knommu: use new macro for .data.cacheline_aligned section.
m68knommu: use new macros for .data.init_task.

arch/m68knommu/kernel/init_task.c | 3 +--
arch/m68knommu/kernel/vmlinux.lds.S | 6 ++----
2 files changed, 3 insertions(+), 6 deletions(-)


2009-04-30 23:57:04

by Tim Abbott

[permalink] [raw]
Subject: [PATCH 2/2] m68knommu: use new macros for .data.init_task.

Signed-off-by: Tim Abbott <[email protected]>
Cc: Greg Ungerer <[email protected]>
---
arch/m68knommu/kernel/init_task.c | 3 +--
arch/m68knommu/kernel/vmlinux.lds.S | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/m68knommu/kernel/init_task.c b/arch/m68knommu/kernel/init_task.c
index fe282de..8b81092 100644
--- a/arch/m68knommu/kernel/init_task.c
+++ b/arch/m68knommu/kernel/init_task.c
@@ -35,7 +35,6 @@ EXPORT_SYMBOL(init_task);
* 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/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index f5154d9..9616d7a 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -146,10 +146,9 @@ SECTIONS {
.data DATA_ADDR : {
. = ALIGN(4);
_sdata = . ;
+ INIT_TASK_DATA(8192)
DATA_DATA
CACHELINE_ALIGNED_DATA(32)
- . = ALIGN(8192) ;
- *(.data.init_task)
_edata = . ;
} > DATA

--
1.6.2.1

2009-05-01 00:02:20

by Tim Abbott

[permalink] [raw]
Subject: [PATCH 1/2] m68knommu: use new macro for .data.cacheline_aligned section.

Signed-off-by: Tim Abbott <[email protected]>
Cc: Greg Ungerer <[email protected]>
---
arch/m68knommu/kernel/vmlinux.lds.S | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index b7fe505..f5154d9 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -147,8 +147,7 @@ SECTIONS {
. = ALIGN(4);
_sdata = . ;
DATA_DATA
- . = ALIGN(32);
- *(.data.cacheline_aligned)
+ CACHELINE_ALIGNED_DATA(32)
. = ALIGN(8192) ;
*(.data.init_task)
_edata = . ;
--
1.6.2.1