Thread (17 messages) 17 messages, 3 authors, 2021-05-20
STALE1864d REVIEWED: 2 (0M)
Revisions (5)
  1. v1 [diff vs current]
  2. v5 [diff vs current]
  3. v2 [diff vs current]
  4. v2 [diff vs current]
  5. v2 current

[PATCH 5.4 v2 7/9] swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single

From: Jianxiong Gao <hidden>
Date: 2021-05-18 22:19:41
Subsystem: dma mapping helpers, the rest · Maintainers: Marek Szyprowski, Linus Torvalds

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 <hch@lst.de>
Acked-by: Jianxiong Gao <redacted>
Tested-by: Jianxiong Gao <redacted>
Signed-off-by: Konrad Rzeszutek Wilk <redacted>

Upstream: 16fc3cef33a04632ab6b31758abdd77563a20759
Signed-off-by: Jianxiong Gao <redacted>
---
 kernel/dma/swiotlb.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index d71f05a33aa4..f4e18ae33507 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -647,7 +647,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:
-- 
2.31.1.751.gd2f1c929bd-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help