Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2193285iof; Tue, 7 Jun 2022 22:46:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5sHpwOsmXXkNkro20KyE36hMC77AAZRtPVwpwGvqo//dAl0fz6nixFY47R4n1wnEVaYxp X-Received: by 2002:a17:902:ce02:b0:153:bd65:5c0e with SMTP id k2-20020a170902ce0200b00153bd655c0emr32113817plg.160.1654667213882; Tue, 07 Jun 2022 22:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667213; cv=none; d=google.com; s=arc-20160816; b=jiJ2MoxrbOv5ay50qis6fM6mh3T9n8Z3Jms+F2oQA6PYCk4GD6vWNGegQUcHSojIXZ 0rwyiu1ffilysBFxtbrzcZ+Z3BP9AG0fVDXBJvMO6w6hgRoAR/vzjrEPVoZ9+eZYzwCf 9KyuQCEvT6TYO126e5lasaozTCLkjIaVuu2VD8MOh4fEPLguWGd3TwXGRHsUltzAdqX4 ZzkhE4aYaAcoVX6Q5M71HpvFvob9ErKw8TJ/KGIaLQdpgjDzDU7NSSiTAAFwY21FkHEr zRIrdSj2ixu7sDGTRp+dhtXtK0We8u+/9UEMkonJdBn/29W+HugaeyCEpD1iZsY00gDr jWZQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PX+jghcLQqxLeGSQzT2cZpWujM4+n2aozUdJtSG7n3c=; b=VsifPgRGw1G9NS8ENjBXHnKvXwoFA9ENzqzz/0+b/QkU4fwSNGTfrIJJG5jyyonbC/ eg+ioQJpk27zGYqdcXK/HAafObSRCm5kOVJYXS10glNnWJEBsJtECFaysZgQ/HpbNtcM Mcrs5JZyxs5E02AHCjfCYlC8HcTDA6YxncrfqgEft+65/CEGXKmCEpToDLQIZb27LLt7 byIv4ij3eimme8q4JMT28tOa2ouo6eMCYo3Tz631AypCWq806fDi0V3vRD/RwYV6HoSW G/j6L57xC17ZXS0m22QmskORqNdEz1kfGZB2UCDJjki+/YKH0/aTd7hvyhwMc7BXaUOa QBtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ahq+6Chp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z23-20020aa791d7000000b0051bc5601f21si21066305pfa.22.2022.06.07.22.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:46:53 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ahq+6Chp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 99F3F182BB5; Tue, 7 Jun 2022 22:11:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385247AbiFHAVD (ORCPT + 99 others); Tue, 7 Jun 2022 20:21:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383244AbiFGVw6 (ORCPT ); Tue, 7 Jun 2022 17:52:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05E052431B1; Tue, 7 Jun 2022 12:10:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A6A83B8220B; Tue, 7 Jun 2022 19:10:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18ABAC385A2; Tue, 7 Jun 2022 19:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629047; bh=Lvhq4E20hiCY4U4uXUpM5ihKqDyUNNnEd67JNgqPIjY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ahq+6Chp5pxtWxZAobEbmJScQdrW4h0JtV3e5oWXMn3AZDCfV2G8t21N7agL0maOZ CW5K0quJI5c1BVfF2/rP/FywY0zq6ORD0skaLtGjhiF41R/Plq8JRzQvl21maUhypF Y1C7hOaquOAvZBrYsUygIlTLxIDQ8mvF+nA7p3JI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ulf Hansson , Anup Patel , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.18 499/879] cpuidle: psci: Fix regression leading to no genpd governor Date: Tue, 7 Jun 2022 19:00:17 +0200 Message-Id: <20220607165017.356200407@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 From: Ulf Hansson [ Upstream commit 34be27517cb763ea367da21e3cdee5d1bc40f47f ] 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 Reviewed-by: Anup Patel Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- 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.35.1