From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6E5ACC5475B for ; Fri, 1 Mar 2024 05:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xiPWbFd74PWpb5aVaKfBzf0A9ORfQGaYvQmW754A41Q=; b=N3qCb+mSn4wtc1 pLH7/hMtch7N0pFMkE5TLxo9LJ4B2LOxh3tPmmAw5AF+pVTJOcE+ZPckYLt+13LWgP9xiQbXkRA/g kQJ5qQsgYDGdKyAx4XvFlM8CQQfONDFJRxrhtw4g2oSPknSxeVK++Zs7S/5171Z/1h6pl1Da9jR9A w7awzW2L+49F1pdNd6hyKvLxoH+VvPkxSfe15NaBEx6isMvr1swWyVIFeHwQ5+27zvfs19chkJwas WNFzmUPxr/oBXhNReV/KQlUgqTf8hFFCwbWwML0F+MClYkrqXuj4KVKmlQE1EPrGiPK+JmeWOGB3c 1DHc+p/K9mTmoLzbQdIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfvgy-0000000GTle-3D6B; Fri, 01 Mar 2024 05:44:20 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfvgw-0000000GTkv-1KoF for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 05:44:19 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4215hxqf081979; Thu, 29 Feb 2024 23:43:59 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1709271839; bh=Ax8wDou/i0Ij3YdyTyGYeuq8MJb/3HgD1UFnkReb0vA=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=iYMwGkDDnBLEOok5A1DLYm8QBUlSlEI69ZCXBqPYkERZyxZJGEqCLXeThETm0acrm pWQtSiYS0VTngf5sydy6PdTYzK4jb4+8GGv+8tb77nyqSxqj2FraN+P6icjPK+u7yS kEecdkAYGy5xqWSYwXlgBC06lsmMKrnuE2gsH0iY= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4215hxWV065949 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 29 Feb 2024 23:43:59 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 29 Feb 2024 23:43:59 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 29 Feb 2024 23:43:59 -0600 Received: from localhost (dhruva.dhcp.ti.com [172.24.227.68]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4215hwno059467; Thu, 29 Feb 2024 23:43:58 -0600 Date: Fri, 1 Mar 2024 11:13:57 +0530 From: Dhruva Gole To: Maulik Shah CC: Mark Rutland , Lorenzo Pieralisi , , , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Sudeep Holla , , , , , , Subject: Re: [PATCH v2] PM: suspend: Set mem_sleep_current during kernel command line setup Message-ID: <20240301054357.hgbvbcywbxclebus@dhruva> References: <20240229-suspend_ops_late_init-v2-1-34852c61a5fa@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240229-suspend_ops_late_init-v2-1-34852c61a5fa@quicinc.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240229_214418_465518_4DEF9DCC X-CRM114-Status: GOOD ( 17.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Feb 29, 2024 at 12:14:59 +0530, Maulik Shah wrote: > psci_init_system_suspend() invokes suspend_set_ops() very early during > bootup even before kernel command line for mem_sleep_default is setup. > This leads to kernel command line mem_sleep_default=s2idle not working > as mem_sleep_current gets changed to deep via suspend_set_ops() and never > changes back to s2idle. > > Set mem_sleep_current along with mem_sleep_default during kernel command > line setup as default suspend mode. > > Fixes: faf7ec4a92c0 ("drivers: firmware: psci: add system suspend support") > CC: stable@vger.kernel.org # 5.4+ > Signed-off-by: Maulik Shah > --- > Changes in v2: > - Set mem_sleep_current during mem_sleep_default kernel command line setup > - Update commit message accordingly > - Retain Fixes: tag > - Link to v1: https://lore.kernel.org/r/20240219-suspend_ops_late_init-v1-1-6330ca9597fa@quicinc.com > --- > kernel/power/suspend.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c > index 742eb26618cc..e3ae93bbcb9b 100644 > --- a/kernel/power/suspend.c > +++ b/kernel/power/suspend.c > @@ -192,6 +192,7 @@ static int __init mem_sleep_default_setup(char *str) > if (mem_sleep_labels[state] && > !strcmp(str, mem_sleep_labels[state])) { > mem_sleep_default = state; > + mem_sleep_current = state; I could've missed this patch. Please CC people who are involved in the previous discussions :) Reviewed-by: Dhruva Gole -- Best regards, Dhruva Gole _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel