From: Jin Dongming <jin.dongming@np.css.fujitsu.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>, APEI-lenb <lenb@kernel.org>
Cc: Huang Ying <ying.huang@intel.com>,
Andi Kleen <andi@firstfloor.org>,
Randy Dunlap <randy.dunlap@oracle.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
ACPI <linux-acpi@vger.kernel.org>,
LKLM <linux-kernel@vger.kernel.org>
Subject: [Patch-next] ACPI, APEI: fix acpi_pre_map() return value.
Date: Mon, 06 Sep 2010 10:10:47 +0900 [thread overview]
Message-ID: <4C843F97.70608@np.css.fujitsu.com> (raw)
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
reply other threads:[~2010-09-06 1:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C843F97.70608@np.css.fujitsu.com \
--to=jin.dongming@np.css.fujitsu.com \
--cc=andi@firstfloor.org \
--cc=bjorn.helgaas@hp.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=sfr@canb.auug.org.au \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).