iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/3] swiotlb: Use %pa to print phys_addr_t variables
@ 2020-08-19 17:13 Andy Shevchenko
  2020-08-19 17:13 ` [PATCH v1 2/3] swiotlb: Declare swiotlb_late_init_with_default_size() in header Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andy Shevchenko @ 2020-08-19 17:13 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci, Konrad Rzeszutek Wilk, iommu,
	Christoph Hellwig, Marek Szyprowski, x86, Robin Murphy
  Cc: Andy Shevchenko

There is an extension to a %p to print phys_addr_t type of variables.
Use it here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 kernel/dma/swiotlb.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index c19379fabd20..676ccf0e49d3 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -165,17 +165,14 @@ unsigned long swiotlb_size_or_default(void)
 
 void swiotlb_print_info(void)
 {
-	unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT;
+	unsigned long mb = (io_tlb_nslabs << IO_TLB_SHIFT) >> 20;
 
 	if (no_iotlb_memory) {
 		pr_warn("No low mem\n");
 		return;
 	}
 
-	pr_info("mapped [mem %#010llx-%#010llx] (%luMB)\n",
-	       (unsigned long long)io_tlb_start,
-	       (unsigned long long)io_tlb_end,
-	       bytes >> 20);
+	pr_info("mapped [mem %pa-%pa] (%luMB)\n", &io_tlb_start, &io_tlb_end, mb);
 }
 
 /*
-- 
2.28.0

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2020-08-19 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 17:13 [PATCH v1 1/3] swiotlb: Use %pa to print phys_addr_t variables Andy Shevchenko
2020-08-19 17:13 ` [PATCH v1 2/3] swiotlb: Declare swiotlb_late_init_with_default_size() in header Andy Shevchenko
2020-08-19 17:13 ` [PATCH v1 3/3] swiotlb: Mark max_segment with static keyword Andy Shevchenko
2020-08-19 17:24 ` [PATCH v1 1/3] swiotlb: Use %pa to print phys_addr_t variables Fabio Estevam
2020-08-19 17:39   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).