lkml.org 
[lkml]   [2008]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromBecky Bruce <>
Subject[PATCH 04/11] swiotlb: Print physical addr instead of bus addr in info printks
DateThu, 18 Dec 2008 23:11:15 -0600
Currently, the bus address is printed, but the physical address
makes more sense in the context of the overall iotlb, and on
some platforms we need a hwdev pointer to determine a bus address,
which we don't have at the time of these printks.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
---
lib/swiotlb.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index add1f92..ef09b4c 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -167,8 +167,10 @@ swiotlb_init_with_default_size(size_t default_size)
if (!io_tlb_overflow_buffer)
panic("Cannot allocate SWIOTLB overflow buffer!\n");

- printk(KERN_INFO "Placing software IO TLB between 0x%lx - 0x%lx\n",
- virt_to_bus(io_tlb_start), virt_to_bus(io_tlb_end));
+ printk(KERN_INFO "Placing software IO TLB between cpu physical "
+ "0x%llx - 0x%llx\n",
+ (unsigned long long)virt_to_phys(io_tlb_start),
+ (unsigned long long)virt_to_phys(io_tlb_end));
}

void __init
@@ -249,9 +251,10 @@ swiotlb_late_init_with_default_size(size_t default_size)
if (!io_tlb_overflow_buffer)
goto cleanup4;

- printk(KERN_INFO "Placing %luMB software IO TLB between 0x%lx - "
- "0x%lx\n", bytes >> 20,
- virt_to_bus(io_tlb_start), virt_to_bus(io_tlb_end));
+ printk(KERN_INFO "Placing %luMB software IO TLB between cpu physical "
+ "0x%llx - 0x%llx\n", bytes >> 20,
+ (unsigned long long)virt_to_phys(io_tlb_start),
+ (unsigned long long)virt_to_phys(io_tlb_end));

return 0;

--
1.5.6.5


\
 
 \ /
  Last update: 2008-12-19 06:17    [from the cache]
©2003-2010