From: Christoph Hellwig Date: Fri, 5 Feb 2021 09:44:16 +0000 (+0100) Subject: swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single X-Git-Tag: v5.12-rc1~16^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16fc3cef33a04632ab6b31758abdd77563a20759;p=thirdparty%2Fkernel%2Flinux.git swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single swiotlb_tbl_map_single currently nevers sets a tlb_addr that is not aligned to the tlb bucket size. But we're going to add such a case soon, for which this adjustment would be bogus. Signed-off-by: Christoph Hellwig Acked-by: Jianxiong Gao Tested-by: Jianxiong Gao Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 6962cb4efb08b..bf063badda1d7 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -660,7 +660,6 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, if (orig_addr == INVALID_PHYS_ADDR) return; - orig_addr += (unsigned long)tlb_addr & (IO_TLB_SIZE - 1); switch (target) { case SYNC_FOR_CPU: