diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-05 00:05:20 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-05 00:05:20 +0300 |
commit | e3e9b577b477edbf50e6c1f93beee89f450f2b68 (patch) | |
tree | fba9c882c67cb4212a1a041011c22a1703ff9d5b /drivers/acpi/acpica/hwxfsleep.c | |
parent | 6b0e2b32871b7c10c75d647b0295a092f918f3e7 (diff) | |
download | linux-e3e9b577b477edbf50e6c1f93beee89f450f2b68.tar.xz |
ACPICA: Drop Linux-specific waking vector functions
Commit f06147f9fbf1 (ACPICA: Hardware: Enable firmware waking vector
for both 32-bit and 64-bit FACS) added three functions that aren't
present in upstream ACPICA, acpi_hw_set_firmware_waking_vectors(),
acpi_set_firmware_waking_vectors() and acpi_set_firmware_waking_vector64(),
to allow Linux to use the previously existing API for setting the
platform firmware waking vector.
However, that wasn't necessary, since the ACPI sleep support code
in Linux can be modified to use the upstream ACPICA's API easily
and the additional functions may be dropped which reduces the code
size and puts the kernel's ACPICA code more in line with the upstream.
Make the changes as per the above. While at it, make the relevant
function desctiption comments reflect the upstream ACPICA's ones.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Lv Zheng <lv.zheng@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/hwxfsleep.c')
-rw-r--r-- | drivers/acpi/acpica/hwxfsleep.c | 96 |
1 files changed, 19 insertions, 77 deletions
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index f8af1abb6ef1..1ce4efa1a2bd 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c @@ -52,9 +52,9 @@ ACPI_MODULE_NAME("hwxfsleep") /* Local prototypes */ #if (!ACPI_REDUCED_HARDWARE) static acpi_status -acpi_hw_set_firmware_waking_vectors(struct acpi_table_facs *facs, - acpi_physical_address physical_address, - acpi_physical_address physical_address64); +acpi_hw_set_firmware_waking_vector(struct acpi_table_facs *facs, + acpi_physical_address physical_address, + acpi_physical_address physical_address64); #endif static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id); @@ -79,22 +79,20 @@ static struct acpi_sleep_functions acpi_sleep_dispatch[] = { /* * These functions are removed for the ACPI_REDUCED_HARDWARE case: - * acpi_set_firmware_waking_vectors * acpi_set_firmware_waking_vector - * acpi_set_firmware_waking_vector64 * acpi_enter_sleep_state_s4bios */ #if (!ACPI_REDUCED_HARDWARE) /******************************************************************************* * - * FUNCTION: acpi_hw_set_firmware_waking_vectors + * FUNCTION: acpi_hw_set_firmware_waking_vector * * PARAMETERS: facs - Pointer to FACS table * physical_address - 32-bit physical address of ACPI real mode - * entry point. + * entry point * physical_address64 - 64-bit physical address of ACPI protected - * mode entry point. + * mode entry point * * RETURN: Status * @@ -103,11 +101,11 @@ static struct acpi_sleep_functions acpi_sleep_dispatch[] = { ******************************************************************************/ static acpi_status -acpi_hw_set_firmware_waking_vectors(struct acpi_table_facs *facs, - acpi_physical_address physical_address, - acpi_physical_address physical_address64) +acpi_hw_set_firmware_waking_vector(struct acpi_table_facs *facs, + acpi_physical_address physical_address, + acpi_physical_address physical_address64) { - ACPI_FUNCTION_TRACE(acpi_hw_set_firmware_waking_vectors); + ACPI_FUNCTION_TRACE(acpi_hw_set_firmware_waking_vector); /* @@ -140,12 +138,12 @@ acpi_hw_set_firmware_waking_vectors(struct acpi_table_facs *facs, /******************************************************************************* * - * FUNCTION: acpi_set_firmware_waking_vectors + * FUNCTION: acpi_set_firmware_waking_vector * * PARAMETERS: physical_address - 32-bit physical address of ACPI real mode - * entry point. + * entry point * physical_address64 - 64-bit physical address of ACPI protected - * mode entry point. + * mode entry point * * RETURN: Status * @@ -154,79 +152,23 @@ acpi_hw_set_firmware_waking_vectors(struct acpi_table_facs *facs, ******************************************************************************/ acpi_status -acpi_set_firmware_waking_vectors(acpi_physical_address physical_address, - acpi_physical_address physical_address64) +acpi_set_firmware_waking_vector(acpi_physical_address physical_address, + acpi_physical_address physical_address64) { - ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vectors); + ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector); if (acpi_gbl_FACS) { - (void)acpi_hw_set_firmware_waking_vectors(acpi_gbl_FACS, - physical_address, - physical_address64); + (void)acpi_hw_set_firmware_waking_vector(acpi_gbl_FACS, + physical_address, + physical_address64); } return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vectors) - -/******************************************************************************* - * - * FUNCTION: acpi_set_firmware_waking_vector - * - * PARAMETERS: physical_address - 32-bit physical address of ACPI real mode - * entry point. - * - * RETURN: Status - * - * DESCRIPTION: Sets the 32-bit firmware_waking_vector field of the FACS - * - ******************************************************************************/ -acpi_status acpi_set_firmware_waking_vector(u32 physical_address) -{ - acpi_status status; - - ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector); - - status = acpi_set_firmware_waking_vectors((acpi_physical_address) - physical_address, 0); - - return_ACPI_STATUS(status); -} - ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector) -#if ACPI_MACHINE_WIDTH == 64 -/******************************************************************************* - * - * FUNCTION: acpi_set_firmware_waking_vector64 - * - * PARAMETERS: physical_address - 64-bit physical address of ACPI protected - * mode entry point. - * - * RETURN: Status - * - * DESCRIPTION: Sets the 64-bit X_firmware_waking_vector field of the FACS, if - * it exists in the table. This function is intended for use with - * 64-bit host operating systems. - * - ******************************************************************************/ -acpi_status acpi_set_firmware_waking_vector64(u64 physical_address) -{ - acpi_status status; - - ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector64); - - status = acpi_set_firmware_waking_vectors(0, - (acpi_physical_address) - physical_address); - - return_ACPI_STATUS(status); -} - -ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector64) -#endif /******************************************************************************* * * FUNCTION: acpi_enter_sleep_state_s4bios |