aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 8b5efbce8d90..eac97f48b9b8 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -865,12 +865,12 @@ static int __init early_init_dt_scan_root(unsigned long node,
865 return 1; 865 return 1;
866} 866}
867 867
868static unsigned long __init dt_mem_next_cell(int s, cell_t **cellp) 868static u64 __init dt_mem_next_cell(int s, cell_t **cellp)
869{ 869{
870 cell_t *p = *cellp; 870 cell_t *p = *cellp;
871 871
872 *cellp = p + s; 872 *cellp = p + s;
873 return of_read_ulong(p, s); 873 return of_read_number(p, s);
874} 874}
875 875
876#ifdef CONFIG_PPC_PSERIES 876#ifdef CONFIG_PPC_PSERIES
@@ -883,8 +883,8 @@ static unsigned long __init dt_mem_next_cell(int s, cell_t **cellp)
883static int __init early_init_dt_scan_drconf_memory(unsigned long node) 883static int __init early_init_dt_scan_drconf_memory(unsigned long node)
884{ 884{
885 cell_t *dm, *ls; 885 cell_t *dm, *ls;
886 unsigned long l, n; 886 unsigned long l, n, flags;
887 unsigned long base, size, lmb_size, flags; 887 u64 base, size, lmb_size;
888 888
889 ls = (cell_t *)of_get_flat_dt_prop(node, "ibm,lmb-size", &l); 889 ls = (cell_t *)of_get_flat_dt_prop(node, "ibm,lmb-size", &l);
890 if (ls == NULL || l < dt_root_size_cells * sizeof(cell_t)) 890 if (ls == NULL || l < dt_root_size_cells * sizeof(cell_t))
@@ -959,14 +959,15 @@ static int __init early_init_dt_scan_memory(unsigned long node,
959 uname, l, reg[0], reg[1], reg[2], reg[3]); 959 uname, l, reg[0], reg[1], reg[2], reg[3]);
960 960
961 while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) { 961 while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
962 unsigned long base, size; 962 u64 base, size;
963 963
964 base = dt_mem_next_cell(dt_root_addr_cells, &reg); 964 base = dt_mem_next_cell(dt_root_addr_cells, &reg);
965 size = dt_mem_next_cell(dt_root_size_cells, &reg); 965 size = dt_mem_next_cell(dt_root_size_cells, &reg);
966 966
967 if (size == 0) 967 if (size == 0)
968 continue; 968 continue;
969 DBG(" - %lx , %lx\n", base, size); 969 DBG(" - %llx , %llx\n", (unsigned long long)base,
970 (unsigned long long)size);
970#ifdef CONFIG_PPC64 971#ifdef CONFIG_PPC64
971 if (iommu_is_off) { 972 if (iommu_is_off) {
972 if (base >= 0x80000000ul) 973 if (base >= 0x80000000ul)