Skip to content

Commit

Permalink
kselftest/arm64: signal: Add SVE to the set of features we can check for
Browse files Browse the repository at this point in the history
[ Upstream commit d4e4dc4 ]

Allow testcases for SVE signal handling to flag the dependency and be
skipped on systems without SVE support.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210819134245.13935-2-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
broonie authored and gregkh committed Sep 30, 2021
1 parent 2eaa39d commit 91d4da3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/testing/selftests/arm64/signal/test_signals.h
Expand Up @@ -33,10 +33,12 @@
*/
enum {
FSSBS_BIT,
FSVE_BIT,
FMAX_END
};

#define FEAT_SSBS (1UL << FSSBS_BIT)
#define FEAT_SVE (1UL << FSVE_BIT)

/*
* A descriptor used to describe and configure a test case.
Expand Down
3 changes: 3 additions & 0 deletions tools/testing/selftests/arm64/signal/test_signals_utils.c
Expand Up @@ -26,6 +26,7 @@ static int sig_copyctx = SIGTRAP;

static char const *const feats_names[FMAX_END] = {
" SSBS ",
" SVE ",
};

#define MAX_FEATS_SZ 128
Expand Down Expand Up @@ -263,6 +264,8 @@ int test_init(struct tdescr *td)
*/
if (getauxval(AT_HWCAP) & HWCAP_SSBS)
td->feats_supported |= FEAT_SSBS;
if (getauxval(AT_HWCAP) & HWCAP_SVE)
td->feats_supported |= FEAT_SVE;
if (feats_ok(td))
fprintf(stderr,
"Required Features: [%s] supported\n",
Expand Down

0 comments on commit 91d4da3

Please sign in to comment.