From 05c8545fff39bf0b6d69b49c07b2c27a9a80fab0 Mon Sep 17 00:00:00 2001 From: Venkatesh Pallipadi Date: Thu, 13 Nov 2003 01:03:02 -0800 Subject: [PATCH] [PATCH] Improper mapping of ACPI-HPET table Early ACPI table parse for HPET tables has a bug, where in it does not do proper set_fixmap for ACPI-HPET table. This bug was lost in oversight, and was not noticed during my testing too, as the ACPI-HPET table on all my test systems happened to be in 1st Gig of memory (where __va() will do the job). --- arch/i386/kernel/acpi/boot.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 218a7c900e5b5..c68d6a9d2be18 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -304,7 +304,14 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) { struct acpi_table_hpet *hpet_tbl; - hpet_tbl = __va(phys); + if (!phys || !size) + return -EINVAL; + + hpet_tbl = (struct acpi_table_hpet *) __acpi_map_table(phys, size); + if (!hpet_tbl) { + printk(KERN_WARNING PREFIX "Unable to map HPET\n"); + return -ENODEV; + } if (hpet_tbl->addr.space_id != ACPI_SPACE_MEM) { printk(KERN_WARNING PREFIX "HPET timers must be located in " -- 2.53.0