]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single
authorJianxiong Gao <jxgao@google.com>
Thu, 29 Apr 2021 17:33:13 +0000 (17:33 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:03:34 +0000 (10:03 +0200)
BugLink: https://bugs.launchpad.net/bugs/1928850
commit: 16fc3cef33a04632ab6b31758abdd77563a20759

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>
Signed-off-by: Jianxiong Gao <jxgao@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
kernel/dma/swiotlb.c

index d1d9dd8efe02b54b1f6ca6d604d1421fb5ac186f..d6cc8d0e36f37665f6915cd5494dbda765c9469c 100644 (file)
@@ -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: