]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: generic: Fix KASLR for generic kernel.
authorMatt Redfearn <matt.redfearn@imgtec.com>
Mon, 17 Oct 2016 16:25:24 +0000 (17:25 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 3 Nov 2016 23:32:06 +0000 (00:32 +0100)
commita3642c18bb0f0f557d837986edc0b75288fdd5ed
treec74bb639bcb32b6ca2ce0661481095f9c81e4d85
parent4784ee16f78d152b537fca5b935a53def877330e
MIPS: generic: Fix KASLR for generic kernel.

The KASLR code requires that the plat_get_fdt() function return the
address of the device tree, and it must be available early in the boot,
before prom_init() is called. Move the code determining the address of
the device tree into plat_get_fdt, and call that from prom_init().

The fdt pointer will be set up by plat_get_fdt() called from
relocate_kernel initially and once the relocated kernel has started,
prom_init() will use it again to determine the address in the relocated
image.

Fixes: 2dac284e52af ("MIPS: generic: Introduce generic DT-based board support")
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14415/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/generic/init.c