From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932508AbdBVNrr (ORCPT ); Wed, 22 Feb 2017 08:47:47 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:33591 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932120AbdBVNrm (ORCPT ); Wed, 22 Feb 2017 08:47:42 -0500 MIME-Version: 1.0 In-Reply-To: <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> <3caf0f3f-76e5-cb1e-7c0f-87ed5e1c2b86@arm.com> From: Geert Uytterhoeven Date: Wed, 22 Feb 2017 14:47:39 +0100 X-Google-Sender-Auth: 5-fEKoQvxrXfkfv8AvzYHgKJKBo Message-ID: Subject: Re: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode To: Sudeep Holla Cc: 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" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sudeep, On Tue, Feb 21, 2017 at 6:22 PM, Sudeep Holla wrote: > On 21/02/17 16:32, 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? > > 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 Good, so there's no need for the DT property, and drivers/firmware/psci.c should aways call do_cpu_idle() instead of PSCI SYSTEM_SUSPEND if any other wake-up sources are configured? That follows the principle of least surprise: it doesn't leave the user with a system that won't wake up the way he configured it to wake up. > proposal is horrible hack. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode Date: Wed, 22 Feb 2017 14:47:39 +0100 Message-ID: References: <1487622809-25127-1-git-send-email-geert+renesas@glider.be> <1487622809-25127-4-git-send-email-geert+renesas@glider.be> <20170221110712.GB5021@amd> <3caf0f3f-76e5-cb1e-7c0f-87ed5e1c2b86@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <3caf0f3f-76e5-cb1e-7c0f-87ed5e1c2b86@arm.com> Sender: linux-renesas-soc-owner@vger.kernel.org To: Sudeep Holla Cc: 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" List-Id: devicetree@vger.kernel.org Hi Sudeep, On Tue, Feb 21, 2017 at 6:22 PM, Sudeep Holla wrote: > On 21/02/17 16:32, 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? > > 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 Good, so there's no need for the DT property, and drivers/firmware/psci.c should aways call do_cpu_idle() instead of PSCI SYSTEM_SUSPEND if any other wake-up sources are configured? That follows the principle of least surprise: it doesn't leave the user with a system that won't wake up the way he configured it to wake up. > proposal is horrible hack. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds From mboxrd@z Thu Jan 1 00:00:00 1970 From: geert@linux-m68k.org (Geert Uytterhoeven) Date: Wed, 22 Feb 2017 14:47:39 +0100 Subject: [PATCH/RFC 3/6] drivers: firmware: psci: Implement shallow suspend mode In-Reply-To: <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> <3caf0f3f-76e5-cb1e-7c0f-87ed5e1c2b86@arm.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Sudeep, On Tue, Feb 21, 2017 at 6:22 PM, Sudeep Holla wrote: > On 21/02/17 16:32, 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? > > 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 Good, so there's no need for the DT property, and drivers/firmware/psci.c should aways call do_cpu_idle() instead of PSCI SYSTEM_SUSPEND if any other wake-up sources are configured? That follows the principle of least surprise: it doesn't leave the user with a system that won't wake up the way he configured it to wake up. > proposal is horrible hack. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds