Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp576441rwi; Wed, 26 Oct 2022 04:50:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jyhQtNxx5Y3yL1A3Rly/dzxmDBlmPYnVAX/+0ugtKufBjB9j0sywI1+dkf/vnOm63wtgz X-Received: by 2002:a05:6402:5250:b0:461:e870:850f with SMTP id t16-20020a056402525000b00461e870850fmr11718860edd.404.1666785046730; Wed, 26 Oct 2022 04:50:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666785046; cv=none; d=google.com; s=arc-20160816; b=cKsncZPdF/PYbUxHnk0P1aAcIIKdRsRiXW3jIUcRsHtBuRVcYz808M2P6qULEVuN4L 9bilUoa2HNf9oddPfP5WTX/iPVrXpeFGnLehs//F2W1n9gwcgzfRaRapoDRSCp8uB7HS xhVc9fv0dgIt3rxml+HoQIoM3oz1pxq3i6zNYcDtSu6AcpsxqUw7xSFiuExVSAI4+Qyg uAFM3l0qUMaMHrrDbkHB7asDsu0QrIIGTeqvbj6tHWow+xhUZmKpcgBHltPlKGJK6pGS 8c2TKJK8HaponNKnn04x0w+Mzhcrkb5h8fwVIt6QtZobIRz/h8mxC59ixVW0Z+eOYoij zo2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=4lXeIi3V6G2qIfuxOA3yJ66Q9+63vtXP3m1JaxcoBmk=; b=SB37ntQQxpE7Y5sDQ3i/YVOZ2wTAPAvxz+7Bjz/8uny71r7ATNHZ3ArY0EnG/Apyvy vbTySYwPEr1DLGomqM4btQHr490FPUvoAobK9gavbX+7mNvrgC62wMRSHHvtvG8cM8T5 rpTe9Of2ihCByxxT0dny/2nSoHtbvEnDvyQLAbudxGkqTMwZiWywmjQ/7vjoj6va0hcs 4o6o6HbmpqsMY6WjimGchXEMAfp9kW2KVyCxB4oOjETANauE+8dA0/YBVD9CiEAfBkGT /ohfRqPLZ7+W8314LvkL0b8MskAaGOgioddoPp8qBG0Sgdmd1NEG/R8lTHvy6TQrCcTP pb5A== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr31-20020a1709073f9f00b0077cfec3a52fsi5861369ejc.839.2022.10.26.04.50.20; Wed, 26 Oct 2022 04:50:46 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233142AbiJZLb5 (ORCPT + 99 others); Wed, 26 Oct 2022 07:31:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233520AbiJZLbk (ORCPT ); Wed, 26 Oct 2022 07:31:40 -0400 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50DD22F657; Wed, 26 Oct 2022 04:31:18 -0700 (PDT) Received: by mail-qv1-f50.google.com with SMTP id h10so11124129qvq.7; Wed, 26 Oct 2022 04:31:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=4lXeIi3V6G2qIfuxOA3yJ66Q9+63vtXP3m1JaxcoBmk=; b=M2RkvLROR5mf0ighu7xBVn6qBeFDtFiHc2lZ7z6kAb9PLb4VfqPiVczGNuPDuQP646 dUx8cKLv+JkTQDmSfciVx7apLJnYtO1p3nlV3iR9Ov7o7TrUY6GAIe5ZVhxqBIF+FckF Vo8V8XSb9uw4dy8klCFTwIGpyY0iJlOAnMpxCuvfsi9ImP5H/fK0z+5NA/YPhbtH38fs +DyShxMZWE/ZIINDneiwUmwbnhfrAF9pTsAdIJ6nIPNEo+I2yKgGzRrWlzwcSCg32fTz 4LVSymGu7LbBle9pKRpaet+B6xHtjzTqW4u1fUSdtAlabokbhmgm1GSs9Lh2+kTQlitd NGJw== X-Gm-Message-State: ACrzQf3DIq6ckJQAwKfaYSlj4AbcTW5ysBfMm41ERxH2hdRN6s6wAyUi rsW2Zrwd5qdb/EySSDa5gCTHigUUwgxT7b+IHKROnWMZ X-Received: by 2002:ad4:596b:0:b0:4b1:ee66:1cb8 with SMTP id eq11-20020ad4596b000000b004b1ee661cb8mr36203074qvb.3.1666783877679; Wed, 26 Oct 2022 04:31:17 -0700 (PDT) MIME-Version: 1.0 References: <20221025123432.1227269-1-sudeep.holla@arm.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 26 Oct 2022 13:31:05 +0200 Message-ID: Subject: Re: [PATCH] PM: domains: Fix handling of unavailable/disabled idle states To: Ulf Hansson , Sudeep Holla Cc: Amit Pundir , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Andy Gross , Dmitry Baryshkov Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 25, 2022 at 2:59 PM Ulf Hansson wrote: > > On Tue, 25 Oct 2022 at 14:34, Sudeep Holla 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" > > Cc: Ulf Hansson > > Fixes: a3381e3a65cb ("PM / domains: Fix up domain-idle-states OF parsing") > > Signed-off-by: Sudeep Holla > > 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 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 > >