From patchwork Tue Aug 1 10:00:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13336133 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 DC785EB64DD for ; Tue, 1 Aug 2023 10:01:26 +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=jK+MuRTvd+S2sdU8zKLJJZhr6MA5upzehSelUNX7a20=; b=cgWklIcwIfSCU7 utMkNiVnQdLUJWV3FRAaGM1wMhyta22GIBGUdnjEkav/Y/t0jzHfMSaIH1IFdmyI1q9EaNG44VcjW MXln6N7Epv/nVLr7schosiI7v90NrYXfwR0QfQ2jJS1F2PER9dpvjr3wUSFHqZvrZdc3XQlyTAJpl HEQbRTqt0Y5QWGXG7lpnUSQ9HSVOdM9GWl9eu6ezORUvRzURjL00kyAeU4+gL0XphdeQMoWZUA1oD 6WOjtCykwbMI2EpFxoTP8M8ftvAcMVjS118Ad/bOAKigxl2tYB2FtbZDAUK7VRPZTiu2CL2DSVVlZ oXm1Q/o1Ej6IFRhElPMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQmBT-001iFS-2U; Tue, 01 Aug 2023 10:00:55 +0000 Received: from mail-db8eur05on20619.outbound.protection.outlook.com ([2a01:111:f400:7e1a::619] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQmBQ-001iE8-2B for linux-arm-kernel@lists.infradead.org; Tue, 01 Aug 2023 10:00:54 +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=frZfGKdr8fs2AXTiB+TOxoW4C8FM8IV/+NuHQcxwLFM=; b=FeNdGzP7wkP2N1lUya0LEBEa+llEfEIpBTEheymuOMF8Go8vH4iTAsKeybS66bosOxcF9V1SRrnFhgmJ09esi/ScSsKQ9mDNW0OfcdLWQzzYnVPpnnWss4ScOXzVqfCrA0235H6UzUSS8qqgEHSqFKDxP9EfTfOBXOgE48ej60o= Received: from DBBPR09CA0010.eurprd09.prod.outlook.com (2603:10a6:10:c0::22) by AS8PR08MB9145.eurprd08.prod.outlook.com (2603:10a6:20b:57c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44; Tue, 1 Aug 2023 10:00:46 +0000 Received: from DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::9f) by DBBPR09CA0010.outlook.office365.com (2603:10a6:10:c0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Tue, 1 Aug 2023 10:00:45 +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 DBAEUR03FT023.mail.protection.outlook.com (100.127.142.253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Tue, 1 Aug 2023 10:00:45 +0000 Received: ("Tessian outbound f9124736ff4f:v145"); Tue, 01 Aug 2023 10:00:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7bf6b229b6aeaaa2 X-CR-MTA-TID: 64aa7808 Received: from a3e4f3d51858.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DCC2737A-4144-47B4-8FDC-C8C5A0BB9A52.1; Tue, 01 Aug 2023 10:00:13 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a3e4f3d51858.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 01 Aug 2023 10:00:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EPvIQJVDbeRsu291H4O77I0wR4tbB1JYHkzjwVeUOQuXYUYcHCCnUGKEwh0KOOZ4Yg6ZzzebcSfFDQwTt49ZTQIhJNipw4oZJnMDjej6KzfGQ9lv8XkfS5wV5V111yJwsncMGMyVejSJJ2GHQHNCN/BTIuuuxQr+D4rhE0/4cimU1+bv49m/QHts5SbgCA4D3f5vLRm7z342Iz75a1ltTBkEvP0Fp9lAerPsbYsz7HWJSPSilMMSXIFsYsSLMSasbfDr8cpvGWgRdaYOKGMtggkRCXdGVRdGRWLZIHa8r4pcKiBJQVzcuiqkJ/RS6VXLOPc7B7ASkmUnOzFypMbykw== 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=frZfGKdr8fs2AXTiB+TOxoW4C8FM8IV/+NuHQcxwLFM=; b=AJ7goMu1bUwEmE7u2Z6GYwHxnahhOEm+3nq0d8w5fo6sX1DwCoCjl3MNMueduWcA1L2+cmz2a06G2R1in8pec+7+ginaiCrOQ1eW7caaEpkIHZoNo68GdSd0YY47qvU7VSVQAF5i11GRMNjRqfLtLs5jLU8wZcCelx4FlOObjwPhBVR490e2QO+Y69+X5r7bcaP6a6UL7eJ53efYYrM2oNvROBAZ7Hawreg1rAcsAm7uyk/i9PUffitGeDBnkNnlZfYJnmMfMUpI0AtvBtvLTyrjmMH3Eb65h6UeMxFVVjjeJ7PLsHB7apHUPN38XnFc9OH4s8cXe4J5+1y8+b22PQ== 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=frZfGKdr8fs2AXTiB+TOxoW4C8FM8IV/+NuHQcxwLFM=; b=FeNdGzP7wkP2N1lUya0LEBEa+llEfEIpBTEheymuOMF8Go8vH4iTAsKeybS66bosOxcF9V1SRrnFhgmJ09esi/ScSsKQ9mDNW0OfcdLWQzzYnVPpnnWss4ScOXzVqfCrA0235H6UzUSS8qqgEHSqFKDxP9EfTfOBXOgE48ej60o= Received: from DUZPR01CA0333.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b8::27) by AS2PR08MB8747.eurprd08.prod.outlook.com (2603:10a6:20b:55f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.42; Tue, 1 Aug 2023 10:00:11 +0000 Received: from DBAEUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b8:cafe::9e) by DUZPR01CA0333.outlook.office365.com (2603:10a6:10:4b8::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Tue, 1 Aug 2023 10:00:11 +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 DBAEUR03FT018.mail.protection.outlook.com (100.127.142.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.44 via Frontend Transport; Tue, 1 Aug 2023 10:00:10 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 1 Aug 2023 10:00:10 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 1 Aug 2023 10:00:10 +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; Tue, 1 Aug 2023 10:00:10 +0000 From: Joey Gouly To: CC: , , , Subject: [PATCH v1 2/2] selftests/arm64: add HWCAP2_HBC test Date: Tue, 1 Aug 2023 11:00:08 +0100 Message-ID: <20230801100008.3125054-3-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230801100008.3125054-1-joey.gouly@arm.com> References: <20230801100008.3125054-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT018:EE_|AS2PR08MB8747:EE_|DBAEUR03FT023:EE_|AS8PR08MB9145:EE_ X-MS-Office365-Filtering-Correlation-Id: c9d12d64-56f0-4e45-26fd-08db92762cd3 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: El0Qc/Zl2bwvSOWFEvPYDd3iw2LpfGYWqdSYqTnC6Lob8kwq4tNbkVmqiStFBj70hN50yb7oSQSSty3pbAX49F2XYGrhjOO9/1QzDLflh/woKsd1OrMgiv7FGIjx36D+LdoSeU/4SwrPMafjbJHAsixrtwPYN5RBLJtuoXH5CrGK+b5G76Iy8hxkD1ltmXhUJo56dNff9ttqodfnjBIj97bSGzJwY/6B86sfuITkYqg/N2vi+216ft91ZgcBgDfuaQV0YE89swI2uG3NP7JfCBFR9pXudfdP/VUf8ucx/ADyW01+/xGzkw1SeXvqG7ExwEtzi33ei1eICR86cBGwt6KxuQgsSaqtFf6LwwlARuhZnarZB0q6DNtVLGj0YD0v5hzmtVC52QH912FVQ9AQlxyRw9g3q3nHrgQXqeNZbpc//GM+lZ1kQfWW0bzAb+PsOFylpqnoaAV/8yBp8pQ9X2PcrXZHA0Y9+7ULyh8XQMbc7bpVGXaMatjazTCIQENBrojoR8TreH0RSQHRxNm1fddsv7w7lFzxvI2Xe4y+2zQw250MhkQWgjDLatbaRGOiTo5zdWSL1uNIG2E+t7XHygkFYPHAMeBpr61VD6LbHBOk0Y1gCoNw1l4leNZlRmrRatUmcAZX7bQqj102twiVJ0/9Xr7DyW+qUmXmrlYyZeQqTYjB808yWkTaAMAl8HEv5fOsJG+QVPapX7VG3iu1yn4/1v1O3gseqvQBcn0dV9qUwbjCwX0DOv6Nbz+e1LXbHgkWQqmXF1nyRDjHEVBZ3Q== 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)(346002)(376002)(39860400002)(136003)(396003)(82310400008)(451199021)(46966006)(36840700001)(40470700004)(2616005)(5660300002)(426003)(40460700003)(40480700001)(356005)(82740400003)(81166007)(36756003)(2906002)(26005)(316002)(47076005)(44832011)(478600001)(4326008)(1076003)(8676002)(336012)(186003)(8936002)(36860700001)(41300700001)(86362001)(7696005)(6916009)(70586007)(54906003)(70206006)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8747 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 22f5e8ff-2860-455a-9163-08db92761805 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 64lhQc9ToUiOMxNLre+5+mYCdnb5ezDknMy+wBq9JNfay54DPZ6HEO7O5ra1SqBrXgI8Ys9FLXNymkUYGR3XuDDe/lNbqJfa4UZTN6c/zBV+Vkym8vdrqwmfbu2rAdfD1KFAOMlQ0MQ3g+CK7YOgX0TUw3jizlV2UEYd4791t/n9IfY6IAtGq9MS7GeYXt+RWMr4HQDgI3daa6n83PifEiM6tot/appBQHVSSyMlLcHvfmuQ6LKXonWEjdE2f4U5HXQGvEfKidwWcaO9DTRrmEqct5YzY9vjTf1hYfWtWaqLt/1qUEdw+rbJV/VqdC+mTfasffPAva5xe/o/QcszBwAQB4RQemrFYCLhhMkB32g1NGyuwtRF60sf/6NRPaU2mdfqHi9U9i77Rezdbf9uebpQWCjYEc4PqViPc6nESNJUlyA5AIFQQnRSyUGFp6YUI98bdEk2eCGuMmmMB+GlkfTwKXHSqiI2TywHwz5bqooYClZKJrVtIwJo/irI1BCXArXt9dOWm39JkWhUdcjZctMMzxs4wGWcSS064D/wwrYNc4qKaXEdkJ7mmNZZe/bB15Y9tjNRPeFWhEDDJrhxBq0R4MqMVk68VA/d4HyI8o+Kzm1jtgWvVpsQj9cYL/Vyp2zKrZobea0lthqjtO4+xWRWR0/gIy/UL/VJdx8kgj8JXi3qQ6Q31c7qL7qhBd+sjeVKBRVeRsjm7s18A57MXrRMpHF22kHthOqtq7kSuYPP1qYVWH/oCmILshYxEioe 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)(39860400002)(376002)(136003)(346002)(451199021)(82310400008)(46966006)(36840700001)(40470700004)(36860700001)(1076003)(5660300002)(70586007)(70206006)(4326008)(6916009)(107886003)(40480700001)(54906003)(40460700003)(81166007)(82740400003)(478600001)(2906002)(426003)(2616005)(8936002)(8676002)(7696005)(41300700001)(36756003)(186003)(316002)(336012)(47076005)(86362001)(26005)(44832011);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2023 10:00:45.8732 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9d12d64-56f0-4e45-26fd-08db92762cd3 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: DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9145 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230801_030052_775148_09E50C1B X-CRM114-Status: GOOD ( 11.13 ) 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..296102cd9192 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" : : :); +} + 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;