Skip to content

Commit

Permalink
swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single
Browse files Browse the repository at this point in the history
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 <jxgao@google.com>
Tested-by: Jianxiong Gao <jxgao@google.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Christoph Hellwig authored and Konrad Rzeszutek Wilk committed Feb 22, 2021
1 parent 26a7e09 commit 16fc3ce
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kernel/dma/swiotlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 16fc3ce

Please sign in to comment.