Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1755672iob; Thu, 19 May 2022 13:48:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZSLm4ZVHENONw7MUwxZrFvFh0mcx0A9Zc0CenDmlmc5cBc+YRyhvqHGiYxZITNW7C3fz5 X-Received: by 2002:a05:6402:1394:b0:427:e7a5:b8d0 with SMTP id b20-20020a056402139400b00427e7a5b8d0mr7450100edv.9.1652993304753; Thu, 19 May 2022 13:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652993304; cv=none; d=google.com; s=arc-20160816; b=gphrC+DXH2Oh6cSkocTmalwvPRii/Oxt7+yVAfwJSTWXDXF9hzfSdjGDsqqSeVghx+ hyCQQ+zxuo//WN23zHSOZQUia7fCt4ZjsVu4z+RpAwjjb/2V/VSdLc2Bxmx8dLvxbJJo 2mwXyHu+i5lIzhContWU5sojby6GrJDN0+SNPhBOaUVS5N6G4fN4Q3ZRSC8e0Y2ARzoi MO9lppS8HcIBtKWYhwzfV0asDJ/eE+64n4SHvC+5/SPmiuy9d/axSvn8lOe/f5dw34jo mpq/P3pB6hWBXsv4qrigW6VmdmOgSQ7ZrdaYOCkkbtK+khFXEr/AR993ywi7eHKpw6Z4 nKXA== 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:dkim-signature; bh=gave4xKcqHaRWgWmo3tUVerd7RvnPPKk9OMCUATRApE=; b=d9srChvKFHsVtoViZAV8OGiYgnLNvnuRrqd+P+Vel7853A58x5OBFBuYS0lkjTMz5m 0JA4p7CIU8vCbyVtB4eqfAouS7Q4TnJhYku1gI/sZKDMSsvRpG4ehKbM+YRUUr0fkQh7 30PWoxMgc5pcLwCCLVkaoxxz004mumTF398ARUIMALfXzG71Ebnrbacodwm8GNEetn/A uXYybIEea2YDz77mT+SRqTKPLgnalXWbQIzRS9xCAEcru6ON3fq4GyOprNg2iXxo9fC5 TaGKXb9GHVP9oxpFmL42kIRHJkvpkMUznA11gnkSvz12nPTYof/EskClZATCNAZZOOhq iv0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WIiOL9nc; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o4-20020a170906974400b006dfe7fc57efsi6759304ejy.475.2022.05.19.13.47.56; Thu, 19 May 2022 13:48:24 -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; dkim=pass header.i=@linaro.org header.s=google header.b=WIiOL9nc; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237049AbiESNBZ (ORCPT + 99 others); Thu, 19 May 2022 09:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235936AbiESNBU (ORCPT ); Thu, 19 May 2022 09:01:20 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC30156237 for ; Thu, 19 May 2022 06:01:17 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id l13so2331868lfp.11 for ; Thu, 19 May 2022 06:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gave4xKcqHaRWgWmo3tUVerd7RvnPPKk9OMCUATRApE=; b=WIiOL9ncTVgucapluhtRwCXqu6zlMC7IDp2go/yp0SiH20cVYUiE9cqkW54xoE6kRf 6W4zspy/SuiNoDb4fZaBhs729Keb9gZxovTS70JP+p17bmYUK4RN12flYyC2hqgWPg0S +A8teBWcQ0VEMgnVxf/woHyLAsmwIji/ewoP/5aQ+SCv79oDlZ39OTv4y8Texjiq5ozC HB7v+UBqgAW3kFVIf5gavgPbtqkmfhuShHCACJYDMtEa0zTfgfmBIABh6KYiKvPX4On8 ABStwUQX1/FNYriiKb1PFl6hFTaSOohJ94zw1mpunKQjwdd04pdLlGgFU5OmciF0rBGt JEJg== 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=gave4xKcqHaRWgWmo3tUVerd7RvnPPKk9OMCUATRApE=; b=m9yWEfzh4yozwjnx5XVmpyTR2p2qYvcfPjEX/mWMzo7XOHyZUvPW/ojA1gOwnGNr0e fjUQuFmldfQjVpSvHzEwB5AdZzIXQbdL8U9wb49usubuB4qHFtsW7xJmQt1wKuD++YmY /NTr+sHCnTZa7TsfWnA/uqpmdB2ry1ki55nm8fpMU4IsHz5K35F2wpEAW9rb3Fri2byt EF4rKtfr8itbCTO3jPZ+kTZFy39fzdcyxGnI+qA0vMSPz4/OxXh4UoKRvnlGBCxBgr+c UWTpOE1xkWQacXikL+7o5yD94KBPgoiQcmzWlTo3YUGvKQ9UKhgn0/UjHxlDbRzCr6q5 VJCg== X-Gm-Message-State: AOAM530390EZaid/7X2cDPUVem9MARXfltUxWt2hyYGogdJDg3ApxK9B 423GD7g2+4bBc+DskLvkqGzsEPXJ76VKaOqyakVj1g== X-Received: by 2002:a19:3852:0:b0:474:2459:26f4 with SMTP id d18-20020a193852000000b00474245926f4mr3304564lfj.233.1652965276049; Thu, 19 May 2022 06:01:16 -0700 (PDT) MIME-Version: 1.0 References: <20220514152032.758738-1-ulf.hansson@linaro.org> In-Reply-To: From: Ulf Hansson Date: Thu, 19 May 2022 15:00:39 +0200 Message-ID: Subject: Re: [PATCH 1/2] cpuidle: psci: Fix regression leading to no genpd governor To: "Rafael J. Wysocki" Cc: Anup Patel , "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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 May 2022 at 20:50, Rafael J. Wysocki wrote: > > 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? I appreciate it if you can pick both this and the second patch. Kind regards Uffe > > > > --- > > > 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 > > >