lkml.org 
[lkml]   [2012]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2012-04-17 20:39    [W:0.036 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site