From patchwork Mon Nov 27 16:08:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beata Michalska X-Patchwork-Id: 13469894 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 072DBC07CB1 for ; Mon, 27 Nov 2023 16:09:39 +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: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:In-Reply-To:References: List-Owner; bh=dP/J/Z0OfyPJU6+vmoSSZVEtcw/a5LiHSfWOdAJd+Zc=; b=4vPfv8CRwqBAV8 9A7qpsPSPyxniTvDcTuKT8weYFfQzN+tOy21Fb8Qp6J2T3nHLFYpa7IbF5JM2gx5iDUBweeYcQeWL Rcm27T9Kc2uFfWQwKkRMXTm9eOekGuYye2aeYbA9J2St1hWIFAj4S3esAgpnqx5LBTV1hM6JzDjVt cq1Py0PJjR5AMG74xO3SBSzgm/jZL3WeSrQQ2a7EJhnYv6aTu7aOSVD+J6HFiNCrdjMoExVO6cr5H Vug1xNJn/XSSWmfVudqmkzdB3gKKBy92zQOpKVliN7+AGvEPfP3Pz+SJOdqHxQICaEQytAwgw0sOx gHRN/hs8XprWKmY/RiBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7eAc-002uq5-0H; Mon, 27 Nov 2023 16:09:14 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7eAY-002up1-1J for linux-arm-kernel@lists.infradead.org; Mon, 27 Nov 2023 16:09:12 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5D2162F4; Mon, 27 Nov 2023 08:09:46 -0800 (PST) Received: from e125905.cambridge.arm.com (e125905.cambridge.arm.com [10.1.194.73]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1D48D3F6C4; Mon, 27 Nov 2023 08:08:57 -0800 (PST) From: Beata Michalska To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, sumitg@nvidia.com Cc: sudeep.holla@arm.covm, will@kernel.org, catalin.marinas@arm.com, viresh.kumar@linaro.org, rafael@kernel.org, ionela.voinescu@arm.com, yang@os.amperecomputing.com, linux-tegra@vger.kernel.org Subject: [PATCH v2 0/2] Add support for AArch64 AMUv1-based arch_freq_get_on_cpu Date: Mon, 27 Nov 2023 16:08:36 +0000 Message-Id: <20231127160838.1403404-1-beata.michalska@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231127_080910_509922_25E7616A X-CRM114-Status: UNSURE ( 8.71 ) X-CRM114-Notice: Please train this message. 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 Introducing AArch64 specific version of arch_freq_get_on_cpu, cashing on existing implementation for FIE and AMUv1 support. Additionally wiring it up with cpufreq_verify_current_freq to hopefully eliminate issues when cpufreq_driver->get() returns frequency that is not entirely aligned. The changes have been rather lightly (due to some limitations) tested on an FVP model. v2: - Splitting the patches - Adding comment for full dyntick mode - Plugging arch_freq_get_on_cpu into cpufreq_verify_current_freq instead of in show_cpuinfo_cur_freq to allow the framework to stay more in sync with potential freq changes [1] https://lore.kernel.org/lkml/20230606155754.245998-1-beata.michalska@arm.com/ Beata Michalska (1): arm64: Provide an AMU-based version of arch_freq_get_on_cpu Sumit Gupta (1): cpufreq: Wire-up arch-flavored freq info into cpufreq_verify_current_freq arch/arm64/kernel/topology.c | 39 ++++++++++++++++++++++++++++++++++++ drivers/cpufreq/cpufreq.c | 3 ++- 2 files changed, 41 insertions(+), 1 deletion(-)