m68k: fix flatmem memory model setup
PATCH 1/1 m68k: 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.
--- arch/m68k/include/asm/page_mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/include/asm/page_mm.h +1 -1
@@ -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 (PAGE_OFFSET >> PAGE_SHIFT)#include <asm-generic/memory_model.h> #endif
Signature · 1 line
2.30.1
Hi,
Quoted 17 lines · Angelo Dureghello
Detected a broken boot on mcf54415, likely introduced from
commit
4bfc848e0981
("m68k/mm: enable use of genericmemory_model.hfor !DISCONTIGMEM")Fix
ARCH_PFN_OFFSETto be a pfn.Signed-off-by Angelo Dureghello <[email protected]>--- arch/m68k/include/asm/page_mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/m68k/include/asm/page_mm.h +0
-0
arch/m68k/include/asm/page_mm.h static inline __attribute_const__ int __virt_to_node_shift(void) · line 170
Quoted 5 lines
arch/m68k/include/asm/page_mm.h +1
-1@@ -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 (PAGE_OFFSET >> PAGE_SHIFT)
Please keep m68k_memory[0].addr and only add the PAGE_SHIFT I've forgot in 4bfc848e0981.
Some of the configurations with motorola mmu would be broken with static PAGE_OFFSET and they require the actual detected memory start to be used as ARCH_PFN_OFFSET.
Quoted 6 lines
arch/m68k/include/asm/page_mm.h +0
-0#include <asm-generic/memory_model.h> #endif Signature · 1 line
2.30.1
Signature · 2 lines
Sincerely yours, Mike.