From: William Morrrow Date: Tue, 15 Aug 2006 05:37:31 +0000 (-0700) Subject: ACPI: Handle BIOS that resumes from S3 to suspend routine rather than resume vector X-Git-Tag: v2.6.18-rc5~75^4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e6e6504a4572dee3afcb0925ce92ad559e1e0db;p=linux-2.6 ACPI: Handle BIOS that resumes from S3 to suspend routine rather than resume vector A BIOS has been found that resumes from S3 to the routine that invoked suspend, ignoring the resume vector. This appears to the OS as a failed S3 attempt. This same system suspend/resume's properly with Windows. 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 the deviant BIOS. Signed-off-by: William Morrow Signed-off-by: Jordan Crouse Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S index 9f408eee4e..b781b38131 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