aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2013-10-30 21:31:18 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-31 09:37:35 -0400
commit40bce100cafb945f1fb5475a70628b4379c74f38 (patch)
treecc50d633bf086af087ebe6b873f558bdf088fa25
parentefb835429fff1488e4718138cdf5bc855a6762a4 (diff)
ACPICA: Cleanup asmlinkage for ACPICA APIs.
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>
-rw-r--r--arch/x86/kernel/acpi/sleep.c11
-rw-r--r--arch/x86/kernel/acpi/sleep.h2
-rw-r--r--arch/x86/kernel/acpi/wakeup_32.S2
-rw-r--r--arch/x86/kernel/acpi/wakeup_64.S2
-rw-r--r--drivers/acpi/acpica/hwxfsleep.c4
-rw-r--r--include/acpi/acpixf.h4
6 files changed, 19 insertions, 6 deletions
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 33120100ff5e..3a2ae4c88948 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -26,6 +26,17 @@ static char temp_stack[4096];
26#endif 26#endif
27 27
28/** 28/**
29 * x86_acpi_enter_sleep_state - enter sleep state
30 * @state: Sleep state to enter.
31 *
32 * Wrapper around acpi_enter_sleep_state() to be called by assmebly.
33 */
34acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state)
35{
36 return acpi_enter_sleep_state(state);
37}
38
39/**
29 * x86_acpi_suspend_lowlevel - save kernel state 40 * x86_acpi_suspend_lowlevel - save kernel state
30 * 41 *
31 * Create an identity mapped page table and copy the wakeup routine to 42 * Create an identity mapped page table and copy the wakeup routine to
diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h
index c9c2c982d5e4..65c7b606b606 100644
--- a/arch/x86/kernel/acpi/sleep.h
+++ b/arch/x86/kernel/acpi/sleep.h
@@ -17,3 +17,5 @@ extern void wakeup_long64(void);
17extern void do_suspend_lowlevel(void); 17extern void do_suspend_lowlevel(void);
18 18
19extern int x86_acpi_suspend_lowlevel(void); 19extern int x86_acpi_suspend_lowlevel(void);
20
21acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state);
diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
index d1daa66ab162..665c6b7d2ea9 100644
--- a/arch/x86/kernel/acpi/wakeup_32.S
+++ b/arch/x86/kernel/acpi/wakeup_32.S
@@ -73,7 +73,7 @@ ENTRY(do_suspend_lowlevel)
73 call save_processor_state 73 call save_processor_state
74 call save_registers 74 call save_registers
75 pushl $3 75 pushl $3
76 call acpi_enter_sleep_state 76 call x86_acpi_enter_sleep_state
77 addl $4, %esp 77 addl $4, %esp
78 78
79# In case of S3 failure, we'll emerge here. Jump 79# 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 8ea5164cbd04..ae693b51ed8e 100644
--- a/arch/x86/kernel/acpi/wakeup_64.S
+++ b/arch/x86/kernel/acpi/wakeup_64.S
@@ -73,7 +73,7 @@ ENTRY(do_suspend_lowlevel)
73 addq $8, %rsp 73 addq $8, %rsp
74 movl $3, %edi 74 movl $3, %edi
75 xorl %eax, %eax 75 xorl %eax, %eax
76 call acpi_enter_sleep_state 76 call x86_acpi_enter_sleep_state
77 /* in case something went wrong, restore the machine status and go on */ 77 /* in case something went wrong, restore the machine status and go on */
78 jmp resume_point 78 jmp resume_point
79 79
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 4895fca102dd..15dddc10fc9b 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -167,7 +167,7 @@ ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector64)
167 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED 167 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
168 * 168 *
169 ******************************************************************************/ 169 ******************************************************************************/
170acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) 170acpi_status acpi_enter_sleep_state_s4bios(void)
171{ 171{
172 u32 in_value; 172 u32 in_value;
173 acpi_status status; 173 acpi_status status;
@@ -361,7 +361,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
361 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED 361 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
362 * 362 *
363 ******************************************************************************/ 363 ******************************************************************************/
364acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) 364acpi_status acpi_enter_sleep_state(u8 sleep_state)
365{ 365{
366 acpi_status status; 366 acpi_status status;
367 367
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 7def8cabfaba..00725f44ac89 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -510,9 +510,9 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b);
510 510
511acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); 511acpi_status acpi_enter_sleep_state_prep(u8 sleep_state);
512 512
513acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state); 513acpi_status acpi_enter_sleep_state(u8 sleep_state);
514 514
515ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) 515ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
516 516
517acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); 517acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
518 518