linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: <ketuzsezr@darnok.org>, <pjones@redhat.com>
Cc: "Jeremy Fitzhardinge" <Jeremy.Fitzhardinge@citrix.com>,
	"Martin Wilck" <Martin.Wilck@fujitsu-siemens.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH] iSCSI/iBFT: use proper address translation
Date: Thu, 01 Oct 2009 09:01:17 +0100	[thread overview]
Message-ID: <4AC47DED0200007800017743@vpn.id2.novell.com> (raw)

In virtual environments (namely, Xen Dom0) virt <-> phys and
virt <-> isa-bus translations cannot be freely interchanged. When
looking at memory below 1M, the latter translations should always
be used.

iscsi_ibft_find.c part from: Martin Wilck <martin.wilck@ts.fujitsu.com>.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>

---
 drivers/firmware/iscsi_ibft.c      |    2 +-
 drivers/firmware/iscsi_ibft_find.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.32-rc1/drivers/firmware/iscsi_ibft.c	2009-06-10 05:05:27.000000000 +0200
+++ 2.6.32-rc1-ibft-addr-xlat/drivers/firmware/iscsi_ibft.c	2009-09-24 12:14:48.000000000 +0200
@@ -939,7 +939,7 @@ static int __init ibft_init(void)
 
 	if (ibft_addr) {
 		printk(KERN_INFO "iBFT detected at 0x%llx.\n",
-		       (u64)virt_to_phys((void *)ibft_addr));
+		       (u64)isa_virt_to_bus(ibft_addr));
 
 		rc = ibft_check_device();
 		if (rc)
--- linux-2.6.32-rc1/drivers/firmware/iscsi_ibft_find.c	2008-10-10 00:13:53.000000000 +0200
+++ 2.6.32-rc1-ibft-addr-xlat/drivers/firmware/iscsi_ibft_find.c	2009-09-24 09:52:18.000000000 +0200
@@ -65,10 +65,10 @@ void __init reserve_ibft_region(void)
 		 * so skip that area */
 		if (pos == VGA_MEM)
 			pos += VGA_SIZE;
-		virt = phys_to_virt(pos);
+		virt = isa_bus_to_virt(pos);
 		if (memcmp(virt, IBFT_SIGN, IBFT_SIGN_LEN) == 0) {
 			unsigned long *addr =
-			    (unsigned long *)phys_to_virt(pos + 4);
+			    (unsigned long *)isa_bus_to_virt(pos + 4);
 			len = *addr;
 			/* if the length of the table extends past 1M,
 			 * the table cannot be valid. */




             reply	other threads:[~2009-10-01  8:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01  8:01 Jan Beulich [this message]
2009-10-01 13:35 ` [PATCH] iSCSI/iBFT: use proper address translation Peter Jones
2009-10-01 21:46 ` Jeremy Fitzhardinge
2009-10-02  1:28   ` Konrad Rzeszutek
2009-10-02  7:25     ` Jan Beulich
2009-10-02 14:32       ` Peter Jones
2009-10-02 14:58         ` Konrad Rzeszutek Wilk
2009-10-02  7:23   ` Jan Beulich

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=4AC47DED0200007800017743@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=Jeremy.Fitzhardinge@citrix.com \
    --cc=Martin.Wilck@fujitsu-siemens.com \
    --cc=ketuzsezr@darnok.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pjones@redhat.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).