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 4FEE0C3DA6E for ; Wed, 3 Jan 2024 09:48:25 +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=TIHXEcLiv1CgMXXUwW3R6FBdFhqLyhbSq/LPeWSetZE=; b=zIQIVnGXa8MR+f g1DqiuACtwGn1YfpSHlyUZTd5OWHycBLkPaRoAkzPm2qmKWepIlmgofWkjSFlRBPAgU6HxIgxbz4w J2g1wTOAtMSmHZ4suHmJpV0S6+A88s5h6x5MlCnPwMs91THqVWqWELiJM2g9rkOh969D/DZufy+RR QokRrnRzpLJsQjhFiB2Bmey5FJbe7/+cPO15daW1Hy5LMLy/vxEvl6IJYm2fQBKAfDgt4sOpFhbVX zHtONgtIWWvMW5fIFtnUEVTgCBwOymyf441qnCcXAj8Y4yNyDRiKtgZU8wivwmY+fy6q/nbEkCVqe eCzL6IxagWANlOmvIY2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rKxqy-00AHHP-1m; Wed, 03 Jan 2024 09:48:00 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rKxqv-00AHFl-15 for linux-arm-kernel@lists.infradead.org; Wed, 03 Jan 2024 09:47:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 62A10C15; Wed, 3 Jan 2024 01:48:39 -0800 (PST) Received: from bogus (unknown [10.57.74.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9649A3F7A6; Wed, 3 Jan 2024 01:47:50 -0800 (PST) Date: Wed, 3 Jan 2024 09:44:42 +0000 From: Sudeep Holla To: Konrad Dybcio Cc: Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Marijn Suijten , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bjorn Andersson Subject: Re: [PATCH 2/2] firmware/psci: Set pm_set_resume/suspend_via_firmware() on qcom Message-ID: <20240103094442.mlh2pf3odof3ze3s@bogus> References: <20231227-topic-psci_fw_sus-v1-0-6910add70bf3@linaro.org> <20231227-topic-psci_fw_sus-v1-2-6910add70bf3@linaro.org> <20231228102801.fzaubcjq5thfwgxg@bogus> <20231228115053.zlypgc5uxxvghi4a@bogus> <376d3040-b9ed-4574-90d7-fb864d694e3c@linaro.org> <20231228124348.mmtceqeuean7ly6y@bogus> <7e31d489-de96-42f0-a72a-a581859e7131@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7e31d489-de96-42f0-a72a-a581859e7131@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240103_014757_487041_ADC50C8C X-CRM114-Status: GOOD ( 34.73 ) 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 On Tue, Jan 02, 2024 at 07:17:50PM +0100, Konrad Dybcio wrote: > On 28.12.2023 13:43, Sudeep Holla wrote: > > On Thu, Dec 28, 2023 at 01:16:28PM +0100, Konrad Dybcio wrote: > >> On 28.12.2023 12:50, Sudeep Holla wrote: > >>> On Thu, Dec 28, 2023 at 12:47:51PM +0100, Konrad Dybcio wrote: > >>>> On 28.12.2023 11:28, Sudeep Holla wrote: > >>>>> On Wed, Dec 27, 2023 at 11:15:31PM +0100, Konrad Dybcio wrote: > >>>>>> Most Qualcomm platforms implementing PSCI (ab)use CPU_SUSPEND for > >>>>>> entering various stages of suspend, across the SoC. These range from a > >>>>>> simple WFI to a full-fledged power collapse of the entire chip > >>>>>> (mostly, anyway). > >>>>>> > >>>>>> Some device drivers are curious to know whether "the firmware" (which is > >>>>>> often assumed to be ACPI) takes care of suspending or resuming the > >>>>>> platform. Set the flag that reports this behavior on the aforementioned > >>>>>> chips. > >>>>>> > >>>>>> Some newer Qualcomm chips ship with firmware that actually advertises > >>>>>> PSCI SYSTEM_SUSPEND, so the compatible list should only grow slightly. > >>>>>> > >>>>> > >>>>> NACK, just use suspend-to-idle if SYSTEM_SUSPEND is not advertised. It is > >>>>> designed for such platforms especially on x86/ACPI which don't advertise > >>>>> Sx states. I see no reason why that doesn't work on ARM platforms as well. > >>>> > >>>> Not sure if I got the message through well, but the bottom line is, on > >>>> Qualcomm platforms the "idle" states aren't actually just "idle" (read: > >>>> they're not like S0ix). All but the most shallow ones shut down quite a > >>>> chunk of the entire SoC, with the lowest ones being essentially S3 with > >>>> power being cut off from the entire chip, except for the memory rail. > >>>> > >>> > >>> No I understood that and S2I is exactly what you need. > >>> Have you checked if S2I already works as intended on these platforms ? > >> Yes, simple CPU idling works OOTB and the SoC power collapse only works > >> given the developer doesn't cut corners when bringing up the platform > >> (read: works on some of the ones we support, trying hard to expand that > >> group!) > >> > >>> What extra do you achieve with this hack by advertising fake S2R ? > >> Uh.. unless I misunderstood something, I'm not advertising s2ram.. > >> Quite the opposite, I'm making sure only s2idle is allowed. > >> > > > > Right, I didn't notice that in suspend_valid_all(), it can be rename > > suspend_valid_s2i or something. "All" indicates all state is valid. > > > > Anyways that is not the main point. IIUC S2I must still work if there is > > at-least one CPU idle state other than WFI without these changes. Right ? > > Yes, and it does > Thanks for the confirmation. > > > > If all these changes is to support S2I wih WFI only, then we can look at > > some generic solution as there were previous attempts to do something > > similar on other platforms IIRC. > > No, I'm just interested in setting the resume/suspend_via_firmware() > markers and the PSCI driver seems like a good place for it, be it on Agreed and your PATCH 1/2 does that exactly and hence I have acked it already. > all platforms with SYSTEM_SUSPEND and Qualcomm which sneaked equivalent > functionality into the CPU_SUSPEND call. > But I don't like the Qualcomm specific changes. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel