From: Pavel Machek <pavel@ucw.cz>
To: Zhang Rui <rui.zhang@intel.com>
Cc: linux-acpi@vger.kernel.org, lenb@kernel.org, kevin.tian@intel.com
Subject: Re: [PATCH]: ACPI: preserve the ebx value in acpi_copy_wakeup_routine
Date: Fri, 1 Jun 2007 12:17:07 +0200 [thread overview]
Message-ID: <20070601101707.GC31453@elf.ucw.cz> (raw)
In-Reply-To: <1180692553.7707.76.camel@localhost.localdomain>
Hi!
> From: Tian Kevin <kevin.tian@intel.com>
>
> 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 <rui.zhang@intel.com>
Looks okay to me. That routine also corrupts ecx and edx, hopefully
that's okay?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-06-01 10:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-01 10:09 [PATCH]: ACPI: preserve the ebx value in acpi_copy_wakeup_routine Zhang Rui
2007-06-01 10:17 ` Pavel Machek [this message]
2007-06-01 10:27 ` Zhang, Rui
2007-06-04 10:37 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070601101707.GC31453@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=kevin.tian@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox