[<prev] [next>] [day] [month] [year] [list]
Message-ID: <48C98E9C.9090709@goop.org>
Date: Thu, 11 Sep 2008 14:33:16 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Ingo Molnar <mingo@...e.hu>
CC: Andi Kleen <andi@...stfloor.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH] acpi: remove final __acpi_map_table mapping before setting
acpi_gbl_permanent_mmap
On x86, __acpi_map_table uses early_ioremap() to create the mapping,
replacing the previous mapping with a new one. Once enough of the
kernel is up an running it switches to using normal ioremap(). At
that point, we need to clean up the final mapping to avoid a warning
from the early_ioremap subsystem.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
---
arch/x86/kernel/acpi/boot.c | 8 +++++---
drivers/acpi/bus.c | 6 ++++++
2 files changed, 11 insertions(+), 3 deletions(-)
===================================================================
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -124,11 +124,13 @@
static char *prev_map;
static unsigned long prev_size;
+ if (prev_map) {
+ early_iounmap(prev_map, prev_size);
+ prev_map = NULL;
+ }
+
if (!phys || !size)
return NULL;
-
- if (prev_map)
- early_iounmap(prev_map, prev_size);
prev_size = size;
prev_map = early_ioremap(phys, size);
===================================================================
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -650,6 +650,12 @@
if (!acpi_strict)
acpi_gbl_enable_interpreter_slack = TRUE;
+ /*
+ * Doing a zero-sized mapping will clear out the previous
+ * __acpi_map_table() mapping, if any.
+ */
+ __acpi_map_table(0, 0);
+
acpi_gbl_permanent_mmap = 1;
status = acpi_reallocate_root_table();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists