Commit 7484619b authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki

ACPICA: Tables: Cleanup to reduce FACS globals

ACPICA commit 3f42ba76e2a0453976d3108296d5f656fdf2bd6e

In this patch, FACS table mapping is also tuned a bit so that only the
selected FACS table will be mapped by the OSPM (mapped on demand) and the
FACS related global variables can be reduced. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/3f42ba76Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 8ec3f459
...@@ -64,8 +64,6 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_xfacs_index, ACPI_INVALID_TABLE_INDEX); ...@@ -64,8 +64,6 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_xfacs_index, ACPI_INVALID_TABLE_INDEX);
#if (!ACPI_REDUCED_HARDWARE) #if (!ACPI_REDUCED_HARDWARE)
ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS); ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS);
ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_facs32);
ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_facs64);
#endif /* !ACPI_REDUCED_HARDWARE */ #endif /* !ACPI_REDUCED_HARDWARE */
......
...@@ -160,19 +160,8 @@ acpi_set_firmware_waking_vectors(acpi_physical_address physical_address, ...@@ -160,19 +160,8 @@ acpi_set_firmware_waking_vectors(acpi_physical_address physical_address,
ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vectors); ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vectors);
/* If Hardware Reduced flag is set, there is no FACS */ if (acpi_gbl_FACS) {
(void)acpi_hw_set_firmware_waking_vectors(acpi_gbl_FACS,
if (acpi_gbl_reduced_hardware) {
return_ACPI_STATUS (AE_OK);
}
if (acpi_gbl_facs32) {
(void)acpi_hw_set_firmware_waking_vectors(acpi_gbl_facs32,
physical_address,
physical_address64);
}
if (acpi_gbl_facs64) {
(void)acpi_hw_set_firmware_waking_vectors(acpi_gbl_facs64,
physical_address, physical_address,
physical_address64); physical_address64);
} }
......
...@@ -68,6 +68,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size); ...@@ -68,6 +68,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size);
acpi_status acpi_tb_initialize_facs(void) acpi_status acpi_tb_initialize_facs(void)
{ {
struct acpi_table_facs *facs;
/* If Hardware Reduced flag is set, there is no FACS */ /* If Hardware Reduced flag is set, there is no FACS */
...@@ -80,14 +81,14 @@ acpi_status acpi_tb_initialize_facs(void) ...@@ -80,14 +81,14 @@ acpi_status acpi_tb_initialize_facs(void)
(void)acpi_get_table_by_index(acpi_gbl_xfacs_index, (void)acpi_get_table_by_index(acpi_gbl_xfacs_index,
ACPI_CAST_INDIRECT_PTR(struct ACPI_CAST_INDIRECT_PTR(struct
acpi_table_header, acpi_table_header,
&acpi_gbl_facs32)); &facs));
acpi_gbl_FACS = acpi_gbl_facs32; acpi_gbl_FACS = facs;
} else if (acpi_gbl_FADT.facs) { } else if (acpi_gbl_FADT.facs) {
(void)acpi_get_table_by_index(acpi_gbl_facs_index, (void)acpi_get_table_by_index(acpi_gbl_facs_index,
ACPI_CAST_INDIRECT_PTR(struct ACPI_CAST_INDIRECT_PTR(struct
acpi_table_header, acpi_table_header,
&acpi_gbl_facs64)); &facs));
acpi_gbl_FACS = acpi_gbl_facs64; acpi_gbl_FACS = facs;
} }
/* If there is no FACS, just continue. There was already an error msg */ /* If there is no FACS, just continue. There was already an error msg */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment