Skip to content

Commit 61a2f1a

Browse files
committed
MIPS: kernel: Fix for_each_memblock conversion
The loop over all memblocks works with PFNs and not physical addresses, so we need for_each_mem_pfn_range(). Fixes: b10d6bc ("arch, drivers: replace for_each_membock() with for_each_mem_range()") Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
1 parent 31b4d8e commit 61a2f1a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/mips/kernel/setup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ static void __init bootmem_init(void)
262262
static void __init bootmem_init(void)
263263
{
264264
phys_addr_t ramstart, ramend;
265-
phys_addr_t start, end;
266-
u64 i;
265+
unsigned long start, end;
266+
int i;
267267

268268
ramstart = memblock_start_of_DRAM();
269269
ramend = memblock_end_of_DRAM();
@@ -300,7 +300,7 @@ static void __init bootmem_init(void)
300300

301301
min_low_pfn = ARCH_PFN_OFFSET;
302302
max_pfn = PFN_DOWN(ramend);
303-
for_each_mem_range(i, &start, &end) {
303+
for_each_mem_pfn_range(i, MAX_NUMNODES, &start, &end, NULL) {
304304
/*
305305
* Skip highmem here so we get an accurate max_low_pfn if low
306306
* memory stops short of high memory.

0 commit comments

Comments
 (0)