kselftest/arm64: signal: Add SVE to the set of features we can check for
[ Upstream commit d4e4dc4fab686c5f3f185272a19b83930664bef5 ] 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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
2eaa39d83e
commit
91d4da33c3
@@ -33,10 +33,12 @@
|
|||||||
*/
|
*/
|
||||||
enum {
|
enum {
|
||||||
FSSBS_BIT,
|
FSSBS_BIT,
|
||||||
|
FSVE_BIT,
|
||||||
FMAX_END
|
FMAX_END
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FEAT_SSBS (1UL << FSSBS_BIT)
|
#define FEAT_SSBS (1UL << FSSBS_BIT)
|
||||||
|
#define FEAT_SVE (1UL << FSVE_BIT)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A descriptor used to describe and configure a test case.
|
* A descriptor used to describe and configure a test case.
|
||||||
|
@@ -26,6 +26,7 @@ static int sig_copyctx = SIGTRAP;
|
|||||||
|
|
||||||
static char const *const feats_names[FMAX_END] = {
|
static char const *const feats_names[FMAX_END] = {
|
||||||
" SSBS ",
|
" SSBS ",
|
||||||
|
" SVE ",
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_FEATS_SZ 128
|
#define MAX_FEATS_SZ 128
|
||||||
@@ -263,6 +264,8 @@ int test_init(struct tdescr *td)
|
|||||||
*/
|
*/
|
||||||
if (getauxval(AT_HWCAP) & HWCAP_SSBS)
|
if (getauxval(AT_HWCAP) & HWCAP_SSBS)
|
||||||
td->feats_supported |= FEAT_SSBS;
|
td->feats_supported |= FEAT_SSBS;
|
||||||
|
if (getauxval(AT_HWCAP) & HWCAP_SVE)
|
||||||
|
td->feats_supported |= FEAT_SVE;
|
||||||
if (feats_ok(td))
|
if (feats_ok(td))
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Required Features: [%s] supported\n",
|
"Required Features: [%s] supported\n",
|
||||||
|
Reference in New Issue
Block a user