aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/acpi/boot.c8
-rw-r--r--drivers/acpi/bus.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 5424a18f2e4e..7217834f6b1d 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -124,12 +124,14 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
124 static char *prev_map; 124 static char *prev_map;
125 static unsigned long prev_size; 125 static unsigned long prev_size;
126 126
127 if (prev_map) {
128 early_iounmap(prev_map, prev_size);
129 prev_map = NULL;
130 }
131
127 if (!phys || !size) 132 if (!phys || !size)
128 return NULL; 133 return NULL;
129 134
130 if (prev_map)
131 early_iounmap(prev_map, prev_size);
132
133 prev_size = size; 135 prev_size = size;
134 prev_map = early_ioremap(phys, size); 136 prev_map = early_ioremap(phys, size);
135 137
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 765fd1c56cd6..fb1be7b5dbc1 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -694,6 +694,12 @@ void __init acpi_early_init(void)
694 if (!acpi_strict) 694 if (!acpi_strict)
695 acpi_gbl_enable_interpreter_slack = TRUE; 695 acpi_gbl_enable_interpreter_slack = TRUE;
696 696
697 /*
698 * Doing a zero-sized mapping will clear out the previous
699 * __acpi_map_table() mapping, if any.
700 */
701 __acpi_map_table(0, 0);
702
697 acpi_gbl_permanent_mmap = 1; 703 acpi_gbl_permanent_mmap = 1;
698 704
699 status = acpi_reallocate_root_table(); 705 status = acpi_reallocate_root_table();