[PATCH] ACPI: Correctly recover from a failed S3 attempt From: William Morrrow This was discovered on a broken BIOS that simply returned from its suspend procedure, appearing to the OS as a failed S3 attempt. It is possible to invoke the protected mode register restore routine (which would normally restore the sysenter registers) when the bios returns from S3. This has no effect on a correctly running system and repairs the damage from broken BIOS. Signed-off-by: William Morrow Signed-off-by: Jordan Crouse --- arch/i386/kernel/acpi/wakeup.S | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S index 9f408ee..b781b38 100644 --- a/arch/i386/kernel/acpi/wakeup.S +++ b/arch/i386/kernel/acpi/wakeup.S @@ -292,7 +292,10 @@ ENTRY(do_suspend_lowlevel) pushl $3 call acpi_enter_sleep_state addl $4, %esp - ret + +# In case of S3 failure, we'll emerge here. Jump +# to ret_point to recover + jmp ret_point .p2align 4,,7 ret_point: call restore_registers