Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1570021iob; Sat, 14 May 2022 12:57:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx44r8zy3/R7JCMGGXyj7I2scYHb/q4vOiSaxZfkNCMyOapbL28PzJPMnT5mMupAfcQ7oCe X-Received: by 2002:a05:6402:1592:b0:425:edec:992d with SMTP id c18-20020a056402159200b00425edec992dmr5184336edv.283.1652558261690; Sat, 14 May 2022 12:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652558261; cv=none; d=google.com; s=arc-20160816; b=tiT9Ecm6gzfT/F2ZlZS6RX33wQsg9e9oelVI923uPCetVr4CIMBjdWHqkSQraFWOwU BnzjaU4lzsQzfm/P4g5UbLpeDp4TxNHSOyx5TIyOu9j1EGa0i2/mp7LAQ1uANuOMmaCT gdDPwqDm/L016k71ctb0FCMQSj0fPQbduULl0jsx1ditgQgrssGYBA1LT+xaOKY+cR0J lFP2MdMm3dKepGlycn8drSqUVGj6osKVN02R01WjyJ8OWYZBiRNX01lWX7bIjESzvDXs IgPOjyJ7FZGGGGC3RxmjaOc2rkGuZr/Nxw8xnR6gei1WXly6AnbkWCW0cB1BN43TSJAT +k3A== 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=h9Ne+v1fWGSBcxhiyeEoVMQ4rFmfRWh1mmd5YIH/r7U=; b=OhDKe3SX0l2pL4T5jIQ0V6clmAjmn5O9tIAnmyloArUukJLKoF1QBPccMViJ3pepfY FkIf1/2HdqenMVoQMDMcmTnRw3dL9AmthVSL5QfyD8EzwM/i6sunHQXyc+ENdk1NYhdq oQi8ZZKiILWSHbfSqcN+4IJalwle+FOnklXGf5WKmVEamtLQRAC6khWDmmJfQxzRq4Lj DZMmXsIT56pwBAHn977p7OAIwW482Nh1Ppmlt9ON25iMNIa57jSTydPmCGO3zLVdIg8P +clOyUfOBe80ioUYPx6N+3Vg+wisCd8614RGHTxrTZ7ndfNdrazXnA1cbLdheb9XIDuI SQSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=meRQd62e; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du12-20020a17090772cc00b006f4d3fac3e8si5701469ejc.292.2022.05.14.12.57.15; Sat, 14 May 2022 12:57:41 -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=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=meRQd62e; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234392AbiENQtA (ORCPT + 99 others); Sat, 14 May 2022 12:49:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234470AbiENQsy (ORCPT ); Sat, 14 May 2022 12:48:54 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3347F36685 for ; Sat, 14 May 2022 09:48:49 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id m1so15087740wrb.8 for ; Sat, 14 May 2022 09:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h9Ne+v1fWGSBcxhiyeEoVMQ4rFmfRWh1mmd5YIH/r7U=; b=meRQd62ep69g3tBqBYUeXf3me9m4oJ40AN+j1I4vlanRExPpzRRvwJGiZsLYWDyhUd INUHrkzVoQbMxwzgnNexlklgKVtXN71UobSDGxwNOupmGxiJLLVDLriwyM4gsuQYSAem FnSvIK6r1IjytddhDA39hO7kvmvRaLmR4FkQFhFkSBb/6XBSG0Hja8KDeT6hmGFjhdrO w3gKjf6NfulL/sCas5YgKZC5aHSNIbfBU1JjOHyAYFP140etjYNiMZ5zIUUw30xts2jh 6mSYZXNzv11NKlDDULNg+MaipgsRINAnRucaHw+mp6UGZHPd8l9v8uGP9Vj7uuw6b6nS Whag== 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=h9Ne+v1fWGSBcxhiyeEoVMQ4rFmfRWh1mmd5YIH/r7U=; b=4n4AqNMhPXv+SCpebrJRLLYEe6db79zEPBmdJWzrchb+Dx0BWxtLKX/nc4VtYOmEX1 WrMC8FCNLHk96psgIY33J/loF3XpIrLDJAMzbdGyUMCJHfSA47anbU8jANoUllS/lJgY 7n4N7WDD/CunEA6vsU0P02FPfk75KIkeTw66axeZFxub6FazDofokdQJT2vQeI1AwoTq ZQ4cPAXySjK3VpKfFuAPih/6sUUcVcitSfp4GV0dJDe59QxahgIzd0adM4YgkUSWkj++ v3hIJSu4fdpdNdEK5cwXbq2LS9BO2IfRcvOLMWz0kZIHI7sGZWcbeUXo7NCEKLeNvv+T b+mA== X-Gm-Message-State: AOAM530QqnVV+JgglY6jHtHhhMpS8vcv0lNyzR68ZH03vtohody+5Y0o dgW4a6D4X5uzfjpn8LhCUOxMtIkjTGZqPb9Q9xvCJg== X-Received: by 2002:adf:f001:0:b0:20d:22b:183c with SMTP id j1-20020adff001000000b0020d022b183cmr1403508wro.313.1652546927571; Sat, 14 May 2022 09:48:47 -0700 (PDT) MIME-Version: 1.0 References: <20220514152032.758738-1-ulf.hansson@linaro.org> In-Reply-To: <20220514152032.758738-1-ulf.hansson@linaro.org> From: Anup Patel Date: Sat, 14 May 2022 22:18:35 +0530 Message-ID: Subject: Re: [PATCH 1/2] cpuidle: psci: Fix regression leading to no genpd governor To: 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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 Regards, Anup > --- > 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 >