diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-09-07 02:06:17 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-09-09 20:43:00 -0400 |
commit | 752db1016019a4e67d86492fdfda724215ee8d9b (patch) | |
tree | c353af4a95611a3c9815329665144b896cfcf539 | |
parent | eacce4b6ce073b69830f5d816282af5317a2e98c (diff) |
ACPICA: Tables: Remove acpi_tb_install_fixed_table()
ACPICA commit 42c7b848d2faa02c7691ef2c53ea741c23cd4665
acpi_tb_install_fixed_table() is now redundant as we've removed the fixed
table indexing mechanism:
Commit: 8ec3f459073e67e5c6d78507dec693064b3040a2
Subject: ACPICA: Tables: Fix global table list issues by removing
fixed table indexes
This patch cleans up the code accordingly.
No functional change. Lv Zheng.
Link: https://bugs.acpica.org/show_bug.cgi?id=1320
Link: https://github.com/acpica/acpica/commit/42c7b848
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>
-rw-r--r-- | drivers/acpi/acpica/actables.h | 7 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbfadt.c | 24 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbinstal.c | 65 |
3 files changed, 16 insertions, 80 deletions
diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h index 86d4d62ed640..9469cd4106c3 100644 --- a/drivers/acpi/acpica/actables.h +++ b/drivers/acpi/acpica/actables.h | |||
@@ -155,12 +155,7 @@ void | |||
155 | acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc, | 155 | acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc, |
156 | u8 override, u32 *table_index); | 156 | u8 override, u32 *table_index); |
157 | 157 | ||
158 | acpi_status | 158 | acpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address); |
159 | acpi_tb_install_fixed_table(acpi_physical_address address, | ||
160 | char *signature, u32 *table_index); | ||
161 | |||
162 | acpi_status ACPI_INIT_FUNCTION | ||
163 | acpi_tb_parse_root_table(acpi_physical_address rsdp_address); | ||
164 | 159 | ||
165 | /* | 160 | /* |
166 | * tbxfload | 161 | * tbxfload |
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c index 016bcdce64ed..e678d6fb163c 100644 --- a/drivers/acpi/acpica/tbfadt.c +++ b/drivers/acpi/acpica/tbfadt.c | |||
@@ -344,23 +344,27 @@ void acpi_tb_parse_fadt(void) | |||
344 | 344 | ||
345 | /* Obtain the DSDT and FACS tables via their addresses within the FADT */ | 345 | /* Obtain the DSDT and FACS tables via their addresses within the FADT */ |
346 | 346 | ||
347 | acpi_tb_install_fixed_table((acpi_physical_address)acpi_gbl_FADT.Xdsdt, | 347 | acpi_tb_install_standard_table((acpi_physical_address)acpi_gbl_FADT. |
348 | ACPI_SIG_DSDT, &acpi_gbl_dsdt_index); | 348 | Xdsdt, |
349 | ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, | ||
350 | FALSE, TRUE, &acpi_gbl_dsdt_index); | ||
349 | 351 | ||
350 | /* If Hardware Reduced flag is set, there is no FACS */ | 352 | /* If Hardware Reduced flag is set, there is no FACS */ |
351 | 353 | ||
352 | if (!acpi_gbl_reduced_hardware) { | 354 | if (!acpi_gbl_reduced_hardware) { |
353 | if (acpi_gbl_FADT.facs) { | 355 | if (acpi_gbl_FADT.facs) { |
354 | acpi_tb_install_fixed_table((acpi_physical_address) | 356 | acpi_tb_install_standard_table((acpi_physical_address) |
355 | acpi_gbl_FADT.facs, | 357 | acpi_gbl_FADT.facs, |
356 | ACPI_SIG_FACS, | 358 | ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, |
357 | &acpi_gbl_facs_index); | 359 | FALSE, TRUE, |
360 | &acpi_gbl_facs_index); | ||
358 | } | 361 | } |
359 | if (acpi_gbl_FADT.Xfacs) { | 362 | if (acpi_gbl_FADT.Xfacs) { |
360 | acpi_tb_install_fixed_table((acpi_physical_address) | 363 | acpi_tb_install_standard_table((acpi_physical_address) |
361 | acpi_gbl_FADT.Xfacs, | 364 | acpi_gbl_FADT.Xfacs, |
362 | ACPI_SIG_FACS, | 365 | ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, |
363 | &acpi_gbl_xfacs_index); | 366 | FALSE, TRUE, |
367 | &acpi_gbl_xfacs_index); | ||
364 | } | 368 | } |
365 | } | 369 | } |
366 | } | 370 | } |
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c index 8b13052128fc..d4618648ea13 100644 --- a/drivers/acpi/acpica/tbinstal.c +++ b/drivers/acpi/acpica/tbinstal.c | |||
@@ -157,68 +157,6 @@ acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc, | |||
157 | 157 | ||
158 | /******************************************************************************* | 158 | /******************************************************************************* |
159 | * | 159 | * |
160 | * FUNCTION: acpi_tb_install_fixed_table | ||
161 | * | ||
162 | * PARAMETERS: address - Physical address of DSDT or FACS | ||
163 | * signature - Table signature, NULL if no need to | ||
164 | * match | ||
165 | * table_index - Where the table index is returned | ||
166 | * | ||
167 | * RETURN: Status | ||
168 | * | ||
169 | * DESCRIPTION: Install a fixed ACPI table (DSDT/FACS) into the global data | ||
170 | * structure. | ||
171 | * | ||
172 | ******************************************************************************/ | ||
173 | |||
174 | acpi_status | ||
175 | acpi_tb_install_fixed_table(acpi_physical_address address, | ||
176 | char *signature, u32 *table_index) | ||
177 | { | ||
178 | struct acpi_table_desc new_table_desc; | ||
179 | acpi_status status; | ||
180 | |||
181 | ACPI_FUNCTION_TRACE(tb_install_fixed_table); | ||
182 | |||
183 | if (!address) { | ||
184 | ACPI_ERROR((AE_INFO, | ||
185 | "Null physical address for ACPI table [%s]", | ||
186 | signature)); | ||
187 | return (AE_NO_MEMORY); | ||
188 | } | ||
189 | |||
190 | /* Fill a table descriptor for validation */ | ||
191 | |||
192 | status = acpi_tb_acquire_temp_table(&new_table_desc, address, | ||
193 | ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); | ||
194 | if (ACPI_FAILURE(status)) { | ||
195 | ACPI_ERROR((AE_INFO, | ||
196 | "Could not acquire table length at %8.8X%8.8X", | ||
197 | ACPI_FORMAT_UINT64(address))); | ||
198 | return_ACPI_STATUS(status); | ||
199 | } | ||
200 | |||
201 | /* Validate and verify a table before installation */ | ||
202 | |||
203 | status = acpi_tb_verify_temp_table(&new_table_desc, signature); | ||
204 | if (ACPI_FAILURE(status)) { | ||
205 | goto release_and_exit; | ||
206 | } | ||
207 | |||
208 | /* Add the table to the global root table list */ | ||
209 | |||
210 | acpi_tb_install_table_with_override(&new_table_desc, TRUE, table_index); | ||
211 | |||
212 | release_and_exit: | ||
213 | |||
214 | /* Release the temporary table descriptor */ | ||
215 | |||
216 | acpi_tb_release_temp_table(&new_table_desc); | ||
217 | return_ACPI_STATUS(status); | ||
218 | } | ||
219 | |||
220 | /******************************************************************************* | ||
221 | * | ||
222 | * FUNCTION: acpi_tb_install_standard_table | 160 | * FUNCTION: acpi_tb_install_standard_table |
223 | * | 161 | * |
224 | * PARAMETERS: address - Address of the table (might be a virtual | 162 | * PARAMETERS: address - Address of the table (might be a virtual |
@@ -230,8 +168,7 @@ release_and_exit: | |||
230 | * | 168 | * |
231 | * RETURN: Status | 169 | * RETURN: Status |
232 | * | 170 | * |
233 | * DESCRIPTION: This function is called to install an ACPI table that is | 171 | * DESCRIPTION: This function is called to verify and install an ACPI table. |
234 | * neither DSDT nor FACS (a "standard" table.) | ||
235 | * When this function is called by "Load" or "LoadTable" opcodes, | 172 | * When this function is called by "Load" or "LoadTable" opcodes, |
236 | * or by acpi_load_table() API, the "Reload" parameter is set. | 173 | * or by acpi_load_table() API, the "Reload" parameter is set. |
237 | * After sucessfully returning from this function, table is | 174 | * After sucessfully returning from this function, table is |