summaryrefslogtreecommitdiff
path: root/arch/csky/mm
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2021-01-20 17:21:57 +0800
committerGuo Ren <guoren@linux.alibaba.com>2021-02-27 16:35:09 +0800
commitc47e1a1cb6d473172d4d9c24056960bd542dc56c (patch)
tree011225d51b8820de2c395198bd5dbb793a639524 /arch/csky/mm
parent0d3b051adbb72ed81956447d0d1e54d5943ee6f5 (diff)
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: Guo Ren <guoren@linux.alibaba.com>
Diffstat (limited to 'arch/csky/mm')
-rw-r--r--arch/csky/mm/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c
index bc05a3be9d57..81e4e5e78f38 100644
--- a/arch/csky/mm/init.c
+++ b/arch/csky/mm/init.c
@@ -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);