mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
arm64: fix bootloader_memory_limit
set bootloader_memory_limit to end of dram, if the memory limit set in kernel parameters is more than ram size. Change-Id: I7d23ca84f08dfb4bf7660253db722a1f6456bf85 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This commit is contained in:
parent
eafa579022
commit
ba55e324c9
1 changed files with 2 additions and 3 deletions
|
|
@ -454,10 +454,9 @@ void __init arm64_memblock_init(void)
|
|||
* Save bootloader imposed memory limit before we overwirte
|
||||
* memblock.
|
||||
*/
|
||||
if (memory_limit == PHYS_ADDR_MAX)
|
||||
bootloader_memory_limit = memblock_max_addr(memory_limit);
|
||||
if (bootloader_memory_limit > memblock_end_of_DRAM())
|
||||
bootloader_memory_limit = memblock_end_of_DRAM();
|
||||
else
|
||||
bootloader_memory_limit = memblock_max_addr(memory_limit);
|
||||
|
||||
update_memory_limit();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue