diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-27 01:28:38 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-27 01:28:38 +0200 |
commit | 4b319f290d3b9c756228a66f72095d0039ec1b50 (patch) | |
tree | 2cda8d4ac3d1f2d9732a2b16feb15b14f91c83f7 /include | |
parent | 0ad4c9a9848fdd46dc422160efd947489a98bbc1 (diff) | |
parent | 01c6a6afd50f07dfd66b2891fd194c4b789fca48 (diff) |
Merge branch 'acpi-sleep'
* acpi-sleep:
x86 / tboot / ACPI: Fail extended mode reduced hardware sleep
xen / ACPI: notify xen when reduced hardware sleep is available
ACPI / sleep: Introduce acpi_os_prepare_extended_sleep() for extended sleep path
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/acpi.h | 7 | ||||
-rw-r--r-- | include/xen/acpi.h | 8 | ||||
-rw-r--r-- | include/xen/interface/platform.h | 7 |
3 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 353ba256f36..a5db4aeefa3 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -481,6 +481,13 @@ void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, acpi_status acpi_os_prepare_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control); + +void acpi_os_set_prepare_extended_sleep(int (*func)(u8 sleep_state, + u32 val_a, u32 val_b)); + +acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state, + u32 val_a, u32 val_b); + #ifdef CONFIG_X86 void arch_reserve_mem_area(acpi_physical_address addr, size_t size); #else diff --git a/include/xen/acpi.h b/include/xen/acpi.h index 46aa3d1c165..4ddd7dc4a61 100644 --- a/include/xen/acpi.h +++ b/include/xen/acpi.h @@ -75,8 +75,10 @@ static inline int xen_acpi_get_pxm(acpi_handle h) return -ENXIO; } -int xen_acpi_notify_hypervisor_state(u8 sleep_state, +int xen_acpi_notify_hypervisor_sleep(u8 sleep_state, u32 pm1a_cnt, u32 pm1b_cnd); +int xen_acpi_notify_hypervisor_extended_sleep(u8 sleep_state, + u32 val_a, u32 val_b); static inline int xen_acpi_suspend_lowlevel(void) { @@ -93,7 +95,9 @@ static inline void xen_acpi_sleep_register(void) { if (xen_initial_domain()) { acpi_os_set_prepare_sleep( - &xen_acpi_notify_hypervisor_state); + &xen_acpi_notify_hypervisor_sleep); + acpi_os_set_prepare_extended_sleep( + &xen_acpi_notify_hypervisor_extended_sleep); acpi_suspend_lowlevel = xen_acpi_suspend_lowlevel; } diff --git a/include/xen/interface/platform.h b/include/xen/interface/platform.h index c57d5f67f70..f1331e3e727 100644 --- a/include/xen/interface/platform.h +++ b/include/xen/interface/platform.h @@ -152,10 +152,11 @@ DEFINE_GUEST_HANDLE_STRUCT(xenpf_firmware_info_t); #define XENPF_enter_acpi_sleep 51 struct xenpf_enter_acpi_sleep { /* IN variables */ - uint16_t pm1a_cnt_val; /* PM1a control value. */ - uint16_t pm1b_cnt_val; /* PM1b control value. */ + uint16_t val_a; /* PM1a control / sleep type A. */ + uint16_t val_b; /* PM1b control / sleep type B. */ uint32_t sleep_state; /* Which state to enter (Sn). */ - uint32_t flags; /* Must be zero. */ +#define XENPF_ACPI_SLEEP_EXTENDED 0x00000001 + uint32_t flags; /* XENPF_ACPI_SLEEP_*. */ }; DEFINE_GUEST_HANDLE_STRUCT(xenpf_enter_acpi_sleep_t); |