* [PATCH] x86/pci: fix dmar_tbl early_ioremap leak
@ 2008-09-25 6:27 Yinghai Lu
2008-09-25 6:48 ` Yinghai Lu
0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2008-09-25 6:27 UTC (permalink / raw)
To: Suresh Siddha, Jesse Barnes, Ingo Molnar, Thomas Gleixner,
H. Peter Anvin, Andrew Morton
Cc: linux-kernel, linux-pci, Yinghai Lu
use early_acpi_os_unmap_memory
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
---
drivers/pci/dmar.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/pci/dmar.c
===================================================================
--- linux-2.6.orig/drivers/pci/dmar.c
+++ linux-2.6/drivers/pci/dmar.c
@@ -42,6 +42,7 @@
LIST_HEAD(dmar_drhd_units);
static struct acpi_table_header * __initdata dmar_tbl;
+static acpi_size __initdata dmar_tbl_size;
static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
{
@@ -296,9 +297,13 @@ static int __init dmar_table_detect(void
{
acpi_status status = AE_OK;
+ if (dmar_tbl)
+ early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size);
+
/* if we could find DMAR table, then there are DMAR devices */
- status = acpi_get_table(ACPI_SIG_DMAR, 0,
- (struct acpi_table_header **)&dmar_tbl);
+ status = acpi_get_table_with_size(ACPI_SIG_DMAR, 0,
+ (struct acpi_table_header **)&dmar_tbl,
+ &dmar_tbl_size);
if (ACPI_SUCCESS(status) && !dmar_tbl) {
printk (KERN_WARNING PREFIX "Unable to map DMAR\n");
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/pci: fix dmar_tbl early_ioremap leak
2008-09-25 6:27 [PATCH] x86/pci: fix dmar_tbl early_ioremap leak Yinghai Lu
@ 2008-09-25 6:48 ` Yinghai Lu
0 siblings, 0 replies; 2+ messages in thread
From: Yinghai Lu @ 2008-09-25 6:48 UTC (permalink / raw)
To: Suresh Siddha, Jesse Barnes, Ingo Molnar, Thomas Gleixner,
H. Peter Anvin, Andrew Morton
Cc: linux-kernel, linux-pci, Yinghai Lu
On Wed, Sep 24, 2008 at 11:27 PM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> use early_acpi_os_unmap_memory
>
> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
>
> ---
> drivers/pci/dmar.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/drivers/pci/dmar.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/dmar.c
> +++ linux-2.6/drivers/pci/dmar.c
> @@ -42,6 +42,7 @@
> LIST_HEAD(dmar_drhd_units);
>
> static struct acpi_table_header * __initdata dmar_tbl;
> +static acpi_size __initdata dmar_tbl_size;
>
> static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
> {
> @@ -296,9 +297,13 @@ static int __init dmar_table_detect(void
> {
> acpi_status status = AE_OK;
>
> + if (dmar_tbl)
> + early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size);
> +
need more work..
YH
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-25 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-25 6:27 [PATCH] x86/pci: fix dmar_tbl early_ioremap leak Yinghai Lu
2008-09-25 6:48 ` Yinghai Lu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.