Alexander Sverdlin a648228729 MIPS: Don't round up kernel sections size for memblock_add()
[ Upstream commit d121f125af22a16f0f679293756d28a9691fa46d ]

Linux doesn't own the memory immediately after the kernel image. On Octeon
bootloader places a shared structure right close after the kernel _end,
refer to "struct cvmx_bootinfo *octeon_bootinfo" in cavium-octeon/setup.c.

If check_kernel_sections_mem() rounds the PFNs up, first memblock_alloc()
inside early_init_dt_alloc_memory_arch() <= device_tree_init() returns
memory block overlapping with the above octeon_bootinfo structure, which
is being overwritten afterwards.

Fixes: a94e4f24ec83 ("MIPS: init: Drop boot_mem_map")
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:51:18 +01:00
..
2018-10-31 08:54:16 -07:00
2019-07-23 14:33:23 -07:00
2019-08-26 11:42:40 +01:00
2019-05-07 19:06:04 -07:00
2018-08-31 11:49:20 -07:00
2019-10-02 14:06:41 -07:00
2020-06-22 09:31:07 +02:00
2020-08-21 13:05:26 +02:00
2019-07-25 21:45:05 -07:00
2018-12-03 13:42:38 -08:00