]> git.baikalelectronics.ru Git - uboot.git/commit
armv8: layerscape: use memalign() to allocate spintable code
authorMichael Walle <michael@walle.cc>
Sun, 31 Oct 2021 22:21:56 +0000 (23:21 +0100)
committerPriyanka Jain <priyanka.jain@nxp.com>
Tue, 9 Nov 2021 11:48:23 +0000 (17:18 +0530)
commit22e5a99f172ef5a1a3651c083176148eb630cb8a
tree1e33a8bf4ce41d806d642b6eaec64bd7d3440395
parent7c49689405c6ddac00781dfd55479b3c612c50c3
armv8: layerscape: use memalign() to allocate spintable code

Don't use efi_allocate_pages(). The allocated memory isn't carved out of
the lmb allocations. The memory might then be allocated twice.
Particulary, this might happened with the fdt_high/initrd_high feature
which will relocate the fdt/ramdisk. This might then overlap with the
spin table.

Instead use memalign() which allocates on memory on the heap which is
correctly carved out by lmb.

Please note, that the memory is later reserved in the device tree as
well as in the EFI memory map in ft_fixup_cpu() (in
arch/arm/cpu/armv8/fsl-layerscape/fdt.c).

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/mp.c