* [PATCH] m68k: fix flatmem memory model setup
@ 2021-02-27 23:20 Angelo Dureghello
2021-02-28 8:51 ` Mike Rapoport
0 siblings, 1 reply; 2+ messages in thread
From: Angelo Dureghello @ 2021-02-27 23:20 UTC (permalink / raw)
To: gerg; +Cc: akpm, rppt, linux-m68k, Angelo Dureghello
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>
---
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..84551b1a8b93 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 (PAGE_OFFSET >> PAGE_SHIFT)
#include <asm-generic/memory_model.h>
#endif
--
2.30.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] m68k: fix flatmem memory model setup
2021-02-27 23:20 [PATCH] m68k: fix flatmem memory model setup Angelo Dureghello
@ 2021-02-28 8:51 ` Mike Rapoport
0 siblings, 0 replies; 2+ messages in thread
From: Mike Rapoport @ 2021-02-28 8:51 UTC (permalink / raw)
To: Angelo Dureghello; +Cc: gerg, akpm, linux-m68k
Hi,
On Sun, Feb 28, 2021 at 12:20:58AM +0100, 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@kernel-space.org>
> ---
> 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..84551b1a8b93 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 (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.
> #include <asm-generic/memory_model.h>
> #endif
>
> --
> 2.30.1
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-28 8:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27 23:20 [PATCH] m68k: fix flatmem memory model setup Angelo Dureghello
2021-02-28 8:51 ` Mike Rapoport
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.