summaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorAngelo Dureghello <angelo@kernel-space.org>2021-02-28 20:08:28 +0100
committerGeert Uytterhoeven <geert@linux-m68k.org>2021-04-06 09:32:50 +0200
commitb19df649adcba4f934a1438dbb21f5f1cb883608 (patch)
tree96a89016e3b32772fe55d96226314edee8b1325e /arch/m68k
parenta65a802aadba072ca7514fc0c301fd7fdc6fc6cb (diff)
downloadlinux-stable-b19df649adcba4f934a1438dbb21f5f1cb883608.tar.gz
linux-stable-b19df649adcba4f934a1438dbb21f5f1cb883608.tar.bz2
linux-stable-b19df649adcba4f934a1438dbb21f5f1cb883608.zip
m68k: mm: Fix flatmem memory model setup
Detected a broken boot on mcf54415, likely introduced from commit 4bfc848e0981 ("m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM") Fix ARCH_PFN_OFFSET to be a pfn. Signed-off-by: Angelo Dureghello <angelo@kernel-space.org> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/20210228190828.392974-1-angelo@kernel-space.org Fixes: 4bfc848e0981fcd3 ("m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/page_mm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h
index 9e8f0cc30a2c..2411ea9ef578 100644
--- a/arch/m68k/include/asm/page_mm.h
+++ b/arch/m68k/include/asm/page_mm.h
@@ -167,7 +167,7 @@ static inline __attribute_const__ int __virt_to_node_shift(void)
((__p) - pgdat->node_mem_map) + pgdat->node_start_pfn; \
})
#else
-#define ARCH_PFN_OFFSET (m68k_memory[0].addr)
+#define ARCH_PFN_OFFSET (m68k_memory[0].addr >> PAGE_SHIFT)
#include <asm-generic/memory_model.h>
#endif