swiotlb: Use %pa to print phys_addr_t variables
Subsystems (3)
PATCH v2 1/3 swiotlb: Use %pa to print phys_addr_t variables
There is an extension to a %p to print phys_addr_t type of variables. Use it here.
---
v2: dropped bytes replacement (Fabio)
kernel/dma/swiotlb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/dma/swiotlb.c +1 -3
@@ -172,9 +172,7 @@ void swiotlb_print_info(void)return ; } -pr_info ("mapped [mem %#010llx-%#010llx] (%luMB)\n" , - (unsigned long long )io_tlb_start, - (unsigned long long )io_tlb_end, +pr_info ("mapped [mem %pa-%pa] (%luMB)\n" , &io_tlb_start, &io_tlb_end, bytes >>20 ); }
Signature · 1 line
2.28.0
PATCH v2 2/3 swiotlb: Declare swiotlb_late_init_with_default_size() in header
Compiler is not happy about one function prototype:
CC kernel/dma/swiotlb.o
kernel/dma/swiotlb.c:275:1: warning: no previous prototype for ‘swiotlb_late_init_with_default_size’ [-Wmissing-prototypes] 275 | swiotlb_late_init_with_default_size(size_t default_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since it's used outside of the module, move its declaration to the header from the user.
---
v2: no change
arch/x86/pci/sta2x11-fixup.c | 1 - include/linux/swiotlb.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
arch/x86/pci/sta2x11-fixup.c +0 -1
@@ -15,7 +15,6 @@#include <asm/iommu.h> #define STA2X11_SWIOTLB_SIZE (4*1024*1024) -extern int swiotlb_late_init_with_default_size (size_t default_size);/* * We build a list of bus numbers that are under the ConneXt. The
include/linux/swiotlb.h +1 -0
@@ -34,6 +34,7 @@ int swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose);extern unsigned long swiotlb_nr_tbl (void );unsigned long swiotlb_size_or_default (void );extern int swiotlb_late_init_with_tbl (char *tlb,unsigned long nslabs); +extern int swiotlb_late_init_with_default_size (size_t default_size);extern void __init swiotlb_update_mem_attributes (void );/*
Signature · 1 line
2.28.0
PATCH v2 3/3 swiotlb: Mark max_segment with static keyword
In reply to Andy ShevchenkoSparse is not happy about max_segment declaration:
CHECK kernel/dma/swiotlb.c
kernel/dma/swiotlb.c:96:14: warning: symbol 'max_segment' was not declared. Should it be static?
Mark it static as suggested.
---
v2: no change
kernel/dma/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/dma/swiotlb.c +1 -1
@@ -93,7 +93,7 @@ static unsigned int io_tlb_index;* Max segment that we can provide which (if pages are contingous) will * not be bounced (unless SWIOTLB_FORCE is set). */ -unsigned int max_segment; +static unsigned int max_segment;/* * We need to save away the original address corresponding to a mapped entry
Signature · 1 line
2.28.0
Quoted 7 lines · Andy Shevchenko
There is an extension to a %p to print
phys_addr_ttype of variables. Use it here.Signed-off-by Andy Shevchenko <[email protected]>---
v2: dropped bytes replacement (Fabio)
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 11 lines · Fabio Estevam
Quoted 7 lines · Andy Shevchenko
There is an extension to a %p to print
phys_addr_ttype of variables. Use it here.Signed-off-by Andy Shevchenko <[email protected]>---
v2: dropped bytes replacement (Fabio)Reviewed-by Fabio Estevam <[email protected]>
Thanks!
Guys, can this series be applied?
Signature · 8 lines
With Best Regards, Andy Shevchenko _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 11 lines · Andy Shevchenko
Quoted 10 lines · Fabio Estevam
Quoted 7 lines · Andy Shevchenko
There is an extension to a %p to print
phys_addr_ttype of variables. Use it here.Signed-off-by Andy Shevchenko <[email protected]>---
v2: dropped bytes replacement (Fabio)
Quoted 5 lines
Quoted 1 line
Reviewed-by Fabio Estevam <[email protected]>Thanks!
Guys, can this series be applied?
Sure.
Quoted 6 lines
Signature · 3 lines
-- With Best Regards, Andy Shevchenko
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu