From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751350AbdJFHYY (ORCPT ); Fri, 6 Oct 2017 03:24:24 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52110 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750714AbdJFHYW (ORCPT ); Fri, 6 Oct 2017 03:24:22 -0400 From: Shriya To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au, paulus@samba.org Cc: mikey@neuling.org, aneesh.kumar@linux.vnet.ibm.com, ego@linux.vnet.ibm.com, Shriya Subject: [PATCH] cpufreq: powernv: Return the actual CPU frequency in /proc/cpuinfo Date: Fri, 6 Oct 2017 12:54:08 +0530 X-Mailer: git-send-email 1.9.1 X-TM-AS-MML: disable x-cbid: 17100607-1617-0000-0000-00000201FDD8 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100607-1618-0000-0000-000048529203 Message-Id: <1507274648-14221-1-git-send-email-shriyak@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-06_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710060110 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make /proc/cpuinfo read the frequency of the CPU it is running at instead of reading the cached value of the last requested frequency. In conditions like WOF/throttle CPU can be running at a different frequency than the requested frequency. 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 897aa14..55ea4bf 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -311,7 +311,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