ACPICA: Cleanup asmlinkage for ACPICA APIs.
authorLv Zheng <lv.zheng@intel.com>
Thu, 31 Oct 2013 01:31:18 +0000 (09:31 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 31 Oct 2013 13:37:35 +0000 (14:37 +0100)
Add an asmlinkage wrapper around acpi_enter_sleep_state() to prevent
an empty stub from being called by assmebly code for ACPI_REDUCED_HARDWARE
set.

As arch/x86/kernel/acpi/wakeup_xx.S is only compiled when CONFIG_ACPI=y
and there are no users of ACPI_HARDWARE_REDUCED, currently this is in
fact not a real issue, but a cleanup to reduce source code differences
between Linux and ACPICA upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/x86/kernel/acpi/sleep.c
arch/x86/kernel/acpi/sleep.h
arch/x86/kernel/acpi/wakeup_32.S
arch/x86/kernel/acpi/wakeup_64.S
drivers/acpi/acpica/hwxfsleep.c
include/acpi/acpixf.h

index 33120100ff5e50486e306f35688620ee8c05754f..3a2ae4c88948dcadb5b9afbfc2e10ef502202930 100644 (file)
@@ -25,6 +25,17 @@ unsigned long acpi_realmode_flags;
 static char temp_stack[4096];
 #endif
 
+/**
+ * x86_acpi_enter_sleep_state - enter sleep state
+ * @state: Sleep state to enter.
+ *
+ * Wrapper around acpi_enter_sleep_state() to be called by assmebly.
+ */
+acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state)
+{
+       return acpi_enter_sleep_state(state);
+}
+
 /**
  * x86_acpi_suspend_lowlevel - save kernel state
  *
index c9c2c982d5e4e168a20a3a2e8fb98bbabf1860e0..65c7b606b60697d73cd4a91c2702aacb678765ec 100644 (file)
@@ -17,3 +17,5 @@ extern void wakeup_long64(void);
 extern void do_suspend_lowlevel(void);
 
 extern int x86_acpi_suspend_lowlevel(void);
+
+acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state);
index d1daa66ab162c872b84fe4a8050c53f6f997246f..665c6b7d2ea93c25740a4b18043d5602d33d9711 100644 (file)
@@ -73,7 +73,7 @@ ENTRY(do_suspend_lowlevel)
        call    save_processor_state
        call    save_registers
        pushl   $3
-       call    acpi_enter_sleep_state
+       call    x86_acpi_enter_sleep_state
        addl    $4, %esp
 
 #      In case of S3 failure, we'll emerge here.  Jump
index 8ea5164cbd0451a27b9048699f60c2420057edb3..ae693b51ed8ed589660570a77cfb5654af924388 100644 (file)
@@ -73,7 +73,7 @@ ENTRY(do_suspend_lowlevel)
        addq    $8, %rsp
        movl    $3, %edi
        xorl    %eax, %eax
-       call    acpi_enter_sleep_state
+       call    x86_acpi_enter_sleep_state
        /* in case something went wrong, restore the machine status and go on */
        jmp     resume_point
 
index 4895fca102dde53636d36e24f95c7f47e65bba22..15dddc10fc9ba5dc1cfd78b5f962ab1c21a45e1f 100644 (file)
@@ -167,7 +167,7 @@ ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector64)
  *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
  *
  ******************************************************************************/
-acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
+acpi_status acpi_enter_sleep_state_s4bios(void)
 {
        u32 in_value;
        acpi_status status;
@@ -361,7 +361,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
  *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
  *
  ******************************************************************************/
-acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
+acpi_status acpi_enter_sleep_state(u8 sleep_state)
 {
        acpi_status status;
 
index 7def8cabfaba43431b287443def61f48bdeac60a..00725f44ac89d8bc06c752692b88e5eb4eecd7ff 100644 (file)
@@ -510,9 +510,9 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b);
 
 acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
 
-acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state);
+acpi_status acpi_enter_sleep_state(u8 sleep_state);
 
-ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void))
+ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
 
 acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);