From: Bjorn Helgaas Date: Tue, 28 Mar 2006 22:04:00 +0000 (-0500) Subject: HPET: fix ACPI memory range length handling X-Git-Tag: v2.6.18-rc1~1081^2~19^2~21^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9224a867c497053842dc595e594ca6d32112221f;p=karo-tx-linux.git HPET: fix ACPI memory range length handling ACPI address space descriptors contain _MIN, _MAX, and _LEN. _MIN and _MAX are the bounds within which the region can be moved (this is clarified in Table 6-38 of the ACPI 3.0 spec). We should use _LEN to determine the size of the region, not _MAX - _MIN + 1. Signed-off-by: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index ef140ebde117..07473cd84121 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -925,11 +925,8 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) status = acpi_resource_to_address64(res, &addr); if (ACPI_SUCCESS(status)) { - unsigned long size; - - size = addr.maximum - addr.minimum + 1; hdp->hd_phys_address = addr.minimum; - hdp->hd_address = ioremap(addr.minimum, size); + hdp->hd_address = ioremap(addr.minimum, addr.address_length); if (hpet_is_known(hdp)) { printk(KERN_DEBUG "%s: 0x%lx is busy\n",