Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7127875ybh; Thu, 8 Aug 2019 10:34:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8FxbheePZT5ld1iN9PtvynC0RsL3UdI8yFSNFetrmSfaRjUY/l1iRWZ33vhkQEBhJoxLn X-Received: by 2002:a62:1d8f:: with SMTP id d137mr17065451pfd.207.1565285678285; Thu, 08 Aug 2019 10:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565285678; cv=none; d=google.com; s=arc-20160816; b=q7B46fgBj994bkYCvFgehPBX4cpBUPksaGfdleBYdd8jwVFb6p/vMwK3z43wKVM16M 6bZ1njbaTNdSUaW+Fzbu4Hl2hqJuNi93Rq+Kl5ooq8xEuffUh0OooxIwtrs7z4yS/oZx 8RX1O/VqiKmCyyyduRJ1Zr5zqXjjSRaz1j00N1D3HWJ90CuLaA1ErftrwXHYZBzAJS2d vuMdkOiZKbg8mY5o2d+qBG13mAcLq1no1bHuXxXjJTYy+8WrsLjXn/7dsE0Dx3WfmMPZ JwbrkOK1lYNUf+sxlSRb0+mRaBqSx7vZuKPz2CW6X3folHpz/GwqiWzVFxxM+5wMO28O WtMQ== 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; bh=PUqm3nEvDMgKo+E1gii7dJhcf2bstatU6q4sFF3Ln8s=; b=nBfTqWmBoSAiIPsZzKF7uZPpv1d/Cqb2a3YptRqtO/Ot/+4hBwrrY0i6OGPihxSpQl Pvwo7pIsz8n3k01ua3nER71g7Aa2lMTkW19zmwor7W2AvrwT8Z8P4jpP/RKudn91LdgZ QXu+QG9dDUPaVdppTy0AIdMHASJQTnfju+VXOaSaI9rnI16cVYznP/DrliHYrMQzGIMo g6z6xt+0ehKSeob92CbF6PyedO72A2r7v3pa7s57kzBT4GHpFv8L4ZhkQkx9xoXh4lGQ tUn0k45n+a0pSLbAHKWdU8ZSFIYKxRGE7lt1I/+hm6iitka2iLobvIz21Ennuh/j3NS1 2xzQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h194si55052121pfe.214.2019.08.08.10.34.22; Thu, 08 Aug 2019 10:34:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404379AbfHHRcf (ORCPT + 99 others); Thu, 8 Aug 2019 13:32:35 -0400 Received: from foss.arm.com ([217.140.110.172]:36710 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404276AbfHHRcf (ORCPT ); Thu, 8 Aug 2019 13:32:35 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D55A015A2; Thu, 8 Aug 2019 10:32:34 -0700 (PDT) Received: from queper01-lin (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D17483F575; Thu, 8 Aug 2019 10:32:33 -0700 (PDT) Date: Thu, 8 Aug 2019 18:32:32 +0100 From: Quentin Perret To: Douglas RAILLARD Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, rjw@rjwysocki.net, viresh.kumar@linaro.org, agross@kernel.org Subject: Re: [PATCH 1/2] cpufreq: drivers: Enable frequency invariance in qcom-cpufreq-hw Message-ID: <20190808173230.53ddupihjlr6uvne@queper01-lin> References: <20190808131857.21082-1-douglas.raillard@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190808131857.21082-1-douglas.raillard@arm.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Douglas, On Thursday 08 Aug 2019 at 14:18:57 (+0100), Douglas RAILLARD wrote: > Add calls to arch_set_freq_scale() in qcom-cpufreq-hw driver to enable > frequency invariance. Is there a patch 2/2 ? > > Signed-off-by: Douglas RAILLARD > --- > drivers/cpufreq/qcom-cpufreq-hw.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c > index 4b0b50403901..3bd3b8b268d9 100644 > --- a/drivers/cpufreq/qcom-cpufreq-hw.c > +++ b/drivers/cpufreq/qcom-cpufreq-hw.c > @@ -34,9 +34,12 @@ static int qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy, > unsigned int index) > { > void __iomem *perf_state_reg = policy->driver_data; > + unsigned long freq = policy->freq_table[index].frequency; > > writel_relaxed(index, perf_state_reg); > > + arch_set_freq_scale(policy->related_cpus, freq, > + policy->cpuinfo.max_freq); > return 0; > } > > @@ -63,6 +66,7 @@ static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy, > { > void __iomem *perf_state_reg = policy->driver_data; > int index; > + unsigned long freq; > > index = policy->cached_resolved_idx; > if (index < 0) > @@ -70,7 +74,11 @@ static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy, > > writel_relaxed(index, perf_state_reg); > > - return policy->freq_table[index].frequency; > + freq = policy->freq_table[index].frequency; > + arch_set_freq_scale(policy->related_cpus, freq, > + policy->cpuinfo.max_freq); > + > + return freq; > } > > static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, > -- > 2.22.0 Reviewed-by: Quentin Perret Thanks, Quentin