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 3C12DC47073 for ; Tue, 2 Jan 2024 18:18:26 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Snw6O58DodWsU5Xzq1rn88l5OwbJtyYmz5TIadaYwY8=; b=293hoqXas3wR2L GUIMNEvy+UxgAkhf9VNIK92+A29/q+Ug4O/BtpOc0wYcxZpG25rP4d4FT99iPizcTU/vicrU6rFs5 PB0BCD/e+zJcuPfo0iMlwB0DAgZiUCrDsieAJFT6rGRmx1qxedAFKtYhkDg+y0SeKhBGSzwiNNv2i MDNWg/5ZiHcXbx+VNqCs/BnasgZSAt/c3VP1A1zJBqvD+PY1sZ/qI1FHzXVm46DAaj6fVXb+CkRMx 3VyxCSRrt4x7LcQb17uYgLmDL9z8yXcagMAkdajxu1EylSTVaVUzKI8Fj8W9nGXFxyd2T11eqGUxp jSYuP9hEK9rUEDQxEcug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rKjKx-008h57-0P; Tue, 02 Jan 2024 18:17:59 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rKjKt-008h4b-22 for linux-arm-kernel@lists.infradead.org; Tue, 02 Jan 2024 18:17:57 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-553ba2f0c8fso10749108a12.1 for ; Tue, 02 Jan 2024 10:17:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704219472; x=1704824272; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=vokVJUHBqqgZii3C8tGP6hxXN4hNbUKKpSnGYxnExi0=; b=injR7tY1SThY3D8qiH6ESioFfaPsZQ7fwVYz3avFRZhMMoY9B1mCStNLtxB+5sePqH f4LC3lwAJYWuHBMlloa7aWF5gZk3rctjQ4u7xdZ9m/xvqjzOp+sovlktQKH0QYqLQzDV 7V1peMXjcwHxshdvuVx98fYLmz1j0O4kWVmMXD8UN7wWm+cfYWrSGuklmBH9JzOx1p6G dPd4EzLoVAo/JU+c2sB7b6iNuTQ0pH2SZ6JC52PGX6n5T4xoaBGIkAoHH+1TF3AEKr0x fHcoypM6vKSt4XpcpXNAYuJJVFyqJ7KuA/5xFnuU+cx9cuncC2vFXCHL4ccDt2/K1sx4 kl1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704219472; x=1704824272; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vokVJUHBqqgZii3C8tGP6hxXN4hNbUKKpSnGYxnExi0=; b=sYtvLxEFdANxR9SvszjNC1bOux47DcP2zJ4XRibT40U1aNUKvbRKr7vpskjkgCTNqE CH0/iPciUbL6wArS821G0WWCexg6aTL+N8aUGP5uSKthpxJ6jqjkgGVlHCI5i4ty0TYA 65BmKbMk7J/N187OPX9uP7CGmYzapNTApmSsAp+y5DHTyG4x7moMqu/gRm9DUUkrNNbG zrkRfWLPUahN01q0IqUUEDUvm0L5zZdmy5BpYZpfbyWSB8hvPgSmGjsLEKC31sc2IUlR OqGx9BnS2FbNDP0fwYnJttY9lwR0dLa1nb1oMVUyX2Fr/vhAVcPD8Zo0TG3npcOEXhT/ 7pbA== X-Gm-Message-State: AOJu0YwDo6BF/raUnZjJcd47AwTNjYeMXhCu+Jjt2yYZXbXuZPOobmNs Xx+BSpL0JzeHy/qUNlKryYGOPAfbcgn9gw== X-Google-Smtp-Source: AGHT+IGO6CdZf1pizfg01zNcXfQT9jtY2/0JkQ1ySIveRsPvmKlm+siO/jHT1Z3BZh+offdblfkLdg== X-Received: by 2002:a17:907:72c3:b0:a23:4532:f168 with SMTP id du3-20020a17090772c300b00a234532f168mr5910693ejc.227.1704219472321; Tue, 02 Jan 2024 10:17:52 -0800 (PST) Received: from [192.168.199.125] (178235179036.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.36]) by smtp.gmail.com with ESMTPSA id fp21-20020a1709069e1500b00a26ade46619sm11179166ejc.121.2024.01.02.10.17.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jan 2024 10:17:51 -0800 (PST) Message-ID: <7e31d489-de96-42f0-a72a-a581859e7131@linaro.org> Date: Tue, 2 Jan 2024 19:17:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] firmware/psci: Set pm_set_resume/suspend_via_firmware() on qcom Content-Language: en-US To: Sudeep Holla Cc: Mark Rutland , Lorenzo Pieralisi , Marijn Suijten , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bjorn Andersson 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> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhTeMkvt4KfE5m5ercid9+ZXAqoaYLUL4HCEw+HW0DXcKDwARAQABzShLb25yYWQgRHli Y2lvIDxrb25yYWQuZHliY2lvQGxpbmFyby5vcmc+wsGOBBMBCAA4FiEEU24if9oCL2zdAAQV R4cBcg5dfFgFAmQ5bqwCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQR4cBcg5dfFjO BQ//YQV6fkbqQCceYebGg6TiisWCy8LG77zV7DB0VMIWJv7Km7Sz0QQrHQVzhEr3trNenZrf yy+o2tQOF2biICzbLM8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/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20231228124348.mmtceqeuean7ly6y@bogus> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240102_101755_775556_E8A24D40 X-CRM114-Status: GOOD ( 25.39 ) 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 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 > > 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 all platforms with SYSTEM_SUSPEND and Qualcomm which sneaked equivalent functionality into the CPU_SUSPEND call. Konrad _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel