From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754031AbdBURWg (ORCPT ); Tue, 21 Feb 2017 12:22:36 -0500 Received: from foss.arm.com ([217.140.101.70]:35276 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753789AbdBURW2 (ORCPT ); Tue, 21 Feb 2017 12:22:28 -0500 Subject: Re: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode To: Geert Uytterhoeven References: <1487622809-25127-1-git-send-email-geert+renesas@glider.be> <1487622809-25127-4-git-send-email-geert+renesas@glider.be> <20170221110712.GB5021@amd> Cc: Sudeep Holla , Pavel Machek , Geert Uytterhoeven , Lorenzo Pieralisi , Mark Rutland , 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" From: Sudeep Holla Organization: ARM Message-ID: <3caf0f3f-76e5-cb1e-7c0f-87ed5e1c2b86@arm.com> Date: Tue, 21 Feb 2017 17:22:14 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/02/17 16:32, Geert Uytterhoeven wrote: > Hi Sudeep, > > 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? > I am not sure if we have such selective configuration of wakeup source implemented in Linux. ACPI specification has some provisions where each device can state if it can specify device state in each system sleeping state that can wake the system. DT has no mechanism today to express this relations. I had brought up this discussion in plumbers(2015). Refer slide 7 in [0] And the way you are trying to do that is not correct IMO especially making it just PSCI specific. > Note that "it will not, ever" is an accepted answer. > IIUC, it's not implemented today. I can't talk about future ;), but your proposal is horrible hack. -- Regards, Sudeep [0] https://linuxplumbersconf.org/2015/ocw//system/presentations/3051/original/wakeup_config.pdf From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sudeep Holla Subject: Re: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode Date: Tue, 21 Feb 2017 17:22:14 +0000 Message-ID: <3caf0f3f-76e5-cb1e-7c0f-87ed5e1c2b86@arm.com> 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=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Geert Uytterhoeven Cc: Sudeep Holla , Pavel Machek , Geert Uytterhoeven , Lorenzo Pieralisi , Mark Rutland , 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 On 21/02/17 16:32, Geert Uytterhoeven wrote: > Hi Sudeep, > > 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? > I am not sure if we have such selective configuration of wakeup source implemented in Linux. ACPI specification has some provisions where each device can state if it can specify device state in each system sleeping state that can wake the system. DT has no mechanism today to express this relations. I had brought up this discussion in plumbers(2015). Refer slide 7 in [0] And the way you are trying to do that is not correct IMO especially making it just PSCI specific. > Note that "it will not, ever" is an accepted answer. > IIUC, it's not implemented today. I can't talk about future ;), but your proposal is horrible hack. -- Regards, Sudeep [0] https://linuxplumbersconf.org/2015/ocw//system/presentations/3051/original/wakeup_config.pdf -- 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: Subject: Re: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode To: Geert Uytterhoeven References: <1487622809-25127-1-git-send-email-geert+renesas@glider.be> <1487622809-25127-4-git-send-email-geert+renesas@glider.be> <20170221110712.GB5021@amd> Cc: Sudeep Holla , Pavel Machek , Geert Uytterhoeven , Lorenzo Pieralisi , Mark Rutland , 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" From: Sudeep Holla Message-ID: <3caf0f3f-76e5-cb1e-7c0f-87ed5e1c2b86@arm.com> Date: Tue, 21 Feb 2017 17:22:14 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: devicetree-owner@vger.kernel.org List-ID: On 21/02/17 16:32, Geert Uytterhoeven wrote: > Hi Sudeep, > > 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? > I am not sure if we have such selective configuration of wakeup source implemented in Linux. ACPI specification has some provisions where each device can state if it can specify device state in each system sleeping state that can wake the system. DT has no mechanism today to express this relations. I had brought up this discussion in plumbers(2015). Refer slide 7 in [0] And the way you are trying to do that is not correct IMO especially making it just PSCI specific. > Note that "it will not, ever" is an accepted answer. > IIUC, it's not implemented today. I can't talk about future ;), but your proposal is horrible hack. -- Regards, Sudeep [0] https://linuxplumbersconf.org/2015/ocw//system/presentations/3051/original/wakeup_config.pdf From mboxrd@z Thu Jan 1 00:00:00 1970 From: sudeep.holla@arm.com (Sudeep Holla) Date: Tue, 21 Feb 2017 17:22:14 +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: <3caf0f3f-76e5-cb1e-7c0f-87ed5e1c2b86@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 21/02/17 16:32, Geert Uytterhoeven wrote: > Hi Sudeep, > > 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? > I am not sure if we have such selective configuration of wakeup source implemented in Linux. ACPI specification has some provisions where each device can state if it can specify device state in each system sleeping state that can wake the system. DT has no mechanism today to express this relations. I had brought up this discussion in plumbers(2015). Refer slide 7 in [0] And the way you are trying to do that is not correct IMO especially making it just PSCI specific. > Note that "it will not, ever" is an accepted answer. > IIUC, it's not implemented today. I can't talk about future ;), but your proposal is horrible hack. -- Regards, Sudeep [0] https://linuxplumbersconf.org/2015/ocw//system/presentations/3051/original/wakeup_config.pdf