[PATCH 04/11] swiotlb: Print physical addr instead of bus addr in info printks

From: Becky Bruce
Date: Fri Dec 19 2008 - 00:14:23 EST


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@xxxxxxxxxxxxxxxxxxx>
---
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

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