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=-1.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 3A3BCC4338F for ; Wed, 11 Aug 2021 09:50:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E65436101D for ; Wed, 11 Aug 2021 09:50:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E65436101D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SEdYjAnkqf3iX0js8avrnqGTcq1ryYUxa2EPGADlGUQ=; b=EgOJbaGO5XjE7G iVxMR13Ldn0/L/BnJoThYZ0LuxLwLg5W/ERWgn7hAqb6+JgJWN8/CQn1qP4ReSJ1/88P7CmrXIKOO Qpz8Wmidf3rgzShbeEZKjmoa7Iyo9IOGaqXXFIYfTacJfNHMBngo1/oRomvfyQ4KonkS88aeKhZYz DJCBanAegqO8KUSj4wcUDpeTPHzmAe8Xmim7/imMZRBjBFaN+spZ5xUkFCNv4/X43RTY0BcpMMoRy VDuaAirCpMIAPlz+ueyulFMMO1VTIpHdO3egFC0ZPSiijMMSIqbYr/7QTaFXhtF/7UWGcLBXrrxU9 /HiDwtDnKyi5K1EEQFhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDkpK-006PPe-GC; Wed, 11 Aug 2021 09:47:11 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDkcr-006KXl-9z for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 09:34:18 +0000 Received: by mail-wm1-x335.google.com with SMTP id c129-20020a1c35870000b02902e6b6135279so28652wma.0 for ; Wed, 11 Aug 2021 02:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=vnsVN4bcM0E0y8yL+4jX4NPKN0s5XVfHXg6t0sA+kKU=; b=u8FXx8PbqKg72yRV7K6aX2nwg+RaUIMIKfNSyZDi54QHZNgrnmHHhpQ3uW6MNefq+t X/92op1mryh95Wm/AH8EEK6FZ9dY6WHyWJJ6gWW9CV/snKBi8+dpGzZiAUW4j3bT+sQA kEkRFMvY/K+F2WRBhUU/Aw+ZhvCvgDYP07VdNhurn9IQQUMuRJhYvRvsUghUHu0Cd7lm 2HxjMjXHAezdkF4PXpqZnFGn0GCPqevGzJ4qOY7sM7q2tRu5scxmVsHV2bkXeB5xOZay Vb/qjRNLocExEd0jwIXNuWn1dpNVgbP5WBCp0KJvYay/+69ktW+ZNYmVv3DQXiNSoqSs F/Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vnsVN4bcM0E0y8yL+4jX4NPKN0s5XVfHXg6t0sA+kKU=; b=P1ZgdD051NURyzN/iJ4Bk8q37C0ed7Rg2yd71iDEPn8QUZOkHjNFrpV2rykr7cGsDB XWKR5p/6nHrDRNiBbWdQhumjutmtuXwljqQK8aLiXiR7iUqZI5ZKetnRR29vH2ANFbTE XoHObTUT4clIFLjEpvG9Nl1eWQ4NuBMNVZNwFuFp8j8+yY8FB9Ki+cGDYHW+1gQ7Rewm 4mqmmZcrDQsQ9q7/+cTi9uVnn43v1JJ4orTFTvDgSffVDU8swYdTnSUYNU1xpF1SKWH6 1787E10i7odKyJy7ZL0GFvArdOIH7aky7yw+8SGNpKb2jI4s5bBe+vH96cw1qOnweX5r 5K2A== X-Gm-Message-State: AOAM533pu48NhXUh//SeXC6i8BOaPgKCmWo3FMF+3ogWKUjF2bNo1VMj U+sPubIPvEXiYp1abSFilNCn7g== X-Google-Smtp-Source: ABdhPJwkwReehafMcUbIlZNd433otHjSQ1cTcW/iaeTfVVwqL8nOZJoLVmtkJ6iZwqwM5f+LD1MLMA== X-Received: by 2002:a7b:cd83:: with SMTP id y3mr26353421wmj.126.1628674455789; Wed, 11 Aug 2021 02:34:15 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:43fd:e634:73d9:e10e]) by smtp.gmail.com with ESMTPSA id i14sm20670426wmq.40.2021.08.11.02.34.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 02:34:15 -0700 (PDT) Date: Wed, 11 Aug 2021 10:34:09 +0100 From: Quentin Perret To: Viresh Kumar Cc: Rafael Wysocki , Vincent Donnefort , lukasz.luba@arm.com, Andy Gross , 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 Subject: Re: [PATCH 0/8] cpufreq: Auto-register with energy model Message-ID: References: <20210811051859.ihjzhvrnuct2knvy@vireshk-i7> <20210811091321.xtb776q4t6cwyanx@vireshk-i7> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210811091321.xtb776q4t6cwyanx@vireshk-i7> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_023417_435235_06213C53 X-CRM114-Status: GOOD ( 29.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wednesday 11 Aug 2021 at 14:43:21 (+0530), Viresh Kumar wrote: > On 11-08-21, 09:37, Quentin Perret wrote: > > On Wednesday 11 Aug 2021 at 10:48:59 (+0530), Viresh Kumar wrote: > > > I had to use the pm-opp version, since almost everyone was using that. > > > > > > On the other hand, there isn't a lot of OPP specific stuff in > > > dev_pm_opp_of_register_em(). It just uses dev_pm_opp_get_opp_count(), > > > that's all. This ended up in the OPP core, nothing else. Maybe we can > > > now move it back to the EM core and name it differently ? > > > > Well it also uses dev_pm_opp_find_freq_ceil() and > > dev_pm_opp_get_voltage(), so not sure how easy it will be to move, but > > if it is possible no objection from me. > > What uses these routines ? dev_pm_opp_of_register_em() ? I am not able > to see that at least :( Yep, it's not immediately obvious, but see how it sets the struct em_data_callback to point at _get_power() where the actual energy calculation is done. So strictly speaking _get_power() is what uses these routines, but it goes in hand with dev_pm_opp_of_register_em() so I guess the same reasoning applies. > > Right but the EM is a description of the hardware, so it seemed fair > > to assume this wouldn't change across the lifetime of the OS, similar > > to the DT which we can't reload at run-time. Yes it can be a little odd > > if you load/unload your driver module, but note that you generally can't > > load two completely different drivers on a single system. You'll just > > load the same one again and the hardware hasn't changed in the meantime, > > so the previously loaded EM will still be correct. > > Yeah, it will be the same driver but a different version of it, which > may have updated the freq table. For me the EM is attached to the > freq-table, and the freq-table is not available anymore after the > driver is gone. > > Anyway, I will leave that for you guys to decide :) IIUC Lukasz is working on something that should allow changing the EM at run-time, so hopefully it'll enable this use-case as well, but we'll see :) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel