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>
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));