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

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

Merge "drivers: of: of_reserved_mem: fixup the alignment with CMA setup"

parents 96141d3b da68efff
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -127,6 +127,10 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
		align = dt_mem_next_cell(dt_root_addr_cells, &prop);
	}

	/* Need adjust the alignment to satisfy the CMA requirement */
	if (IS_ENABLED(CONFIG_CMA) && of_flat_dt_is_compatible(node, "shared-dma-pool"))
		align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));

	prop = of_get_flat_dt_prop(node, "alloc-ranges", &len);
	if (prop) {