diff options
author | Mark Brown <broonie@kernel.org> | 2022-04-19 12:22:43 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2022-04-28 17:57:12 +0100 |
commit | 4963aeb35a9edca90f062885b0d78c47a00c1752 (patch) | |
tree | b40b0390286d026cca11cd2e5d162469174f6edc /tools/testing/selftests/arm64/signal/test_signals_utils.c | |
parent | kselftest/arm64: Add stress test for SME ZA context switching (diff) | |
download | linux-dev-4963aeb35a9edca90f062885b0d78c47a00c1752.tar.xz linux-dev-4963aeb35a9edca90f062885b0d78c47a00c1752.zip |
kselftest/arm64: signal: Add SME signal handling tests
Add test cases for the SME signal handing ABI patterned off the SVE tests.
Due to the small size of the tests and the differences in ABI (especially
around needing to account for both streaming SVE and ZA) there is some code
duplication here.
We currently cover:
- Reporting of the vector length.
- Lack of support for changing vector length.
- Presence and size of register state for streaming SVE and ZA.
As with the SVE tests we do not yet have any validation of register
contents.
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20220419112247.711548-36-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing/selftests/arm64/signal/test_signals_utils.c')
-rw-r--r-- | tools/testing/selftests/arm64/signal/test_signals_utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.c b/tools/testing/selftests/arm64/signal/test_signals_utils.c index 5743897984b0..b588d10afd5b 100644 --- a/tools/testing/selftests/arm64/signal/test_signals_utils.c +++ b/tools/testing/selftests/arm64/signal/test_signals_utils.c @@ -27,6 +27,8 @@ static int sig_copyctx = SIGTRAP; static char const *const feats_names[FMAX_END] = { " SSBS ", " SVE ", + " SME ", + " FA64 ", }; #define MAX_FEATS_SZ 128 @@ -268,6 +270,10 @@ int test_init(struct tdescr *td) td->feats_supported |= FEAT_SSBS; if (getauxval(AT_HWCAP) & HWCAP_SVE) td->feats_supported |= FEAT_SVE; + if (getauxval(AT_HWCAP2) & HWCAP2_SME) + td->feats_supported |= FEAT_SME; + if (getauxval(AT_HWCAP2) & HWCAP2_SME_FA64) + td->feats_supported |= FEAT_SME_FA64; if (feats_ok(td)) { if (td->feats_required & td->feats_supported) fprintf(stderr, |