Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1873527pxb; Tue, 26 Oct 2021 18:21:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8+WDrHz9CKvJ4hNvSkIyeDSjXOeFYjDEDwhIKvFQmotm0GIc9rP9Zd+eQIqDI6fk8GmYf X-Received: by 2002:a65:564e:: with SMTP id m14mr21597066pgs.113.1635297710892; Tue, 26 Oct 2021 18:21:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635297710; cv=none; d=google.com; s=arc-20160816; b=vw3yNYtPDv//955n9OqsXr4QMxUUt8gJBMYzsReLsWfvlDloj4+zgDvZfmqT7gCszh iDn7p5GG25WmkEUs5X2m/QZGKbqfJznnyTiwofHa37rtbw8epxNnRmFDX8xHiGwtJXH+ uaEVf0sgVI8BFKBPivE1k/sSl3CGBtryZt5unU5ocuGNjXb41ASa6VD/oQP1fjjhIBGc XsuZVOuYMO2pYNxyguDnMuj75MoRL6NjF6YYs8ZMMwkucHXNmAr4fZ6DQmfSW6wpuk1Y +oN7o1IuIZuhBcvCGdjksUt+OpMBACbVy8OilFngMvQmlurAfwGDOtjn+Ew2suFI0cs/ jSIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Sri5XoZvqCByz2vb2UjwtiT5I0LkDcCO0W0vlUj4eqk=; b=NbvSS3uITcOJM8C7yEFeRwpGABvY9N2JPKucL/oQDfdVDZqlzsKEQcqFI8XUw3GvDi kn0Yb8gMxTKT0XlxN9DRJIvAkQa1xYHLqHMp7esFoJx1qz4IPHD4FZgDFEixb0ilz37r Ud725dI9+dxBk8anngmdOScHYeY1Mytpbp1SHdMKhXPfQ40kTSodoSn4fKa93Ve6wQfF qCLRkf1JBOnW5r7up4mQ0xbaRxIvh4bPUTjDBvyQjaNErN0+mafA2UPtfX5cDR4+a+4z e/TuS1boqfLHRYSyaoGZr7KkCei1ivnm+vXeKUcp06FmJlGwAa+fWv2wVRd/Z9HzTep5 dgJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si16802607plg.255.2021.10.26.18.21.35; Tue, 26 Oct 2021 18:21:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237572AbhJZQxe (ORCPT + 99 others); Tue, 26 Oct 2021 12:53:34 -0400 Received: from foss.arm.com ([217.140.110.172]:34932 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236197AbhJZQx2 (ORCPT ); Tue, 26 Oct 2021 12:53:28 -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 0FCBE1FB; Tue, 26 Oct 2021 09:51:04 -0700 (PDT) Received: from [192.168.185.184] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6F9823F70D; Tue, 26 Oct 2021 09:50:59 -0700 (PDT) Subject: Re: [PATCH v2 2/5] thermal: cpufreq_cooling: Use new thermal pressure update function To: Lukasz Luba , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, sudeep.holla@arm.com, will@kernel.org, catalin.marinas@arm.com, linux@armlinux.org.uk, gregkh@linuxfoundation.org, rafael@kernel.org, viresh.kumar@linaro.org, amitk@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, thara.gopinath@linaro.org, bjorn.andersson@linaro.org, agross@kernel.org References: <20211015144550.23719-1-lukasz.luba@arm.com> <20211015144550.23719-3-lukasz.luba@arm.com> From: Dietmar Eggemann Message-ID: <495d461a-d643-5dbf-7da8-74ddbdc486ca@arm.com> Date: Tue, 26 Oct 2021 18:51:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211015144550.23719-3-lukasz.luba@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/10/2021 16:45, Lukasz Luba wrote: [...] > @@ -479,10 +478,7 @@ static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev, > if (ret >= 0) { > cpufreq_cdev->cpufreq_state = state; > cpus = cpufreq_cdev->policy->related_cpus; > - max_capacity = arch_scale_cpu_capacity(cpumask_first(cpus)); > - capacity = frequency * max_capacity; > - capacity /= cpufreq_cdev->policy->cpuinfo.max_freq; Took me a while to realize that `cpufreq_cdev->policy->cpuinfo.max_freq` is 1000 * per_cpu(freq_factor, cpu), the latter being used now in arch_thermal_pressure_update(). Maybe worth mentioning in the patch header?