Skip to content

Commit

Permalink
[POWERPC] Clean up some linker and symbol usage
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Kumar Gala authored and Paul Mackerras committed Apr 16, 2008
1 parent 09b5e63 commit 4846c5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 1 addition & 3 deletions arch/powerpc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
@@ -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>

Expand Down

0 comments on commit 4846c5d

Please sign in to comment.