Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp403584imm; Tue, 22 May 2018 22:02:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpkaUor+eZ8hSte3yAezlq6cOabB8U15DzAknbAg2z+9kW9g+VDbTs/q7xNhpF4cMULuFVj X-Received: by 2002:a63:a05d:: with SMTP id u29-v6mr1117882pgn.80.1527051763332; Tue, 22 May 2018 22:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527051763; cv=none; d=google.com; s=arc-20160816; b=yBUnddMQbmCCZYXkEhcyDeFt6OdnV9GBB21HtmyqCCGYV0OtCgQnA9AmNwtd+ONSx1 5R94BOgDnH5pnXf/SIhXetPYqDyhBd/AOzNTjwBYbG+Sa0uHYUY34DQ5LsLtXYdhUVMT 6Nz5Qt9NGZPxZgMx9mb1Y7ViANu7IFNS04rSl4BKG7K4JR6otGuEtrpqUE0/l2v/5TwA u/AE/8S/cVatEcGTY+Ix3QjXpp+ERN6gJRZQ5cUyJJF587kSMeE1co+7Axmaunz76NUb 96EK2PhYlHejH+06KR9Hh48epBcq0EfROGfyGI2hmSIOnXoTO+qxolzaqY66Xr5o3SXc JU3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=d0NjEzpOEOhYHMDCbkKSPogH5xu78dpjj+9z37NjgU8=; b=Fl5X3d6HtHn8mPjR802aI2VrCm5hfWJNT1xyr+skPUdYGkfERwaRkQG0E3FZya6CC/ 0+Iep82Pt2iwN4X4ipRwT6jRCXNjuRYrqjyT6CeiGmOGSrR1u4kJ/dBJnzt7hu7Ih6nJ 194ACExXIp+27JOyMNqwxnpAHqd/3FU7D8ADI5zt6tnmwZB0H60Xugel2edkfJJnGozH +b4LVRFjv6u+USfQAR40xdx1/BIi1T3O/CAO6XmZMluSUysXf2yxQstLXZ1xHGuht64v kxwQOIRu3lJ4+khsvFPHjgMyKMZ7j7PsY+w4DKh6CsjxSnx3shLZnv16ABO8tLFJmVuf KBmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VowDFQ45; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6-v6si18302943pfi.147.2018.05.22.22.02.25; Tue, 22 May 2018 22:02:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VowDFQ45; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753899AbeEWFCN (ORCPT + 99 others); Wed, 23 May 2018 01:02:13 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:40907 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbeEWFCM (ORCPT ); Wed, 23 May 2018 01:02:12 -0400 Received: by mail-pg0-f65.google.com with SMTP id l2-v6so8847982pgc.7 for ; Tue, 22 May 2018 22:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=d0NjEzpOEOhYHMDCbkKSPogH5xu78dpjj+9z37NjgU8=; b=VowDFQ45mLkcY0EaT7zL6CCU8ilWWLSUCMU3jY6COg8TLtg0pbY98qcCoFS9qo6d3t im4WVXQUDgc5/lJOnBKrsVyT/WdhsXiJUijcSoQhs0SYqYnoD4ourqb8EdAgm9J6/Tjz EX6gPywfk7elHg7cwrrim85WnnfkwMatwFy/A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=d0NjEzpOEOhYHMDCbkKSPogH5xu78dpjj+9z37NjgU8=; b=DDhiufpmVLluGv1S7DdlVyvUP8lwFsRVrxnz6oD3qH98cPtfWCIQvwWXEytTtGmMMt ZJ/qXcoclS70sGkNqfvMJ/PLUSW1k1QOSe2G3tLDSGoRVtSnSK2azDOJmg1ol+xwktVX Yjn6zTWTxSG2YiLEbNHDY6H/H07uspqkDuCgmN7Rn2Ff4rBSz31cNmHnGxMlXz+E1gy0 PXox4BewVeHsy1kEc2cOnnM8IhRaxDWNbe+5ANI/pTQG+Kq7UW+oY0IQRLURgeS5wp1o tJUqNSBmIWxGVra3mx1OCy2zUuPjRjPStrKkIV14ZXl0xpjzvcecvf0wU4EM+bpGyFNC nbmA== X-Gm-Message-State: ALKqPwfYRkYMW5bxkJ5/GYnbP6AqU9ZNCfPVX95E+0pjHx8qN7bEV0vb HhZ55poqJaB5en3i0ag4+N3ZgQ== X-Received: by 2002:a65:41cd:: with SMTP id b13-v6mr1093375pgq.72.1527051731931; Tue, 22 May 2018 22:02:11 -0700 (PDT) Received: from localhost ([122.167.163.112]) by smtp.gmail.com with ESMTPSA id p12-v6sm23397212pgn.26.2018.05.22.22.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 22:02:11 -0700 (PDT) Date: Wed, 23 May 2018 10:32:08 +0530 From: Viresh Kumar To: George Cherian Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, rjw@rjwysocki.net Subject: Re: [PATCH] cpufreq / CPPC: Add cpuinfo_cur_freq support for CPPC Message-ID: <20180523050208.rvbeawn377oqzpzx@vireshk-i7> References: <1526989324-4183-1-git-send-email-george.cherian@cavium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526989324-4183-1-git-send-email-george.cherian@cavium.com> User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-05-18, 04:42, George Cherian wrote: > Per Section 8.4.7.1.3 of ACPI 6.2, The platform provides performance > feedback via set of performance counters. To determine the actual > performance level delivered over time, OSPM may read a set of > performance counters from the Reference Performance Counter Register > and the Delivered Performance Counter Register. > > OSPM calculates the delivered performance over a given time period by > taking a beginning and ending snapshot of both the reference and > delivered performance counters, and calculating: > > delivered_perf = reference_perf X (delta of delivered_perf counter / delta of reference_perf counter). > > Implement the above and hook this to the cpufreq->get method. > > Signed-off-by: George Cherian > --- > drivers/cpufreq/cppc_cpufreq.c | 44 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 44 insertions(+) Acked-by: Viresh Kumar -- viresh