Commit 9930fba0 authored by Benjamin Gray's avatar Benjamin Gray Committed by Michael Ellerman

selftests/powerpc/dexcr: Attempt to enable NPHIE in hashchk selftest

Now that a process can control its DEXCR to some extent, make the
hashchk tests more reliable by explicitly setting the local and onexec
NPHIE aspect.
Signed-off-by: default avatarBenjamin Gray <bgray@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240417112325.728010-7-bgray@linux.ibm.com
parent 5bfa66bf
...@@ -21,8 +21,14 @@ ...@@ -21,8 +21,14 @@
static int require_nphie(void) static int require_nphie(void)
{ {
SKIP_IF_MSG(!dexcr_exists(), "DEXCR not supported"); SKIP_IF_MSG(!dexcr_exists(), "DEXCR not supported");
pr_set_dexcr(PR_PPC_DEXCR_NPHIE, PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_SET_ONEXEC);
if (get_dexcr(EFFECTIVE) & DEXCR_PR_NPHIE)
return 0;
SKIP_IF_MSG(!(get_dexcr(EFFECTIVE) & DEXCR_PR_NPHIE), SKIP_IF_MSG(!(get_dexcr(EFFECTIVE) & DEXCR_PR_NPHIE),
"DEXCR[NPHIE] not enabled"); "Failed to enable DEXCR[NPHIE]");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment