[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210121065349.3188251-29-guoren@kernel.org>
Date: Thu, 21 Jan 2021 14:53:49 +0800
From: guoren@...nel.org
To: guoren@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-csky@...r.kernel.org,
Guo Ren <guoren@...ux.alibaba.com>
Subject: [PATCH 29/29] csky: Fixup pfn_valid error with wrong max_mapnr
From: Guo Ren <guoren@...ux.alibaba.com>
The max_mapnr is the number of PFNs, not absolute PFN offset.
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
---
arch/csky/mm/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c
index 03970f4408f5..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;
- set_max_mapnr(highend_pfn);
+ set_max_mapnr(highend_pfn - ARCH_PFN_OFFSET);
#else
- set_max_mapnr(max_low_pfn);
+ set_max_mapnr(max_low_pfn - ARCH_PFN_OFFSET);
#endif
high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
--
2.17.1
Powered by blists - more mailing lists