aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2009-02-07 18:39:41 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-09 07:35:07 -0500
commit7d97277b754d3ee098a5ec69b6aaafb00c94e2f2 (patch)
tree457ff6256a2da2f39f93500453a6a643ab29ef2b /drivers/acpi/osl.c
parent05876f88ed9a66b26af613e222795ae790616252 (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/osl.c')
-rw-r--r--drivers/acpi/osl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index b3193ec0a2ef..d1dd5160daa9 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -274,12 +274,19 @@ EXPORT_SYMBOL_GPL(acpi_os_map_memory);
274 274
275void acpi_os_unmap_memory(void __iomem * virt, acpi_size size) 275void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
276{ 276{
277 if (acpi_gbl_permanent_mmap) { 277 if (acpi_gbl_permanent_mmap)
278 iounmap(virt); 278 iounmap(virt);
279 } 279 else
280 __acpi_unmap_table(virt, size);
280} 281}
281EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); 282EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
282 283
284void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
285{
286 if (!acpi_gbl_permanent_mmap)
287 __acpi_unmap_table(virt, size);
288}
289
283#ifdef ACPI_FUTURE_USAGE 290#ifdef ACPI_FUTURE_USAGE
284acpi_status 291acpi_status
285acpi_os_get_physical_address(void *virt, acpi_physical_address * phys) 292acpi_os_get_physical_address(void *virt, acpi_physical_address * phys)