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

Commit da68efff authored by Jason Liu's avatar Jason Liu Committed by Shiraz Hashim
Browse files

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

There is an alignment mismatch issue between the of_reserved_mem and
the CMA setup requirement. The of_reserved_mem will try to get the
alignment value from the DTS and pass it to __memblock_alloc_base to
do the memory block base allocation, but the alignment value specified
in the DTS may not satisfy the CAM setup requirement since CMA setup
required the alignment as the following in the code:

align = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);

The sanity check in the function of rmem_cma_setup will fail if the
alignment does not setup correctly and thus CMA will fail to setup.

This patch is to fixup the alignment to meet the CMA setup required.

Change-Id: If06b7f3abd6c85b0c1e4b10454231138164d24b0
Mailing-list-thread: https://lkml.org/lkml/2015/11/9/138


Signed-off-by: default avatarJason Liu <r64343@freescale.com>
Acked-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Git-Commit: 1cc8e3458b5110253c8f5aaf1890d5ffea9bb7b7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarShiraz Hashim <shashim@codeaurora.org>
parent 450bd44d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment