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

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

Merge "arm: dma-mapping: set the proper bitmap size"

parents 5ab65826 919aec60
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2170,6 +2170,9 @@ arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size)
	if (!bitmap_size)
		return ERR_PTR(-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;
@@ -2192,7 +2195,7 @@ arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size)
	mapping->nr_bitmaps = 1;
	mapping->extensions = extensions;
	mapping->base = base;
	mapping->bits = bits;
	mapping->bits = BITS_PER_BYTE * bitmap_size;

	spin_lock_init(&mapping->lock);