mbox series

[v2,0/2] Support clean reboot after hibernate on Arm64

Message ID 20240412073530.2222496-1-dwmw2@infradead.org (mailing list archive)
Headers show
Series Support clean reboot after hibernate on Arm64 | expand

Message

David Woodhouse March 11, 2024, 12:19 p.m. UTC
When the hardware signature in the ACPI FACS changes, the OS is supposed
to perform a clean reboot instead of attempting to resume on a changed
platform.

Although these patches have a functional dependency, they could be merged
separately. The second patch just won't *see* a FACS table if the ACPICA
fix isn't present.

v2: Now that the ACPICA patch is merged upstream, note its commit ID

David Woodhouse (2):
      ACPICA: Detect FACS even for hardware reduced platforms
      arm64: acpi: Honour firmware_signature field of FACS, if it exists

 arch/arm64/kernel/acpi.c      | 10 ++++++++++
 drivers/acpi/acpica/tbfadt.c  | 30 +++++++++++++-----------------
 drivers/acpi/acpica/tbutils.c |  7 +------
 3 files changed, 24 insertions(+), 23 deletions(-)

Comments

Will Deacon April 12, 2024, 2:05 p.m. UTC | #1
On Mon, Mar 11, 2024 at 12:19:14PM +0000, David Woodhouse wrote:
> When the hardware signature in the ACPI FACS changes, the OS is supposed
> to perform a clean reboot instead of attempting to resume on a changed
> platform.
> 
> Although these patches have a functional dependency, they could be merged
> separately. The second patch just won't *see* a FACS table if the ACPICA
> fix isn't present.
> 
> v2: Now that the ACPICA patch is merged upstream, note its commit ID
> 
> David Woodhouse (2):
>       ACPICA: Detect FACS even for hardware reduced platforms
>       arm64: acpi: Honour firmware_signature field of FACS, if it exists
> 
>  arch/arm64/kernel/acpi.c      | 10 ++++++++++
>  drivers/acpi/acpica/tbfadt.c  | 30 +++++++++++++-----------------
>  drivers/acpi/acpica/tbutils.c |  7 +------

Rafael, how would you like the handle this series? The arm64 part has
been Acked-by Sudeep, so I'm happy with it.

Will
David Woodhouse April 12, 2024, 2:18 p.m. UTC | #2
On Fri, 2024-04-12 at 15:05 +0100, Will Deacon wrote:
> On Mon, Mar 11, 2024 at 12:19:14PM +0000, David Woodhouse wrote:
> > When the hardware signature in the ACPI FACS changes, the OS is supposed
> > to perform a clean reboot instead of attempting to resume on a changed
> > platform.
> > 
> > Although these patches have a functional dependency, they could be merged
> > separately. The second patch just won't *see* a FACS table if the ACPICA
> > fix isn't present.
> > 
> > v2: Now that the ACPICA patch is merged upstream, note its commit ID
> > 
> > David Woodhouse (2):
> >       ACPICA: Detect FACS even for hardware reduced platforms
> >       arm64: acpi: Honour firmware_signature field of FACS, if it exists
> > 
> >  arch/arm64/kernel/acpi.c      | 10 ++++++++++
> >  drivers/acpi/acpica/tbfadt.c  | 30 +++++++++++++-----------------
> >  drivers/acpi/acpica/tbutils.c |  7 +------
> 
> Rafael, how would you like the handle this series? The arm64 part has
> been Acked-by Sudeep, so I'm happy with it.

Thanks, Will.

