Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1dda415 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dma-mapping-fast: Fix sg-list length calculation in fast_smmu_unmap_sg()"

parents 713f0247 8cf0085b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/dma-contiguous.h>
@@ -477,7 +477,8 @@ static void fast_smmu_unmap_sg(struct device *dev,
			break;
		sg = tmp;
	}
	len = sg_dma_address(sg) + sg_dma_len(sg) - start;
	len = ALIGN(sg_dma_address(sg) + sg_dma_len(sg) - start,
		    FAST_PAGE_SIZE);

	av8l_fast_unmap_public(mapping->pgtbl_ops, start, len);