diff options
author | Lv Zheng <lv.zheng@intel.com> | 2015-12-29 09:02:18 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-01 05:47:38 +0300 |
commit | 2e1beaf6a91998ad82e11a4c5a7b55b59396983b (patch) | |
tree | 5144c1213ad56d5537812ac31f9f0f3760e52745 /drivers/acpi/acpica/utxfinit.c | |
parent | aa6abd2be1cc7fa2593c8377f78420dec0a5d7a5 (diff) | |
download | linux-2e1beaf6a91998ad82e11a4c5a7b55b59396983b.tar.xz |
ACPICA: Utilities: Reorder initialization code
ACPICA commit 3894fa9d071343e6ebc7ea480255fa4f27a290be
This patch re-orders initialization code in acpi_enable_subsystem()
so that all hardware reduced stuffs can be collected together.
Note this patch contains code from the following 2 ACPICA upstream commits
so that the changes can be made clearer for the reviewers:
https://github.com/acpica/acpica/commit/071eff73
https://github.com/acpica/acpica/commit/3894fa9d
And additional change to remove the global variable and unused code
fragments due to the test result. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/3894fa9d
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utxfinit.c')
-rw-r--r-- | drivers/acpi/acpica/utxfinit.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c index 8586260f94cc..7d8eb602bbbe 100644 --- a/drivers/acpi/acpica/utxfinit.c +++ b/drivers/acpi/acpica/utxfinit.c @@ -154,6 +154,21 @@ acpi_status __init acpi_enable_subsystem(u32 flags) */ acpi_gbl_early_initialization = FALSE; + /* + * Install the default operation region handlers. These are the + * handlers that are defined by the ACPI specification to be + * "always accessible" -- namely, system_memory, system_IO, and + * PCI_Config. This also means that no _REG methods need to be + * run for these address spaces. We need to have these handlers + * installed before any AML code can be executed, especially any + * module-level code (11/2015). + */ + status = acpi_ev_install_region_handlers(); + if (ACPI_FAILURE(status)) { + ACPI_EXCEPTION((AE_INFO, status, + "During Region initialization")); + return_ACPI_STATUS(status); + } #if (!ACPI_REDUCED_HARDWARE) /* Enable ACPI mode */ @@ -182,24 +197,8 @@ acpi_status __init acpi_enable_subsystem(u32 flags) return_ACPI_STATUS(status); } } -#endif /* !ACPI_REDUCED_HARDWARE */ /* - * Install the default op_region handlers. These are installed unless - * other handlers have already been installed via the - * install_address_space_handler interface. - */ - if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) { - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "[Init] Installing default address space handlers\n")); - - status = acpi_ev_install_region_handlers(); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - } -#if (!ACPI_REDUCED_HARDWARE) - /* * Initialize ACPI Event handling (Fixed and General Purpose) * * Note1: We must have the hardware and events initialized before we can |