Messages in this thread | | | Date | Tue, 17 Apr 2012 11:36:45 -0700 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH 2/2] x86/acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler. |
| |
On 04/17/2012 11:29 AM, Konrad Rzeszutek Wilk wrote: > diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S > index 13ab720..d3a18a4 100644 > --- a/arch/x86/kernel/acpi/wakeup_32.S > +++ b/arch/x86/kernel/acpi/wakeup_32.S > @@ -74,8 +74,7 @@ restore_registers: > ENTRY(do_suspend_lowlevel) > call save_processor_state > call save_registers > - pushl $3 > - call acpi_enter_sleep_state > + call acpi_enter_s3 > addl $4, %esp >
You need to drop the %esp adjustment here.
> # In case of S3 failure, we'll emerge here. Jump > diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S > index 8ea5164..fea733d 100644 > --- a/arch/x86/kernel/acpi/wakeup_64.S > +++ b/arch/x86/kernel/acpi/wakeup_64.S > @@ -71,9 +71,8 @@ ENTRY(do_suspend_lowlevel) > movq %rsi, saved_rsi > > addq $8, %rsp > - movl $3, %edi > xorl %eax, %eax > - call acpi_enter_sleep_state > + call acpi_enter_s3 > /* in case something went wrong, restore the machine status and go on */
You can presumably remove the xorl here ... setting %eax to zero immediately before calling a non-varadic C function is meaningless.
-hpa
| |