[PATCH] use proper address translation functions in DCDBAS

From: Jan Beulich
Date: Fri Nov 20 2009 - 08:46:04 EST


In one case, the properly translated address is already available, in
the other virt_to_bus() ought to be used (in particular for Xen
compatibility).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

---
drivers/firmware/dcdbas.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.32-rc8/drivers/firmware/dcdbas.c 2009-06-10 05:05:27.000000000 +0200
+++ 2.6.32-rc8-dcdbas/drivers/firmware/dcdbas.c 2009-10-26 16:34:02.000000000 +0100
@@ -106,7 +106,7 @@ static int smi_data_buf_realloc(unsigned
/* set up new buffer for use */
smi_data_buf = buf;
smi_data_buf_handle = handle;
- smi_data_buf_phys_addr = (u32) virt_to_phys(buf);
+ smi_data_buf_phys_addr = (u32) handle;
smi_data_buf_size = size;

dev_dbg(&dcdbas_pdev->dev, "%s: phys: %x size: %lu\n",
@@ -319,7 +319,7 @@ static ssize_t smi_request_store(struct
break;
case 1:
/* Calling Interface SMI */
- smi_cmd->ebx = (u32) virt_to_phys(smi_cmd->command_buffer);
+ smi_cmd->ebx = (u32) virt_to_bus(smi_cmd->command_buffer);
ret = dcdbas_smi_request(smi_cmd);
if (!ret)
ret = count;



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/