From patchwork Thu Oct 12 15:36:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 13419396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E4B5BCDB46E for ; Thu, 12 Oct 2023 15:36:54 +0000 (UTC) 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QdQl4b78Aub0b11EkQLQSCwPEPMEqzDTWGmISlwHkJ0=; b=nfApWFRWQ86YYa VWnDcdWE1+2h4zURPRbN6If7FQyb2NN1Uzk4DfoWPB0TU/niwDo8fMjxN/32tcEDUiUhnoPay3OYM /txbBYR1q1+N1GfzO7YUtoGBBV9uXfnc884Zf9ZsPUJvRz5gJl5KP7UqCxM4xiVl0jEhwzMkS5MvA 7y3uPGetqrhskf8FT3QqvGD+rdbdNdkzY6nVIEm8vhdGgjZUA8/unmMG50gWxwf0THLIvmOXYBnXs RJeDSfZ8jouHoyYJ8TSZ+FD5EiMxqiEIn+B5n1Yge+B3nSUnQffJhs0F8nBf6bIVThlwYreRqe++9 fFrJ7OubZ0PiH1c2EFlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqxje-001JCd-1S; Thu, 12 Oct 2023 15:36:26 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqxja-001JAu-31 for linux-arm-kernel@lists.infradead.org; Thu, 12 Oct 2023 15:36:25 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-507962561adso506289e87.0 for ; Thu, 12 Oct 2023 08:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697124979; x=1697729779; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tG5ZMvbc/231iS9bGZIwnFfA7k32eTQNm7qUwA1Humk=; b=kbdmLJI0Q8iwQZbgAiThvYFDkxuJ4VrrtjUg4CCtCswxLKhR+r95awbyasVTn/BC1I GiBJ+1geUUcGX8U29khgEzXJ8D+0YUoTUsT22+BGQnac+AMlvyoxebAuWIBH0DE/t/xd /SITyDY2758wiNALZEpuA+/Qx+BQIBeBvq5CVZ+o0Y6GKcLAA8uSMmatL5TFEFH9sj5n JD7CXTADYRTKLq4F4gJJHS261Nd5i1VOITwltyQJcSOx1hhlZlGecVYwWiP0+MQrVkTq 8AlrEFvdUjErQB9rf9w4t2fssS873WL0Oxbpwp4soneqc5/bLnVzZUc0DjF/dQ7b3m86 rkzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697124979; x=1697729779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tG5ZMvbc/231iS9bGZIwnFfA7k32eTQNm7qUwA1Humk=; b=tpMYE6x9eXgxcIrOj1wApERr3Ln8d36YA3PWVjsGCQAv2pDsRW0z1NwNPApcctyFlY DbcPfOFSspvUkIURR+sXxhB3S3YcIiknoGRXcOyIILeFEFlfxaXaXeousMs2w+GggVv3 vQWrFbk1lBfFJ3gXIb32DZeyq1fWPrEOMOm7y36eFxhlP2okp2ibyHK5hcEpX3BToxp9 Igh/Ic7Y8osDsYpx149/vHMe9pCK72o7jjFdPlM9lnKaYvrec8lmZrIgeUw7iAkYr7vZ 2LJ9zAP+gFtmztCBxRY8DT4fa1i4wGmpWJooG1gf7EtFG+rupl71QfJNP2PPBmpxgKWi ZSWQ== X-Gm-Message-State: AOJu0YyL+OUvs1lSrRkdRH5ILmE93sa2YPDL8rWOM0bZ7DeFeqAI9Lpk poGAQdOrfoO92iHHHrt3fDkXNQ== X-Google-Smtp-Source: AGHT+IG8sYtgmxjUGA4Gz/lVuYLOQcH5yynWBIYvk5xYfJMjqzZRnVBFmVCBGSHUxHBvUkJajqTTiA== X-Received: by 2002:a19:5017:0:b0:507:9701:2705 with SMTP id e23-20020a195017000000b0050797012705mr520821lfb.9.1697124979127; Thu, 12 Oct 2023 08:36:19 -0700 (PDT) Received: from uffe-tuxpro14.. (h-94-254-63-18.NA.cust.bahnhof.se. [94.254.63.18]) by smtp.gmail.com with ESMTPSA id b3-20020ac247e3000000b004fb9c625b4asm2848218lfp.210.2023.10.12.08.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 08:36:18 -0700 (PDT) From: Ulf Hansson To: Ulf Hansson , linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" Subject: [PATCH 5/5] PM: domains: Drop the unused pm_genpd_opp_to_performance_state() Date: Thu, 12 Oct 2023 17:36:16 +0200 Message-Id: <20231012153616.101485-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231012152108.101270-1-ulf.hansson@linaro.org> References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231012_083622_975123_7F7A0311 X-CRM114-Status: GOOD ( 14.38 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Cc: "Rafael J. Wysocki" Signed-off-by: Ulf Hansson --- 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 5cb2023581d4..04bd4fd82acf 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -3032,38 +3032,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 f776fb93eaa0..124f870f38ca 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -113,7 +113,6 @@ struct genpd_power_state { }; struct genpd_lock_ops; -struct dev_pm_opp; struct opp_table; struct generic_pm_domain { @@ -141,8 +140,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; @@ -343,8 +340,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, @@ -390,13 +385,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;