aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/dmar.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-02-11 04:06:59 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-11 08:20:10 -0500
commit8e1568f3500287d0b36c9776132cb53a42d5651d (patch)
tree82740294d41f0e6268b5c3b44f08ef4be5bed708 /drivers/pci/dmar.c
parentb825e6cc7b1401862531df497a4a4daff8102ed5 (diff)
pci, x86, acpi: fix early_ioremap() leak
Pawel reported: ------------[ cut here ]------------ WARNING: at arch/x86/mm/ioremap.c:616 check_early_ioremap_leak+0x52/0x67() Hardware name: Debug warning: early ioremap leak of 1 areas detected. Modules linked in: Pid: 1, comm: swapper Not tainted 2.6.29-rc4-tip #2 ... Reported-by: Pawel Dziekonski <dzieko@gmail.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r--drivers/pci/dmar.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index f5a662a50acb..519f5f91e765 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -42,6 +42,7 @@
42LIST_HEAD(dmar_drhd_units); 42LIST_HEAD(dmar_drhd_units);
43 43
44static struct acpi_table_header * __initdata dmar_tbl; 44static struct acpi_table_header * __initdata dmar_tbl;
45static acpi_size dmar_tbl_size;
45 46
46static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd) 47static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
47{ 48{
@@ -288,8 +289,9 @@ static int __init dmar_table_detect(void)
288 acpi_status status = AE_OK; 289 acpi_status status = AE_OK;
289 290
290 /* if we could find DMAR table, then there are DMAR devices */ 291 /* if we could find DMAR table, then there are DMAR devices */
291 status = acpi_get_table(ACPI_SIG_DMAR, 0, 292 status = acpi_get_table_with_size(ACPI_SIG_DMAR, 0,
292 (struct acpi_table_header **)&dmar_tbl); 293 (struct acpi_table_header **)&dmar_tbl,
294 &dmar_tbl_size);
293 295
294 if (ACPI_SUCCESS(status) && !dmar_tbl) { 296 if (ACPI_SUCCESS(status) && !dmar_tbl) {
295 printk (KERN_WARNING PREFIX "Unable to map DMAR\n"); 297 printk (KERN_WARNING PREFIX "Unable to map DMAR\n");
@@ -481,6 +483,7 @@ void __init detect_intel_iommu(void)
481 iommu_detected = 1; 483 iommu_detected = 1;
482#endif 484#endif
483 } 485 }
486 early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size);
484 dmar_tbl = NULL; 487 dmar_tbl = NULL;
485} 488}
486 489