diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c index bc05a3be9d57b9d2f2396607c0c710b4c964f2e5..81e4e5e78f38538295bb23d98b549f1d0f3d15c2 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);