Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3560665pxt; Tue, 10 Aug 2021 06:27:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoNQJXM2q+5nw3GEDKXLx7We+xsv0ZM2KIGqvb2/mKyJO3oEwuGF2uzCavEwa2I1NELfui X-Received: by 2002:a05:6402:8ce:: with SMTP id d14mr5038347edz.228.1628602020451; Tue, 10 Aug 2021 06:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628602020; cv=none; d=google.com; s=arc-20160816; b=NRqDHQlL9XKs3Zlvn3o9Bwl2kj0DLRDBD02zawWzkEwC9qhhja8pOvAZyLSxe5MVh+ LdxXC/vnLG8m59VXlF5pHtpkzfMrw01Dhoi97rsTBzU9H5MhjDcKJdnnI3P0SqD8v2xo GwXa6oQi/xHOUmEACfX11UmU24cfPUh8wLJr4QNDpyXDaWh9TtvDtIYu7FdMCHokDyCG brIirQJgX73TknT50z5FRdvuYwtQ6tAHU/xYWFgsg/ePSyY0Lj1bcQmJTrIJGI+nREpb bytaKYLnvQy3wJU4t1/USmv1WtRrEhmpGPqASIYOuEuskpf6m9iBOPnrPybLb8J3v22N ASHA== 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=a/2olOXyURJviveAIeOCNWdvW175yEByK2t1rOJsXY0=; b=GmbWy5YxNYjBb+7mrUVBxOWODad4LBpNJDY2sXutFC1ls/lwhUF1tdHLtCQBzg1fgE qYgSljfsTJMkQ8szEq2jqW0ouj2OZh8FS6gDgZcz1FhaR7EOolxljG8Xfb2Kk8TE2bql HuEZycL0j+HH1Kj6hbMuU+a8olKXtKUvGmFHkNTK+D+hWc4WaLlS/rbmv0omfmf/7R2C xFPIIoyDqyw2p69zQjtlZrdDejN7CjC//9CJPvYmbvfI0l8I08QSe2rRmjiH5mTgCEHU h8avacBhTDXF6vKrUdmyjfUwRcxmjWdMv99uC+pw7S6CuSBP72iSLW36yk84NCl5Dde4 FYEw== 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 cw26si3649578edb.32.2021.08.10.06.26.35; Tue, 10 Aug 2021 06:27:00 -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 S239743AbhHJKL5 (ORCPT + 99 others); Tue, 10 Aug 2021 06:11:57 -0400 Received: from foss.arm.com ([217.140.110.172]:52896 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230039AbhHJKL4 (ORCPT ); Tue, 10 Aug 2021 06:11:56 -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 608E46D; Tue, 10 Aug 2021 03:11:34 -0700 (PDT) Received: from [10.57.9.181] (unknown [10.57.9.181]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8384F3F70D; Tue, 10 Aug 2021 03:11:32 -0700 (PDT) Subject: Re: [PATCH 8/8] cpufreq: vexpress: Use auto-registration for energy model To: Viresh Kumar Cc: Rafael Wysocki , Vincent Donnefort , Sudeep Holla , linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <87fecd84e3f6ff6f153be14b0d53de93c0b04ae6.1628579170.git.viresh.kumar@linaro.org> <20210810100652.h473q6hgtc5czfyk@vireshk-i7> From: Lukasz Luba Message-ID: <2210acb9-2666-7aa9-d36c-346480541f3c@arm.com> Date: Tue, 10 Aug 2021 11:11:31 +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: <20210810100652.h473q6hgtc5czfyk@vireshk-i7> 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 8/10/21 11:06 AM, Viresh Kumar wrote: > On 10-08-21, 11:05, Lukasz Luba wrote: >> I can see that this driver calls explicitly the >> of_cpufreq_cooling_register() >> It does this in the cpufreq_driver->ready() callback >> implementation: ve_spc_cpufreq_ready() >> >> With that in mind, the new code in the patch 1/8, which >> registers the EM, should be called even earlier, above: >> ---------------------8<--------------------------------- >> /* Callback for handling stuff after policy is ready */ >> if (cpufreq_driver->ready) >> cpufreq_driver->ready(policy); >> ------------------->8---------------------------------- > > Thanks. I will look at this sequencing issue again. > >> This also triggered a question: >> If this new flag can be set in the cpufreq driver which hasn't set >> CPUFREQ_IS_COOLING_DEV >> ? > > Why not ? I thought someone could try to call cpufreq_cooling_register() from the cpufreq driver init function, but it's not possible. I have just checked that, so should be good with these two flags being independent and working fine. > >> I can only see one driver (this one in the patch) which has such >> configuration. >