summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-11-16 18:45:15 +0100
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-11-17 10:31:31 +0100
commit61a2f1aecf6052f7bcf900829ca2b9d74437ec07 (patch)
tree4f65019482e1620c76072dd38b68bfcf7f9dfa40
parent31b4d8e172f614adc53ddecb4b6b2f6411a49b84 (diff)
downloadlwn-61a2f1aecf6052f7bcf900829ca2b9d74437ec07.tar.gz
lwn-61a2f1aecf6052f7bcf900829ca2b9d74437ec07.zip
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: b10d6bca8720 ("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>
-rw-r--r--arch/mips/kernel/setup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 0d4253208bde..ca579deef939 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -262,8 +262,8 @@ static void __init bootmem_init(void)
static void __init bootmem_init(void)
{
phys_addr_t ramstart, ramend;
- phys_addr_t start, end;
- u64 i;
+ unsigned long start, end;
+ int i;
ramstart = memblock_start_of_DRAM();
ramend = memblock_end_of_DRAM();
@@ -300,7 +300,7 @@ static void __init bootmem_init(void)
min_low_pfn = ARCH_PFN_OFFSET;
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
* memory stops short of high memory.