mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] use proper address translation functions in DCDBAS
@ 2009-11-20 13:46 Jan Beulich
  2009-11-20 14:07 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2009-11-20 13:46 UTC (permalink / raw)
  To: Douglas_Warzecha; +Cc: linux-kernel

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@novell.com>

---
 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;




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] use proper address translation functions in DCDBAS
  2009-11-20 13:46 [PATCH] use proper address translation functions in DCDBAS Jan Beulich
@ 2009-11-20 14:07 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2009-11-20 14:07 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Douglas_Warzecha, linux-kernel

On Fri, 20 Nov 2009 13:46:00 +0000
"Jan Beulich" <JBeulich@novell.com> wrote:

> 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).

Same again - these are physical CPU memory views so virt_to_bus is wrong.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-20 14:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-20 13:46 [PATCH] use proper address translation functions in DCDBAS Jan Beulich
2009-11-20 14:07 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®