[RFC 06/10] powerpc: vmlinux.lds.S cleanup - use PERCPU, THREAD_SIZE macroses

From: gorcunov
Date: Wed Feb 27 2008 - 16:02:17 EST


This patch includes thread_info.h header into liker script that
allow us to use THREAD_SIZE macro instead of numeric constant

Also PERCPU macro is used instead of explicit section definition

Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
---

WARNING: COMPLETELY UNTESTED !!!

vmlinux.lds.S | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

Index: linux-2.6.git/arch/powerpc/kernel/vmlinux.lds.S
===================================================================
--- linux-2.6.git.orig/arch/powerpc/kernel/vmlinux.lds.S 2008-01-29 18:03:46.000000000 +0300
+++ linux-2.6.git/arch/powerpc/kernel/vmlinux.lds.S 2008-02-27 21:33:53.000000000 +0300
@@ -8,6 +8,7 @@
#endif
#include <asm-generic/vmlinux.lds.h>
#include <asm/cache.h>
+#include <asm/thread_info.h>

ENTRY(_stext)

@@ -145,13 +146,8 @@ SECTIONS
__initramfs_end = .;
}
#endif
- . = ALIGN(PAGE_SIZE);
- .data.percpu : {
- __per_cpu_start = .;
- *(.data.percpu)
- *(.data.percpu.shared_aligned)
- __per_cpu_end = .;
- }
+
+ PERCPU(PAGE_SIZE)

. = ALIGN(8);
.machine.desc : {
@@ -202,11 +198,7 @@ SECTIONS
PROVIDE32 (edata = .);

/* The initial task and kernel stack */
-#ifdef CONFIG_PPC32
- . = ALIGN(8192);
-#else
- . = ALIGN(16384);
-#endif
+ . = ALIGN(THREAD_SIZE);
.data.init_task : {
*(.data.init_task)
}

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/