From patchwork Sat Feb 3 12:25:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 769683 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97A0D79DB0; Sat, 3 Feb 2024 12:32:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706963570; cv=none; b=mGiAlkw7T1bmYPEO1BgWtUWHL41hA5u1FqdtBlS0ddjVfWo2y5djrm5XPGAKuy7b/wXXVgElyQMaq4jqq+7tn/hgtbqF6CfZLRKa3syXh19Qby+Ramu+Vzwf4YDkSBs1EUsvIpChbLSnO1afYh4bdqrOxJuqHUxuhfob+NKI3hE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706963570; c=relaxed/simple; bh=Go+3eKanODPQVKnV1QnMIrC75/lXwO2PkPnkMfOn2oA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bFTPEWvMwRQU6jJ5T4Pyq/DQkadCilquxZVyCmiLMH6wRTEnW3dQIAnhItx2dT50LpANXtncoKhd6JfOU+OwmjC467Y7ve6Vq4/0ChUtcodsJPe61Gg3LQE45/bLUU1Kl4sV3RWCSy41Zr/pdTg7WeEX6kj2Bk/KXixEp9ae0Ps= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DX3pD5b6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DX3pD5b6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D77D1C43390; Sat, 3 Feb 2024 12:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706963570; bh=Go+3eKanODPQVKnV1QnMIrC75/lXwO2PkPnkMfOn2oA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DX3pD5b66LMn5s9XCPzNiW8Ohd0be3iU+tGL+cyFljRDq6foySmJjsTZF1YctTL+3 s1odq9u5fazA79LfV23TfXoDxAtZ6G40eneN6LwjBBYmJ5WJD9mun8qf0d6dtAkQa0 0NQ03qC16gpi8tG7LZcW4KBDLgGBtNj2OLhPTLCa25Ia7G48F3rARD0QaEPgNJ9NMq QNs6oA55JJ1CqAy51xQaC+t4SE50oVOtTfR5Uwu+ukSBphjlu+rJuTznNA/znOKVi9 6x3lT2ibIvsjY+VRHM2uE7Tc9JFxWeSkWXYS4epLtICQ13T/OlHd0vfdNUyLQyCe4e w0J+0hm3/1drQ== From: Mark Brown Date: Sat, 03 Feb 2024 12:25:54 +0000 Subject: [PATCH v8 28/38] kselftest/arm64: Add GCS as a detected feature in the signal tests Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240203-arm64-gcs-v8-28-c9fec77673ef@kernel.org> References: <20240203-arm64-gcs-v8-0-c9fec77673ef@kernel.org> In-Reply-To: <20240203-arm64-gcs-v8-0-c9fec77673ef@kernel.org> To: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Arnd Bergmann , Oleg Nesterov , Eric Biederman , Kees Cook , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy Cc: "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , Thiago Jung Bauermann , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Brown X-Mailer: b4 0.13-dev-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=1828; i=broonie@kernel.org; h=from:subject:message-id; bh=Go+3eKanODPQVKnV1QnMIrC75/lXwO2PkPnkMfOn2oA=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlvjDnv4va7Xw8q+9IPj8NpQvVrRWDKQAKGymqiuH9 vVzGLcWJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZb4w5wAKCRAk1otyXVSH0La0B/ 4lCc/SwjJvxVcIvBZtR884QVIBbVQHrqffIBeJOToitxCKeral+Vi14paZlCsB+z4lQqHnwXqSmU1O LgytJMK+lHJNHXVwX6qBDliivP28+wkHYFGM5dVzlnuaHLYaWCvcrTt9FuxcycfdKrGxh6Yrlcns6P 5cO/ZComrZ+hmwB9ih+IDFWZhyVXl+X/T9oGJpK1OYbUkWxkE5eWPOqIViydw/Yy1G5D0LcoqvAA+0 nXqkFzSboRRYecAvqq/m1WCqmXukbEeCLSo7TT9ptOZVWoaztMIhE98hlZzzBVTupuJs1gusBll95R l9oXxqT+rgpyun7GAjAkca6C9qG6hz X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB In preparation for testing GCS related signal handling add it as a feature we check for in the signal handling support code. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/signal/test_signals.h | 2 ++ tools/testing/selftests/arm64/signal/test_signals_utils.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tools/testing/selftests/arm64/signal/test_signals.h b/tools/testing/selftests/arm64/signal/test_signals.h index 1e6273d81575..7ada43688c02 100644 --- a/tools/testing/selftests/arm64/signal/test_signals.h +++ b/tools/testing/selftests/arm64/signal/test_signals.h @@ -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. diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.c b/tools/testing/selftests/arm64/signal/test_signals_utils.c index 0dc948db3a4a..89ef95c1af0e 100644 --- a/tools/testing/selftests/arm64/signal/test_signals_utils.c +++ b/tools/testing/selftests/arm64/signal/test_signals_utils.c @@ -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_HWCAP2) & HWCAP2_GCS) + td->feats_supported |= FEAT_GCS; if (feats_ok(td)) { if (td->feats_required & td->feats_supported) fprintf(stderr,