Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp738492iob; Wed, 18 May 2022 11:50:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwSDLLofItWW3PSAzwKzXieZvpgsMyw7AspohVpgvn6F/cv2xhNqfLByWnWX220jq51Ion X-Received: by 2002:a17:902:d2c3:b0:161:ab47:8afe with SMTP id n3-20020a170902d2c300b00161ab478afemr774700plc.8.1652899839280; Wed, 18 May 2022 11:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652899839; cv=none; d=google.com; s=arc-20160816; b=QmwfUcOf4RZBFm4sQNmBqpjKwej+ywWmX0YO0F9PrvAhHnzPvQ20MiPqQy+noibOET 5FmbDVxbgkgNLFpMkHAaG89fUbUlU/RCnTcsEPJEDQwskSefxDX8eY7mMeBDqdnvn6bx 9S+VFZ/dB78wFgKVrugNRm8G+gBj5nPzZvJr29KTi0gQtueqNKXFugdyhlt75PYMsOZy Yqqp1l6HoDIsFwHd9TGGgOtJq0jzbCDdakpN4nOh7vrzxLtuUFimzXVkQtGYT9zgzIWs tI01uLa7KY0XxxC/z0zOfKt1Oys9xPfwQ6h8OtrqEY5cRHNzYkkrEnapRsn2IMK0C46D s17w== 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=JeOeCVH7gCGznzqm2nGSE0funGSjnIdlMb+nr+xRP/A=; b=Gemf450VKWX8B1AbpQ+mlHGgAQmQEIQC2Jql+gmBfz7eo+ZBjuOWuP0afuAbZAhBVw 81xtj5cneKIdZ+c/qw2qjKW9s0dwIKxfUeCTE001NZ3bHRHO9EaSDH6rQjuFoRCfc2TW 7w7jf0OxeewvQVTjv0a70FrXzextqzgZdAUtUTt3sw+0OMIx/otK0RGuZLl6Qa/AG1Qw pJ2M/buD9qZF8zryje9oj/Igs7gJu7Lk9/T/UWf2TiFYE5bjq35VNgD6fRO3X41c7X55 YxDDRZqQOul9Jd0l6TnHn3MVBIvPafIL88IBIWj/aPwn0A2mrj2+pL1ZDlzuWkV2Kub4 LSaA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f5-20020a170902ce8500b0015f45278c31si4362249plg.233.2022.05.18.11.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 11:50:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D051422A2E3; Wed, 18 May 2022 11:50:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241648AbiERSub (ORCPT + 99 others); Wed, 18 May 2022 14:50:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241624AbiERSu3 (ORCPT ); Wed, 18 May 2022 14:50:29 -0400 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74892177076; Wed, 18 May 2022 11:50:27 -0700 (PDT) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-2ec42eae76bso34188157b3.10; Wed, 18 May 2022 11:50:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JeOeCVH7gCGznzqm2nGSE0funGSjnIdlMb+nr+xRP/A=; b=3+ugiIGKRuORnUBE3aWmDYPmfo2uoKReK9QoB9jYqINY0xOKGYRLD4kaHXsqZbsFBQ xikCFVQ81XLmVFHXafYVezePnJ+jFtjhf6pZmoO+aiu8kfVYcZ8Df+B31IoA+upCDVMA IUEeaxuBg3/G+VOhZfVb0k0j1aP+w7oSqR63bOjM8ISxVx+ogFxiuuYJrFt3ol6pJWOd 7p80i5ixfyK0/5EwMPce3rb3lpsboEllF82sfE0Mq0ztsd7ljZd1gTA5LZW338M5enp3 Y0gV6dhtrsIrigpFM/cbyCMeKD9Dg75kBwYHrUHkWOmcqfpXlqL3AoIupPN2ziz0lpgr 66OA== X-Gm-Message-State: AOAM531s/TwKcTwNgkHuJeNSTgKx6vkmKKEeJuMoNNXo5Mpy55xTGz5S s7fFmXpfZ20PAXU6l8gIqAOTMb9qhOyuM+5K+YQ= X-Received: by 2002:a0d:c8c3:0:b0:2fe:e9eb:664 with SMTP id k186-20020a0dc8c3000000b002fee9eb0664mr844761ywd.301.1652899826747; Wed, 18 May 2022 11:50:26 -0700 (PDT) MIME-Version: 1.0 References: <20220514152032.758738-1-ulf.hansson@linaro.org> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 18 May 2022 20:50:15 +0200 Message-ID: Subject: Re: [PATCH 1/2] cpuidle: psci: Fix regression leading to no genpd governor To: Anup Patel , Ulf Hansson Cc: "Rafael J . Wysocki" , "open list:THERMAL" , Sudeep Holla , Lorenzo Pieralisi , Maulik Shah , Daniel Lezcano , Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , linux-arm-kernel , linux-riscv , "linux-kernel@vger.kernel.org List" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Sat, May 14, 2022 at 6:49 PM Anup Patel wrote: > > On Sat, May 14, 2022 at 8:50 PM Ulf Hansson wrote: > > > > While factoring out the PM domain related code from PSCI domain driver into > > a set of library functions, a regression when initializing the genpds got > > introduced. More precisely, we fail to assign a genpd governor, so let's > > fix this. > > > > Fixes: 9d976d6721df ("cpuidle: Factor-out power domain related code from PSCI domain driver") > > Signed-off-by: Ulf Hansson > > Looks good to me. > > Reviewed-by: Anup Patel > Ulf, do you want me to take this lot or is it going to be handled elsewhere? > > --- > > drivers/cpuidle/cpuidle-psci-domain.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c > > index 755bbdfc5b82..3db4fca1172b 100644 > > --- a/drivers/cpuidle/cpuidle-psci-domain.c > > +++ b/drivers/cpuidle/cpuidle-psci-domain.c > > @@ -52,7 +52,7 @@ static int psci_pd_init(struct device_node *np, bool use_osi) > > struct generic_pm_domain *pd; > > struct psci_pd_provider *pd_provider; > > struct dev_power_governor *pd_gov; > > - int ret = -ENOMEM, state_count = 0; > > + int ret = -ENOMEM; > > > > pd = dt_idle_pd_alloc(np, psci_dt_parse_state_node); > > if (!pd) > > @@ -71,7 +71,7 @@ static int psci_pd_init(struct device_node *np, bool use_osi) > > pd->flags |= GENPD_FLAG_ALWAYS_ON; > > > > /* Use governor for CPU PM domains if it has some states to manage. */ > > - pd_gov = state_count > 0 ? &pm_domain_cpu_gov : NULL; > > + pd_gov = pd->states ? &pm_domain_cpu_gov : NULL; > > > > ret = pm_genpd_init(pd, pd_gov, false); > > if (ret) > > -- > > 2.25.1 > >