From patchwork Thu Sep 12 07:19:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhan X-Patchwork-Id: 13801553 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 5617FEE6457 for ; Thu, 12 Sep 2024 07:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=BwdmEJaFhYEqjVIXDP3QdXEClSHA446Djx9eBCRZEg4=; b=aC0pziOkkBkTBZmVPcJZXjs4HY HFKeS5AkeWbRqKIg0p0CI71xkUrufAzvKv8xS4p/qlVH/kc42dVm+Ri3jzd1dE4/SCpwh+gOiXq29 +Ks4wR1ECYtDMH57z1YQh/O0cG6F74/mdJakT6eGNKiVynwYVOoYROaCOC/xQryvV/hSKxXGTeF0+ uXfNCQ22HKGNTxflHxN8TxB8a7o9O/0Y9fSIL/gi47BdYizthV2JyCrFGHlnAdQw7yMQByzV/JHkt SgaF2KC5UPqR0G5AhodoDMJj6LLjR4jxsEpV1cUc24stHQHP3NpiagZF/DggyLalLNxAcEYPEF1ma fgNxSFFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soeGQ-0000000CAUW-0T2S; Thu, 12 Sep 2024 07:29:14 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soeDI-0000000CA4v-3wKf for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2024 07:26:03 +0000 Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4X489l2G0nz20l3L; Thu, 12 Sep 2024 15:25:47 +0800 (CST) Received: from dggpeml500019.china.huawei.com (unknown [7.185.36.137]) by mail.maildlp.com (Postfix) with ESMTPS id 3C1361A016C; Thu, 12 Sep 2024 15:25:54 +0800 (CST) Received: from localhost.localdomain (10.90.30.45) by dggpeml500019.china.huawei.com (7.185.36.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 12 Sep 2024 15:25:53 +0800 From: Jie Zhan To: , , , , CC: , , , , , , , , , , , Subject: [PATCH v2 0/3] cppc_cpufreq: Rework ->get() error handling when cores are idle Date: Thu, 12 Sep 2024 15:19:58 +0800 Message-ID: <20240912072001.433980-1-zhanjie9@hisilicon.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-Originating-IP: [10.90.30.45] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500019.china.huawei.com (7.185.36.137) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240912_002601_823430_2134114E X-CRM114-Status: UNSURE ( 7.29 ) 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 Internal: A quick update of V2 with the feedback received today. Also, cc'd a wider range of people. Looking forward to further discussion and feedback. ----------------- External: CPPC feedback counters can be unchanged or 0 when cores are idle, e.g. clock-gated or power-gated. In such case, get the latest desired perf for calculating frequency. Also, the HiSilicon CPPC workaround is now handled by the common code and can be removed. Jie Zhan (3): cppc_cpufreq: Return desired perf in ->get() if feedback counters are 0 cppc_cpufreq: Return latest desired perf if feedback counters don't change cppc_cpufreq: Remove HiSilicon CPPC workaround drivers/cpufreq/cppc_cpufreq.c | 103 +++++++++------------------------ 1 file changed, 27 insertions(+), 76 deletions(-)