From 7852fc8103a67f3036349d907dba6c66758b7b6f Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Sat, 7 Feb 2009 15:39:40 -0800 Subject: [PATCH] --- yaml --- r: 136338 b: refs/heads/master c: 05876f88ed9a66b26af613e222795ae790616252 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/acpi/boot.c | 8 +++++--- trunk/drivers/acpi/bus.c | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index ea20d940dfeb..1d0f9b14bd27 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eecb9a697f0b790e5840dae8a8b866bea49a86ee +refs/heads/master: 05876f88ed9a66b26af613e222795ae790616252 diff --git a/trunk/arch/x86/kernel/acpi/boot.c b/trunk/arch/x86/kernel/acpi/boot.c index 5424a18f2e4e..7217834f6b1d 100644 --- a/trunk/arch/x86/kernel/acpi/boot.c +++ b/trunk/arch/x86/kernel/acpi/boot.c @@ -124,12 +124,14 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size) 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); diff --git a/trunk/drivers/acpi/bus.c b/trunk/drivers/acpi/bus.c index 765fd1c56cd6..fb1be7b5dbc1 100644 --- a/trunk/drivers/acpi/bus.c +++ b/trunk/drivers/acpi/bus.c @@ -694,6 +694,12 @@ void __init acpi_early_init(void) 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();