Similar question for Rafael on the guest side of the PSCI SYSTEM_OFF2
series, in particular
https://lore.kernel.org/kvm/20240319130957.1050637-6-dwmw2@infradead.org/#Z31kernel:power:hibernate.c
which sets the entering_platform_hibernation flag around the call to
the standard kernel_power_off() function when invoking it for
HIBERNATION_SHUTDOWN.
Wysocki, Rafael J April 12, 2024, 7:25 p.m. UTC | #3
On 4/12/2024 4:18 PM, David Woodhouse wrote:
> On Fri, 2024-04-12 at 15:05 +0100, Will Deacon wrote:
>> On Mon, Mar 11, 2024 at 12:19:14PM +0000, David Woodhouse wrote:
>>> When the hardware signature in the ACPI FACS changes, the OS is supposed
>>> to perform a clean reboot instead of attempting to resume on a changed
>>> platform.
>>>
>>> Although these patches have a functional dependency, they could be merged
>>> separately. The second patch just won't *see* a FACS table if the ACPICA
>>> fix isn't present.
>>>
>>> v2: Now that the ACPICA patch is merged upstream, note its commit ID
>>>
>>> David Woodhouse (2):
>>>        ACPICA: Detect FACS even for hardware reduced platforms
>>>        arm64: acpi: Honour firmware_signature field of FACS, if it exists
>>>
>>>   arch/arm64/kernel/acpi.c      | 10 ++++++++++
>>>   drivers/acpi/acpica/tbfadt.c  | 30 +++++++++++++-----------------
>>>   drivers/acpi/acpica/tbutils.c |  7 +------
>> Rafael, how would you like the handle this series? The arm64 part has
>> been Acked-by Sudeep, so I'm happy with it.
> Thanks, Will.
>
> Similar question for Rafael on the guest side of the PSCI SYSTEM_OFF2
> series, in particular
> https://lore.kernel.org/kvm/20240319130957.1050637-6-dwmw2@infradead.org/#Z31kernel:power:hibernate.c
> which sets the entering_platform_hibernation flag around the call to
> the standard kernel_power_off() function when invoking it for
> HIBERNATION_SHUTDOWN.

In both cases, please feel free to route the patches as it is convenient 
and add

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

to both of them.
Will Deacon April 19, 2024, 3:32 p.m. UTC | #4
On Mon, 11 Mar 2024 12:19:14 +0000, David Woodhouse wrote:
> When the hardware signature in the ACPI FACS changes, the OS is supposed
> to perform a clean reboot instead of attempting to resume on a changed
> platform.
> 
> Although these patches have a functional dependency, they could be merged
> separately. The second patch just won't *see* a FACS table if the ACPICA
> fix isn't present.
> 
> [...]

Applied to arm64 (for-next/acpi), thanks!

[1/2] ACPICA: Detect FACS even for hardware reduced platforms
      https://git.kernel.org/arm64/c/bc5b492ac305
[2/2] arm64: acpi: Honour firmware_signature field of FACS, if it exists
      https://git.kernel.org/arm64/c/fbaad243b536

Cheers,
David Woodhouse April 19, 2024, 3:39 p.m. UTC | #5
On Fri, 2024-04-19 at 16:32 +0100, Will Deacon wrote:
> On Mon, 11 Mar 2024 12:19:14 +0000, David Woodhouse wrote:
> > When the hardware signature in the ACPI FACS changes, the OS is supposed
> > to perform a clean reboot instead of attempting to resume on a changed
> > platform.
> > 
> > Although these patches have a functional dependency, they could be merged
> > separately. The second patch just won't *see* a FACS table if the ACPICA
> > fix isn't present.
> > 
> > [...]
> 
> Applied to arm64 (for-next/acpi), thanks!
> 
> [1/2] ACPICA: Detect FACS even for hardware reduced platforms
>       https://git.kernel.org/arm64/c/bc5b492ac305
> [2/2] arm64: acpi: Honour firmware_signature field of FACS, if it exists
>       https://git.kernel.org/arm64/c/fbaad243b536

Thanks. I've rebased the remaining SYSTEM_OFF2 patches on top of that:
https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/psci-hibernate

I've added Rafael's Acked-by: to the last commit in that series too.

Will repost them when the final version of the PSCI 1.3 spec is published.