aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2009-02-07 18:39:41 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-09 07:35:37 -0500
commitb825e6cc7b1401862531df497a4a4daff8102ed5 (patch)
tree96abe11788d9a05772d1c6398ac84baf787ffb29 /arch
parent7d97277b754d3ee098a5ec69b6aaafb00c94e2f2 (diff)
x86, es7000: fix ACPI table mappings
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/es7000_32.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index 53699c931ad4..71d7be624d46 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -292,24 +292,31 @@ int __init find_unisys_acpi_oem_table(unsigned long *oem_addr)
292{ 292{
293 struct acpi_table_header *header = NULL; 293 struct acpi_table_header *header = NULL;
294 int i = 0; 294 int i = 0;
295 acpi_size tbl_size;
295 296
296 while (ACPI_SUCCESS(acpi_get_table("OEM1", i++, &header))) { 297 while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) {
297 if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) { 298 if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
298 struct oem_table *t = (struct oem_table *)header; 299 struct oem_table *t = (struct oem_table *)header;
299 300
300 oem_addrX = t->OEMTableAddr; 301 oem_addrX = t->OEMTableAddr;
301 oem_size = t->OEMTableSize; 302 oem_size = t->OEMTableSize;
303 early_acpi_os_unmap_memory(header, tbl_size);
302 304
303 *oem_addr = (unsigned long)__acpi_map_table(oem_addrX, 305 *oem_addr = (unsigned long)__acpi_map_table(oem_addrX,
304 oem_size); 306 oem_size);
305 return 0; 307 return 0;
306 } 308 }
309 early_acpi_os_unmap_memory(header, tbl_size);
307 } 310 }
308 return -1; 311 return -1;
309} 312}
310 313
311void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr) 314void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr)
312{ 315{
316 if (!oem_addr)
317 return;
318
319 __acpi_unmap_table((char *)oem_addr, oem_size);
313} 320}
314#endif 321#endif
315 322