提交 4846c5de 编写于 作者: K Kumar Gala 提交者: Paul Mackerras

[POWERPC] Clean up some linker and symbol usage

* 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: NKumar Gala <galak@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 09b5e63f
...@@ -289,7 +289,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -289,7 +289,7 @@ void __init setup_arch(char **cmdline_p)
if (ppc_md.panic) if (ppc_md.panic)
setup_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_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata; init_mm.end_data = (unsigned long) _edata;
init_mm.brk = klimit; init_mm.brk = klimit;
......
...@@ -510,7 +510,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -510,7 +510,7 @@ void __init setup_arch(char **cmdline_p)
if (ppc_md.panic) if (ppc_md.panic)
setup_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_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata; init_mm.end_data = (unsigned long) _edata;
init_mm.brk = klimit; init_mm.brk = klimit;
......
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
#include <asm/page.h>
#define PROVIDE32(x) PROVIDE(__unused__##x) #define PROVIDE32(x) PROVIDE(__unused__##x)
#else #else
#define PAGE_SIZE 4096
#define KERNELBASE CONFIG_KERNEL_START
#define PROVIDE32(x) PROVIDE(x) #define PROVIDE32(x) PROVIDE(x)
#endif #endif
#include <asm/page.h>
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/cache.h> #include <asm/cache.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册