Skip to contentSkip to conversation

powerpc: fix skipping call to early_init_fdt_scan_reserved_mem

PATCH In review Rob Herring 2 participants 2 messages Apr 30, 2014 – May 12, 2014 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: fix skipping call to early_init_fdt_scan_reserved_mem

From: Rob Herring <[email protected]>

The call to early_init_fdt_scan_reserved_mem will be skipped if reserved-ranges is not found. Move the call earlier so that it is called unconditionally.

Cc Marek Szyprowski <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc linuxppc-dev-uLR06cmDAlY/[email protected]

---
I found this issue in testing of my fdt clean-up series (thanks to Stephen). Since the reserved memory support is new, I don't think it is critical to fix this for 3.15. I plan to include this with my fdt series for 3.16 unless I hear otherwise.

Rob

 arch/powerpc/kernel/prom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/prom.c +2 -2
index 668aa47..d657549 100644
@@ -567,6 +567,8 @@ static void __init early_reserve_mem_dt(void)
 	unsigned long i, len, dt_root;
 	const __be32 *prop;
 
+	early_init_fdt_scan_reserved_mem();
+
 	dt_root = of_get_flat_dt_root();
 
 	prop = of_get_flat_dt_prop(dt_root, "reserved-ranges", &len);
@@ -589,8 +591,6 @@ static void __init early_reserve_mem_dt(void)
 			memblock_reserve(base, size);
 		}
 	}
-
-	early_init_fdt_scan_reserved_mem();
 }
 
 static void __init early_reserve_mem(void)
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Rob Herring

From: Rob Herring <[email protected]>

The call to early_init_fdt_scan_reserved_mem will be skipped if reserved-ranges is not found. Move the call earlier so that it is called unconditionally.

Cc Marek Szyprowski <[email protected]>
Quoted 8 lines

---
I found this issue in testing of my fdt clean-up series (thanks to Stephen). Since the reserved memory support is new, I don't think it is critical to fix this for 3.15. I plan to include this with my fdt series for 3.16 unless I hear otherwise.

Sure, go for it.

Cheers,
Ben.

Quoted 27 lines

Rob

 arch/powerpc/kernel/prom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/prom.c +2 -2
index 668aa47..d657549 100644
@@ -567,6 +567,8 @@ static void __init early_reserve_mem_dt(void)
 	unsigned long i, len, dt_root;
 	const __be32 *prop;
 
+	early_init_fdt_scan_reserved_mem();
+
 	dt_root = of_get_flat_dt_root();
 
 	prop = of_get_flat_dt_prop(dt_root, "reserved-ranges", &len);
@@ -589,8 +591,6 @@ static void __init early_reserve_mem_dt(void)
 			memblock_reserve(base, size);
 		}
 	}
-
-	early_init_fdt_scan_reserved_mem();
 }
 
 static void __init early_reserve_mem(void)