From patchwork Fri Aug 4 14:37:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13341961 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D36EEC001DF for ; Fri, 4 Aug 2023 14:39:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xJabXpdLMcNAeOqzvcRWuHNQk77uAF8Bn7V3wDNRDBE=; b=RirZw58JBRbz/A ssj1SgvC7RUh6CTvSfeKiKrMwQi2sjYP7oo8VOr4xmM1TXXLp9YtgfN2ev5DzY/XrsCkPATcUudBP j+ZAZ9NI+i7ThvKI0saOugrff67eV6yJOHXLcejkiE4ADjG78U72paDAwOOrwRp7sG9N9ziqpJpEB zvZNW6q6XzVvo9vO0EklNg14tZM34co2rCuSXEx3ZhSmtZY0Cm1fRu3lQrLjqhckTifs0BojJhesl tQ9rBxwvudtcVWqNy5IlUrv0Fkmw/2W2xkRd9wOYjkqdlskvMz6FnE7N/stL1glpeJ5Vkd6IJ8mWL dIv/PE3Qrht3I22iSLvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRvwr-00Cc2M-2A; Fri, 04 Aug 2023 14:38:37 +0000 Received: from mail-db8eur05on2062d.outbound.protection.outlook.com ([2a01:111:f400:7e1a::62d] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRvwp-00Cc0b-1e for linux-arm-kernel@lists.infradead.org; Fri, 04 Aug 2023 14:38:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GSUb1XCKi8fuhSd1bBTZnWEZ3qW6vygikUhYZKi5vgo=; b=V23hz1YNwToEElaNK+kOkHd1aK69xkgujriy/AmN3Bb1OrK8EFlIxEpmOcc5ZL2jjjR0GorX3UZDRMxAtJdpoo8zcYCYP8iK9UE5ZVAQZ9r98Q5ieCgCjnwuYVGMJxyDadgmU+hDUNDTW2Uo53hgE3AROYq8vuSFrqU2/GohHVA= Received: from DB9PR06CA0007.eurprd06.prod.outlook.com (2603:10a6:10:1db::12) by DB9PR08MB8267.eurprd08.prod.outlook.com (2603:10a6:10:3c5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.21; Fri, 4 Aug 2023 14:38:26 +0000 Received: from DBAEUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1db:cafe::af) by DB9PR06CA0007.outlook.office365.com (2603:10a6:10:1db::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.21 via Frontend Transport; Fri, 4 Aug 2023 14:38:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT010.mail.protection.outlook.com (100.127.142.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.48 via Frontend Transport; Fri, 4 Aug 2023 14:38:26 +0000 Received: ("Tessian outbound f9124736ff4f:v145"); Fri, 04 Aug 2023 14:38:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3843b96e6a282dc1 X-CR-MTA-TID: 64aa7808 Received: from a64207de25d4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 37B54E0F-57FB-4165-849A-6CAA75D5A576.1; Fri, 04 Aug 2023 14:37:57 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a64207de25d4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 04 Aug 2023 14:37:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eBCCyygKkddPyeFiL9sPw2R3aLT2nxUJbhtRKWQTvxVbrEAjDd6ZAxcrBlcgBlI2oJErgijgvH5FWUofTKFG2OAyFNzhDWg4/xLolcSp28cY7w34HflAl4Ak+at89NO2SuTfE1NTplJZhjWhsCvX0d0ivqsUYaE3D1nLPbi9qc72P1eLvdXPs8IAFWLlWcnd6/2KkT7sutcFaT5R7Hj6d5BpjkxFl1bhFqMJfcZx5xwXzIRUR2Gm0HGsP05pgBQmz+5VH1oDnS4l4stj2njYdckXxiy7/Gwio7Pc6U+TW79zDc/QQI5QKncpwvSowEZlKxQr4H0q+BZqOawSiGWzcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GSUb1XCKi8fuhSd1bBTZnWEZ3qW6vygikUhYZKi5vgo=; b=hXe0py/1e3T6WftLUi3Vnot2H7P232AZ8PDSrUeXb7YtxV1+bXauxLv5xpGDi8j9ORyNu0Tr/h7SMs+mrJAZjilgOwfkJ2QcNXCKgeoCRpOtVP7T+l0+4x/wzzNMhqhluzOhjwsxp0/p4wDtKo/bOIJDEly3lkBOm99wqg3DoiD1Hl1SI2vVO/d1Aa8dtiBS5FmBQuPTy8UHk7CulT3c8ype6qCcHO4NMc4X6RlEY8Q5NgyOwIsLcSWTD1Oe3duxjgcNOdn8wMb+Stlplc6tQHaTFog8UuuA+zY6lls5qvl05++7iFjgeCww+p64dC2Q9i6fcsGZZFVOcuNdmHiyOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GSUb1XCKi8fuhSd1bBTZnWEZ3qW6vygikUhYZKi5vgo=; b=V23hz1YNwToEElaNK+kOkHd1aK69xkgujriy/AmN3Bb1OrK8EFlIxEpmOcc5ZL2jjjR0GorX3UZDRMxAtJdpoo8zcYCYP8iK9UE5ZVAQZ9r98Q5ieCgCjnwuYVGMJxyDadgmU+hDUNDTW2Uo53hgE3AROYq8vuSFrqU2/GohHVA= Received: from AS9PR06CA0584.eurprd06.prod.outlook.com (2603:10a6:20b:486::9) by DU0PR08MB9396.eurprd08.prod.outlook.com (2603:10a6:10:423::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.47; Fri, 4 Aug 2023 14:37:51 +0000 Received: from AM7EUR03FT041.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:486:cafe::49) by AS9PR06CA0584.outlook.office365.com (2603:10a6:20b:486::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.21 via Frontend Transport; Fri, 4 Aug 2023 14:37:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT041.mail.protection.outlook.com (100.127.140.233) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.48 via Frontend Transport; Fri, 4 Aug 2023 14:37:50 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 4 Aug 2023 14:37:48 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 4 Aug 2023 14:37:48 +0000 From: Joey Gouly To: CC: , , , Subject: [PATCH v2 2/2] selftests/arm64: add HWCAP2_HBC test Date: Fri, 4 Aug 2023 15:37:46 +0100 Message-ID: <20230804143746.3900803-3-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230804143746.3900803-1-joey.gouly@arm.com> References: <20230804143746.3900803-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT041:EE_|DU0PR08MB9396:EE_|DBAEUR03FT010:EE_|DB9PR08MB8267:EE_ X-MS-Office365-Filtering-Correlation-Id: 71c0af80-3b1a-4890-82be-08db94f87690 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: SOt7VokCe9Xq0Y3+hcJXd9mLbdnVEWwBEKRU5gkyM7J52H4UQJJOh6jOFP3vpAC/akOjn6KQi+1JLV+EnXyJeU4z0+7gIrP/E9VJXgqP3PQH/cqhaHemFGF2gOvRHNs/ii8IsKN5ANyoWITwHZ/lXPXlx9fbzPTEcPFcJKhMu0EnwguQSGhHv3KiaG0o9cMvlz0RKyhsDSOLA8h8kDmO2jQM1me7ensqMIVhbLbu5Ak+7HuLyyAhAqdfjBWhG5BiGJ6MO6J3N6EVIBHJhwwk+jVNL3ag1IyVEaHiJLR99jS8o02Ngtm8k3ceSw02TTeJMF4442K5BC7+/VgpQRB+x2QuBYKeK+Q3HzaNTF08feShNzxT3ny7opELPW/gPMtX9srcPYla/yyLU5ugnKXd/dBf3oKFv3TdsDJ1nLRnNPiCRGV4s8gjujwjy4+qegAmyQZnBYxubvF0MzwhHC7tWZJo8dW6AyJ4fXolHS5Y8B8RSTZkWpZGVQJaAIGKLdKE1II8POZfh3pLm0nhFPiMV5Fg6TCtxRg2weShSGCcq1iH9G+ohZn4H/hdFwFWS8LbaF9oGoIoIsvlI5nmtkeC+hlR+DSPsNoAs8AwNnPexmeSd9pVb7inkl7FD0w46G60khsR1yS1v81FcGA0KL4JpFMA9yVyPlLBP0eaE2ndGZlBcEl4qSWVcgNBf8xcmQCUDXv5/R1v7uPdHYYV6lGhbbWY4uNmkKrW2Ll+Hhi034eNIFa+EFrNnUPnbPF/CxMa33Gg4bn9PsnpmIRdZbKopg== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(376002)(39860400002)(346002)(82310400008)(1800799003)(186006)(451199021)(46966006)(36840700001)(40470700004)(82740400003)(40460700003)(2616005)(1076003)(8676002)(26005)(336012)(47076005)(4326008)(2906002)(36860700001)(316002)(70586007)(5660300002)(6916009)(426003)(70206006)(44832011)(8936002)(41300700001)(7696005)(478600001)(40480700001)(54906003)(356005)(81166007)(36756003)(86362001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9396 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3b6bb211-90d9-4df9-6805-08db94f8616a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HGsYUJxSa0j2sNWzW35EizKtLM5PoLXlVI3df4OGnM22unequtWttwz9u8mgpytpLU/UDmtbQ8CobZgdQxsvk5Oscw4o8l7ZuQEdNBxVDThr5ZZ6uQ8YQ7brKoa94/K6QCWgGauzpnHP0oMdTw35KHtIcOtkxsN7+hp1wI5W8bUgXontq4ZIJGPvJ7cH5Wzk62IJiGB5+MOovKB1MF18QI5zJ7aV3qREHxFshh+IjVX0zk0dnPbc4wZ6DTyvizaF5wNITIBVsu8JVyjNib/Y8YZZjeeWBg6t8f+lvPKuEyOGTB21FwY7/15A8n1hAOgxopo2y+DeK+oiZ7irqaf7DN0gH9G4ZzinXNx47Y/pHdY7BTJ/3PYIqtIcQK7tpRdnKW3MS/RUpLEgroHcMH1hFE8YklLIT0zht0poU9Qepl1eBV9h7YSSweBtswqI49QKKu+tJVEBveJYzKvkceq4ERcd5s1FGtPD3BqfPl+XsP+0IE66XoI0Q/2SOx1xZrRdIWcH6zBKoTEPgRiqEpEMZiQI1unGMEbGmlOdqkkMDOkLI5cHMjfoO1NDvxipWjNuLU67TGTBM284udTW4zawyMO0DNC5Xj2XEnsKdc4BL7QixqARwJGbKnF8QgXhZ+lH88G1DX70ITg0aLLQPLr4ZSHXdXg3oAX13rNRt57fdxYIQqSvneWLeXGM9cCWwItsrqOH55A5zLZG/7sLtm8+c2+kYNNIKYvtmQMLBBXb3Da9C9T7RxgHg86F8KAsjEQs X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(376002)(39850400004)(346002)(1800799003)(82310400008)(186006)(451199021)(46966006)(36840700001)(40470700004)(2906002)(40460700003)(44832011)(107886003)(426003)(36756003)(2616005)(47076005)(40480700001)(26005)(1076003)(86362001)(336012)(6916009)(70586007)(70206006)(4326008)(41300700001)(316002)(7696005)(82740400003)(81166007)(54906003)(478600001)(8676002)(8936002)(5660300002)(36860700001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2023 14:38:26.4883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 71c0af80-3b1a-4890-82be-08db94f87690 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8267 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230804_073835_586002_7EAFD89B X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a test for the newly added HWCAP2_HBC. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- tools/testing/selftests/arm64/abi/hwcap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index d4ad813fed10..fabeac9a1b5e 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -208,6 +208,13 @@ static void svebf16_sigill(void) asm volatile(".inst 0x658aa000" : : : "z0"); } +static void hbc_sigill(void) +{ + /* BC.EQ +4 */ + asm volatile("cmp xzr, xzr\n" + ".inst 0x54000030" : : : "cc"); +} + static const struct hwcap_data { const char *name; unsigned long at_hwcap; @@ -386,6 +393,14 @@ static const struct hwcap_data { .hwcap_bit = HWCAP2_SVE_EBF16, .cpuinfo = "sveebf16", }, + { + .name = "HBC", + .at_hwcap = AT_HWCAP2, + .hwcap_bit = HWCAP2_HBC, + .cpuinfo = "hbc", + .sigill_fn = hbc_sigill, + .sigill_reliable = true, + }, }; static bool seen_sigill;