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

Commit fff2cea6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "arm: dma-mapping: WARN_ON if iova is not 128M aligned""

parents 99cc4e5f 27174605
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -2346,16 +2346,12 @@ static int
iommu_init_mapping(struct device *dev, struct dma_iommu_mapping *mapping)
{
	unsigned int bitmap_size = BITS_TO_LONGS(mapping->bits) * sizeof(long);
	u64 size = mapping->bits << PAGE_SHIFT;
	int extensions = 1;
	int err = -ENOMEM;

	if (!bitmap_size)
		return -EINVAL;

	WARN(!IS_ALIGNED(size, SZ_128M),
			"size is not aligned to 128M, alignment enforced");

	if (bitmap_size > PAGE_SIZE) {
		extensions = bitmap_size / PAGE_SIZE;
		bitmap_size = PAGE_SIZE;