From patchwork Thu Sep 12 07:22:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhan X-Patchwork-Id: 13801623 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 62E37EE6454 for ; Thu, 12 Sep 2024 07:37:02 +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=3Ma9tCy8zsc6z92yFJjqLn8QAI8Pa0ZxS+gMzbKurQ0=; b=0wbuqEMk6ovCShkSwG0hLVcKuO omXjwoYkdcI2B6iUhsfzc8fRSgZdYFTFawacqTHp/NkIW53bWRGRvjhEx3tDZ3Htm5vcRkCLphf6p 9tVHKXa4/4Wqnr4ggNnRHhoZ3/64/tehCXJte7aIFIyYskS59iarAVz5nm58tGIDq95xerf+PsMOT lt3Mt1vcq5D1Y4J5OG191UsQUuX1ZJiliPgxFYVYIekIlFP3aPpu+ObauADBoI/bzaOv1Qv+8gEAB rq72mNyVjmQ2QqNehpLhGaToohDUA6l89WksKSLDJnG02KsOdEuAkGWruALpoMCesRBmNbWHheKQI Kd4tQ0rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soeNo-0000000CBzy-0Zik; Thu, 12 Sep 2024 07:36:52 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soeFl-0000000CAPj-2sRN for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2024 07:28:35 +0000 Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4X48Dc2thJz69XP; Thu, 12 Sep 2024 15:28:16 +0800 (CST) Received: from dggpeml500019.china.huawei.com (unknown [7.185.36.137]) by mail.maildlp.com (Postfix) with ESMTPS id 856981800D4; Thu, 12 Sep 2024 15:28:23 +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:28:23 +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:22:28 +0800 Message-ID: <20240912072231.439332-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: dggems706-chm.china.huawei.com (10.3.19.183) 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_002834_006705_E58D699F X-CRM114-Status: UNSURE ( 6.94 ) 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 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(-)