Skip to contentSkip to conversation

xtensa: Flat DeviceTree copy not future-safe

PATCH New Max Filippov 1 participant 1 message Jun 24, 2013 1 message not in the archive Tensilica Xtensa port (xtensa)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Max Filippov

author maintainer
#1 lore raw

PATCH 5/6 xtensa: Flat DeviceTree copy not future-safe

From: Vineet Gupta <[email protected]>

flat DT copy code calls bootmem allocator with @align = 0. This is probably OK with legacy allocator which xtensa uses right now, but this will panic right away with memblock allocator

---
 arch/xtensa/kernel/setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/xtensa/kernel/setup.c +1 -1
index 14c6c3a..42a8bba 100644
@@ -256,7 +256,7 @@ void __init early_init_devtree(void *params)
 static void __init copy_devtree(void)
 {
 	void *alloc = early_init_dt_alloc_memory_arch(
-			be32_to_cpu(initial_boot_params->totalsize), 0);
+			be32_to_cpu(initial_boot_params->totalsize), 8);
 	if (alloc) {
 		memcpy(alloc, initial_boot_params,
 				be32_to_cpu(initial_boot_params->totalsize));
Signature · 1 line
1.7.7.6