Commit 61a2f1ae authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer

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: b10d6bca ("arch, drivers: replace for_each_membock() with for_each_mem_range()")
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Reviewed-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
parent 31b4d8e1
...@@ -262,8 +262,8 @@ static void __init bootmem_init(void) ...@@ -262,8 +262,8 @@ static void __init bootmem_init(void)
static void __init bootmem_init(void) static void __init bootmem_init(void)
{ {
phys_addr_t ramstart, ramend; phys_addr_t ramstart, ramend;
phys_addr_t start, end; unsigned long start, end;
u64 i; int i;
ramstart = memblock_start_of_DRAM(); ramstart = memblock_start_of_DRAM();
ramend = memblock_end_of_DRAM(); ramend = memblock_end_of_DRAM();
...@@ -300,7 +300,7 @@ static void __init bootmem_init(void) ...@@ -300,7 +300,7 @@ static void __init bootmem_init(void)
min_low_pfn = ARCH_PFN_OFFSET; min_low_pfn = ARCH_PFN_OFFSET;
max_pfn = PFN_DOWN(ramend); max_pfn = PFN_DOWN(ramend);
for_each_mem_range(i, &start, &end) { for_each_mem_pfn_range(i, MAX_NUMNODES, &start, &end, NULL) {
/* /*
* Skip highmem here so we get an accurate max_low_pfn if low * Skip highmem here so we get an accurate max_low_pfn if low
* memory stops short of high memory. * memory stops short of high memory.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment