Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB4CE33999; Tue, 2 Jul 2024 03:34:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719891298; cv=none; b=hJDJF537KlUSAs3EtDRL3nAR4y1zpY40MXIu06fKeUmJJ+BCh56AO+v4y2c3gvy5r9mVW/v/vNKEYdpL9DfaivQLuOlN5/gGeaoQNo9yhwLee8GyIrtXNd6tt0huzhZ3XaSwAeIOFTuOFQPfz4MPNkA8XnCPm2V7ERJnwDWPQJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719891298; c=relaxed/simple; bh=c5AkcvKWxB+VaeblOPWvKnHaTfV+bapdvdk6en6EoaU=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=faZgDt6HPLJrF/0wQQYqUfzucubf1IOLErXcusA06/B5c/qeoRhdFauDbhL48rCh94xXcQhHTsxs2qN0ttUkW/HYxmI/pkIyvxslTlhl5zlyPCdHdUwgCdcWrn/FUeLQSKaX9oTplkfTKpS35/k1tN1y76YjF6/KEx3phWXsJVs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4WCpQg2KbJz1xtBh; Tue, 2 Jul 2024 11:33:15 +0800 (CST) Received: from dggpemm500018.china.huawei.com (unknown [7.185.36.111]) by mail.maildlp.com (Postfix) with ESMTPS id 667B41402D0; Tue, 2 Jul 2024 11:34:47 +0800 (CST) Received: from [10.174.178.96] (10.174.178.96) by dggpemm500018.china.huawei.com (7.185.36.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 2 Jul 2024 11:34:46 +0800 Message-ID: Date: Tue, 2 Jul 2024 11:34:46 +0800 Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] cpufreq/cppc: fix perf_to_khz/khz_to_perf conversion exception To: Viresh Kumar CC: , , , , , References: <20240506075816.1325303-1-liwei728@huawei.com> <20240520072513.vtlqwjbmxugvuppj@vireshk-i7> From: "liwei (JK)" In-Reply-To: <20240520072513.vtlqwjbmxugvuppj@vireshk-i7> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500018.china.huawei.com (7.185.36.111) kindly ping 在 2024/5/20 15:25, Viresh Kumar 写道: > On 06-05-24, 15:58, liwei wrote: >> When the nominal_freq recorded by the kernel is equal to the lowest_freq, >> and the frequency adjustment operation is triggered externally, there is >> a logic error in cppc_perf_to_khz()/cppc_khz_to_perf(), resulting in perf >> and khz conversion errors. >> >> Fix this by adding the branch processing logic when nominal_freq is equal >> to lowest_freq. >> >> Fixes: ec1c7ad47664 ("cpufreq: CPPC: Fix performance/frequency conversion") >> Signed-off-by: liwei >> --- >> v2: >> - Fix similar issue in cppc_khz_to_perf() >> >> drivers/acpi/cppc_acpi.c | 22 +++++++++++++++++----- >> 1 file changed, 17 insertions(+), 5 deletions(-) > > Acked-by: Viresh Kumar >