Re: [PATCH v2] m68k: fix flatmem memory model setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Angelo,

On 1/3/21 5:08 am, Angelo Dureghello wrote:
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@xxxxxxxxxxxxxxxx>

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


---
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(-)

diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h
index 8cfc92451711..1c683ce57d48 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 <asm-generic/memory_model.h>
  #endif




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux