From: David Hildenbrand <david@redhat.com>
To: Mike Rapoport <rppt@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Ungerer <gerg@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 2/2] sh: initialize max_mapnr
Date: Thu, 16 Feb 2023 13:56:12 +0100 [thread overview]
Message-ID: <30bc98f3-2048-1b2e-88b5-4e54dff8e0fa@redhat.com> (raw)
In-Reply-To: <20230214140729.1649961-3-rppt@kernel.org>
On 14.02.23 15:07, Mike Rapoport wrote:
> From: "Mike Rapoport (IBM)" <rppt@kernel.org>
>
> sh never initializes max_mapnr which is used by the generic
> implementation of pfn_valid().
>
> Initialize max_mapnr with set_max_mapnr() in sh::paging_init().
>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Fixes: e5080a967785 ("mm, arch: add generic implementation of pfn_valid() for FLATMEM")
> Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
> ---
> arch/sh/mm/init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
> index 506784702430..bf1b54055316 100644
> --- a/arch/sh/mm/init.c
> +++ b/arch/sh/mm/init.c
> @@ -301,6 +301,7 @@ void __init paging_init(void)
> */
> max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
> min_low_pfn = __MEMORY_START >> PAGE_SHIFT;
> + set_max_mapnr(max_low_pfn - min_low_pfn);
>
> nodes_clear(node_online_map);
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2023-02-16 12:56 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
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 [this message]
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=30bc98f3-2048-1b2e-88b5-4e54dff8e0fa@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=geert@linux-m68k.org \
--cc=gerg@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;
as well as URLs for NNTP newsgroup(s).