[PATCH 2/7] swiotlb: use swiotlb_size_or_default in swiotlb_init
Christoph Hellwig
hch at lst.de
Thu Apr 22 17:19:16 AEST 2021
Use swiotlb_size_or_default to calculate the buffer size insted of
open coding it.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
kernel/dma/swiotlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index c7b3dd86db7f56..27461fd63e0330 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -209,7 +209,7 @@ int __init swiotlb_init_with_tbl(char *tlb, size_t bytes, int verbose)
void __init
swiotlb_init(int verbose)
{
- size_t bytes = default_nslabs << IO_TLB_SHIFT;
+ size_t bytes = swiotlb_size_or_default();
void *tlb;
if (swiotlb_force == SWIOTLB_NO_FORCE)
--
2.30.1
More information about the Linuxppc-dev
mailing list