ARM: rmobile: Generate fitting mem_map on Gen3
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Wed, 31 Oct 2018 14:06:50 +0000 (15:06 +0100)
committerMarek Vasut <marex@denx.de>
Fri, 2 Nov 2018 14:57:13 +0000 (15:57 +0100)
commite5cb6bd9a2db28338d3595bb3ea30f63624936d6
tree9be74259d29df83bd05b2a3a06353633eeb441cc
parent5dbdd3a600906f56a19c9a82a741705988851a28
ARM: rmobile: Generate fitting mem_map on Gen3

Patch "ARM: rmobile: Mark 4-64GiB as DRAM on Gen3" marked the entire
64bit DRAM space as cachable. On CortexA57, this might result in odd
side effects, where the CPU tries to prefetch from those areas and if
there is no DRAM backing them, CPU bus hang can happen.

This patch fixes it by generating the mem_map structure based on the
actual memory layout obtained from the DT, thus not marking areas
without any DRAM behind them as cachable.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Fixes: c1ec34763811d ("ARM: rmobile: Mark 4-64GiB as DRAM on Gen3")
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
arch/arm/mach-rmobile/cpu_info.c
arch/arm/mach-rmobile/memmap-gen3.c