Skip to content

Commit c47e1a1

Browse files
committed
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 <[email protected]>
1 parent 0d3b051 commit c47e1a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/csky/mm/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ void __init mem_init(void)
8686
#ifdef CONFIG_HIGHMEM
8787
unsigned long tmp;
8888

89-
max_mapnr = highend_pfn;
89+
set_max_mapnr(highend_pfn - ARCH_PFN_OFFSET);
9090
#else
91-
max_mapnr = max_low_pfn;
91+
set_max_mapnr(max_low_pfn - ARCH_PFN_OFFSET);
9292
#endif
9393
high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
9494

0 commit comments

Comments
 (0)