Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp879666pxb; Wed, 27 Oct 2021 14:20:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhhd5UF2ZyPrARTKqJs6fA/sSL22gxNBb+CWYBjsrb+aUfx9esiQ80CnpuC5HVUoP1Q8i8 X-Received: by 2002:a17:906:6087:: with SMTP id t7mr79230ejj.206.1635369649893; Wed, 27 Oct 2021 14:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635369649; cv=none; d=google.com; s=arc-20160816; b=fuPDI7U+7/xk1tLGZvL+kGRh5yXSQqSuUJ2FypzsGKaCQwlzQz7nS1i7ypFKSw6hcM NuBLqTU/TzQRztquuEr31xI4EqPZRYdxqVFisdixCU032bZP0cik0kKvPqEU2hcBUoWY NH8ICU44VdOMxGWYZphDG8qLlX+/oeyQ5C+Z85WiZelXKsMCT3nsYBmBVb4DBnNh3Hku cEXzFtH2GcZ+4J+Hl/lnIJqUwiX/Mqvipl7su41SB+KNieXUKcNwbe7d8QsYMDX77n9T h/a7tTOAUHEPiXc6IG2bHRzmAyeBE8ke2RhNNkEQNoDCGt/OiwEJgxuxs8xqcLeI28+R SSpg== 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=KBchX+8Vdamx28yh4cFVPY45LHBUz8BN+KO/kNHX2eQ=; b=dIXoZfasH3gxucHB+3O5G5I9TcCpuPVVUi1aWDokqz9hYZUR8jCrd9yjQb8wq8zQbS zCP8YBNQ8kTMf+l3d/QEFoIrObhK4b+JFU79ZWnoZIxtfX4dfWspW7gKxP11Qxsy6pLD 0brDvtTEkZycdq5n8TIhaug7Uz9Q3csQytmWsIxirGUXgsuRr68wO/P1AT8jCkbq0Pzy kAJhYGi9sdakbzPutLkoueE9Q++RE3zqgIlwhIiPKvyVvGjbQ3tVqGYXojGeeap2i3f6 k1vatPbn+//2j62JCtezjFhjfCMwHe594lt+QlTxVlo9mMvFOLWz0rUTYyoTNVgYueiC 9ESA== 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 nd33si1523980ejc.633.2021.10.27.14.20.23; Wed, 27 Oct 2021 14:20:49 -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 S232021AbhJ0JDL (ORCPT + 97 others); Wed, 27 Oct 2021 05:03:11 -0400 Received: from foss.arm.com ([217.140.110.172]:41002 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232047AbhJ0JDH (ORCPT ); Wed, 27 Oct 2021 05:03:07 -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 C1B131063; Wed, 27 Oct 2021 02:00:41 -0700 (PDT) Received: from [10.57.24.210] (unknown [10.57.24.210]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D667C3F70D; Wed, 27 Oct 2021 02:00:38 -0700 (PDT) Subject: Re: [PATCH v2 2/5] thermal: cpufreq_cooling: Use new thermal pressure update function To: Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, 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> <495d461a-d643-5dbf-7da8-74ddbdc486ca@arm.com> From: Lukasz Luba Message-ID: <3397e593-637a-8b23-f65e-2aca4d84e627@arm.com> Date: Wed, 27 Oct 2021 10:00:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <495d461a-d643-5dbf-7da8-74ddbdc486ca@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/21 5:51 PM, Dietmar Eggemann wrote: > 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? > OK, I will put that information into the patch description in the next version.