[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160309153436.GB15775@codeblueprint.co.uk>
Date: Wed, 9 Mar 2016 15:34:36 +0000
From: Matt Fleming <matt@...eblueprint.co.uk>
To: "Chen, Yu C" <yu.c.chen@...el.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
"Rafael J. Wysocki" <rafael@...nel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Len Brown <lenb@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"Zhang, Rui" <rui.zhang@...el.com>
Subject: Re: [PATCH][RFC v3] ACPI / PM: Fix poweroff issue on HW-full
platforms without _S5
On Tue, 08 Mar, at 04:25:30PM, Chen, Yu C wrote:
> Hum. unfortunately it is not guaranteed to run after all of the other code,
> because other components who register pm_power_off may be built as modules, and
> we can not predict/control the sequence registration. So this patch may
> break the EFI platforms who use non-efi poweroff due to unstable EFI service
> , not sure if there are any released-products of this kind.
Certainly the majority of x86 client machines do not use EFI power
off, because it hardly ever functions correctly.
> Currently I'm thinking of 3 possible solutions, could you please give some advices on them:
>
> 1. Introduce bootopt of 'poweroff=efi'
> Set the pm_power_off to efi_power_off no matter whether there is _S5 or not
>
> 2. Introduce /sys/power/poweroff
> Allow the user to choose which pm_power_off, for example:
>
> # cat /sys/power/poweroff
> *acpi acpi_power_off
> efi efi_power_off
> gpio gpio_poweroff_do_poweroff
> user can echo string to enable which one.
>
> And two APIs:
> register_power_off(char *name, power_off func)
> unregister_power_off(char *name)
>
>
> 3. replace all the codes of pm_power_off() with reliable_pm_power_off()
>
> void reliable_pm_power_off(void)
> {
> if (!pm_power_off) {
> if (acpi_no_s5)
> pm_power_off = efi_power_off;
> /* Other conditions added in the future. */
> }
> pm_power_off();
> }
Be wary of adding all these control knobs. People just want their
machines to reboot properly without having to mess with boot
parameters.
Let's go back to the start. What prompted this patch? Do Intel have
(or are planning) machines that do not have _S5 and are expected to
use EFI to reset the system? Or is this some new configuration
discussed in the ACPI spec that Linux needs to be support?
Can we remove the ambiguity and options to force EFI reset if _S5 is
missing? Afterall, that's why the function is called
efi_poweroff_*required*.
Powered by blists - more mailing lists