* [PATCH v2] m68k: fix flatmem memory model setup
@ 2021-02-28 19:08 Angelo Dureghello
2021-03-01 6:59 ` Mike Rapoport
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Angelo Dureghello @ 2021-02-28 19:08 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>
---
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
--
2.30.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] m68k: fix flatmem memory model setup
2021-02-28 19:08 [PATCH v2] m68k: fix flatmem memory model setup Angelo Dureghello
@ 2021-03-01 6:59 ` Mike Rapoport
2021-03-01 23:26 ` Greg Ungerer
2021-04-12 9:51 ` Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Mike Rapoport @ 2021-03-01 6:59 UTC (permalink / raw)
To: Angelo Dureghello; +Cc: gerg, akpm, linux-m68k
On Sun, Feb 28, 2021 at 08:08:28PM +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>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
> 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
>
> --
> 2.30.1
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] m68k: fix flatmem memory model setup
2021-02-28 19:08 [PATCH v2] m68k: fix flatmem memory model setup Angelo Dureghello
2021-03-01 6:59 ` Mike Rapoport
@ 2021-03-01 23:26 ` Greg Ungerer
2021-04-12 9:51 ` Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Greg Ungerer @ 2021-03-01 23:26 UTC (permalink / raw)
To: Angelo Dureghello; +Cc: akpm, rppt, linux-m68k
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@kernel-space.org>
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
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] m68k: fix flatmem memory model setup
2021-02-28 19:08 [PATCH v2] m68k: fix flatmem memory model setup Angelo Dureghello
2021-03-01 6:59 ` Mike Rapoport
2021-03-01 23:26 ` Greg Ungerer
@ 2021-04-12 9:51 ` Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2021-04-12 9:51 UTC (permalink / raw)
To: Angelo Dureghello; +Cc: Greg Ungerer, Andrew Morton, Mike Rapoport, Linux/m68k
On Sun, Feb 28, 2021 at 9:12 PM Angelo Dureghello
<angelo@kernel-space.org> 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>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
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
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-12 9:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28 19:08 [PATCH v2] m68k: fix flatmem memory model setup Angelo Dureghello
2021-03-01 6:59 ` Mike Rapoport
2021-03-01 23:26 ` Greg Ungerer
2021-04-12 9:51 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).