diff options
author | Becky Bruce <beckyb@kernel.crashing.org> | 2009-05-08 08:19:27 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-15 02:43:41 -0400 |
commit | 49a849652513235a244dfbf5e58c54f796bd1148 (patch) | |
tree | 809fe33bad6255fab153fb5a7f03170150ab88c7 /arch/powerpc/kernel/prom.c | |
parent | 31207dab7d2e63795eb15823947bd2f7025b08e2 (diff) |
powerpc: Allow mem=x cmdline to work with 4G+
We're currently choking on mem=4g (and above) due to memory_limit
being specified as an unsigned long. Make memory_limit
phys_addr_t to fix this.
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 5ec6a9e23933..ce01ff2474da 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -426,7 +426,7 @@ static int __init early_parse_mem(char *p) | |||
426 | return 1; | 426 | return 1; |
427 | 427 | ||
428 | memory_limit = PAGE_ALIGN(memparse(p, &p)); | 428 | memory_limit = PAGE_ALIGN(memparse(p, &p)); |
429 | DBG("memory limit = 0x%lx\n", memory_limit); | 429 | DBG("memory limit = 0x%llx\n", (unsigned long long)memory_limit); |
430 | 430 | ||
431 | return 0; | 431 | return 0; |
432 | } | 432 | } |
@@ -1160,7 +1160,7 @@ static inline void __init phyp_dump_reserve_mem(void) {} | |||
1160 | 1160 | ||
1161 | void __init early_init_devtree(void *params) | 1161 | void __init early_init_devtree(void *params) |
1162 | { | 1162 | { |
1163 | unsigned long limit; | 1163 | phys_addr_t limit; |
1164 | 1164 | ||
1165 | DBG(" -> early_init_devtree(%p)\n", params); | 1165 | DBG(" -> early_init_devtree(%p)\n", params); |
1166 | 1166 | ||
@@ -1204,7 +1204,7 @@ void __init early_init_devtree(void *params) | |||
1204 | 1204 | ||
1205 | limit = memory_limit; | 1205 | limit = memory_limit; |
1206 | if (! limit) { | 1206 | if (! limit) { |
1207 | unsigned long memsize; | 1207 | phys_addr_t memsize; |
1208 | 1208 | ||
1209 | /* Ensure that total memory size is page-aligned, because | 1209 | /* Ensure that total memory size is page-aligned, because |
1210 | * otherwise mark_bootmem() gets upset. */ | 1210 | * otherwise mark_bootmem() gets upset. */ |
@@ -1218,7 +1218,7 @@ void __init early_init_devtree(void *params) | |||
1218 | lmb_analyze(); | 1218 | lmb_analyze(); |
1219 | lmb_dump_all(); | 1219 | lmb_dump_all(); |
1220 | 1220 | ||
1221 | DBG("Phys. mem: %lx\n", lmb_phys_mem_size()); | 1221 | DBG("Phys. mem: %llx\n", lmb_phys_mem_size()); |
1222 | 1222 | ||
1223 | /* We may need to relocate the flat tree, do it now. | 1223 | /* We may need to relocate the flat tree, do it now. |
1224 | * FIXME .. and the initrd too? */ | 1224 | * FIXME .. and the initrd too? */ |