[PATCH 1/8] powerpc/svm: stop using io_tlb_start
Christoph Hellwig
hch at lst.de
Mon Feb 8 03:09:27 AEDT 2021
Use the local variable that is passed to swiotlb_init_with_tbl for
freeing the memory in the failure case to isolate the code a little
better from swiotlb internals.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
arch/powerpc/platforms/pseries/svm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/svm.c b/arch/powerpc/platforms/pseries/svm.c
index 7b739cc7a8a93e..b9968ac7cc0789 100644
--- a/arch/powerpc/platforms/pseries/svm.c
+++ b/arch/powerpc/platforms/pseries/svm.c
@@ -56,7 +56,7 @@ void __init svm_swiotlb_init(void)
return;
if (io_tlb_start)
- memblock_free_early(io_tlb_start,
+ memblock_free_early(__pa(vstart),
PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT));
panic("SVM: Cannot allocate SWIOTLB buffer");
}
--
2.29.2
More information about the Linuxppc-dev
mailing list