selftests/powerpc: Update PROT_SAO test to skip ISA 3.1

Since SAO support was removed from ISA 3.1, skip the
prot_sao test if PPC_FEATURE2_ARCH_3_1 is set.

Signed-off-by: Shawn Anastasio <shawn@anastas.io>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200821185558.35561-4-shawn@anastas.io
This commit is contained in:
Shawn Anastasio 2020-08-21 13:55:58 -05:00 committed by Michael Ellerman
parent 9b725a90a8
commit 24ded46f53
1 changed files with 3 additions and 2 deletions

View File

@ -18,8 +18,9 @@ int test_prot_sao(void)
{
char *p;
/* 2.06 or later should support SAO */
SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06));
/* SAO was introduced in 2.06 and removed in 3.1 */
SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06) ||
have_hwcap2(PPC_FEATURE2_ARCH_3_1));
/*
* Ensure we can ask for PROT_SAO.