Skip to content

Commit b2d2f11

Browse files
brooniectmarinas
authored andcommitted
kselftest/arm64: Add GCS as a detected feature in the signal tests
In preparation for testing GCS related signal handling add it as a feature we check for in the signal handling support code. Reviewed-by: Thiago Jung Bauermann <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 7a2f671 commit b2d2f11

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tools/testing/selftests/arm64/signal/test_signals.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ enum {
3535
FSME_BIT,
3636
FSME_FA64_BIT,
3737
FSME2_BIT,
38+
FGCS_BIT,
3839
FMAX_END
3940
};
4041

@@ -43,6 +44,7 @@ enum {
4344
#define FEAT_SME (1UL << FSME_BIT)
4445
#define FEAT_SME_FA64 (1UL << FSME_FA64_BIT)
4546
#define FEAT_SME2 (1UL << FSME2_BIT)
47+
#define FEAT_GCS (1UL << FGCS_BIT)
4648

4749
/*
4850
* A descriptor used to describe and configure a test case.

tools/testing/selftests/arm64/signal/test_signals_utils.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ static char const *const feats_names[FMAX_END] = {
3030
" SME ",
3131
" FA64 ",
3232
" SME2 ",
33+
" GCS ",
3334
};
3435

3536
#define MAX_FEATS_SZ 128
@@ -329,6 +330,8 @@ int test_init(struct tdescr *td)
329330
td->feats_supported |= FEAT_SME_FA64;
330331
if (getauxval(AT_HWCAP2) & HWCAP2_SME2)
331332
td->feats_supported |= FEAT_SME2;
333+
if (getauxval(AT_HWCAP) & HWCAP_GCS)
334+
td->feats_supported |= FEAT_GCS;
332335
if (feats_ok(td)) {
333336
if (td->feats_required & td->feats_supported)
334337
fprintf(stderr,

0 commit comments

Comments
 (0)