aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/init.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-03 11:22:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-03 11:22:06 -0400
commitcf0223503e6198292cdcc864e01eeb5fe7490752 (patch)
tree5ed99ae5fc7a67ec19df19f4b46b0c04d97db174 /arch/sh/mm/init.c
parent3f8ddb032afa729d4bad1bf2965d3ec068de6b72 (diff)
parente857bfd4604a3a4edaf9c7038db880d9f78aecbd (diff)
Merge branch 'sh-latest' of git://github.com/pmundt/linux-sh
* 'sh-latest' of git://github.com/pmundt/linux-sh: sh: Add default uImage rule for sh7757lcr sh: modify the asm/sh_eth.h to linux/sh_eth.h in sh7757lcr sh: userimask.c needs linux/stat.h sh: pfc: Add GPIO IRQ support sh: modify the asm/sh_eth.h to linux/sh_eth.h in some boards sh: pfc: Remove unused gpio_in_use member sh: add parameters for EHCI and RIIC in clock-sh7757.c sh: kexec: Add PHYSICAL_START SH: irq: Remove IRQF_DISABLED sh: pfc: get_config_reg() shift clean up sh: intc: Add IRQ trigger bit field check sh: drop unused Kconfig symbol sh: Fix implicit declaration of function numa_node_id sh: kexec: Register crashk_res sh: ecovec: add renesas_usbhs DMAEngine support
Diffstat (limited to 'arch/sh/mm/init.c')
-rw-r--r--arch/sh/mm/init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 58a93fb3d965..c9dbace35b16 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -287,6 +287,8 @@ static void __init do_init_bootmem(void)
287static void __init early_reserve_mem(void) 287static void __init early_reserve_mem(void)
288{ 288{
289 unsigned long start_pfn; 289 unsigned long start_pfn;
290 u32 zero_base = (u32)__MEMORY_START + (u32)PHYSICAL_OFFSET;
291 u32 start = zero_base + (u32)CONFIG_ZERO_PAGE_OFFSET;
290 292
291 /* 293 /*
292 * Partially used pages are not usable - thus 294 * Partially used pages are not usable - thus
@@ -300,15 +302,13 @@ static void __init early_reserve_mem(void)
300 * this catches the (definitely buggy) case of us accidentally 302 * this catches the (definitely buggy) case of us accidentally
301 * initializing the bootmem allocator with an invalid RAM area. 303 * initializing the bootmem allocator with an invalid RAM area.
302 */ 304 */
303 memblock_reserve(__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET, 305 memblock_reserve(start, (PFN_PHYS(start_pfn) + PAGE_SIZE - 1) - start);
304 (PFN_PHYS(start_pfn) + PAGE_SIZE - 1) -
305 (__MEMORY_START + CONFIG_ZERO_PAGE_OFFSET));
306 306
307 /* 307 /*
308 * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET. 308 * Reserve physical pages below CONFIG_ZERO_PAGE_OFFSET.
309 */ 309 */
310 if (CONFIG_ZERO_PAGE_OFFSET != 0) 310 if (CONFIG_ZERO_PAGE_OFFSET != 0)
311 memblock_reserve(__MEMORY_START, CONFIG_ZERO_PAGE_OFFSET); 311 memblock_reserve(zero_base, CONFIG_ZERO_PAGE_OFFSET);
312 312
313 /* 313 /*
314 * Handle additional early reservations 314 * Handle additional early reservations