* [Patch-next] ACPI, APEI: fix acpi_pre_map() return value.
@ 2010-09-06 1:10 Jin Dongming
0 siblings, 0 replies; only message in thread
From: Jin Dongming @ 2010-09-06 1:10 UTC (permalink / raw)
To: Bjorn Helgaas, APEI-lenb
Cc: Huang Ying, Andi Kleen, Randy Dunlap, Stephen Rothwell,
Hidetoshi Seto, ACPI, LKLM
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>
Acked-by: Huang Ying <ying.huang@intel.com>
---
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 8f8bd73..542e539 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;
--
1.7.1.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-06 1:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-06 1:10 [Patch-next] ACPI, APEI: fix acpi_pre_map() return value Jin Dongming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).