Skip to content

Commit

Permalink
HPET: fix ACPI memory range length handling
Browse files Browse the repository at this point in the history
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 <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Apr 2, 2006
1 parent 459c726 commit 9224a86
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9224a86

Please sign in to comment.