]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: add mcd_on_by_default
authorChuck Anderson <chuck.anderson@oracle.com>
Sat, 18 Feb 2017 06:15:35 +0000 (22:15 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 9 Mar 2017 03:30:15 +0000 (19:30 -0800)
Add the global variable mcd_on_by_default and support for the kernel boot arg
"mcd_on_by_default" which causes mcd_on_by_default = 1 if the kernel is
adi_capable().

Based on the code in commit:
    sparc64: Enable Application Data Integrity for m7 and newer processors
Required by commit:
    sparc64: Add proc files specific to ADI

Orabug: 22713162
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
arch/sparc/kernel/process_64.c

index 87a27fd5aa003d58e60f937626014b3f58e1cea8..6ea1a3ebe9c8ae841d7ae74b42950629dca81684 100644 (file)
@@ -803,6 +803,16 @@ out:
        return ret;
 }
 
+int mcd_on_by_default;
+
+static int __init setup_mcd_default(char *str)
+{
+       if (adi_capable())
+               mcd_on_by_default = 1;
+       return 1;
+}
+__setup("mcd_on_by_default", setup_mcd_default);
+
 void sparc64_elf_core_copy_regs(elf_gregset_t dst, struct pt_regs *regs)
 {
        memcpy(&dst[0], regs->u_regs, 8 * sizeof(unsigned long));