]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[AVR32] Kill a few hardcoded constants in vmlinux.lds
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Mon, 17 Sep 2007 09:08:28 +0000 (11:08 +0200)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Thu, 11 Oct 2007 10:16:56 +0000 (12:16 +0200)
Use PAGE_SIZE, THREAD_SIZE and L1_CACHE_BYTES instead of harcoded
constants in places where that's what we really mean.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
arch/avr32/kernel/vmlinux.lds.S

index db0438f35c0066b8776df3c326e8de8ec6402427..fef0e6d322f107f47ca5c945c109b95af43a11a7 100644 (file)
@@ -9,6 +9,8 @@
  */
 #define LOAD_OFFSET 0x00000000
 #include <asm-generic/vmlinux.lds.h>
+#include <asm/cache.h>
+#include <asm/thread_info.h>
 
 OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
 OUTPUT_ARCH(avr32)
@@ -58,7 +60,7 @@ SECTIONS
                        *(.init.ramfs)
                __initramfs_end = .;
 #endif
-               . = ALIGN(4096);
+               . = ALIGN(PAGE_SIZE);
                __init_end = .;
        }
 
@@ -96,7 +98,7 @@ SECTIONS
 
        RODATA
 
-       . = ALIGN(8192);
+       . = ALIGN(THREAD_SIZE);
 
        .data           : AT(ADDR(.data) - LOAD_OFFSET) {
                _data = .;
@@ -107,7 +109,7 @@ SECTIONS
                *(.data.init_task)
 
                /* Then, the cacheline aligned data */
-               . = ALIGN(32);
+               . = ALIGN(L1_CACHE_BYTES);
                *(.data.cacheline_aligned)
 
                /* And the rest... */