aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/tbinstal.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-04-04 00:38:42 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-20 16:59:38 -0400
commit7f9fc99cde939187c1ee6dac115bdb76655cc798 (patch)
treeb766b5d65c10e1d5057cf480dce7ba07d6f6a9a9 /drivers/acpi/acpica/tbinstal.c
parent55df23f0d620c5194ecbd3b68ecdb2798778bf93 (diff)
ACPICA: Tables: Clean up split INSTALLED/VALIDATED table state logics.
This patch is mainly a naming cleanup to clarify hidden logics, no functional changes. acpi_initialize_tables() is used by Linux to install table addresses for early boot steps. During this stage, table addresses are mapped by early_ioremap() mechanism which is different from the runtime IO mappings. Thus it is not safe for ACPICA to keep mapped pointers in struct acpi_table_desc structure during this stage. In order to support this in ACPICA, table states are divided into 1. "INSTALLED" (where struct acpi_table_desc.Pointer is always NULL) and 2. "VALIDATED" (where struct acpi_table_desc.Pointer is always not NULL). During acpi_initialize_tables(), table state are ensured to be "INSTALLED" but not "VALIDATED". This logic is ensured by the original code in very ambigious way. For example, currently acpi_tb_delete_table() is invoked in some place to perform an uninstallation while it is invoked in other place to perform an invalidation. They happen to work just because no one enters the penalty where the 2 behaviours are not equivalent. The naming cleanups are made in this patch: A. For installation and validation: There is code setting struct acpi_table_desc.Pointer first and delete it immediately to keep the descriptor's state as "INSTALLED" during the installation. This patch implements this in more direct way. After applying it, struct acpi_table_desc.Pointer will never be set in acpi_tb_install_table() and acpi_tb_override_table() as they are the only functions invoked during acpi_initialize_tables(). This is achieved by: 1. Rename acpi_tb_verify_table() to acpi_tb_validate_table() to clarify this change. 2. Rename acpi_tb_table_override() to acpi_tb_override_table() to keep nameing consistencies as other APIs (verb. Table). 3. Stops setting struct acpi_table_desc.Pointer in acpi_tb_install_table() and acpi_tb_table_override(). 4. Introduce acpi_tb_acquire_table() to acquire the table pointer that is not maintained in the struct acpi_table_desc of the global root table list and rewrite acpi_tb_validate_table() using this new function to reduce redundancies. 5. Replace the table pointer using the overridden table pointer in acpi_tb_add_table(). As acpi_tb_add_table() is not invoked during early boot stage, tables returned from this functions should be "VALIDATED". As acpi_tb_override_table() is modified by this patch to return a "INSTALLED" but not "VALIDATED" descriptor, to keep acpi_tb_add_table() unchanged, struct acpi_table_desc.Pointer is filled in acpi_tb_add_table(). B. For invalidation and uninstallation: The original code invalidate table by invoking acpi_tb_delete_table() here and there, but actually this function should only be used to uninstall tables. This can work just because its invocations are equivalent to invalidation in some cases. This patch splits acpi_tb_delete_table() into acpi_tb_invalidate_table() and acpi_tb_uninstall_table() and cleans up the hidden logic using the new APIs. This is achieved by: 1. Rename acpi_tb_delete_table() to acpi_tb_uninstall_table() as it is mainly called before resetting struct acpi_table_desc.Address. Thus the table descriptor is in "not INSTALLED" state. This patch enforces this by setting struct acpi_table_desc.Address to NULL in this function. 2. Introduce acpi_tb_invalidate_table() to be the reversal of acpi_tb_validate_table() and invoke it in acpi_tb_uninstall_table(). 3. Introduce acpi_tb_release_table() to release the table pointer that is not maintained in acpi_gbl_root_table_list and rewrite acpi_tb_invalidate_table() using this new function to reduce redundancies. After cleaning up, the maintainability of the internal APIs are also improved: 1. acpi_tb_acquire_table: Acquire struct acpi_table_header according to ACPI_TABLE_ORIGIN_xxx flags. 2. acpi_tb_release_table: Release struct acpi_table_header according to ACPI_TABLE_ORIGIN_xxx flags. 3. acpi_tb_install_table: Make struct acpi_table_desc.Address not NULL according to ACPI_TABLE_ORIGIN_xxx flags. 4. acpi_tb_uninstall_table: Make struct acpi_table_desc.Address NULL according to ACPI_TABLE_ORIGIN_xxx flags. 5. acpi_tb_validate_table: Make struct acpi_table_desc.Pointer not NULL according to ACPI_TABLE_ORIGIN_xxx flags. 6. acpi_tb_invalidate_table: Make struct acpi_table_desc.Pointer NULL according to ACPI_TABLE_ORIGIN_xxx flags. 7. acpi_tb_override_table: Replace struct acpi_table_desc.Address and struct acpi_table_desc.Flags. It only happens in "INSTALLED" state. The patch has been unit tested in acpi_exec by: 1. Initializing; 2. Executing exc_tbl ASLTS tests; 3. Executing "Load" command. So that all original acpi_tb_install_table() and acpi_tb_override_table() invocations are covered. Known Issues: 1. Cleanup acpi_tb_add_table() to Kill Code Redundancies Current implementation in acpi_tb_add_table() is not very clean, further patch can rewrite acpi_tb_add_table() with ordered acpi_tb_install_table(), acpi_tb_override_table() and acpi_tb_validate_table(). It is not done in this patch so that it is easy for the reviewers to understand the changes in this patch. 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/tbinstal.c')
-rw-r--r--drivers/acpi/acpica/tbinstal.c299
1 files changed, 205 insertions, 94 deletions
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 0040e19b6d14..93a99ef03425 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -49,49 +49,123 @@
49#define _COMPONENT ACPI_TABLES 49#define _COMPONENT ACPI_TABLES
50ACPI_MODULE_NAME("tbinstal") 50ACPI_MODULE_NAME("tbinstal")
51 51
52/****************************************************************************** 52/*******************************************************************************
53 * 53 *
54 * FUNCTION: acpi_tb_verify_table 54 * FUNCTION: acpi_tb_acquire_table
55 * 55 *
56 * PARAMETERS: table_desc - table 56 * PARAMETERS: table_desc - Table descriptor
57 * table_ptr - Where table is returned
58 * table_length - Where table length is returned
59 * table_flags - Where table allocation flags are returned
57 * 60 *
58 * RETURN: Status 61 * RETURN: Status
59 * 62 *
60 * DESCRIPTION: this function is called to verify and map table 63 * DESCRIPTION: Acquire a table. It can be used for tables not maintained in
64 * acpi_gbl_root_table_list.
61 * 65 *
62 *****************************************************************************/ 66 ******************************************************************************/
63acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc) 67acpi_status
68acpi_tb_acquire_table(struct acpi_table_desc *table_desc,
69 struct acpi_table_header **table_ptr,
70 u32 *table_length, u8 *table_flags)
64{ 71{
65 acpi_status status = AE_OK; 72 struct acpi_table_header *table = NULL;
66 73
67 ACPI_FUNCTION_TRACE(tb_verify_table); 74 switch (table_desc->flags & ACPI_TABLE_ORIGIN_MASK) {
75 case ACPI_TABLE_ORIGIN_MAPPED:
68 76
69 /* Map the table if necessary */ 77 table =
78 acpi_os_map_memory(table_desc->address, table_desc->length);
79 break;
70 80
71 if (!table_desc->pointer) { 81 case ACPI_TABLE_ORIGIN_ALLOCATED:
72 switch (table_desc->flags & ACPI_TABLE_ORIGIN_MASK) { 82 case ACPI_TABLE_ORIGIN_UNKNOWN:
73 case ACPI_TABLE_ORIGIN_MAPPED: 83 case ACPI_TABLE_ORIGIN_OVERRIDE:
74 84
75 table_desc->pointer = 85 table =
76 acpi_os_map_memory(table_desc->address, 86 ACPI_CAST_PTR(struct acpi_table_header,
77 table_desc->length); 87 table_desc->address);
78 break; 88 break;
79 89
80 case ACPI_TABLE_ORIGIN_ALLOCATED: 90 default:
81 case ACPI_TABLE_ORIGIN_UNKNOWN:
82 case ACPI_TABLE_ORIGIN_OVERRIDE:
83 91
84 table_desc->pointer = 92 break;
85 ACPI_CAST_PTR(struct acpi_table_header, 93 }
86 table_desc->address);
87 break;
88 94
89 default: 95 /* Table is not valid yet */
90 96
91 break; 97 if (!table) {
92 } 98 return (AE_NO_MEMORY);
99 }
100
101 /* Fill the return values */
102
103 *table_ptr = table;
104 *table_length = table_desc->length;
105 *table_flags = table_desc->flags;
106
107 return (AE_OK);
108}
109
110/*******************************************************************************
111 *
112 * FUNCTION: acpi_tb_release_table
113 *
114 * PARAMETERS: table - Pointer for the table
115 * table_length - Length for the table
116 * table_flags - Allocation flags for the table
117 *
118 * RETURN: None
119 *
120 * DESCRIPTION: Release a table. The reversal of acpi_tb_acquire_table().
121 *
122 ******************************************************************************/
123
124void
125acpi_tb_release_table(struct acpi_table_header *table,
126 u32 table_length, u8 table_flags)
127{
128 switch (table_flags & ACPI_TABLE_ORIGIN_MASK) {
129 case ACPI_TABLE_ORIGIN_MAPPED:
130
131 acpi_os_unmap_memory(table, table_length);
132 break;
133
134 case ACPI_TABLE_ORIGIN_ALLOCATED:
135 case ACPI_TABLE_ORIGIN_UNKNOWN:
136 case ACPI_TABLE_ORIGIN_OVERRIDE:
137 default:
138
139 break;
140 }
141}
142
143/******************************************************************************
144 *
145 * FUNCTION: acpi_tb_validate_table
146 *
147 * PARAMETERS: table_desc - Table descriptor
148 *
149 * RETURN: Status
150 *
151 * DESCRIPTION: This function is called to validate (ensure Pointer is valid)
152 * and verify the table.
153 *
154 *****************************************************************************/
155
156acpi_status acpi_tb_validate_table(struct acpi_table_desc *table_desc)
157{
158 acpi_status status = AE_OK;
159
160 ACPI_FUNCTION_TRACE(tb_validate_table);
161
162 /* Validate the table if necessary */
93 163
94 if (!table_desc->pointer) { 164 if (!table_desc->pointer) {
165 status = acpi_tb_acquire_table(table_desc, &table_desc->pointer,
166 &table_desc->length,
167 &table_desc->flags);
168 if (ACPI_FAILURE(status) || !table_desc->pointer) {
95 return_ACPI_STATUS(AE_NO_MEMORY); 169 return_ACPI_STATUS(AE_NO_MEMORY);
96 } 170 }
97 } 171 }
@@ -106,6 +180,37 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)
106 180
107/******************************************************************************* 181/*******************************************************************************
108 * 182 *
183 * FUNCTION: acpi_tb_invalidate_table
184 *
185 * PARAMETERS: table_desc - Table descriptor
186 *
187 * RETURN: None
188 *
189 * DESCRIPTION: Invalidate one internal ACPI table, this is reversal of
190 * acpi_tb_validate_table().
191 *
192 ******************************************************************************/
193
194void acpi_tb_invalidate_table(struct acpi_table_desc *table_desc)
195{
196
197 ACPI_FUNCTION_TRACE(tb_invalidate_table);
198
199 /* Table must be validated */
200
201 if (!table_desc->pointer) {
202 return_VOID;
203 }
204
205 acpi_tb_release_table(table_desc->pointer, table_desc->length,
206 table_desc->flags);
207 table_desc->pointer = NULL;
208
209 return_VOID;
210}
211
212/*******************************************************************************
213 *
109 * FUNCTION: acpi_tb_add_table 214 * FUNCTION: acpi_tb_add_table
110 * 215 *
111 * PARAMETERS: table_desc - Table descriptor 216 * PARAMETERS: table_desc - Table descriptor
@@ -124,11 +229,12 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
124{ 229{
125 u32 i; 230 u32 i;
126 acpi_status status = AE_OK; 231 acpi_status status = AE_OK;
232 struct acpi_table_header *final_table;
127 233
128 ACPI_FUNCTION_TRACE(tb_add_table); 234 ACPI_FUNCTION_TRACE(tb_add_table);
129 235
130 if (!table_desc->pointer) { 236 if (!table_desc->pointer) {
131 status = acpi_tb_verify_table(table_desc); 237 status = acpi_tb_validate_table(table_desc);
132 if (ACPI_FAILURE(status) || !table_desc->pointer) { 238 if (ACPI_FAILURE(status) || !table_desc->pointer) {
133 return_ACPI_STATUS(status); 239 return_ACPI_STATUS(status);
134 } 240 }
@@ -166,8 +272,8 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
166 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { 272 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
167 if (!acpi_gbl_root_table_list.tables[i].pointer) { 273 if (!acpi_gbl_root_table_list.tables[i].pointer) {
168 status = 274 status =
169 acpi_tb_verify_table(&acpi_gbl_root_table_list. 275 acpi_tb_validate_table(&acpi_gbl_root_table_list.
170 tables[i]); 276 tables[i]);
171 if (ACPI_FAILURE(status) 277 if (ACPI_FAILURE(status)
172 || !acpi_gbl_root_table_list.tables[i].pointer) { 278 || !acpi_gbl_root_table_list.tables[i].pointer) {
173 continue; 279 continue;
@@ -215,7 +321,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
215 } else { 321 } else {
216 /* Table was unloaded, allow it to be reloaded */ 322 /* Table was unloaded, allow it to be reloaded */
217 323
218 acpi_tb_delete_table(table_desc); 324 acpi_tb_uninstall_table(table_desc);
219 table_desc->pointer = 325 table_desc->pointer =
220 acpi_gbl_root_table_list.tables[i].pointer; 326 acpi_gbl_root_table_list.tables[i].pointer;
221 table_desc->address = 327 table_desc->address =
@@ -229,9 +335,15 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
229 * ACPI Table Override: 335 * ACPI Table Override:
230 * Allow the host to override dynamically loaded tables. 336 * Allow the host to override dynamically loaded tables.
231 * NOTE: the table is fully mapped at this point, and the mapping will 337 * NOTE: the table is fully mapped at this point, and the mapping will
232 * be deleted by tb_table_override if the table is actually overridden. 338 * be deleted by acpi_tb_override_table if the table is actually overridden.
233 */ 339 */
234 (void)acpi_tb_table_override(table_desc->pointer, table_desc); 340 final_table = acpi_tb_override_table(table_desc->pointer, table_desc);
341 if (final_table) {
342
343 /* Ensure table descriptor is in "VALIDATED" state */
344
345 table_desc->pointer = final_table;
346 }
235 347
236 /* Add the table to the global root table list */ 348 /* Add the table to the global root table list */
237 349
@@ -252,7 +364,7 @@ release:
252 364
253/******************************************************************************* 365/*******************************************************************************
254 * 366 *
255 * FUNCTION: acpi_tb_table_override 367 * FUNCTION: acpi_tb_override_table
256 * 368 *
257 * PARAMETERS: table_header - Header for the original table 369 * PARAMETERS: table_header - Header for the original table
258 * table_desc - Table descriptor initialized for the 370 * table_desc - Table descriptor initialized for the
@@ -264,29 +376,35 @@ release:
264 * 376 *
265 * DESCRIPTION: Attempt table override by calling the OSL override functions. 377 * DESCRIPTION: Attempt table override by calling the OSL override functions.
266 * Note: If the table is overridden, then the entire new table 378 * Note: If the table is overridden, then the entire new table
267 * is mapped and returned by this function. 379 * is acquired and returned by this function.
380 * After invocation, the table descriptor is in a state that is
381 * "INSTALLED" but not "VALIDATED", thus the "Pointer" member is
382 * kept NULL.
268 * 383 *
269 ******************************************************************************/ 384 ******************************************************************************/
270 385
271struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header 386struct acpi_table_header *acpi_tb_override_table(struct acpi_table_header
272 *table_header, 387 *table_header,
273 struct acpi_table_desc 388 struct acpi_table_desc
274 *table_desc) 389 *table_desc)
275{ 390{
276 acpi_status status; 391 acpi_status status;
277 struct acpi_table_header *new_table = NULL; 392 struct acpi_table_header *new_table;
278 acpi_physical_address new_address = 0; 393 u32 new_table_length;
279 u32 new_table_length = 0;
280 u8 new_flags; 394 u8 new_flags;
281 char *override_type; 395 char *override_type;
396 struct acpi_table_desc new_table_desc;
397
398 ACPI_MEMSET(&new_table_desc, 0, sizeof(struct acpi_table_desc));
282 399
283 /* (1) Attempt logical override (returns a logical address) */ 400 /* (1) Attempt logical override (returns a logical address) */
284 401
285 status = acpi_os_table_override(table_header, &new_table); 402 status = acpi_os_table_override(table_header, &new_table_desc.pointer);
286 if (ACPI_SUCCESS(status) && new_table) { 403 if (ACPI_SUCCESS(status) && new_table_desc.pointer) {
287 new_address = ACPI_PTR_TO_PHYSADDR(new_table); 404 new_table_desc.address =
288 new_table_length = new_table->length; 405 ACPI_PTR_TO_PHYSADDR(new_table_desc.pointer);
289 new_flags = ACPI_TABLE_ORIGIN_OVERRIDE; 406 new_table_desc.length = new_table_desc.pointer->length;
407 new_table_desc.flags = ACPI_TABLE_ORIGIN_OVERRIDE;
290 override_type = "Logical"; 408 override_type = "Logical";
291 goto finish_override; 409 goto finish_override;
292 } 410 }
@@ -294,25 +412,12 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
294 /* (2) Attempt physical override (returns a physical address) */ 412 /* (2) Attempt physical override (returns a physical address) */
295 413
296 status = acpi_os_physical_table_override(table_header, 414 status = acpi_os_physical_table_override(table_header,
297 &new_address, 415 &new_table_desc.address,
298 &new_table_length); 416 &new_table_desc.length);
299 if (ACPI_SUCCESS(status) && new_address && new_table_length) { 417 if (ACPI_SUCCESS(status) && new_table_desc.address
300 418 && new_table_desc.length) {
301 /* Map the entire new table */
302
303 new_table = acpi_os_map_memory(new_address, new_table_length);
304 if (!new_table) {
305 ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
306 "%4.4s " ACPI_PRINTF_UINT
307 " Attempted physical table override failed",
308 table_header->signature,
309 ACPI_FORMAT_TO_UINT(table_desc->
310 address)));
311 return (NULL);
312 }
313
314 override_type = "Physical"; 419 override_type = "Physical";
315 new_flags = ACPI_TABLE_ORIGIN_MAPPED; 420 new_table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED;
316 goto finish_override; 421 goto finish_override;
317 } 422 }
318 423
@@ -320,22 +425,36 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
320 425
321finish_override: 426finish_override:
322 427
428 /*
429 * Acquire the entire new table to indicate overridden.
430 * Note that this is required by the callers of this function.
431 */
432 status = acpi_tb_acquire_table(&new_table_desc, &new_table,
433 &new_table_length, &new_flags);
434 if (ACPI_FAILURE(status)) {
435 ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
436 "%4.4s " ACPI_PRINTF_UINT
437 " Attempted table override failed",
438 table_header->signature,
439 ACPI_FORMAT_TO_UINT(table_desc->address)));
440 return (NULL);
441 }
442
323 ACPI_INFO((AE_INFO, "%4.4s " ACPI_PRINTF_UINT 443 ACPI_INFO((AE_INFO, "%4.4s " ACPI_PRINTF_UINT
324 " %s table override, new table: " ACPI_PRINTF_UINT, 444 " %s table override, new table: " ACPI_PRINTF_UINT,
325 table_header->signature, 445 table_header->signature,
326 ACPI_FORMAT_TO_UINT(table_desc->address), 446 ACPI_FORMAT_TO_UINT(table_desc->address),
327 override_type, ACPI_FORMAT_TO_UINT(new_table))); 447 override_type, ACPI_FORMAT_TO_UINT(new_table_desc.address)));
328 448
329 /* We can now unmap/delete the original table (if fully mapped) */ 449 /* We can now uninstall the original table (if fully mapped) */
330 450
331 acpi_tb_delete_table(table_desc); 451 acpi_tb_uninstall_table(table_desc);
332 452
333 /* Setup descriptor for the new table */ 453 /* Install the new table */
334 454
335 table_desc->address = new_address; 455 table_desc->address = new_table_desc.address;
336 table_desc->pointer = new_table; 456 table_desc->length = new_table_desc.length;
337 table_desc->length = new_table_length; 457 table_desc->flags = new_table_desc.flags;
338 table_desc->flags = new_flags;
339 458
340 return (new_table); 459 return (new_table);
341} 460}
@@ -458,9 +577,9 @@ acpi_tb_store_table(acpi_physical_address address,
458 577
459/******************************************************************************* 578/*******************************************************************************
460 * 579 *
461 * FUNCTION: acpi_tb_delete_table 580 * FUNCTION: acpi_tb_uninstall_table
462 * 581 *
463 * PARAMETERS: table_index - Table index 582 * PARAMETERS: table_desc - Table descriptor
464 * 583 *
465 * RETURN: None 584 * RETURN: None
466 * 585 *
@@ -468,35 +587,27 @@ acpi_tb_store_table(acpi_physical_address address,
468 * 587 *
469 ******************************************************************************/ 588 ******************************************************************************/
470 589
471void acpi_tb_delete_table(struct acpi_table_desc *table_desc) 590void acpi_tb_uninstall_table(struct acpi_table_desc *table_desc)
472{ 591{
473 592
474 /* Table must be mapped or allocated */ 593 ACPI_FUNCTION_TRACE(tb_uninstall_table);
475
476 if (!table_desc->pointer) {
477 return;
478 }
479
480 switch (table_desc->flags & ACPI_TABLE_ORIGIN_MASK) {
481 case ACPI_TABLE_ORIGIN_MAPPED:
482
483 acpi_os_unmap_memory(table_desc->pointer, table_desc->length);
484 break;
485
486 case ACPI_TABLE_ORIGIN_ALLOCATED:
487 594
488 ACPI_FREE(table_desc->pointer); 595 /* Table must be installed */
489 table_desc->address = ACPI_PTR_TO_PHYSADDR(NULL);
490 break;
491 596
492 /* Not mapped or allocated, there is nothing we can do */ 597 if (!table_desc->address) {
598 return_VOID;
599 }
493 600
494 default: 601 acpi_tb_invalidate_table(table_desc);
495 602
496 return; 603 if ((table_desc->flags & ACPI_TABLE_ORIGIN_MASK) ==
604 ACPI_TABLE_ORIGIN_ALLOCATED) {
605 ACPI_FREE(ACPI_CAST_PTR(void, table_desc->address));
497 } 606 }
498 607
499 table_desc->pointer = NULL; 608 table_desc->address = ACPI_PTR_TO_PHYSADDR(NULL);
609
610 return_VOID;
500} 611}
501 612
502/******************************************************************************* 613/*******************************************************************************
@@ -522,7 +633,7 @@ void acpi_tb_terminate(void)
522 /* Delete the individual tables */ 633 /* Delete the individual tables */
523 634
524 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; i++) { 635 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; i++) {
525 acpi_tb_delete_table(&acpi_gbl_root_table_list.tables[i]); 636 acpi_tb_uninstall_table(&acpi_gbl_root_table_list.tables[i]);
526 } 637 }
527 638
528 /* 639 /*