From d3f7d3ada60abaeb15365e062e09e81f5a72252c Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Tue, 20 Jul 2021 14:01:32 +0100 Subject: [PATCH] ANDROID: Revert "swiotlb: manipulate orig_addr when tlb_addr has offset" This reverts commit e6108147dd91b94d1979b110f265710c254c99d5. This conflicts with a number of swiotlb changes made since v5.10 that are needed by restricted DMA. Temporarily revert it for now, as we will apply the upstream version later on. Signed-off-by: Will Deacon Bug: 190591509 Change-Id: I1611312f719bac48ed8179c05508b0dc84340a72 --- kernel/dma/swiotlb.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 0ed0e1f215c7..0f61b14b0099 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -667,9 +667,6 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, if (orig_addr == INVALID_PHYS_ADDR) return; - orig_addr += (tlb_addr & (IO_TLB_SIZE - 1)) - - swiotlb_align_offset(hwdev, orig_addr); - switch (target) { case SYNC_FOR_CPU: if (likely(dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL))