Skip to content

Commit 1a09247

Browse files
committed
Merge tag 'fixes-2020-11-05' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull highmem initialization fix from Mike Rapoport: "Fix highmem initialization on arm and xtensa Recent refactoring of memblock iterators has broken initialization of highmem on arm and xtensa because it changed the way beginning and end of memory regions are rounded to PFNs. This fix restores the original behaviour" * tag 'fixes-2020-11-05' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: ARM, xtensa: highmem: avoid clobbering non-page aligned memory reservations
2 parents d1dd461 + b9bc367 commit 1a09247

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

arch/arm/mm/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ static void __init free_highpages(void)
354354
/* set highmem page free */
355355
for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE,
356356
&range_start, &range_end, NULL) {
357-
unsigned long start = PHYS_PFN(range_start);
358-
unsigned long end = PHYS_PFN(range_end);
357+
unsigned long start = PFN_UP(range_start);
358+
unsigned long end = PFN_DOWN(range_end);
359359

360360
/* Ignore complete lowmem entries */
361361
if (end <= max_low)

arch/xtensa/mm/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ static void __init free_highpages(void)
8989
/* set highmem page free */
9090
for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE,
9191
&range_start, &range_end, NULL) {
92-
unsigned long start = PHYS_PFN(range_start);
93-
unsigned long end = PHYS_PFN(range_end);
92+
unsigned long start = PFN_UP(range_start);
93+
unsigned long end = PFN_DOWN(range_end);
9494

9595
/* Ignore complete lowmem entries */
9696
if (end <= max_low)

0 commit comments

Comments
 (0)