diff options
author | Mike Rapoport | 2020-08-28 19:39:02 +0300 |
---|---|---|
committer | Vineet Gupta | 2020-09-01 11:23:50 -0700 |
commit | 4af22ded0ecf23adea1b26ea264c53f9f1cfc310 (patch) | |
tree | 95ecfb74ac66298bfcf4b3958d43ef2439f32c4b /include | |
parent | 89d29997f103d08264b0685796b420d911658b96 (diff) |
arc: fix memory initialization for systems with two memory banks
Rework of memory map initialization broke initialization of ARC systems
with two memory banks. Before these changes, memblock was not aware of
nodes configuration and the memory map was always allocated from the
"lowmem" bank. After the addition of node information to memblock, the core
mm attempts to allocate the memory map for the "highmem" bank from its
node. The access to this memory using __va() fails because it can be only
accessed using kmap.
Anther problem that was uncovered is that {min,max}_high_pfn are calculated
from u64 high_mem_start variable which prevents truncation to 32-bit
physical address and the PFN values are above the node and zone boundaries.
Use phys_addr_t type for high_mem_start and high_mem_size to ensure
correspondence between PFNs and highmem zone boundaries and reserve the
entire highmem bank until mem_init() to avoid accesses to it before highmem
is enabled.
To test this:
1. Enable HIGHMEM in ARC config
2. Enable 2 memory banks in haps_hs.dts (uncomment the 2nd bank)
Fixes: 51930df5801e ("mm: free_area_init: allow defining max_zone_pfn in descending order")
Cc: stable@vger.kernel.org [5.8]
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
[vgupta: added instructions to test highmem]
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions