sh: initialize max_mapnr
authorMike Rapoport (IBM) <rppt@kernel.org>
Tue, 14 Feb 2023 14:07:29 +0000 (16:07 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 17 Feb 2023 04:43:55 +0000 (20:43 -0800)
commitb4fb12e6c74791ac4c5c98b845628c576366b889
treea5b85ae370cadd04cbf7673abd00ca1b31d77b0f
parent9325ddf90ec3a801c09da374b74532d4589a7346
sh: initialize max_mapnr

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

Link: https://lkml.kernel.org/r/20230214140729.1649961-3-rppt@kernel.org
Fixes: e5080a967785 ("mm, arch: add generic implementation of pfn_valid() for FLATMEM")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Ungerer <gerg@linux-m68k.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/sh/mm/init.c