From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam03on0106.outbound.protection.outlook.com ([104.47.42.106]:32336 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932636AbeARVGY (ORCPT ); Thu, 18 Jan 2018 16:06:24 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Shriya , Michael Ellerman , Sasha Levin Subject: [added to the 4.1 stable tree] powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo Date: Thu, 18 Jan 2018 21:01:42 +0000 Message-ID: <20180118205908.3220-258-alexander.levin@microsoft.com> References: <20180118205908.3220-1-alexander.levin@microsoft.com> In-Reply-To: <20180118205908.3220-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Shriya This patch has been added to the stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ Upstream commit cd77b5ce208c153260ed7882d8910f2395bfaabd ] The call to /proc/cpuinfo in turn calls cpufreq_quick_get() which returns the last frequency requested by the kernel, but may not reflect the actual frequency the processor is running at. This patch makes a call to cpufreq_get() instead which returns the current frequency reported by the hardware. Fixes: fb5153d05a7d ("powerpc: powernv: Implement ppc_md.get_proc_freq()") Signed-off-by: Shriya Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/platforms/powernv/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platform= s/powernv/setup.c index 16fdcb23f4c3..20974478f8d0 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -469,7 +469,7 @@ static unsigned long pnv_get_proc_freq(unsigned int cpu= ) { unsigned long ret_freq; =20 - ret_freq =3D cpufreq_quick_get(cpu) * 1000ul; + ret_freq =3D cpufreq_get(cpu) * 1000ul; =20 /* * If the backend cpufreq driver does not exist, --=20 2.11.0