Message ID | 20230817060314.535987-2-gankulkarni@os.amperecomputing.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 11934EB64DD for <linux-arm-kernel@archiver.kernel.org>; Thu, 17 Aug 2023 06:04:11 +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=xE4FZ3T2LrKKtyCekrkAblWMCXgNK+JAItAA5D7nBXI=; b=GWa9VMYTGBbhcu ujrY65pGLhyplAXYJOR9xC+VU20Sld3vFnDMJPAqw5tpVLunkQ3RzZ649JNiH428PNvodsv10okgx uIGebgYAFogs/PYVo+elXxhxdLHujmiNrS9qtT9p1wkaGEsWbqhGAbSdJ7oZ4gc5ZD9GHsvREO9NB jb7oBlNWAVCcYEfyk+OtgAWlLLVYalNhqwIg08LW24VYam1oimD1wmgiXfjLfQS/5QuHMP10dyW8s wfpM8gTJLhF0nk0Cu84Sr6YJqAmRfgIaRAZ4IyKNGx15o6vxu9MkshTYVd2MtfWCanGWZV5LLdonB HWtQ9Ch0iihpd+ADbhsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWW6i-005cak-2I; Thu, 17 Aug 2023 06:03:44 +0000 Received: from mail-mw2nam12on20725.outbound.protection.outlook.com ([2a01:111:f400:fe5a::725] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWW6f-005caD-38 for linux-arm-kernel@lists.infradead.org; Thu, 17 Aug 2023 06:03:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JulC2HBUDFXOOlRmXUrsqZK9IQ5hvus4mmskRAWUZnGEubO5yQ42CtEwUFxiupCf7iz0BK3Q2QkXvKsW+eCIA4wSDylB7uU5lY7xpNtzk+5ygD0IGeshVFbroFmtkc43wS3wUCrqSc6LI2XFZ+UII9mj2g3P5LfQOHQX/VVf2tzfWknT1GqG+ybnIs3qP/+3bHMobyPuBbzod/GmRNYr6cFTDpCcvNN6kL13PyZIxfqTsJMjHU6m+1A6twxgbbhOrNK8GnsELBaDJ0Ug9tIvEfBCnT/P3UTPT0N8SDA7vwiFeeJiCHvYow/BD5wFtpOm5njOIyfmDXL8lvucsympXw== 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=cOZw2EURdLDxgbCFLA4cIfp5eTLsDkKifig5lfBXwNI=; b=YMxFpSv8luoj1jMg0jmLalUJ0QRFF9anLhKOH1ffNyw2IJnzMymGLoJvCvo+w8ki5sbhOL8a+vnY7GKKFKWzLwKoQ2Y/zIysMDCCvC+UPGHW+o32/XV990BsiI9G+S+aeXybFnQXyLtoY7v8mKXbDM3AQRESz08XrbedeMzkXYl+zrt5dM7E+VuA5lvMDwuON4w8GsDc4dRaHCK6s3KhqUG1w6Og4dAH/rz/QrHjiehVBH74o5g2djCKJZqY2/OaUptmIHePz7jtPzsICc4IS7dALxHVwntv0XUrCKO4lA8ea/tfbMDyQnox7Ik/j3LL8yXkEgH5DmBaTc8ghMDOQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cOZw2EURdLDxgbCFLA4cIfp5eTLsDkKifig5lfBXwNI=; b=f/WgRTxHA4M7ZyoQ3dSckLUyN88M2KO30vAtODYV01fjTjBVtQ8u0CasY6H4bDHiw+HbbvDZeUk1lk2h+FmCMLYG2dGtfCXKSN/ZMIQBhs8e37dQqCBrnFc5cUrx95iK71/gTo9OIjr9MoH37ktwIEHEw1EvdfO3TUilripkARw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM8PR01MB6824.prod.exchangelabs.com (2603:10b6:8:23::24) by SA1PR01MB6592.prod.exchangelabs.com (2603:10b6:806:185::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.31; Thu, 17 Aug 2023 06:03:35 +0000 Received: from DM8PR01MB6824.prod.exchangelabs.com ([fe80::d62f:d774:15b0:4a40]) by DM8PR01MB6824.prod.exchangelabs.com ([fe80::d62f:d774:15b0:4a40%4]) with mapi id 15.20.6678.029; Thu, 17 Aug 2023 06:03:35 +0000 From: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> To: linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, maz@kernel.org Cc: christoffer.dall@linaro.org, eauger@redhat.com, miguel.luis@oracle.com, darren@os.amperecomputing.com, scott@os.amperecomputing.com, gankulkarni@os.amperecomputing.com Subject: [PATCH 1/2] KVM: arm64: timers: Move helper has_cntpoff to a header file Date: Wed, 16 Aug 2023 23:03:13 -0700 Message-Id: <20230817060314.535987-2-gankulkarni@os.amperecomputing.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230817060314.535987-1-gankulkarni@os.amperecomputing.com> References: <20230817060314.535987-1-gankulkarni@os.amperecomputing.com> X-ClientProxiedBy: CH2PR03CA0018.namprd03.prod.outlook.com (2603:10b6:610:59::28) To DM8PR01MB6824.prod.exchangelabs.com (2603:10b6:8:23::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR01MB6824:EE_|SA1PR01MB6592:EE_ X-MS-Office365-Filtering-Correlation-Id: fa03734f-ecd0-4406-1664-08db9ee7b139 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jABkziO/VFX7cwmIas7CFX6VHx5XsHxZee/zhnjqoyUKgiYppa/B/X4BMG36K+IS+Zky+8T6D0Ffy61vJ/PpG/4FzGjR3pKQGmDaZaGkgFzETdqNlL8rBlAKTYdFBc1gKogkQ4oGH7J4zGYADaD1byMU5m4tdvitwnW2f6v2UggLCJylqx2K7wb9YgctvVUmHfwfXFULbLQ8Vd3sFc2KRu0cDSdSWT9Jrj+iutjiiFRZiDkJ+qcXweHMbzQlRAUn3iSOcnGRPYSIKrSM7lfPSp1mHbPb4k1WBoUZwWAVZHGkKPYz3gIoy/RFFdJqopnz0wCvG6fqKjlRrHQNVKFQV6YUTrRyuqLx9yPXAShuQyw76HA/tzAgAgGCvTrRSEWDM/3U7J/PgLuy5yqbVajq+5ZFYl6ubGSlnt5yGX1V9r/fL24XXhsNGJreHPLiek7nMb7sBlmfTPkwqR5HSM66QqVzwtVmFbgWxeu9p+LsQYqddQ9jVHOT43T69O7TCZfGhh/JeZYaByhjibIWTKGeTKHTcWrCTPU/7GGw0Egt73ebGW7Wuf0G6x/bK4jOgvSUDWBwd2zVOCrjm/aSMJZE9BiKaaJwhSeUKklszY2g+oJPg+mqrRHB945Lm2AiXQzu X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR01MB6824.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(376002)(39850400004)(136003)(396003)(346002)(1800799009)(186009)(451199024)(83380400001)(2906002)(478600001)(66946007)(66556008)(66476007)(6666004)(6506007)(6486002)(52116002)(316002)(107886003)(2616005)(5660300002)(26005)(1076003)(6512007)(4326008)(8936002)(8676002)(41300700001)(86362001)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NlxIoS+wOPoPLHIt/APzMGQ5zoL69/7YvKf+wIMWqlkoghLOGhQxK3KpGZLmHPQ1jlZjlc0GoEL5HkOvdStc/ovq+iqEGXMIaKpzrH5h0QZxiP6uNLT4f4goXNkkzFX9d9aiNSYrRlOizY6VkwO1CZwd300CZsAvbGLMT98QhXouKLn2Ots407CM22pSgUr/qB09/LdrfC7Hf+6oEOe8zMS1jCMZD/MHygrEMPTcXK2wcwrKxiBVS/XnfL/ZLG3l7SorG9MG/q9XzyBJcy973X6O4zAuwVDKfbc3ZJaRuhgGyf+5erTT+gfibpmU2LmxyLlIUuC/LZwGwpro1cpf+vpchTIecMXhOaDnZsINiBrmcClNngtBVZgvpjtotB64FjE8cMbbXkkwE3aYGGrn3KJq9gynyDqpD8KNSqsTftEj2ccqE4chgQ/TSCSx16nsJb10/rFSlek6bhSqo/7f4JfqYIzSpKe4HyhmrZr0/8eYn/RuCPJfqY/gyqXVUJIr/8OURLT0vkTp6XXiBSrxFKqxoGxN+Ce8PIaVdzjg0+ZYL5HJbS6hq4KKWQ+hwww/07zIEiC05Y8uQdUrdpw5WPeN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-Exchange-CrossTenant-Network-Message-Id: fa03734f-ecd0-4406-1664-08db9ee7b139 X-MS-Exchange-CrossTenant-AuthSource: DM8PR01MB6824.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2023 06:03:35.2759 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Lr6/jPNTFua6VZrL+CLRg/LCvsib0UTRHPEWOd1N2fqsPoXIrxJpc5sAl8ZQr3ZKxWyXjqSxTfCrOvffB3Sp3jptgmzenAqPSrzkriYx6XkHyq0Q+0gWo3NpD7+Nyky9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR01MB6592 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230816_230342_062965_FC9E1F95 X-CRM114-Status: GOOD ( 10.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Avoid spurious ptimer interrupts for non-zero cntpoff
|
expand
|
diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h index 4eb601e7de50..f22cc733efb1 100644 --- a/arch/arm64/include/asm/virt.h +++ b/arch/arm64/include/asm/virt.h @@ -132,6 +132,11 @@ static __always_inline bool has_vhe(void) return cpus_have_final_cap(ARM64_HAS_VIRT_HOST_EXTN); } +static __always_inline bool has_cntpoff(void) +{ + return (has_vhe() && cpus_have_final_cap(ARM64_HAS_ECV_CNTPOFF)); +} + static __always_inline bool is_protected_kvm_enabled(void) { if (is_vhe_hyp_code()) diff --git a/arch/arm64/kvm/arch_timer.c b/arch/arm64/kvm/arch_timer.c index 75bddab3224f..98b0e8ac02ae 100644 --- a/arch/arm64/kvm/arch_timer.c +++ b/arch/arm64/kvm/arch_timer.c @@ -55,11 +55,6 @@ static struct irq_ops arch_timer_irq_ops = { .get_input_level = kvm_arch_timer_get_input_level, }; -static bool has_cntpoff(void) -{ - return (has_vhe() && cpus_have_final_cap(ARM64_HAS_ECV_CNTPOFF)); -} - static int nr_timers(struct kvm_vcpu *vcpu) { if (!vcpu_has_nv(vcpu))
Move helper function has_cntpoff() to header file as an inline function to make it available to other functions as well. Signed-off-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> --- arch/arm64/include/asm/virt.h | 5 +++++ arch/arm64/kvm/arch_timer.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-)