Skip to content

Commit b4fb12e

Browse files
rpptakpm00
authored andcommitted
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/[email protected] Fixes: e5080a9 ("mm, arch: add generic implementation of pfn_valid() for FLATMEM") Reported-by: Guenter Roeck <[email protected]> Signed-off-by: Mike Rapoport (IBM) <[email protected]> Acked-by: John Paul Adrian Glaubitz <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: Rich Felker <[email protected]> Cc: Yoshinori Sato <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 9325ddf commit b4fb12e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/sh/mm/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ void __init paging_init(void)
301301
*/
302302
max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
303303
min_low_pfn = __MEMORY_START >> PAGE_SHIFT;
304+
set_max_mapnr(max_low_pfn - min_low_pfn);
304305

305306
nodes_clear(node_online_map);
306307

0 commit comments

Comments
 (0)