From: Greg Ungerer <gerg@linux-m68k.org>
To: Mike Rapoport <rppt@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Guenter Roeck <linux@roeck-us.net>, Rich Felker <dalias@libc.org>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org,
linux-mm@kvack.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH 1/2] m68k/nommu: add missing definition of ARCH_PFN_OFFSET
Date: Wed, 15 Feb 2023 22:16:32 +1000 [thread overview]
Message-ID: <c990e632-4e2e-3942-0fe3-4b7a2e636ff7@linux-m68k.org> (raw)
In-Reply-To: <20230214140729.1649961-2-rppt@kernel.org>
On 15/2/23 00:07, Mike Rapoport wrote:
> From: "Mike Rapoport (IBM)" <rppt@kernel.org>
>
> On m68k/nommu RAM does not necessarily start at 0x0 and when it does not
> pfn_valid() uses a wrong offset into the memory map which causes silent
> boot failures.
>
> Define ARCH_PFN_OFFSET to make pfn_valid() use the correct offset.
>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Fixes: d82f07f06cf8 ("m68k: use asm-generic/memory_model.h for both MMU and !MMU")
> Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
> ---
> arch/m68k/include/asm/page_no.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/m68k/include/asm/page_no.h b/arch/m68k/include/asm/page_no.h
> index 43ff6b109ebb..060e4c0e7605 100644
> --- a/arch/m68k/include/asm/page_no.h
> +++ b/arch/m68k/include/asm/page_no.h
> @@ -28,6 +28,8 @@ extern unsigned long memory_end;
> #define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET) && \
> ((unsigned long)(kaddr) < memory_end))
>
> +#define ARCH_PFN_OFFSET PHYS_PFN(PAGE_OFFSET_RAW)
> +
> #endif /* __ASSEMBLY__ */
>
> #endif /* _M68K_PAGE_NO_H */
next prev parent reply other threads:[~2023-02-15 12:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 14:07 [PATCH 0/2] fixups for generic implementation of pfn_valid() Mike Rapoport
2023-02-14 14:07 ` [PATCH 1/2] m68k/nommu: add missing definition of ARCH_PFN_OFFSET Mike Rapoport
2023-02-15 12:16 ` Greg Ungerer [this message]
2023-02-16 12:55 ` David Hildenbrand
2023-02-14 14:07 ` [PATCH 2/2] sh: initialize max_mapnr Mike Rapoport
2023-02-14 14:41 ` John Paul Adrian Glaubitz
2023-02-16 12:56 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c990e632-4e2e-3942-0fe3-4b7a2e636ff7@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mm@kvack.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rppt@kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox