Skip to content

Commit 1d51b4b

Browse files
committed
Merge tag 'm68k-for-v4.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k fix from Geert Uytterhoeven: "Fix memblock-related crashes" * tag 'm68k-for-v4.20-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Fix memblock-related crashes
2 parents c0f3ece + bed1369 commit 1d51b4b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/m68k/kernel/setup_mm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
164164
be32_to_cpu(m->addr);
165165
m68k_memory[m68k_num_memory].size =
166166
be32_to_cpu(m->size);
167-
memblock_add(m68k_memory[m68k_num_memory].addr,
168-
m68k_memory[m68k_num_memory].size);
169167
m68k_num_memory++;
170168
} else
171169
pr_warn("%s: too many memory chunks\n",

arch/m68k/mm/motorola.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ void __init paging_init(void)
228228

229229
min_addr = m68k_memory[0].addr;
230230
max_addr = min_addr + m68k_memory[0].size;
231+
memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
231232
for (i = 1; i < m68k_num_memory;) {
232233
if (m68k_memory[i].addr < min_addr) {
233234
printk("Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n",
@@ -238,6 +239,7 @@ void __init paging_init(void)
238239
(m68k_num_memory - i) * sizeof(struct m68k_mem_info));
239240
continue;
240241
}
242+
memblock_add(m68k_memory[i].addr, m68k_memory[i].size);
241243
addr = m68k_memory[i].addr + m68k_memory[i].size;
242244
if (addr > max_addr)
243245
max_addr = addr;

0 commit comments

Comments
 (0)