From patchwork Tue Aug 30 10:48:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12959116 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 7783EECAAD4 for ; Tue, 30 Aug 2022 11:07:57 +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=J+5m/Kuyj9ae0yCadjJoJ/lv2XrarjCEIiro0ZpTTu0=; b=LZ+hbWeBclUKE5 YgGEP6G1worKkTrBpQZsHGOyob6fSW/SZHUvcDtQ8SEUWbhvpGhjEDGWCHEcK/2Tt9JkZ19yqsqAw lRMxTuP4avgSkUXh7vUaCbiT9gZg3bOL4yRUNCZwwtEWkKVczBHgT+jET1IlA+8Ww5cWcdVaeV2q4 e8PeQ0jzoOJRFiDLCnvJ5tXtJ1c7GoeJwu3mNdyy6shHU5u4xzZAD1CWh93icdKha8RP4gNXQsB3L bSP3894gdF18dT3KO2ZfN4aWe0AwHJ79KhMYcdjZ2mJ5rMgaU2M4JhDYwfSRD8LT6RWln0/A6Zqko I4bXbDn62cgKKJBtha4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSz2N-00GOXG-HI; Tue, 30 Aug 2022 11:04:16 +0000 Received: from mail-eopbgr70088.outbound.protection.outlook.com ([40.107.7.88] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSz1Z-00GOBl-Us for linux-arm-kernel@lists.infradead.org; Tue, 30 Aug 2022 11:03:22 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=RvDJxptXlJ78XBI3N1uu0NyWkJ9GXm+5jhAO2kFkeMYz2FPiuRRl9Xv93bAM7APgSG2ZKGCT/EumnfSWMnBB2CicBdCy9OR+kmfmChfSsCLKob0Vc0sEgEKDdRm75186wW5PRf1qcltaTVTtc8DmXFb5Qaz42Dq5TTFp5OCA8FJ9nN8as3PNLKcTEkBeKHk1k5l3v5icR9S1ocbFD1HrdDccRMfI6wlTdzB17vR01M/LotroH3h+m450tNBTwLaTF/sXANEYX1qo8kghsuxpt9gmUnGV5sxQmnWnYOy3TMCNsGCEZYKXVBSiS0lkW3vQR7kxvs0gxGaC0wkyng/94w== ARC-Message-Signature: i=2; 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=GULmGIjFLBUDLBlhjtZ1vX0gEb9BmxWwOuDN1QHMhmw=; b=hDJuDcD4uSXchDKTwEH1BCKN605bmATKjv7QdhTT9exuI79mzRp3sOY0EsxXMVmqDLJnkIHXAusQCiLlZY8Yn5u6RI9kuJdsgWls+MBVy+xFc/y2hR3jBtTJVYWUYOsvl6UokEyjlFzG6WIXcSpQNgxF/10Y3KPbht45JMuCBOg4mMZDlqEQIIDb8izQVsb6Uda2zwiEoQ8M/n3QpG7ByQ1ACi4BCaqItKkoIxwzCRUEirbg239N8DLi4MP7txVFzd+6bl1AJ+I1CiewVKjUyTd+jdycqkXu7HzlcZhAb9IfV2q6pwlpMGkinoVpfgMsKGKRmX2IOD3F0aAcUgX+xw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) 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=GULmGIjFLBUDLBlhjtZ1vX0gEb9BmxWwOuDN1QHMhmw=; b=dgbD2dogvzx665HrhTsinXap3E5/r/oV8QW0H1pCpYd1DGoVyi6E4cZM9AgP8reBC1eMjKhlX6jKfkgaezNnrkzZke4msLVowQsMOYeq/W2Kn4OzODnIejqzOAXSyv5K7JADQyhxwJPlLIPxiZnkMou3AzED0X2+6hAVFOivlDg= Received: from AS9PR06CA0375.eurprd06.prod.outlook.com (2603:10a6:20b:460::19) by PA4PR08MB7484.eurprd08.prod.outlook.com (2603:10a6:102:2a8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Tue, 30 Aug 2022 10:48:48 +0000 Received: from AM7EUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:460:cafe::f7) by AS9PR06CA0375.outlook.office365.com (2603:10a6:20b:460::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15 via Frontend Transport; Tue, 30 Aug 2022 10:48:48 +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 AM7EUR03FT012.mail.protection.outlook.com (100.127.141.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15 via Frontend Transport; Tue, 30 Aug 2022 10:48:48 +0000 Received: ("Tessian outbound fa99bf31ee7d:v123"); Tue, 30 Aug 2022 10:48:48 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: dfac08aef188c36b X-CR-MTA-TID: 64aa7808 Received: from e84ec40945b6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D64521A5-40AA-44BA-9CE6-358637A1F060.1; Tue, 30 Aug 2022 10:48:41 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e84ec40945b6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 30 Aug 2022 10:48:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=niFYhqy/l1sSNGfF8U7xKh+hJDRZ0HVduht1j3Tz6Z4Dg/MLY4c+Elq/GXbEF5TNfQrmzlC5Y9xbN28BaC1qFTKnKhEzQ0/nu/35duxS60527cCesXrVLOgJutXsBNPbH18Ie+skPZAr3M13U28wrO5jFnJRHvGedlx7v2aDkwTqLMLEaSAk9hK7oTNUBJuzcSdWw+vQ3PXQQPTrabDoJqru32PsjKVJaFYy4Oql8rFAYHefFxds3FMD4M9+QUcnQay8hzx6tbYyAdqwqvIEX7Pnk8Ub/b7dwu3XynskixPExPj5XDUdlDnB5ZY4aD6A0R4V5XAzlrzaE91+Q8ClMg== 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=GULmGIjFLBUDLBlhjtZ1vX0gEb9BmxWwOuDN1QHMhmw=; b=n+R5gsxyGKOL9g1bFjkV2/peTasJF6ZqhKZWF7u4/f/TZG+TFAt5x9VRCuFp5mGuFQ1z0x8HJ28ONOkwIY9fh38e2sG3taVokYhMpjm6MdX9CwaI5+WE74OXdE27EtiW4WSPUrXpiAhDtIu1y2jZ4lPcSXQh+Ck9xEJQfrkT3CL6kW362rdxoW5ygnMAIKB0w7t7I9bfzbGAsTfoCEgP0MqJ/fEVVU+AfOJQR0jaz9m5vnfbsGx/x23xLv6ConSYx5lttBQiaQNNrV/3uR963sO+cS8r9EwKUags/rmzdiulSmL5WeJItoicKRyI/VOJZ6lO+bVFYMNMbgR7BfHiEQ== 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=GULmGIjFLBUDLBlhjtZ1vX0gEb9BmxWwOuDN1QHMhmw=; b=dgbD2dogvzx665HrhTsinXap3E5/r/oV8QW0H1pCpYd1DGoVyi6E4cZM9AgP8reBC1eMjKhlX6jKfkgaezNnrkzZke4msLVowQsMOYeq/W2Kn4OzODnIejqzOAXSyv5K7JADQyhxwJPlLIPxiZnkMou3AzED0X2+6hAVFOivlDg= Received: from DU2PR04CA0327.eurprd04.prod.outlook.com (2603:10a6:10:2b5::32) by DBBPR08MB4695.eurprd08.prod.outlook.com (2603:10a6:10:db::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Tue, 30 Aug 2022 10:48:39 +0000 Received: from DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:2b5:cafe::9f) by DU2PR04CA0327.outlook.office365.com (2603:10a6:10:2b5::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.21 via Frontend Transport; Tue, 30 Aug 2022 10:48:39 +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 DBAEUR03FT048.mail.protection.outlook.com (100.127.142.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5566.15 via Frontend Transport; Tue, 30 Aug 2022 10:48:39 +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.9; Tue, 30 Aug 2022 10:48:38 +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.9 via Frontend Transport; Tue, 30 Aug 2022 10:48:37 +0000 From: Joey Gouly To: CC: , , , , , , Subject: [PATCH v2 3/3] arm64: vdso: use SYS_CNTVCTSS_EL0 for gettimeofday Date: Tue, 30 Aug 2022 11:48:33 +0100 Message-ID: <20220830104833.34636-4-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220830104833.34636-1-joey.gouly@arm.com> References: <20220830104833.34636-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: dbb3c8b1-4463-4688-fe1b-08da8a753816 X-MS-TrafficTypeDiagnostic: DBBPR08MB4695:EE_|AM7EUR03FT012:EE_|PA4PR08MB7484:EE_ 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: /13hRWRQHSXu6TAKALP2Q9Urq9Hw5dv0xFQLqhDBQlGPLEMdVotxyfOPZ5yQm0+Z4jg+AyL4FpN9jlnxs6rrFowyvhX6/CO9fPxIHnyoVBjyGgn8COEzEKELeolEswSfgx8d91ghvGy8840YluxUE2cRvbao7cS7uajga1IqG+AO/q6vVkSFgfjSDqnGQZtYO5GhaJ3v3CbqTalC3Wo8bGpk3sE0FqJ2efR2up9ONGPvjTYrGUyo3HoAOjSYrgvn77jWf+b7DJjaJWgoWLyoPYPfEV209H6DRFCmnBjtyqvU9+VQ0132fRy0OCze+EnFzsvivdo+ybwu/ZBXTlcMgLYvTdw8azLz2QGzL2dVUxCNEJ6aN0plFiDuBVCGV3xzX0ZPa9lbz87POlW/TTWrBcp4Mn0EFcHd78lhaU2qiIffW2wsBI1gQf+inHUBGPoQRXVete1kEKh5xRC5Ju3uPkXFELKt5mW5u4ahnfuPnPaSNWXX8ruZgKCSPeT/7cnCQ90MiCfeSKZKswGyxW3/5LVaSkFQhwyXQahB4WFR4tZt4bkjXyQbJfig7bLZvzaUhrEUNNvxmjtnF3uMZtNB/5qjzFZS38WQHyONFx5PB/noDmmZO5f/5+jZjgB1eTYe7x3rJmC/15bAl3fn7s3Akbh3/R/PHMVmb08Z+w5QbaA8FGGv54H3JDO9K+l9d4ks+VMLGAm8aTCq+inlU4uELS3HJrkWO8KLEKWJ98H69J0H8jQAQzCorX5BVHe5n2iKee5lvb1nuZsC9LxZLE+DiS9Qes6TEMWuA17PWbi7BAo= 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:(13230016)(4636009)(39860400002)(136003)(376002)(396003)(346002)(46966006)(36840700001)(40470700004)(6916009)(4326008)(70206006)(70586007)(316002)(54906003)(40460700003)(8676002)(82310400005)(8936002)(36860700001)(40480700001)(5660300002)(2906002)(356005)(82740400003)(81166007)(44832011)(36756003)(6666004)(7696005)(26005)(86362001)(478600001)(41300700001)(336012)(426003)(186003)(2616005)(1076003)(47076005)(83380400001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4695 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c10b12dc-a4aa-4c70-a846-08da8a7532f2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0aHWdCIRZR1mNukaCqLrz0KdEMFIzy+qjPycXR5UVSFJZT4X9dcPJkyO8VO2b7N9BR+ZY4eZTGxCEQ9o+ceRGtvlN8GIlFL+9wlGTq4a001EwtRqX1vlnpEVA4ChESQDdGt80gxz4MvANKJaPVcEHtUnqf8SJgHsxOVPicK1huEUsScyiCSB63LYg/v6cNIs2PYdQgTHYWQC1WTBZy+CQnT8VzN3Ul1f+YtPbJz8m6qp/WFhBd1XN5Zdb6DhTwChkvotk6fO2xyeydCG8uBz0eCAZlmnJixHCoL+jmFS5eBNsicFZa1CSx3B6uWiVaJArUAjCjLJw7aByexi+IIsTi3CWXlKX45fiY0Ft46xuZP82EjqhH+XA7Cuw5E6L/UekZZSAKh0hRi07j1h4gzGwm6gIByaHeXOWMRVvzbXwSF8SrvB6AOaOgFvqgugxdG69g6L8SI+aGosTQnxpadcM6iBc2/7dKWwiNTMNrQWhRYDxjhZBkMTiZvXHycBXXOGDq3XwDnW+17TBpJXcA96cA4RWQYLUT2pb5o1meMrDJHi+tQWIt9gHgpGJ1KMNWtA6UW1KmVor2W+/AQJzwCLlDsKZ26suMKAB9JKo4XFhnJA/jVu0e6SW3TxaGrh5lW2oTXMoETgNhT5On8WdhhFc3NCN7Yt1JOzCEhaOyfDXWwgl669u4kY9ZMWD79mG2KAQ83yGa3hrYpFO9EqUkL7mHzwbsqPiv2Ch1Qd+AM5Dw59QDhZYoTP1CrmB+PkYU3zvYZQR8XEhXcMpyM0vBN7fg== 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:(13230016)(4636009)(376002)(396003)(346002)(39860400002)(136003)(46966006)(36840700001)(40470700004)(6916009)(36860700001)(81166007)(82740400003)(86362001)(40460700003)(316002)(70206006)(70586007)(2906002)(54906003)(426003)(47076005)(44832011)(83380400001)(5660300002)(1076003)(2616005)(7696005)(4326008)(8676002)(186003)(478600001)(82310400005)(40480700001)(107886003)(8936002)(26005)(6666004)(41300700001)(336012)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2022 10:48:48.2559 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dbb3c8b1-4463-4688-fe1b-08da8a753816 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: AM7EUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB7484 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220830_040321_381540_4AF4938A X-CRM114-Status: GOOD ( 11.05 ) 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 If FEAT_ECV is implemented, the self-synchronized counter CNTVCTSS_EL0 can be used, removing the need for an ISB. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Vincenzo Frascino Cc: Mark Rutland Cc: Andre Przywara Acked-by: Mark Rutland --- arch/arm64/include/asm/vdso/gettimeofday.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/vdso/gettimeofday.h b/arch/arm64/include/asm/vdso/gettimeofday.h index 4f7a629df81f..764d13e2916c 100644 --- a/arch/arm64/include/asm/vdso/gettimeofday.h +++ b/arch/arm64/include/asm/vdso/gettimeofday.h @@ -7,8 +7,10 @@ #ifndef __ASSEMBLY__ +#include #include #include +#include #define VDSO_HAS_CLOCK_GETRES 1 @@ -78,11 +80,20 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode, return 0; /* - * This isb() is required to prevent that the counter value + * If FEAT_ECV is available, use the self-synchronizing counter. + * Otherwise the isb is required to prevent that the counter value * is speculated. - */ - isb(); - asm volatile("mrs %0, cntvct_el0" : "=r" (res) :: "memory"); + */ + asm volatile( + ALTERNATIVE("isb\n" + "mrs %0, cntvct_el0", + "nop\n" + __mrs_s("%0", SYS_CNTVCTSS_EL0), + ARM64_HAS_ECV) + : "=r" (res) + : + : "memory"); + arch_counter_enforce_ordering(res); return res;