Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4232451rdb; Mon, 11 Dec 2023 12:44:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFs8pygpnEtcAp/92r3yoo/C/X07xQGQ02W55gNWbuQ3vRRuYeAQjyUpvBgjh5br3EsvWaY X-Received: by 2002:a17:902:9689:b0:1d0:4cb1:860f with SMTP id n9-20020a170902968900b001d04cb1860fmr2454397plp.62.1702327470650; Mon, 11 Dec 2023 12:44:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702327470; cv=none; d=google.com; s=arc-20160816; b=FJ7ddJqJDKLt2pdSUPaGL7OmW5gFiPkkHHwO0dfkpg9eEWjdPXTnrUFUmo3Bjxxdjs gFOieqjnl3BbtPprEzjDUSxwZUnJ53T/Ivfkn8LPY3+ujy20+qIq03fUVNFv0hpIDpby +vd2ylqIaDb/XU5vbg/ZkHs0rOWN6A9ibF161JfitW0HrWgFU75E2fm8cyDG8jKbsHtX aoGw90N2KwugZbkM/18bT+xZ1ZNKstY0ISK6TVIuKkgSeZQm2pYG8+Q719GtYABuCwiW uVcUc5kRZPk9X2x4xVdMJRTlYM1xGpMcx12hs+4ry+SAFK/n/N8aKcN6ksbCKAMPzZHf Rsrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=Eym+6IVvZXx58B4d5+L246hyieP4VicXXCovymYcnrg=; fh=Sp9JDeb1kzqFJP6BNgJyWQKqwnvtqd0SFlxO9Toz6iM=; b=n5VtfYphcztRUt3kbOu1pxRfjkEJYYD3wkyH95a4qdBIhBaqlSzzkd2nsNCEPBAnWD I4AtD3bUeVQuG5iteEw4nn8+MDC+fshC0Kp7GVWUm0Vw7ddrZLBjWliiP8tbJVsNcq5l KpnDtg8LdGj7h/tn73RAXMWWpEMP3L28c9JhCOxBFljWFTmV3HdsZ8f2SZFCsyShVMDb g3ZwMf7+8jkAOH3y45/TLbzuNbMph/0mF578bmnIvmE7Mbvi4hE+t5r7TcZLmBVmmh9d 1a0xP5rgwlsvQfvgZDLnou05mr45a7P8na7Ius0iMXb3KRipyVpyZTwM+v2vEyDj0Lbb gr7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id be3-20020a170902aa0300b001cf8d044c2asi6489791plb.544.2023.12.11.12.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 12:44:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D821180B3B67; Mon, 11 Dec 2023 12:44:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344449AbjLKUoN convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Dec 2023 15:44:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjLKUoM (ORCPT ); Mon, 11 Dec 2023 15:44:12 -0500 Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF66F9F; Mon, 11 Dec 2023 12:44:18 -0800 (PST) Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5909156aea9so499990eaf.0; Mon, 11 Dec 2023 12:44:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702327458; x=1702932258; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BeREiPriPrWtwP3pdr3EegoOX+dWJ7MdihH217BBpnA=; b=b9iNlsraf8aigEB920qwohqWgv8wvRjwe7d9rSpBTdDwGr4Rwf/Jk5CCnshCfkpN+u ssCSQ/ItgyU2xjPVtC1oETavsyTRxrs4x2FEySKuJD9QuCnoK6VhMLqCWmRnPj41Qmzq mUgj7ETfJKJ6kmfJSlBMLIOvCyzsU4XMkJMs3vXoffubuyxNf0gfGLRStAwqBsF+6lRo UQuawhmMxNg/62p5gml194emBjVPetaQRofKTgE0xaRCgHDxesk6QflJzphEbXdoan/3 8zTYBNx+P8lgcTmCZMSJcpR9/MO04utvcYPk3UQIsaFU03ET/kEKuRCX9nYnGSKHjYje c0Zw== X-Gm-Message-State: AOJu0Yxg3NOHo6RAURMMPEDnugds5rvQ+iNJCsXhkss0363RE+o3dp3y vw10ICAv7GzuVWkD9cmAdjODjBB0hXicVPW7jGQx5SHA X-Received: by 2002:a4a:a7c4:0:b0:590:6585:5c41 with SMTP id n4-20020a4aa7c4000000b0059065855c41mr8414919oom.0.1702327457990; Mon, 11 Dec 2023 12:44:17 -0800 (PST) MIME-Version: 1.0 References: <20231127151931.47055-1-ulf.hansson@linaro.org> In-Reply-To: <20231127151931.47055-1-ulf.hansson@linaro.org> From: "Rafael J. Wysocki" Date: Mon, 11 Dec 2023 21:44:07 +0100 Message-ID: Subject: Re: [PATCH] PM: domains: Drop the unused pm_genpd_opp_to_performance_state() To: Ulf Hansson Cc: "Rafael J . Wysocki" , linux-pm@vger.kernel.org, Kevin Hilman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 11 Dec 2023 12:44:28 -0800 (PST) On Mon, Nov 27, 2023 at 4:19 PM Ulf Hansson wrote: > > Since commit 7c41cdcd3bbe ("OPP: Simplify the over-designed pstate <-> > level dance"), there is no longer any users of the > pm_genpd_opp_to_performance_state() API. Let's therefore drop it and its > corresponding ->opp_to_performance_state() callback, which also no longer > has any users. > > Signed-off-by: Ulf Hansson I can take this in principle, but I'm wondering if you'd prefer to apply patches modifying domain.c yourself? They are definitely related to the pmdomain tree. > --- > drivers/base/power/domain.c | 32 -------------------------------- > include/linux/pm_domain.h | 12 ------------ > 2 files changed, 44 deletions(-) > > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c > index da1777e39eaa..cf65b5a9783c 100644 > --- a/drivers/base/power/domain.c > +++ b/drivers/base/power/domain.c > @@ -3042,38 +3042,6 @@ int of_genpd_parse_idle_states(struct device_node *dn, > } > EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); > > -/** > - * pm_genpd_opp_to_performance_state - Gets performance state of the genpd from its OPP node. > - * > - * @genpd_dev: Genpd's device for which the performance-state needs to be found. > - * @opp: struct dev_pm_opp of the OPP for which we need to find performance > - * state. > - * > - * Returns performance state encoded in the OPP of the genpd. This calls > - * platform specific genpd->opp_to_performance_state() callback to translate > - * power domain OPP to performance state. > - * > - * Returns performance state on success and 0 on failure. > - */ > -unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev, > - struct dev_pm_opp *opp) > -{ > - struct generic_pm_domain *genpd = NULL; > - int state; > - > - genpd = container_of(genpd_dev, struct generic_pm_domain, dev); > - > - if (unlikely(!genpd->opp_to_performance_state)) > - return 0; > - > - genpd_lock(genpd); > - state = genpd->opp_to_performance_state(genpd, opp); > - genpd_unlock(genpd); > - > - return state; > -} > -EXPORT_SYMBOL_GPL(pm_genpd_opp_to_performance_state); > - > static int __init genpd_bus_init(void) > { > return bus_register(&genpd_bus_type); > diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h > index 34663d0d5c55..b97c5e9820f9 100644 > --- a/include/linux/pm_domain.h > +++ b/include/linux/pm_domain.h > @@ -118,7 +118,6 @@ struct genpd_power_state { > }; > > struct genpd_lock_ops; > -struct dev_pm_opp; > struct opp_table; > > struct generic_pm_domain { > @@ -146,8 +145,6 @@ struct generic_pm_domain { > int (*power_on)(struct generic_pm_domain *domain); > struct raw_notifier_head power_notifiers; /* Power on/off notifiers */ > struct opp_table *opp_table; /* OPP table of the genpd */ > - unsigned int (*opp_to_performance_state)(struct generic_pm_domain *genpd, > - struct dev_pm_opp *opp); > int (*set_performance_state)(struct generic_pm_domain *genpd, > unsigned int state); > struct gpd_dev_ops dev_ops; > @@ -348,8 +345,6 @@ int of_genpd_remove_subdomain(struct of_phandle_args *parent_spec, > struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); > int of_genpd_parse_idle_states(struct device_node *dn, > struct genpd_power_state **states, int *n); > -unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev, > - struct dev_pm_opp *opp); > > int genpd_dev_pm_attach(struct device *dev); > struct device *genpd_dev_pm_attach_by_id(struct device *dev, > @@ -395,13 +390,6 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn, > return -ENODEV; > } > > -static inline unsigned int > -pm_genpd_opp_to_performance_state(struct device *genpd_dev, > - struct dev_pm_opp *opp) > -{ > - return 0; > -} > - > static inline int genpd_dev_pm_attach(struct device *dev) > { > return 0; > -- > 2.34.1 >