m68k: fix flatmem memory model setup
authorAngelo Dureghello <angelo@kernel-space.org>
Sun, 28 Feb 2021 19:08:28 +0000 (20:08 +0100)
committerGreg Ungerer <gerg@linux-m68k.org>
Sun, 11 Apr 2021 23:34:26 +0000 (09:34 +1000)
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>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/include/asm/page_mm.h

index 9e8f0cc30a2ccb9d2459228f1fef4ae28d4ca0ff..2411ea9ef578b19dbc5d369440d30d708830b682 100644 (file)
@@ -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