Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38586 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbdJMEg4 (ORCPT ); Fri, 13 Oct 2017 00:36:56 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9D4ZhbS117891 for ; Fri, 13 Oct 2017 00:36:56 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2djp4vry3n-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 13 Oct 2017 00:36:55 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Oct 2017 05:36:53 +0100 From: Shriya To: mpe@ellerman.id.au, mikey@neuling.org Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ego@linux.vnet.ibm.com, shilpa.bhat@linux.vnet.ibm.com, Shriya , stable@vger.kernel.org Subject: [PATCH v2] cpufreq: powernv: Fix the frequency read by /proc/cpuinfo Date: Fri, 13 Oct 2017 10:06:41 +0530 Message-Id: <1507869401-4715-1-git-send-email-shriyak@linux.vnet.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: 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 : commit fb5153d05a7d ("powerpc: powernv: Implement ppc_md.get_proc_freq()") Cc: stable@vger.kernel.org Signed-off-by: Shriya --- 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/platforms/powernv/setup.c index cf52d53..58e7ae5 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -312,7 +312,7 @@ static unsigned long pnv_get_proc_freq(unsigned int cpu) { unsigned long ret_freq; - ret_freq = cpufreq_quick_get(cpu) * 1000ul; + ret_freq = cpufreq_get(cpu) * 1000ul; /* * If the backend cpufreq driver does not exist, -- 1.9.1