Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4551906rdb; Fri, 15 Sep 2023 05:58:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgmesCWsrecnpCcUjk3ewYcCF46anYeuv2q+R8e1bmlugCBIBLN/RjHZxOo3qS5/D0QCfS X-Received: by 2002:a05:6a00:1f0b:b0:68f:c9f6:f366 with SMTP id be11-20020a056a001f0b00b0068fc9f6f366mr1695287pfb.0.1694782690228; Fri, 15 Sep 2023 05:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694782690; cv=none; d=google.com; s=arc-20160816; b=mQmMfmtQ/EwNG88SLk34ejyt48NSJTPB+fRHjfJV2Xxf6B5/98JaXxn9qwQObS99Be f58UBgtnukQpylv8hkDO4rt9rOOWVbgxPIMatwXa9kO0736uReFA+2LCcx1JAL/2QtQe sNdAFNb6WQIVLzoM6JXtVXCNCsE2RXx2fVf0sKIM5yl5gSx7C5yp05AHv4ydNQk1eScX pnSOuFz4Yfr+7hcTYyPOskKPunvBHwMLLp+IS23YRXxcl8aEI4nXb95vTwngISDF7bpG UeY3FhhJX3ykFOfpQ7dnAjfEgOgte2vxNMta8VMCK2z1fgW9jhazwpu+x4IFSvCEJlAQ jy2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=mPKq4EbtXtTDCR+nlqeVctZFL+LGD4SfyqBc8FHyWLk=; fh=SiXmqcPYq85JxBTDcCZgCgSD3Pp7634CbLPd+aAIOw4=; b=WIAoSehw/LwgRu74uR7HsfUVEMc57sIcu8IMg7Ki9d2sHF/L2hAuRmAAr7H/HNS4ry 8Fh3gBIemQfA6FnLnvghn4DMPWXHuEsOVUuCDCyJJDrZMm3TBjuZ51cHCFVXuJtp7/+H Jgpb22dcommyDkNjYYoODxS+y3/J4/JAmpWyKX9mrpeUpzluAh52fA1fuzySn2CqaxM9 8sqoE+0LyWQvSNfiA1SqbIcL9KJDs75T5VRDdnIrImiym8faVD7P/6wGyCZQ9P5YXozE mwTWodJzbmQRRKjFOQZ0SxC/SJKEm2zv+6RC/o3PqTFWnqnURMMCwWX8992J8SYelVvO c8UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UxTbdnVz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id k3-20020a6568c3000000b0056f8fdb4430si3260330pgt.893.2023.09.15.05.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 05:58:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UxTbdnVz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 4B2D583B5B4B; Fri, 15 Sep 2023 05:23:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234854AbjIOMX1 (ORCPT + 99 others); Fri, 15 Sep 2023 08:23:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234871AbjIOMXV (ORCPT ); Fri, 15 Sep 2023 08:23:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBCDC268E; Fri, 15 Sep 2023 05:23:08 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8E1BC433C9; Fri, 15 Sep 2023 12:23:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694780588; bh=PRDjBgGWGghQhg/tWPb7ZH7iDykrzxmqhs+gMi1vJbU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=UxTbdnVzk/rl5KN+mfS/89f0Dw9IHQShwifrRADrhMRVqYSF2hnVh+EPqAW12jQsO 9NrfvN3/tA1TlRFZ7RMii9GnuAvZqYcD1CDYtQ01RCLN8g4qse4QUPFvAstXZ9W9Nj gTb8MQbG19B66JbkMRZuVBdfYFXH8gfm031BuiOYUQGrlbNY33KMQdSZCUmgg4sN6e 1qJOwdYq7Gj6g5ZgaoY1RcsTWHYOe6TBlOMjD1N3eFvgvx+tWswstfhGdThTuhLETL aS/REbNFaSrCngkOy1OwD38ysS4jDEqy8DpjYyip20qPq1dGZl4sn9CoFC2H+QFqy4 QfVSAMKtnPS/g== From: Mark Brown Date: Fri, 15 Sep 2023 13:18:07 +0100 Subject: [PATCH 2/2] kselftest/arm64: Verify HWCAP2_SVE_B16B16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230915-arm64-zfr-b16b16-el0-v1-2-f9aba807bdb5@kernel.org> References: <20230915-arm64-zfr-b16b16-el0-v1-0-f9aba807bdb5@kernel.org> In-Reply-To: <20230915-arm64-zfr-b16b16-el0-v1-0-f9aba807bdb5@kernel.org> To: Catalin Marinas , Will Deacon , Jonathan Corbet , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-034f2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1151; i=broonie@kernel.org; h=from:subject:message-id; bh=PRDjBgGWGghQhg/tWPb7ZH7iDykrzxmqhs+gMi1vJbU=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlBEyh1Q1DxfXjmIM7NFRHNM28YeA0Up8sAZxwpEBS 4xytz1yJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZQRMoQAKCRAk1otyXVSH0MtfB/ 0dvicZBlBgZ+uDGQ4PBgtDBYjKlsrCXDnBnj56PbVHU5UQHrG8MeMq3H+0kVYDFV6RWi7EM2epLgK9 o5Ta85uCkZ3loQvECa0hIwiYB1AsZXhABAGs+Gy84UtgtFooW509jKu8BGSdhoaNFO19TdV7XbfIwp Q41i8vhrx7p2vt/Ytcgt4qY5Zd9VH2MXk/dkeI6KZwQr5yVWQ5i2VK2ZiXXs/+YInmfOFls0pgGUub jSd+Ht1wO7VJYUiJUkJSaZQez5y+dGcmMSsSyY31C27RE0OniqLGinnluJ3JwrTVYvGrJDwqVRjuJM suABRzG539sdZdoSd2y3JMh5M0hpfD X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 15 Sep 2023 05:23:49 -0700 (PDT) Validate that SVE B16B16 support is reported correctly and consistently to userspace. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/abi/hwcap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index e3d262831d91..d8a144213d04 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -226,6 +226,12 @@ static void sveaes_sigill(void) asm volatile(".inst 0x4522e400" : : : "z0"); } +static void sveb16b16_sigill(void) +{ + /* BFADD ZA.H[W0, 0], {Z0.H-Z1.H} */ + asm volatile(".inst 0xC1E41C00" : : : ); +} + static void svepmull_sigill(void) { /* PMULLB Z0.Q, Z0.D, Z0.D */ @@ -493,6 +499,13 @@ static const struct hwcap_data { .cpuinfo = "sveaes", .sigill_fn = sveaes_sigill, }, + { + .name = "SVE2 B16B16", + .at_hwcap = AT_HWCAP2, + .hwcap_bit = HWCAP2_SVE_B16B16, + .cpuinfo = "sveb16b16", + .sigill_fn = sveb16b16_sigill, + }, { .name = "SVE2 PMULL", .at_hwcap = AT_HWCAP2, -- 2.30.2