diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2009-02-07 18:39:41 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-09 07:35:07 -0500 |
commit | 7d97277b754d3ee098a5ec69b6aaafb00c94e2f2 (patch) | |
tree | 457ff6256a2da2f39f93500453a6a643ab29ef2b /drivers/acpi/acpica/tbxface.c | |
parent | 05876f88ed9a66b26af613e222795ae790616252 (diff) |
acpi/x86: introduce __apci_map_table, v4
to prevent wrongly overwriting fixmap that still want to use.
ACPI used to rely on low mappings being all linearly mapped and
grew a habit: it never really unmapped certain kinds of tables
after use.
This can cause problems - for example the hypothetical case
when some spurious access still references it.
v2: remove prev_map and prev_size in __apci_map_table
v3: let acpi_os_unmap_memory() call early_iounmap too, so remove extral calling to
early_acpi_os_unmap_memory
v4: fix typo in one acpi_get_table_with_size calling
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/acpi/acpica/tbxface.c')
-rw-r--r-- | drivers/acpi/acpica/tbxface.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c index c3e841f3cde9..ab0aff3c7d6a 100644 --- a/drivers/acpi/acpica/tbxface.c +++ b/drivers/acpi/acpica/tbxface.c | |||
@@ -365,7 +365,7 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id) | |||
365 | 365 | ||
366 | /******************************************************************************* | 366 | /******************************************************************************* |
367 | * | 367 | * |
368 | * FUNCTION: acpi_get_table | 368 | * FUNCTION: acpi_get_table_with_size |
369 | * | 369 | * |
370 | * PARAMETERS: Signature - ACPI signature of needed table | 370 | * PARAMETERS: Signature - ACPI signature of needed table |
371 | * Instance - Which instance (for SSDTs) | 371 | * Instance - Which instance (for SSDTs) |
@@ -377,8 +377,9 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id) | |||
377 | * | 377 | * |
378 | *****************************************************************************/ | 378 | *****************************************************************************/ |
379 | acpi_status | 379 | acpi_status |
380 | acpi_get_table(char *signature, | 380 | acpi_get_table_with_size(char *signature, |
381 | u32 instance, struct acpi_table_header **out_table) | 381 | u32 instance, struct acpi_table_header **out_table, |
382 | acpi_size *tbl_size) | ||
382 | { | 383 | { |
383 | u32 i; | 384 | u32 i; |
384 | u32 j; | 385 | u32 j; |
@@ -408,6 +409,7 @@ acpi_get_table(char *signature, | |||
408 | acpi_tb_verify_table(&acpi_gbl_root_table_list.tables[i]); | 409 | acpi_tb_verify_table(&acpi_gbl_root_table_list.tables[i]); |
409 | if (ACPI_SUCCESS(status)) { | 410 | if (ACPI_SUCCESS(status)) { |
410 | *out_table = acpi_gbl_root_table_list.tables[i].pointer; | 411 | *out_table = acpi_gbl_root_table_list.tables[i].pointer; |
412 | *tbl_size = acpi_gbl_root_table_list.tables[i].length; | ||
411 | } | 413 | } |
412 | 414 | ||
413 | if (!acpi_gbl_permanent_mmap) { | 415 | if (!acpi_gbl_permanent_mmap) { |
@@ -420,6 +422,15 @@ acpi_get_table(char *signature, | |||
420 | return (AE_NOT_FOUND); | 422 | return (AE_NOT_FOUND); |
421 | } | 423 | } |
422 | 424 | ||
425 | acpi_status | ||
426 | acpi_get_table(char *signature, | ||
427 | u32 instance, struct acpi_table_header **out_table) | ||
428 | { | ||
429 | acpi_size tbl_size; | ||
430 | |||
431 | return acpi_get_table_with_size(signature, | ||
432 | instance, out_table, &tbl_size); | ||
433 | } | ||
423 | ACPI_EXPORT_SYMBOL(acpi_get_table) | 434 | ACPI_EXPORT_SYMBOL(acpi_get_table) |
424 | 435 | ||
425 | /******************************************************************************* | 436 | /******************************************************************************* |