[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871s6erut1.fsf@concordia.ellerman.id.au>
Date: Wed, 19 Dec 2018 15:42:50 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Christophe Leroy <christophe.leroy@....fr>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc/prom: move the device tree if not in declared memory.
Christophe Leroy <christophe.leroy@....fr> writes:
> 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.
I worry this will break some obscure platform, but I'll merge it anyway
and we'll see :)
cheers
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 87a68e2dc531..4181ec715f88 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -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;
> --
> 2.13.3
Powered by blists - more mailing lists