diff options
author | Simon Horman <horms@verge.net.au> | 2011-09-15 20:13:00 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-10-28 15:03:43 +0900 |
commit | e66ac3f26aef131f5ca60350d25fba95f43acd0d (patch) | |
tree | 480337b09468bb5e8d1660c218d04a1a63b940e3 /arch/sh/mm | |
parent | d11584a0449f881181dc94dd697d3f3896c15c73 (diff) | |
download | op-kernel-dev-e66ac3f26aef131f5ca60350d25fba95f43acd0d.zip op-kernel-dev-e66ac3f26aef131f5ca60350d25fba95f43acd0d.tar.gz |
sh: kexec: Add PHYSICAL_START
Add PHYSICAL_START kernel configuration parameter to set the address at
which the kernel should be loaded.
It has been observed on an sh7757lcr that simply modifying MEMORY_START
does not achieve this goal for 32bit sh. This is due to MEMORY_OFFSET in
arch/sh/kernel/vmlinux.lds.S bot being based on MEMORY_START on such
systems.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r-- | arch/sh/mm/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 58a93fb3..c9dbace 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -287,6 +287,8 @@ static void __init do_init_bootmem(void) static void __init early_reserve_mem(void) { unsigned long start_pfn; + u32 zero_base = (u32)__MEMORY_START + (u32)PHYSICAL_OFFSET; + u32 start = zero_base + (u32)CONFIG_ZERO_PAGE_OFFSET; /* * Partially used pages are not usable - thus @@ -300,15 +302,13 @@ static void __init early_reserve_mem(void) * this catches the (definitely buggy) case of us accidentally * initializing the bootmem allocator with an invalid RAM area. */ - memblock_reserve(__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET, - (PFN_PHYS(start_pfn) + PAGE_SIZE - 1) - - (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET)); + memblock_reserve(start, (PFN_PHYS(start_pfn) + PAGE_SIZE - 1) - start); /* * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET. */ if (CONFIG_ZERO_PAGE_OFFSET != 0) - memblock_reserve(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET); + memblock_reserve(zero_base, CONFIG_ZERO_PAGE_OFFSET); /* * Handle additional early reservations |