m68k: fix flatmem memory model setup
PATCH v2 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.
---
Change for v2:
- replace PAGE_OFFSET with m68k_memory[0].addr
--- 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 (m68k_memory[0].addr >> PAGE_SHIFT)#include <asm-generic/memory_model.h> #endif
Signature · 1 line
2.30.1
Quoted 8 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]>
Quoted 23 lines
---
Change for v2:
- replacePAGE_OFFSETwith m68k_memory[0].addr--- 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 (m68k_memory[0].addr >> PAGE_SHIFT)#include <asm-generic/memory_model.h> #endif Signature · 1 line
2.30.1
Signature · 2 lines
Sincerely yours, Mike.
Hi Angelo,
Quoted 8 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]>
Thanks. I will add to the for-next (and for-linus) branches of the m68knommu git tree - with Mike's Acked-by.
If no issues show up I'll get this to Linus in the next week or two.
Thanks
Greg
Quoted 21 lines
---
Change for v2:
- replacePAGE_OFFSETwith m68k_memory[0].addr--- 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 (m68k_memory[0].addr >> PAGE_SHIFT)#include <asm-generic/memory_model.h> #endif
Quoted 8 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]>
As this affects m68k-with-MMU, too, I have applied it, and queued it in the m68k for-v5.13 branch. But it should hit upstream before v5.12 due to Greg's pull request.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds