From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752069AbdJFLSf (ORCPT ); Fri, 6 Oct 2017 07:18:35 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59998 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752013AbdJFLSc (ORCPT ); Fri, 6 Oct 2017 07:18:32 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 06 Oct 2017 16:52:48 +0530 From: shriyak To: Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, paulus@samba.org, ego@linux.vnet.ibm.com, mikey@neuling.org, aneesh.kumar@linux.vnet.ibm.com, Linuxppc-dev Subject: Re: [PATCH] cpufreq: powernv: Return the actual CPU frequency in /proc/cpuinfo In-Reply-To: <87mv544lgz.fsf@concordia.ellerman.id.au> References: <1507274648-14221-1-git-send-email-shriyak@linux.vnet.ibm.com> <87mv544lgz.fsf@concordia.ellerman.id.au> User-Agent: Roundcube Webmail/1.0.1 X-TM-AS-GCONF: 00 x-cbid: 17100611-2213-0000-0000-00000226F282 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007849; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000235; SDB=6.00927227; UDB=6.00466546; IPR=6.00707485; BA=6.00005623; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017419; XFM=3.00000015; UTC=2017-10-06 11:18:30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17100611-2214-0000-0000-000057C4B5F8 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-06_03:,, 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-1710060163 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-10-06 16:00, Michael Ellerman wrote: > Shriya writes: > >> 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. > > Sounds like a bug fix to me ? > > cheers > >> 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 Yes, its a bug fix. Thanks.