From patchwork Wed Nov 22 09:42:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13464423 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 3B681C61D9B for ; Wed, 22 Nov 2023 09:46:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CCF796B05C4; Wed, 22 Nov 2023 04:46:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C7E416B05C5; Wed, 22 Nov 2023 04:46:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6D2C6B05C6; Wed, 22 Nov 2023 04:46:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A7B766B05C4 for ; Wed, 22 Nov 2023 04:46:47 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 7FEA9A0656 for ; Wed, 22 Nov 2023 09:46:47 +0000 (UTC) X-FDA: 81485110854.21.098C7A7 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf27.hostedemail.com (Postfix) with ESMTP id 0BCDE4001F for ; Wed, 22 Nov 2023 09:46:44 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=p3JwdAwl; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700646405; 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=+yPK72IDWPizGwnzq/hEJFw0qTsKEBkl+c/fPfZYSgc=; b=bKd6yclXLYo2QPD3HvMM3MvaymnbQbYqcoBEhyCPpjR6SV3uHj87bwOe9oVOQ5gyihpTpU KQ3r5nBvRNHSvDvhNzXDI7+Ahf7mce0S6N55iAAOhNJjEyncfP7AT/Wl848CT8+V69PlGb gAhvzMS+LznXuLZLLqJN5KsN0Znj41k= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=p3JwdAwl; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700646405; a=rsa-sha256; cv=none; b=xp7Q4oJnq/DX0qebuqxWvWhMIdQxpsCc1zjo3Lud8Pmp+JlBcv+qSbffUExRkMwQfp+Cmo 0FeLTJAgPR9+ZTQ5OPSc2gXnvdnEBbqndFmdeWOwNBAMqlRcpVylbMYPoFj3NxLF3jdJgw 4RtxVhM2FkTaq19tfXy8gbuSX9jKJDk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 1E66FCE1EC3; Wed, 22 Nov 2023 09:46:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 495C6C433C8; Wed, 22 Nov 2023 09:46:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700646401; bh=eI3VK56kyhvq7JOnBJXgl6j+EIFmz1Cd350CxZrMcNA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=p3JwdAwl1IwDl1cRu279YeAAcZ/jDDNBFvD6epk9Cj3NAtBjknB4UKuxychR75RtB FhjbV32JXVmGGIo7RvOYvZI21X1Va108tpxqaoXhAlxRto69QxeD4jrYLKfxzRH+xS fS4SsKyIPwP7gr6HZsK/zCT+FGosjhk9bH6qPcKXRN5/Gg8IcmfmTi+fnplKR0d3NB d4XtyugCFtLBNbW2QMhR75JadHd3ITyQBaQ4BS9ZMhBgxqaRG6GWK5XglKVU3qBEyH 51/2dg7wqDRYv0qDxXDHavJlTBhDl1MK0iQvFuQaTnqc0cUJPWw7BCj4c2ii5isa1m 5uI1oYMi+XrMQ== From: Mark Brown Date: Wed, 22 Nov 2023 09:42:39 +0000 Subject: [PATCH v7 29/39] kselftest/arm64: Add GCS as a detected feature in the signal tests MIME-Version: 1.0 Message-Id: <20231122-arm64-gcs-v7-29-201c483bd775@kernel.org> References: <20231122-arm64-gcs-v7-0-201c483bd775@kernel.org> In-Reply-To: <20231122-arm64-gcs-v7-0-201c483bd775@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-0438c X-Developer-Signature: v=1; a=openpgp-sha256; l=1828; i=broonie@kernel.org; h=from:subject:message-id; bh=eI3VK56kyhvq7JOnBJXgl6j+EIFmz1Cd350CxZrMcNA=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlXc0MpoaH+B7so44Op51dKDPnZ+HR/liFSB4lO rxQeP/wL7iJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZV3NDAAKCRAk1otyXVSH 0OPrB/0bYwxvcTBgjII2I1FWsRdgrDk0RAdSe1MhLGxQngmZhESoEneo2Hq5C+22QiDRyqPOBWG NBhs+DcJn2N8QakBKktW1j2hZa/f2Fq4KvqQXWzEzaozqttPg3+lRVUc/+5XW2a+SMylEt1YziP D2jfrKJj4dayCnvjh7KLRR9I6EXK8+UH3eNDRgBoO3xugNgtV822vuRQkc43QiV5uAvpfJ3I5ZM ddSrXmzHk2QU0QffGhU8k1hfn4I2IqmpsZW99HiDapofjAKTjk9jUeKd4kbu3X+PH/DOibREYO3 VHJNr+Al5/4t9DoAy8UzphVB0ymspKLRJlwLJbX6p/eOOAfu X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspamd-Queue-Id: 0BCDE4001F X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 1esohh63z9yto33g8y4gzzna6kg8h43y X-HE-Tag: 1700646404-415273 X-HE-Meta: U2FsdGVkX1/+3kkn17i3U37W3Cc4/VyprOqUejNzwZ/QwtYrU3w3Sc8zcQ0PMLb8VS2NwLNOTtSpsvRBcAoG/Stab/xl2+3kcJ1FtKByfBoWYLELEZOgLhiWbqxLCIlvWrSFXyNrhRrzIBKQEdgBsz3StVKaynTCrGMTlqLPKg+mhFY104adiOfmCva1jmQsMCFzCii3ULdgTqQ1A96RbHbjzvrewqexqOpVKd7ZW0Y0Aiz6Lh3t+2ki6lXqWT9Vm7mR25WSmCk1QtZqe7s4msJEbEt2g2OJZphnlUh65Hz/RVxuN+i2JFlk/JSPGU4dxOOdmN/gsJDukVMvOuL+PAgFTM43FoI/NeR3FI6yvTaGQuYfpTCg9QqCRgMDJ1kU/ITn1p6h1cIABARBEOyQ1pjpk/pUuP7sO5FeadxAuXfrqLIpsi3B2GF7P8AVLMfJoPYKq1xm4Xnl0Oo09ZQXkTHlxK1yYUor+u8lDNjoF+CTt9nokLQcrnWpiT+89/ai0YFwZKBn4FcVxP1NqOOFg+ajUn3/Ap4sJ6wGV1HEtik/q6e0Es7bJpCdzym+ZX+v8YHEzTevRfo6vrYlB1jLaH1jf3m94gXrFkvBwg3zFd+CxO+akXmw/LwVumkL2JWrRTwBTZJks0GtFYCqWAiItyA3jp8CbHqymLOopjxFlWWR3sF6Kk3rZDN8LOgiVymyugWAjz7xlXyqGcosvkXssfxv4LOOYJVPkzbABerpYYx2A0bXSYY9RhSoeGlikQ9b2Zw4+LNob3+aYe2VU832MhH5iZ2ZAEdF/dmIA2tZUbvTtDXR23OYkiy8HmfRP+g3scyEuex29gjG7WUFrt5WPs3uY9xG2jm/52hK6UWNblpiM7XRsyivRjvxxx02yR5xSRDAr6xFxqgX2C/ozxRz4ul8M5Nhu8Nea6g7fR6Fu/ioFZqSJ5GttUTyKIH0D/7gkhPQ65Mgnv17alwDS9K YDdgDuN9 oouR1G9nzsKcjaNUGf6mQj1XZ5hDI8iuDk67qBA+xEpIUxj2vh8yqod5KFJKXPkNuyOQPE16FlEpypRWIztBiCEznW77truYuMIpEofXUxo2VLGgifppmdnkpPrbFGGRdA4sQBpcj7MME/wsqyIy0lJ738FEneuW/CNclL0+PkOiELwBQGqkzzhbilPGT4aceI/ljRm3LeUxmxjod9fXSx4jSVqg91Nmpk7tnzQJA96QPfM719GPsM7TwwbWUGx+oBvhS7q6DtsY6GhU5DT7BxwamuzzCfI57n33TtTEn2aGfVoWpJjGB6VmF3Gau2xZefQoC X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.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. 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,