Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp90263lqg; Thu, 29 Feb 2024 21:44:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXg8JHO20DqVxbFPpVslDFfkE9JJ4Ue9XfdLxLZweMkAV+o06SbwRfcEssiWwPS76Kdx396Xph9S9IVM4cddf3I07cgBlY8nXofbPuK/Q== X-Google-Smtp-Source: AGHT+IGSaHTi/l0ENdkw8r98R+GMsou8Rqo53utMkQqAVKv+q1MIMqjuj2Ve6XeTnqgch3CtpbmX X-Received: by 2002:a05:620a:269c:b0:787:7cf8:dcfa with SMTP id c28-20020a05620a269c00b007877cf8dcfamr931236qkp.76.1709271880292; Thu, 29 Feb 2024 21:44:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709271880; cv=pass; d=google.com; s=arc-20160816; b=1H9H5a+YvZR6YEy3MkOW5czM2ZgeE/1kM5SSa53v2k73zRSTOvEv9nCOU7oDBKbzJU fK3wWz1Uvvza7j2pfyAS3ckmC+WFL5NVdb0ZArvZz7Kl8TGo1mx+hUUoMGkxl08QiapT hvBaxHBzqNM8E6715gMLp8lTkuD9EsDKlUBSm8UZlcQ1hIebTX7XYRra0mnDhSoFF8ps /rmiL3kMGJS//ffzg0SoDin2rYCG6pfnBgJgO8hRh4Jf/grYbE8hbjggWVFlu3YxIfMR duXw9H917PzsGR+LDEZD3QCrHBV2jqxDnllQMCMeNiogOJjXXZFQRlWLKz1/wcJwq0ZX /30w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ax8wDou/i0Ij3YdyTyGYeuq8MJb/3HgD1UFnkReb0vA=; fh=qv++8PKpk4govNu1E/HUB8JCGZdarEs4RP8kk0n2gZA=; b=YAiX0HB22DPfXMywJ2gwkg5sUhieX9AqoQ4UbDvBnGgbd9FDUgGkeaRnh/rEfFBCze rIIqwAzjMy259uqjR3a+yIG/O5lL5+Cz65AkptkdD8SX8sNym58hp1g6R1zlJHl7moIz D0H4ZTM5tINai1tH9/KRptazb0n89wB2grp1Jm6tqoEnCd/lAjFxb0heqr2SYZN+wB1L LvYi6Gv6UxRaivyLaOzmLN3r/TRw8OL1crarGZVQEwrWuBQVclqRRZEdg1I0OQC7AY8y wr11hdSHZy/qeknJucNYj/1v0YHRKJ3Iy1/ZMxWuum3SlxmerwcmVpwlrV58+ubkvZ7b xqww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=iYMwGkDD; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-87940-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87940-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u10-20020a05620a022a00b00787f0b28995si2885052qkm.6.2024.02.29.21.44.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 21:44:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87940-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=iYMwGkDD; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-87940-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87940-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 865CB1C225D7 for ; Fri, 1 Mar 2024 05:44:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31081524AA; Fri, 1 Mar 2024 05:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="iYMwGkDD" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2FAE2AEEE; Fri, 1 Mar 2024 05:44:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709271868; cv=none; b=M2f8ZEz/z52inu26tQSslaeacck7aC30LyCL6lmPrcqRON8X/c3BFQfAX+UGdIhFC0ltNCIwfAcuFVlUr90wTpthySin2nqKzZzE7GfC70D7/lCxq4+MWo4AJ586KWBwpxd1W9eaUsI2OPtPVpNaTsrtMdkqRk9etBnHd9jYkWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709271868; c=relaxed/simple; bh=x0RYsqPoQe7Py7qVG6iE+FyNJ5qnSlT7pe837V0tbtg=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rCr3crl0o7B4rKCmAc5VB6l8oMl/zrxej7OkgmxFOFwZjOeHyXNkYiwHJz1RIaandCb8LWUZWz4DoIVDKiE2YiuGYEOtJUcHYljSQubRmGd9uoXKUO+n/fsaZQ4c/cHlkO07PXG5LP0iA/yeSerPBmFDun00z9Cnu978yvKECgo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=iYMwGkDD; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 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