mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-03 15:55:38 +00:00
powerpc/prom: move the device tree if not in declared memory.
If the device tree doesn't reside in the memory which is declared inside it, it has to be moved as well as this memory will not be mapped by the kernel. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
ec2adcd8dd
commit
f242e0ac95
1 changed files with 2 additions and 2 deletions
|
@ -124,8 +124,8 @@ static void __init move_device_tree(void)
|
|||
size = fdt_totalsize(initial_boot_params);
|
||||
|
||||
if ((memory_limit && (start + size) > PHYSICAL_START + memory_limit) ||
|
||||
overlaps_crashkernel(start, size) ||
|
||||
overlaps_initrd(start, size)) {
|
||||
!memblock_is_memory(start + size - 1) ||
|
||||
overlaps_crashkernel(start, size) || overlaps_initrd(start, size)) {
|
||||
p = __va(memblock_phys_alloc(size, PAGE_SIZE));
|
||||
memcpy(p, initial_boot_params, size);
|
||||
initial_boot_params = p;
|
||||
|
|
Loading…
Add table
Reference in a new issue