diff options
author | Jan Beulich <JBeulich@novell.com> | 2009-10-02 17:12:39 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-05 21:05:40 +0200 |
commit | ed3c661448a1b4b0b07c0a0d3c6e8a19c7d0ffd7 (patch) | |
tree | ddf42bb3a23d51a836f5faf6ffd88f0a4f7508e5 /drivers/firmware | |
parent | Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
download | linux-ed3c661448a1b4b0b07c0a0d3c6e8a19c7d0ffd7.tar.xz linux-ed3c661448a1b4b0b07c0a0d3c6e8a19c7d0ffd7.zip |
iSCSI/iBFT: use proper address translation
In virtual environments (namely, Xen Dom0) virt <-> phys and
virt <-> isa-bus translations cannot be freely interchanged (and
even outside such environments it is not really correct to do so).
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>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <ketuzsezs@darnok.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/iscsi_ibft.c | 2 | ||||
-rw-r--r-- | drivers/firmware/iscsi_ibft_find.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index 420a96e7f2db..051d1ebbd287 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c @@ -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) diff --git a/drivers/firmware/iscsi_ibft_find.c b/drivers/firmware/iscsi_ibft_find.c index d53fbbfefa3e..dfb15c06c88f 100644 --- a/drivers/firmware/iscsi_ibft_find.c +++ b/drivers/firmware/iscsi_ibft_find.c @@ -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. */ |