MIPS: Pistachio: Enable KASLR
authorMatt Redfearn <matt.redfearn@imgtec.com>
Wed, 25 May 2016 11:58:40 +0000 (12:58 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 28 May 2016 10:35:11 +0000 (12:35 +0200)
Allow KASLR to be selected on Pistachio based systems. Tested on a
Creator Ci40.

Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: Jonas Gorski <jogo@openwrt.org>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13356/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Kconfig
arch/mips/pistachio/init.c

index ac9bfad794ebf1d571fbfb0202033fc773dc83e9..7ce55623b5227f949d047fb1c2f4624c4f0737a0 100644 (file)
@@ -399,6 +399,7 @@ config MACH_PISTACHIO
        select SYS_SUPPORTS_LITTLE_ENDIAN
        select SYS_SUPPORTS_MIPS_CPS
        select SYS_SUPPORTS_MULTITHREADING
+       select SYS_SUPPORTS_RELOCATABLE
        select SYS_SUPPORTS_ZBOOT
        select SYS_HAS_EARLY_PRINTK
        select USE_GENERIC_EARLY_PRINTK_8250
index 956c92eabfaba73cad83ab35539fd8b166ca502e..ab79828230ab3e53fc0e2b25e6d33d81eacd9f91 100644 (file)
@@ -83,12 +83,16 @@ static void __init plat_setup_iocoherency(void)
        }
 }
 
-void __init plat_mem_setup(void)
+void __init *plat_get_fdt(void)
 {
        if (fw_arg0 != -2)
                panic("Device-tree not present");
+       return (void *)fw_arg1;
+}
 
-       __dt_setup_arch((void *)fw_arg1);
+void __init plat_mem_setup(void)
+{
+       __dt_setup_arch(plat_get_fdt());
 
        plat_setup_iocoherency();
 }