diff options
author | Jin Dongming <jin.dongming@np.css.fujitsu.com> | 2010-09-29 19:53:52 +0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-09-29 14:02:16 -0400 |
commit | bad97c37db9c1ee36de8ac58f9f73931d15a2e94 (patch) | |
tree | 49220b98d5311caf598fd3a6dec3daf7566ec97d /drivers/acpi | |
parent | 3a78f965328482eee542217de79036c2a8791de8 (diff) | |
download | linux-bad97c37db9c1ee36de8ac58f9f73931d15a2e94.tar.gz linux-bad97c37db9c1ee36de8ac58f9f73931d15a2e94.tar.bz2 linux-bad97c37db9c1ee36de8ac58f9f73931d15a2e94.zip |
ACPI, APEI, Fix acpi_pre_map() return value
After we ioremap() a new region, we call __acpi_try_ioremap() to
see whether another thread has already mapped the same region.
This check clobbers "vaddr", so compute the return value of
acpi_pre_map() using the ioremap() result "map->vaddr" instead.
v2:
Modified the unsuitable description of patch.
v3:
Removed unlikely() check and made description simpler.
Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/atomicio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/atomicio.c b/drivers/acpi/atomicio.c index 8f8bd736d4ff..542e53903891 100644 --- a/drivers/acpi/atomicio.c +++ b/drivers/acpi/atomicio.c @@ -142,7 +142,7 @@ static void __iomem *acpi_pre_map(phys_addr_t paddr, list_add_tail_rcu(&map->list, &acpi_iomaps); spin_unlock_irqrestore(&acpi_iomaps_lock, flags); - return vaddr + (paddr - pg_off); + return map->vaddr + (paddr - map->paddr); err_unmap: iounmap(vaddr); return NULL; |