aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
authorSuzuki Poulose <suzuki@in.ibm.com>2012-08-20 21:42:33 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-06 21:44:30 -0400
commita84fcd46870113e92523e1ebb9a0ec75f66e03a2 (patch)
tree9d0616762fbd33f0ac448a5303c134b87d1c1aa2 /arch/powerpc/kernel/prom.c
parent0090e02b947c5de1cf978f52ac12c7b532e61154 (diff)
powerpc: Change memory_limit from phys_addr_t to unsigned long long
There are some device-tree nodes, whose values are of type phys_addr_t. The phys_addr_t is variable sized based on the CONFIG_PHSY_T_64BIT. Change these to a fixed unsigned long long for consistency. This patch does the change only for memory_limit. The following is a list of such variables which need the change: 1) kernel_end, crashk_size - in arch/powerpc/kernel/machine_kexec.c 2) (struct resource *)crashk_res.start - We could export a local static variable from machine_kexec.c. Changing the above values might break the kexec-tools. So, I will fix kexec-tools first to handle the different sized values and then change the above. Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index f191bf02943a..37725e86651e 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -78,7 +78,7 @@ static int __init early_parse_mem(char *p)
78 return 1; 78 return 1;
79 79
80 memory_limit = PAGE_ALIGN(memparse(p, &p)); 80 memory_limit = PAGE_ALIGN(memparse(p, &p));
81 DBG("memory limit = 0x%llx\n", (unsigned long long)memory_limit); 81 DBG("memory limit = 0x%llx\n", memory_limit);
82 82
83 return 0; 83 return 0;
84} 84}
@@ -661,7 +661,7 @@ void __init early_init_devtree(void *params)
661 661
662 /* make sure we've parsed cmdline for mem= before this */ 662 /* make sure we've parsed cmdline for mem= before this */
663 if (memory_limit) 663 if (memory_limit)
664 first_memblock_size = min(first_memblock_size, memory_limit); 664 first_memblock_size = min_t(u64, first_memblock_size, memory_limit);
665 setup_initial_memory_limit(memstart_addr, first_memblock_size); 665 setup_initial_memory_limit(memstart_addr, first_memblock_size);
666 /* Reserve MEMBLOCK regions used by kernel, initrd, dt, etc... */ 666 /* Reserve MEMBLOCK regions used by kernel, initrd, dt, etc... */
667 memblock_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START); 667 memblock_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START);