From: Tian Kevin Date: Sun, 24 Jun 2007 00:16:52 +0000 (-0700) Subject: ACPI: preserve the ebx value in acpi_copy_wakeup_routine X-Git-Tag: v2.6.22-rc6~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8cbee61c9d53ee28473ad33bbb54f6a88f5e3af;p=pandora-kernel.git ACPI: preserve the ebx value in acpi_copy_wakeup_routine Register %ebx serves as the "global offset table base register" for position-independent code. For absolute code, %ebx serves as a local register and has no specified role in the function calling sequence. In either case, a function must preserve the register value for the caller. acpi_copy_wakeup_routine overrides %ebx without saving it, this may corrupt the called data. Kevin found that most time the value of Sx is saved in %esi, however sometimes compiler also uses %ebx. When this happens, suspends fails since sleep value in ebx is changed by acpi_copy_wakeup_routine. The same funtion in X86_64 doesn't have this problem. Signed-off-by: Zhang Rui Looks-okay-to: Pavel Machek Signed-off-by: Rafael J. Wysocki Cc: Len Brown Acked-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed