Commit b19df649 authored by Angelo Dureghello's avatar Angelo Dureghello Committed by Geert Uytterhoeven

m68k: mm: Fix flatmem memory model setup

Detected a broken boot on mcf54415, likely introduced from

commit 4bfc848e
("m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM")

Fix ARCH_PFN_OFFSET to be a pfn.
Signed-off-by: default avatarAngelo Dureghello <angelo@kernel-space.org>
Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/20210228190828.392974-1-angelo@kernel-space.org
Fixes: 4bfc848e ("m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM")
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent a65a802a
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment