ANDROID: Revert "swiotlb: manipulate orig_addr when tlb_addr has offset"

This reverts commit e6108147dd.

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 <willdeacon@google.com>
Bug: 190591509
Change-Id: I1611312f719bac48ed8179c05508b0dc84340a72
This commit is contained in:
Will Deacon
2021-07-20 14:01:32 +01:00
parent 5629c870d5
commit d3f7d3ada6

View File

@@ -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))