From: "Jan Beulich" <JBeulich@novell.com>
To: <Douglas_Warzecha@Dell.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] use proper address translation functions in Dell RBU
Date: Fri, 20 Nov 2009 13:46:46 +0000 [thread overview]
Message-ID: <4B06ABD602000078000211D5@vpn.id2.novell.com> (raw)
virt_to_bus() ought to be used (in particular for Xen compatibility).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
drivers/firmware/dell_rbu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-2.6.32-rc8/drivers/firmware/dell_rbu.c 2009-03-24 00:12:14.000000000 +0100
+++ 2.6.32-rc8-dell-rbu/drivers/firmware/dell_rbu.c 2009-10-26 16:34:16.000000000 +0100
@@ -170,7 +170,7 @@ static int create_packet(void *data, siz
goto out_alloc_packet_array;
}
- if ((unsigned long)virt_to_phys(packet_data_temp_buf)
+ if ((unsigned long)virt_to_bus(packet_data_temp_buf)
< allocation_floor) {
pr_debug("packet 0x%lx below floor at 0x%lx.\n",
(unsigned long)virt_to_phys(
@@ -185,7 +185,7 @@ static int create_packet(void *data, siz
newpacket->data = packet_data_temp_buf;
pr_debug("create_packet: newpacket at physical addr %lx\n",
- (unsigned long)virt_to_phys(newpacket->data));
+ (unsigned long)virt_to_bus(newpacket->data));
/* packets may not have fixed size */
newpacket->length = length;
@@ -204,7 +204,7 @@ out_alloc_packet_array:
/* always free packet array */
for (;idx>0;idx--) {
pr_debug("freeing unused packet below floor 0x%lx.\n",
- (unsigned long)virt_to_phys(
+ (unsigned long)virt_to_bus(
invalid_addr_packet_array[idx-1]));
free_pages((unsigned long)invalid_addr_packet_array[idx-1],
ordernum);
@@ -438,7 +438,7 @@ static int img_update_realloc(unsigned l
(unsigned char *) __get_free_pages(GFP_KERNEL, ordernum);
img_buf_phys_addr =
- (unsigned long) virt_to_phys(image_update_buffer);
+ (unsigned long) virt_to_bus(image_update_buffer);
if (img_buf_phys_addr > BIOS_SCAN_LIMIT) {
free_pages((unsigned long) image_update_buffer, ordernum);
next reply other threads:[~2009-11-20 13:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 13:46 Jan Beulich [this message]
2009-11-20 14:07 ` Alan Cox
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=4B06ABD602000078000211D5@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=Douglas_Warzecha@Dell.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®