Message ID | 20221025123432.1227269-1-sudeep.holla@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp978986wru; Tue, 25 Oct 2022 05:35:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7QOSL2NQhBaD9Rel31O5QMvyvUqPM1Q93lv4Hb7Gajbtwn2oKKIIkqe3RQYmyjt/kTeDm2 X-Received: by 2002:a17:90b:1b0b:b0:20d:7c31:e75d with SMTP id nu11-20020a17090b1b0b00b0020d7c31e75dmr43315575pjb.101.1666701348340; Tue, 25 Oct 2022 05:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666701348; cv=none; d=google.com; s=arc-20160816; b=vIXRm/YKhOszMHBMa+IJjtYKZ2MBIq8BrUPfboOpYGxYUIB65RsJYTbMP6fqzoCDMj GFkZ0s9h4tl9v6DwfniWlTw4l/eKuLFknd+hfhSpLwtNkvFJ88xuaHBOPLyO27s07VOE 7vx2Un/whDLNXDHvLwsAdOgD6jEgQq4c/UG2AK1S1+mzzII60I1551A/flapLLRAGop5 AS8Gk9J8284jdWShpLIi7vyhNrCJjmvRgVn3E/07//rDMWHk7+vSnvEgM0mm8ar3a/Xx PEcIFHwHvx3SFFSoFrC6bYBPoxBnv1KfRzOx9VzbYOROJBoDU/eT0hcnSW5jxhdwYGvB xZjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=zTefL/O/eDGgRrrfH2rWXmnYYhO8HP29QBdKV3O55UI=; b=ynwTNQJ9hoFjp0MjGC/s5WSYIG+jkawC5aupjtn9FKB9IdJ8HqpYKmlFEnG7eLl1/x 0umk6tvWF+6Q/0zokijS2rnsTopS7AlteNKJ9UaOX+Gw7RE+16KIWXtUmwc0vkKKN2eb RhSzNX2/hcX5T93A5UYrpx+3U2zS4Xa+u3xD9wry6mBaUFkLRVv2R4bunlEchOQeIi6l OwTwNUx0V6FvvRgzn7VS+IS1vN3W66cpMpnohONSGKOXQYUFGWTgnVhvEV5JocwAYvXx 82L7b8S4d4kpL7izs7P84vmhowGUx2IrazJfc7+tIwlOHQwiOJqv9TTR5ppzaZs0BMkV D3Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a62ce03000000b0056bf7935ac1si3027162pfg.145.2022.10.25.05.35.34; Tue, 25 Oct 2022 05:35:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231774AbiJYMem (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Tue, 25 Oct 2022 08:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbiJYMek (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 08:34:40 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E4F99923D4; Tue, 25 Oct 2022 05:34:37 -0700 (PDT) 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 F15A0D6E; Tue, 25 Oct 2022 05:34:43 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7F8683F7B4; Tue, 25 Oct 2022 05:34:36 -0700 (PDT) From: Sudeep Holla <sudeep.holla@arm.com> To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla <sudeep.holla@arm.com>, Amit Pundir <amit.pundir@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Andy Gross <agross@kernel.org>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org> Subject: [PATCH] PM: domains: Fix handling of unavailable/disabled idle states Date: Tue, 25 Oct 2022 13:34:32 +0100 Message-Id: <20221025123432.1227269-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747663032931768545?= X-GMAIL-MSGID: =?utf-8?q?1747663032931768545?= |
Series |
PM: domains: Fix handling of unavailable/disabled idle states
|
|
Commit Message
Sudeep Holla
Oct. 25, 2022, 12:34 p.m. UTC
Platforms can provide the information about the availability of each
idle states via status flag. Platforms may have to disable one or more
idle states for various reasons like broken firmware or other unmet
dependencies.
Fix handling of such unavailable/disabled idle states by ignoring them
while parsing the states.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Fixes: a3381e3a65cb ("PM / domains: Fix up domain-idle-states OF parsing")
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/base/power/domain.c | 4 ++++
1 file changed, 4 insertions(+)
Hi Ulf,
As you already know, this change alone doesn't fix the issue reported here[1].
It also needs the fixes you have posted [2].
Regards,
Sudeep
[1] https://lore.kernel.org/all/20221018145348.4051809-1-amit.pundir@linaro.org
[2] https://lore.kernel.org/all/20221021151013.148457-1-ulf.hansson@linaro.org
--
2.38.1
Comments
On Tue, 25 Oct 2022 at 14:34, Sudeep Holla <sudeep.holla@arm.com> wrote: > > Platforms can provide the information about the availability of each > idle states via status flag. Platforms may have to disable one or more > idle states for various reasons like broken firmware or other unmet > dependencies. > > Fix handling of such unavailable/disabled idle states by ignoring them > while parsing the states. > > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > Cc: Ulf Hansson <ulf.hansson@linaro.org> > Fixes: a3381e3a65cb ("PM / domains: Fix up domain-idle-states OF parsing") > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> I think this should be tagged for stable kernels too. Rafael, can you pick this up as a fix for v6.1rc[n]? Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Kind regards Uffe > --- > drivers/base/power/domain.c | 4 ++++ > 1 file changed, 4 insertions(+) > > Hi Ulf, > > As you already know, this change alone doesn't fix the issue reported here[1]. > It also needs the fixes you have posted [2]. > > Regards, > Sudeep > > [1] https://lore.kernel.org/all/20221018145348.4051809-1-amit.pundir@linaro.org > [2] https://lore.kernel.org/all/20221021151013.148457-1-ulf.hansson@linaro.org Well, I think it's better if we replace [1] with a patch that only disables the cluster idle state. In that case, it would be sufficient with $subject patch. In that case, we can just manage [2] separately. Amit, can you submit a new version and test it together with $subject patch? Kind regards Uffe > > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c > index ead135c7044c..6471b559230e 100644 > --- a/drivers/base/power/domain.c > +++ b/drivers/base/power/domain.c > @@ -2952,6 +2952,10 @@ static int genpd_iterate_idle_states(struct device_node *dn, > np = it.node; > if (!of_match_node(idle_state_match, np)) > continue; > + > + if (!of_device_is_available(np)) > + continue; > + > if (states) { > ret = genpd_parse_state(&states[i], np); > if (ret) { > -- > 2.38.1 >
On Tue, Oct 25, 2022 at 2:59 PM Ulf Hansson <ulf.hansson@linaro.org> wrote: > > On Tue, 25 Oct 2022 at 14:34, Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > Platforms can provide the information about the availability of each > > idle states via status flag. Platforms may have to disable one or more > > idle states for various reasons like broken firmware or other unmet > > dependencies. > > > > Fix handling of such unavailable/disabled idle states by ignoring them > > while parsing the states. > > > > Cc: "Rafael J. Wysocki" <rafael@kernel.org> > > Cc: Ulf Hansson <ulf.hansson@linaro.org> > > Fixes: a3381e3a65cb ("PM / domains: Fix up domain-idle-states OF parsing") > > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> > > I think this should be tagged for stable kernels too. Rafael, can you > pick this up as a fix for v6.1rc[n]? > > Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Applied as 6.1-rc material, thanks! > > > --- > > drivers/base/power/domain.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > Hi Ulf, > > > > As you already know, this change alone doesn't fix the issue reported here[1]. > > It also needs the fixes you have posted [2]. > > > > Regards, > > Sudeep > > > > [1] https://lore.kernel.org/all/20221018145348.4051809-1-amit.pundir@linaro.org > > [2] https://lore.kernel.org/all/20221021151013.148457-1-ulf.hansson@linaro.org > > Well, I think it's better if we replace [1] with a patch that only > disables the cluster idle state. In that case, it would be sufficient > with $subject patch. In that case, we can just manage [2] separately. > > Amit, can you submit a new version and test it together with $subject patch? > > Kind regards > Uffe > > > > > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c > > index ead135c7044c..6471b559230e 100644 > > --- a/drivers/base/power/domain.c > > +++ b/drivers/base/power/domain.c > > @@ -2952,6 +2952,10 @@ static int genpd_iterate_idle_states(struct device_node *dn, > > np = it.node; > > if (!of_match_node(idle_state_match, np)) > > continue; > > + > > + if (!of_device_is_available(np)) > > + continue; > > + > > if (states) { > > ret = genpd_parse_state(&states[i], np); > > if (ret) { > > -- > > 2.38.1 > >
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index ead135c7044c..6471b559230e 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2952,6 +2952,10 @@ static int genpd_iterate_idle_states(struct device_node *dn, np = it.node; if (!of_match_node(idle_state_match, np)) continue; + + if (!of_device_is_available(np)) + continue; + if (states) { ret = genpd_parse_state(&states[i], np); if (ret) {