From 0fc5e8f4e4b33ddfa1d1d673fcd420d6e13eb076 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Wed, 28 Dec 2016 15:28:49 +0800 Subject: ACPICA: Hardware: Add sleep register hooks ACPICA commit ba665dc8e20d9f7730466a659564dd6c557a6cbc In Linux, para-virtualization implmentation hooks critical register writes to prevent real hardware operations. This increases divergences when the sleep registers are cracked in Linux resident ACPICA. This patch tries to introduce a single OSL to reduce the divergences. Link: https://github.com/acpica/acpica/commit/ba665dc8 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- .../acpi/os_specific/service_layers/osunixxf.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tools/power/acpi') diff --git a/tools/power/acpi/os_specific/service_layers/osunixxf.c b/tools/power/acpi/os_specific/service_layers/osunixxf.c index 10648aaf6164..e41c2644c347 100644 --- a/tools/power/acpi/os_specific/service_layers/osunixxf.c +++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c @@ -316,6 +316,28 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table, return (AE_SUPPORT); } +/****************************************************************************** + * + * FUNCTION: acpi_os_enter_sleep + * + * PARAMETERS: sleep_state - Which sleep state to enter + * rega_value - Register A value + * regb_value - Register B value + * + * RETURN: Status + * + * DESCRIPTION: A hook before writing sleep registers to enter the sleep + * state. Return AE_CTRL_TERMINATE to skip further sleep register + * writes. + * + *****************************************************************************/ + +acpi_status acpi_os_enter_sleep(u8 sleep_state, u32 rega_value, u32 regb_value) +{ + + return (AE_OK); +} + /****************************************************************************** * * FUNCTION: acpi_os_redirect_output -- cgit v1.2.3