]> err.no Git - linux-2.6/commitdiff
[POWERPC] Clean up some linker and symbol usage
authorKumar Gala <galak@kernel.crashing.org>
Tue, 15 Apr 2008 19:52:26 +0000 (05:52 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 16 Apr 2008 21:46:13 +0000 (07:46 +1000)
* PAGE_OFFSET is not always the start of code, use _stext instead.
* grab PAGE_SIZE and KERNELBASE from asm/page.h like ppc64 does.  Makes the
  code a bit more common and provide a single place to manipulate the
  defines for things like kdump.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/vmlinux.lds.S

index eac936eb3190f165d75a5b4bbc36ead6ad7b52a4..d813c394f0ff829f24b026d75334444e7d25838e 100644 (file)
@@ -289,7 +289,7 @@ void __init setup_arch(char **cmdline_p)
        if (ppc_md.panic)
                setup_panic();
 
-       init_mm.start_code = PAGE_OFFSET;
+       init_mm.start_code = (unsigned long)_stext;
        init_mm.end_code = (unsigned long) _etext;
        init_mm.end_data = (unsigned long) _edata;
        init_mm.brk = klimit;
index 2c2d8315193ce438bdb83b9df07b4434e29f7ca4..0205d408d2edaf5a91f0e280216677aaafae88a6 100644 (file)
@@ -510,7 +510,7 @@ void __init setup_arch(char **cmdline_p)
        if (ppc_md.panic)
                setup_panic();
 
-       init_mm.start_code = PAGE_OFFSET;
+       init_mm.start_code = (unsigned long)_stext;
        init_mm.end_code = (unsigned long) _etext;
        init_mm.end_data = (unsigned long) _edata;
        init_mm.brk = klimit;
index 0afb9e31d2a008a79f1b5a4d2ff70d8dc798a458..b5a76bcd95a6437b76630589b9f0d9740877db53 100644 (file)
@@ -1,11 +1,9 @@
 #ifdef CONFIG_PPC64
-#include <asm/page.h>
 #define PROVIDE32(x)   PROVIDE(__unused__##x)
 #else
-#define PAGE_SIZE      4096
-#define KERNELBASE     CONFIG_KERNEL_START
 #define PROVIDE32(x)   PROVIDE(x)
 #endif
+#include <asm/page.h>
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/cache.h>