aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-11-15 05:41:14 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2015-11-22 05:35:25 -0500
commitc73ec319339030a455e7641e7020fc14093a4153 (patch)
treec7f09985a34529fab528980e45c56d4280b828d7 /arch
parent4722b8feb0dc53a01a051f36846bef5a95d91a46 (diff)
m68k/mm: sun3 - Add missing initialization of max_pfn and {min,max}_low_pfn
If max_pfn is not initialized, the various /proc/kpage* files are empty, and selftests/vm/mlock2-tests will fail. max_pfn is also used by the block layer to calculate DMA masks. Switch from init_bootmem_node() to init_bootmem(), as there's only one memory node on Sun-3. This will initialize min_low_pfn and max_low_pfn, which was also not done before. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/m68k/sun3/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c
index a8b942bf7163..2a5f43a68ae3 100644
--- a/arch/m68k/sun3/config.c
+++ b/arch/m68k/sun3/config.c
@@ -118,13 +118,13 @@ static void __init sun3_bootmem_alloc(unsigned long memory_start,
118 memory_end = memory_end & PAGE_MASK; 118 memory_end = memory_end & PAGE_MASK;
119 119
120 start_page = __pa(memory_start) >> PAGE_SHIFT; 120 start_page = __pa(memory_start) >> PAGE_SHIFT;
121 num_pages = __pa(memory_end) >> PAGE_SHIFT; 121 max_pfn = num_pages = __pa(memory_end) >> PAGE_SHIFT;
122 122
123 high_memory = (void *)memory_end; 123 high_memory = (void *)memory_end;
124 availmem = memory_start; 124 availmem = memory_start;
125 125
126 m68k_setup_node(0); 126 m68k_setup_node(0);
127 availmem += init_bootmem_node(NODE_DATA(0), start_page, 0, num_pages); 127 availmem += init_bootmem(start_page, num_pages);
128 availmem = (availmem + (PAGE_SIZE-1)) & PAGE_MASK; 128 availmem = (availmem + (PAGE_SIZE-1)) & PAGE_MASK;
129 129
130 free_bootmem(__pa(availmem), memory_end - (availmem)); 130 free_bootmem(__pa(availmem), memory_end - (availmem));