]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
kselftest/arm64: Add GCS as a detected feature in the signal tests
authorMark Brown <broonie@kernel.org>
Tue, 1 Oct 2024 22:59:09 +0000 (23:59 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Oct 2024 11:04:42 +0000 (12:04 +0100)
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 <thiago.bauermann@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241001-arm64-gcs-v13-30-222b78d87eee@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/signal/test_signals.h
tools/testing/selftests/arm64/signal/test_signals_utils.c

index 1e6273d815759d9c10978ae9af6c9285068b6bde..7ada43688c0240acbcd175e594aaf04b1fd12af9 100644 (file)
@@ -35,6 +35,7 @@ enum {
        FSME_BIT,
        FSME_FA64_BIT,
        FSME2_BIT,
+       FGCS_BIT,
        FMAX_END
 };
 
@@ -43,6 +44,7 @@ enum {
 #define FEAT_SME               (1UL << FSME_BIT)
 #define FEAT_SME_FA64          (1UL << FSME_FA64_BIT)
 #define FEAT_SME2              (1UL << FSME2_BIT)
+#define FEAT_GCS               (1UL << FGCS_BIT)
 
 /*
  * A descriptor used to describe and configure a test case.
index 0dc948db3a4a4039e585e69df7ae7811bb8a6d79..dcc49e3ce1ebe7666c33dcb54d977a412bbfe9e8 100644 (file)
@@ -30,6 +30,7 @@ static char const *const feats_names[FMAX_END] = {
        " SME ",
        " FA64 ",
        " SME2 ",
+       " GCS ",
 };
 
 #define MAX_FEATS_SZ   128
@@ -329,6 +330,8 @@ int test_init(struct tdescr *td)
                        td->feats_supported |= FEAT_SME_FA64;
                if (getauxval(AT_HWCAP2) & HWCAP2_SME2)
                        td->feats_supported |= FEAT_SME2;
+               if (getauxval(AT_HWCAP) & HWCAP_GCS)
+                       td->feats_supported |= FEAT_GCS;
                if (feats_ok(td)) {
                        if (td->feats_required & td->feats_supported)
                                fprintf(stderr,