Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754435AbdLTIEz (ORCPT ); Wed, 20 Dec 2017 03:04:55 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40494 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753206AbdLTIEu (ORCPT ); Wed, 20 Dec 2017 03:04:50 -0500 Date: Wed, 20 Dec 2017 13:34:37 +0530 From: Gautham R Shenoy To: Balbir Singh Cc: Gautham R Shenoy , Viresh Kumar , linux-pm@vger.kernel.org, "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , Paul Mackerras , Abhishek , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" Subject: Re: [PATCH] cpufreq: powernv: Add support of frequency domain Reply-To: ego@linux.vnet.ibm.com References: <20171213081937.16376-1-huntbag@linux.vnet.ibm.com> <20171214044239.GU3322@vireshk-i7> <93cc9d38-4fd8-d340-2263-108329b69b94@linux.vnet.ibm.com> <20171218082935.GH19815@vireshk-i7> <20171219092037.GA27991@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 x-cbid: 17122008-0012-0000-0000-0000157D0935 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008231; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000244; SDB=6.00962861; UDB=6.00487062; IPR=6.00742854; BA=6.00005752; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018638; XFM=3.00000015; UTC=2017-12-20 08:04:48 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17122008-0013-0000-0000-000050BB732E Message-Id: <20171220080437.GA31588@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-20_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712200121 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2173 Lines: 50 On Tue, Dec 19, 2017 at 09:21:52PM +1100, Balbir Singh wrote: > On Tue, Dec 19, 2017 at 8:20 PM, Gautham R Shenoy > wrote: > > Hi Viresh, > > On Mon, Dec 18, 2017 at 01:59:35PM +0530, Viresh Kumar wrote: > >> On 18-12-17, 10:41, Abhishek wrote: > >> > We need to do it in this way as the current implementation takes the max of > >> > the PMSR of the cores. Thus, when the frequency is required to be ramped up, > >> > it suffices to write to just the local PMSR, but when the frequency is to be > >> > ramped down, if we don't send the IPI it breaks the compatibility with P8. > >> > >> Looks strange really that you have to program this differently for speeding up > >> or down. These CPUs are part of one cpufreq policy and so I would normally > >> expect changes to any CPU should reflect for other CPUs as well. > >> > >> @Goutham: Do you know why it is so ? > >> > > > > These are due to some implementation quirks where the platform has > > provided a PMCR per-core to be backward compatible with POWER8, but > > controls the frequency at a quad-level, by taking the maximum of the > > four PMCR values instead of the latest one. So, changes to any CPU in > > the core will reflect on all the cores if the frequency is higher than > > the current frequency, but not necessarily if the requested frequency > > is lower than the current frequency. > > > > Without sending the extra IPIs, we will be breaking the ABI since if > > we set userspace governor, and change the frequency of a core by > > lowering it, then it will not reflect on the CPUs of the cores in the > > quad. > > > What about cpufreq_policy->cpus/related_cpus? Am I missing something? The frequency indicator passed via the device tree is used to derive the mask corresponding to the set of CPUs that share the same frequency. It is this mask that is set to cpufreq_policy->cpus/related_cpus. > > > > > Abhishek, > > I think we can rework this by sending the extra IPIs only in the > > presence of the quirk which can be indicated through a device-tree > > parameter. If the future implementation fix this, then we won't need > > the extra IPIs. > > Balbir Singh. >