From patchwork Thu Aug 1 12:06:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13750410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B91FC3DA64 for ; Thu, 1 Aug 2024 13:00:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA5246B00C8; Thu, 1 Aug 2024 09:00:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A53226B00C9; Thu, 1 Aug 2024 09:00:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8CD056B00CA; Thu, 1 Aug 2024 09:00:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 6C3EB6B00C8 for ; Thu, 1 Aug 2024 09:00:57 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DE6C2A0D6B for ; Thu, 1 Aug 2024 13:00:56 +0000 (UTC) X-FDA: 82403686512.19.E278096 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf15.hostedemail.com (Postfix) with ESMTP id DAE51A003B for ; Thu, 1 Aug 2024 13:00:53 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YaeczFSW; spf=pass (imf15.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722517225; a=rsa-sha256; cv=none; b=PQAxmr0mXHCfa5Uk/NOCaYbYkfjupNfg2ykF0ywcfpAfjoq60p3Eu54v0Ci3DZ4LHAv435 X44TzK83HCj5FIlJSbbTta2C8bm7q2+S++EarBhkUVCpP0lmfB2dF139iOHZMNBYdRXGqV 8PS+MN2qmkp4iZhzflzet3JG4nPZgGc= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YaeczFSW; spf=pass (imf15.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722517225; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ni0Kxk3yWVfTWSbrVjjhIlms208eOmetcRX6FMFodsY=; b=3GtK/hIlKUcZshqeRI6k6Y21j3bPMHdQowTszqUEvhVldCOGR0l1benmfmfpcv3m3w4CQC 6MSDZgCsIY+dyWES94QXXbGSyxyAFE+Kg+TbKnJFr9B7NZgz01EhuqeA4PIaOx/uzDGO16 60DNvaRs8vsXhaUMMOmFEbBznbXfg6Q= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 234C0CE18F9; Thu, 1 Aug 2024 13:00:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9507C32786; Thu, 1 Aug 2024 13:00:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722517250; bh=daws7+gY8b6XFlV57O+J5ZaQ5dAS4S0GI4Vh7sgzmHk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YaeczFSW/0sQVi4Y5MZxG0vXvCbqJ3B5xzzE5AP9dTzYvhAzl/vQ3+MYM6uYprAOe 70sA7AYgAVjQD2r6xVtm2I+QdnfpYpgb38IG0UvMK88+S9If+ArSDMipaZa139A8Aa amnSXsdY0QAmRVZRHyUaLz9RHZvhUZEBoD1RNXnhXsJM/Oh5kw5Ir48Lb5Uc+P48GC L1EMrJ1FWOTRIyygtumExRrL5WQTM+hzMyVys/ZrDZ/E5Yx1aFTNNf4YfF085NmlYT 7xGguAyHeqD58lUBuw4xsj6qRJLzqe34cjOTUlZlt3PSgLpNFkepoD/v9BoZcVi5hn GMKYDblaFYphA== From: Mark Brown Date: Thu, 01 Aug 2024 13:06:57 +0100 Subject: [PATCH v10 30/40] kselftest/arm64: Add GCS as a detected feature in the signal tests MIME-Version: 1.0 Message-Id: <20240801-arm64-gcs-v10-30-699e2bd2190b@kernel.org> References: <20240801-arm64-gcs-v10-0-699e2bd2190b@kernel.org> In-Reply-To: <20240801-arm64-gcs-v10-0-699e2bd2190b@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 , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy , Kees Cook Cc: "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , Thiago Jung Bauermann , Ross Burton , 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.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=1894; i=broonie@kernel.org; h=from:subject:message-id; bh=daws7+gY8b6XFlV57O+J5ZaQ5dAS4S0GI4Vh7sgzmHk=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmq4Yd/AayJpdDJb2tH+bu+tocCjvDaVO7v9RFDWZu YTIKLIeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZquGHQAKCRAk1otyXVSH0Ji6B/ 49n/gPVSOC0zUdOFsKaXyNbeJnnjaeAF6Gi0yO/OvRf6VhmA1x9nevcrHxGpv9DmgkfvS1ypLr5tnA i4w0As1xKtNtyuW7oYQecE0S2I8n9mVnIQt+N5kfwKwsHQr+n/GJCNd29oNl4QZIEeFqOVYeu/6a0b HB/wcdBizcnOfVCSchCJZPMPOyeBHkP5+q+4FiTIPtAddvi9WiYoYv1IDkYLyarNhgHtFWHNEl0MhV UiHVNfUn0FsTrxnnEaml6vKI7WrzvQKeELLE4SHw6rHgudllTAtV1UffSDB5Kuidf6INcLHWx0iECg FQCqn39dvgOsLwpZxr5jqd2j64PGrJ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Stat-Signature: 41rx8huxh37pwcwf1y8qy81aaotfbfud X-Rspamd-Queue-Id: DAE51A003B X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1722517253-879837 X-HE-Meta: U2FsdGVkX1/47uGHNhlIEYBEoXI0masRVEyywTCRe5ToPmxrLdxnob5XhTbDiFHthJkUNrrIck3/7iC6KcNk/GQ5+WEqiPF5RXeeD0AzkvUKjthf4G+TzXr70APU5NF0PCP9k38DdwX7CsDq+xq0kI6e4EkizOL/yP1ouwg4Cu1xP1v84mRLKhQNYi5xBitX+bcGdvm6WuLAnswSzzFjvbHWeJlnqjKWH3Sv1/AwSqpKB76/rbh5vmEnoaRY438ms5D8ZfkQsz6ZjPCRszVQ7W4xk/LU4/OrnwChbBmypu+d8wGQeWJ+l3rINW3hEBocW07nc3fGUPffVwVrbGx18gHHSyRs/EbdPzLkR52JaOGp7zYkwPwRQBhpO9dKN14FR1t3+hqba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.org List-ID: List-Subscribe: List-Unsubscribe: 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 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,