From b19df649adcba4f934a1438dbb21f5f1cb883608 Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Sun, 28 Feb 2021 20:08:28 +0100 Subject: [PATCH] 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 Acked-by: Mike Rapoport 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 --- arch/m68k/include/asm/page_mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h index 9e8f0cc..2411ea9 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 #endif -- 2.7.4