Commit c47e1a1c authored by Guo Ren's avatar Guo Ren

csky: Fixup pfn_valid error with wrong max_mapnr

The max_mapnr is the number of PFNs, not absolute PFN offset.
Using set_max_mapnr API instead of setting the value directly.
Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
parent 0d3b051a
......@@ -86,9 +86,9 @@ void __init mem_init(void)
#ifdef CONFIG_HIGHMEM
unsigned long tmp;
max_mapnr = highend_pfn;
set_max_mapnr(highend_pfn - ARCH_PFN_OFFSET);
#else
max_mapnr = max_low_pfn;
set_max_mapnr(max_low_pfn - ARCH_PFN_OFFSET);
#endif
high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment