diff options
Diffstat (limited to 'drivers/acpi/acpica/evxfregn.c')
-rw-r--r-- | drivers/acpi/acpica/evxfregn.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c index eb7386763712..c85c8c45599d 100644 --- a/drivers/acpi/acpica/evxfregn.c +++ b/drivers/acpi/acpica/evxfregn.c | |||
@@ -110,9 +110,39 @@ acpi_install_address_space_handler(acpi_handle device, | |||
110 | goto unlock_and_exit; | 110 | goto unlock_and_exit; |
111 | } | 111 | } |
112 | 112 | ||
113 | /* Run all _REG methods for this address space */ | 113 | /* |
114 | * For the default space_iDs, (the IDs for which there are default region handlers | ||
115 | * installed) Only execute the _REG methods if the global initialization _REG | ||
116 | * methods have already been run (via acpi_initialize_objects). In other words, | ||
117 | * we will defer the execution of the _REG methods for these space_iDs until | ||
118 | * execution of acpi_initialize_objects. This is done because we need the handlers | ||
119 | * for the default spaces (mem/io/pci/table) to be installed before we can run | ||
120 | * any control methods (or _REG methods). There is known BIOS code that depends | ||
121 | * on this. | ||
122 | * | ||
123 | * For all other space_iDs, we can safely execute the _REG methods immediately. | ||
124 | * This means that for IDs like embedded_controller, this function should be called | ||
125 | * only after acpi_enable_subsystem has been called. | ||
126 | */ | ||
127 | switch (space_id) { | ||
128 | case ACPI_ADR_SPACE_SYSTEM_MEMORY: | ||
129 | case ACPI_ADR_SPACE_SYSTEM_IO: | ||
130 | case ACPI_ADR_SPACE_PCI_CONFIG: | ||
131 | case ACPI_ADR_SPACE_DATA_TABLE: | ||
132 | |||
133 | if (acpi_gbl_reg_methods_executed) { | ||
134 | |||
135 | /* Run all _REG methods for this address space */ | ||
136 | |||
137 | status = acpi_ev_execute_reg_methods(node, space_id); | ||
138 | } | ||
139 | break; | ||
140 | |||
141 | default: | ||
114 | 142 | ||
115 | status = acpi_ev_execute_reg_methods(node, space_id); | 143 | status = acpi_ev_execute_reg_methods(node, space_id); |
144 | break; | ||
145 | } | ||
116 | 146 | ||
117 | unlock_and_exit: | 147 | unlock_and_exit: |
118 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 148 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |