From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8557FC4320A for ; Tue, 10 Aug 2021 09:18:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6659160720 for ; Tue, 10 Aug 2021 09:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238832AbhHJJS3 (ORCPT ); Tue, 10 Aug 2021 05:18:29 -0400 Received: from foss.arm.com ([217.140.110.172]:51682 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238813AbhHJJS0 (ORCPT ); Tue, 10 Aug 2021 05:18:26 -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 78AA6D6E; Tue, 10 Aug 2021 02:18:04 -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 EC2E23F718; Tue, 10 Aug 2021 02:17:59 -0700 (PDT) Subject: Re: [PATCH 0/8] cpufreq: Auto-register with energy model To: Viresh Kumar , Andy Gross Cc: Rafael Wysocki , Vincent Donnefort , Bjorn Andersson , Cristian Marussi , Fabio Estevam , Kevin Hilman , Matthias Brugger , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Sudeep Holla , linux-pm@vger.kernel.org, Vincent Guittot , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org References: From: Lukasz Luba Message-ID: <6449a61f-a5fc-0b81-65b2-7bf77b8a71aa@arm.com> Date: Tue, 10 Aug 2021 10:17:58 +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: 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-arm-msm@vger.kernel.org Hi Viresh, I like the idea, only small comments here in the cover letter. On 8/10/21 8:36 AM, Viresh Kumar wrote: > Provide a cpufreq driver flag so drivers can ask the cpufreq core to register > with the EM core on their behalf. This allows us to get rid of duplicated code > in the drivers and fix the unregistration part as well, which none of the > drivers have done until now. The EM is never freed for CPUs by design. The unregister function was introduced for devfreq devices. > > This would also make the registration with EM core to happen only after policy > is fully initialized, and the EM core can do other stuff from in there, like > marking frequencies as inefficient (WIP). Though this patchset is useful without > that work being done and should be merged nevertheless. > > This doesn't update scmi cpufreq driver for now as it is a special case and need > to be handled differently. Though we can make it work with this if required. The scmi cpufreq driver uses direct EM API, which provides flexibility and should stay as is. Let me review the patches. Regards, Lukasz