Re: [PATCH 2/2] x86/acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux