From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754097AbdBURU3 (ORCPT ); Tue, 21 Feb 2017 12:20:29 -0500 Received: from foss.arm.com ([217.140.101.70]:35216 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753996AbdBURUV (ORCPT ); Tue, 21 Feb 2017 12:20:21 -0500 Date: Tue, 21 Feb 2017 17:20:13 +0000 From: Mark Rutland To: Geert Uytterhoeven Cc: Sudeep Holla , Pavel Machek , Geert Uytterhoeven , Lorenzo Pieralisi , Lina Iyer , John Stultz , Thomas Gleixner , "Rafael J . Wysocki" , Len Brown , Rob Herring , Magnus Damm , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Linux-Renesas , Linux PM list , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode Message-ID: <20170221172012.GD8605@leverpostej> References: <1487622809-25127-1-git-send-email-geert+renesas@glider.be> <1487622809-25127-4-git-send-email-geert+renesas@glider.be> <20170221110712.GB5021@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Feb 21, 2017 at 05:32:50PM +0100, Geert Uytterhoeven wrote: > On Tue, Feb 21, 2017 at 12:14 PM, Sudeep Holla wrote: > > On 21/02/17 11:07, Pavel Machek wrote: > >>> Enable support for "shallow" suspend mode, also known as "Standby" or > >>> "Power-On Suspend". > >>> > >>> As secondary CPU cores are taken offline, "shallow" suspend mode saves > >>> slightly more power than "s2idle", but less than "deep" suspend mode. > >>> However, unlike "deep" suspend mode, "shallow" suspend mode can be used > >>> regardless of the presence of support for PSCI_SYSTEM_SUSPEND, which is > >>> an optional API in PSCI v1.0. > >> > >> If system supports "shallow" suspend, why does not PSCI implement it? > > > > Yes it can, and IIUC it already does on this platform with CPU_SUSPEND. > > All it now needs is just to use existing "freeze" suspend mode in Linux. > > How can Linux know if using "deep" suspend will allow to wake-up the system > according to configured wake-up sources, or not? My understanding is that if a device can wake the system from PSCI_SYSTEM_SUSPEND, it should be described in the DT as a wakeup source [1]. So we should be able to determine the set of devices which can wake the system from a suspend. We shouldn't assume that other devices can (though I don't precisely what we do currently). Otherwise, where PSCI_CPU_SUSPEND, we'd expect that most devices (barring cpu-local timers) can wake up CPUs, and hence the system, by raising an interrupt. Thanks, Mark. [1] Documentation/devicetree/bindings/power/wakeup-source.txt From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Rutland Subject: Re: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode Date: Tue, 21 Feb 2017 17:20:13 +0000 Message-ID: <20170221172012.GD8605@leverpostej> References: <1487622809-25127-1-git-send-email-geert+renesas@glider.be> <1487622809-25127-4-git-send-email-geert+renesas@glider.be> <20170221110712.GB5021@amd> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Geert Uytterhoeven Cc: Sudeep Holla , Pavel Machek , Geert Uytterhoeven , Lorenzo Pieralisi , Lina Iyer , John Stultz , Thomas Gleixner , "Rafael J . Wysocki" , Len Brown , Rob Herring , Magnus Damm , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Linux-Renesas , Linux PM list , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: devicetree@vger.kernel.org Hi, On Tue, Feb 21, 2017 at 05:32:50PM +0100, Geert Uytterhoeven wrote: > On Tue, Feb 21, 2017 at 12:14 PM, Sudeep Holla wrote: > > On 21/02/17 11:07, Pavel Machek wrote: > >>> Enable support for "shallow" suspend mode, also known as "Standby" or > >>> "Power-On Suspend". > >>> > >>> As secondary CPU cores are taken offline, "shallow" suspend mode saves > >>> slightly more power than "s2idle", but less than "deep" suspend mode. > >>> However, unlike "deep" suspend mode, "shallow" suspend mode can be used > >>> regardless of the presence of support for PSCI_SYSTEM_SUSPEND, which is > >>> an optional API in PSCI v1.0. > >> > >> If system supports "shallow" suspend, why does not PSCI implement it? > > > > Yes it can, and IIUC it already does on this platform with CPU_SUSPEND. > > All it now needs is just to use existing "freeze" suspend mode in Linux. > > How can Linux know if using "deep" suspend will allow to wake-up the system > according to configured wake-up sources, or not? My understanding is that if a device can wake the system from PSCI_SYSTEM_SUSPEND, it should be described in the DT as a wakeup source [1]. So we should be able to determine the set of devices which can wake the system from a suspend. We shouldn't assume that other devices can (though I don't precisely what we do currently). Otherwise, where PSCI_CPU_SUSPEND, we'd expect that most devices (barring cpu-local timers) can wake up CPUs, and hence the system, by raising an interrupt. Thanks, Mark. [1] Documentation/devicetree/bindings/power/wakeup-source.txt -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Tue, 21 Feb 2017 17:20:13 +0000 From: Mark Rutland To: Geert Uytterhoeven Cc: Sudeep Holla , Pavel Machek , Geert Uytterhoeven , Lorenzo Pieralisi , Lina Iyer , John Stultz , Thomas Gleixner , "Rafael J . Wysocki" , Len Brown , Rob Herring , Magnus Damm , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Linux-Renesas , Linux PM list , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode Message-ID: <20170221172012.GD8605@leverpostej> References: <1487622809-25127-1-git-send-email-geert+renesas@glider.be> <1487622809-25127-4-git-send-email-geert+renesas@glider.be> <20170221110712.GB5021@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: Hi, On Tue, Feb 21, 2017 at 05:32:50PM +0100, Geert Uytterhoeven wrote: > On Tue, Feb 21, 2017 at 12:14 PM, Sudeep Holla wrote: > > On 21/02/17 11:07, Pavel Machek wrote: > >>> Enable support for "shallow" suspend mode, also known as "Standby" or > >>> "Power-On Suspend". > >>> > >>> As secondary CPU cores are taken offline, "shallow" suspend mode saves > >>> slightly more power than "s2idle", but less than "deep" suspend mode. > >>> However, unlike "deep" suspend mode, "shallow" suspend mode can be used > >>> regardless of the presence of support for PSCI_SYSTEM_SUSPEND, which is > >>> an optional API in PSCI v1.0. > >> > >> If system supports "shallow" suspend, why does not PSCI implement it? > > > > Yes it can, and IIUC it already does on this platform with CPU_SUSPEND. > > All it now needs is just to use existing "freeze" suspend mode in Linux. > > How can Linux know if using "deep" suspend will allow to wake-up the system > according to configured wake-up sources, or not? My understanding is that if a device can wake the system from PSCI_SYSTEM_SUSPEND, it should be described in the DT as a wakeup source [1]. So we should be able to determine the set of devices which can wake the system from a suspend. We shouldn't assume that other devices can (though I don't precisely what we do currently). Otherwise, where PSCI_CPU_SUSPEND, we'd expect that most devices (barring cpu-local timers) can wake up CPUs, and hence the system, by raising an interrupt. Thanks, Mark. [1] Documentation/devicetree/bindings/power/wakeup-source.txt From mboxrd@z Thu Jan 1 00:00:00 1970 From: mark.rutland@arm.com (Mark Rutland) Date: Tue, 21 Feb 2017 17:20:13 +0000 Subject: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode In-Reply-To: References: <1487622809-25127-1-git-send-email-geert+renesas@glider.be> <1487622809-25127-4-git-send-email-geert+renesas@glider.be> <20170221110712.GB5021@amd> Message-ID: <20170221172012.GD8605@leverpostej> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Tue, Feb 21, 2017 at 05:32:50PM +0100, Geert Uytterhoeven wrote: > On Tue, Feb 21, 2017 at 12:14 PM, Sudeep Holla wrote: > > On 21/02/17 11:07, Pavel Machek wrote: > >>> Enable support for "shallow" suspend mode, also known as "Standby" or > >>> "Power-On Suspend". > >>> > >>> As secondary CPU cores are taken offline, "shallow" suspend mode saves > >>> slightly more power than "s2idle", but less than "deep" suspend mode. > >>> However, unlike "deep" suspend mode, "shallow" suspend mode can be used > >>> regardless of the presence of support for PSCI_SYSTEM_SUSPEND, which is > >>> an optional API in PSCI v1.0. > >> > >> If system supports "shallow" suspend, why does not PSCI implement it? > > > > Yes it can, and IIUC it already does on this platform with CPU_SUSPEND. > > All it now needs is just to use existing "freeze" suspend mode in Linux. > > How can Linux know if using "deep" suspend will allow to wake-up the system > according to configured wake-up sources, or not? My understanding is that if a device can wake the system from PSCI_SYSTEM_SUSPEND, it should be described in the DT as a wakeup source [1]. So we should be able to determine the set of devices which can wake the system from a suspend. We shouldn't assume that other devices can (though I don't precisely what we do currently). Otherwise, where PSCI_CPU_SUSPEND, we'd expect that most devices (barring cpu-local timers) can wake up CPUs, and hence the system, by raising an interrupt. Thanks, Mark. [1] Documentation/devicetree/bindings/power/wakeup-source.txt