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

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

Merge "cma: Drop alignment requirements for regions not in system"

parents 85adcf19 c0c4dd61
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t *res_base,
				       bool to_system, bool remove)
{
	phys_addr_t base = *res_base;
	phys_addr_t alignment;
	phys_addr_t alignment = PAGE_SIZE;
	int ret = 0;

	pr_debug("%s(size %lx, base %pa, limit %pa)\n", __func__,
@@ -353,6 +353,7 @@ int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t *res_base,
		return -EINVAL;

	/* Sanitise input arguments */
	if (!remove)
		alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
	base = ALIGN(base, alignment);
	size = ALIGN(size, alignment);