mirror of https://gitee.com/openkylin/linux.git
m68k fixes for 4.20
- Fix memblock-related crashes. -----BEGIN PGP SIGNATURE----- iIsEABYIADMWIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCXBuvvRUcZ2VlcnRAbGlu dXgtbTY4ay5vcmcACgkQisJQ/WRJ8XAnaQD9FFT7gGm36B8tRirlxnkbMbJ4i0zA 9iNlWwYR0lwMIzEBAOROlTxaapSXzYqyuVpEMDqTw0W1Ym6iyrCUDmESvLUA =+Vsi -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
1d51b4b1d3
|
@ -164,8 +164,6 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
|
|||
be32_to_cpu(m->addr);
|
||||
m68k_memory[m68k_num_memory].size =
|
||||
be32_to_cpu(m->size);
|
||||
memblock_add(m68k_memory[m68k_num_memory].addr,
|
||||
m68k_memory[m68k_num_memory].size);
|
||||
m68k_num_memory++;
|
||||
} else
|
||||
pr_warn("%s: too many memory chunks\n",
|
||||
|
|
|
@ -228,6 +228,7 @@ void __init paging_init(void)
|
|||
|
||||
min_addr = m68k_memory[0].addr;
|
||||
max_addr = min_addr + m68k_memory[0].size;
|
||||
memblock_add(m68k_memory[0].addr, m68k_memory[0].size);
|
||||
for (i = 1; i < m68k_num_memory;) {
|
||||
if (m68k_memory[i].addr < min_addr) {
|
||||
printk("Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n",
|
||||
|
@ -238,6 +239,7 @@ void __init paging_init(void)
|
|||
(m68k_num_memory - i) * sizeof(struct m68k_mem_info));
|
||||
continue;
|
||||
}
|
||||
memblock_add(m68k_memory[i].addr, m68k_memory[i].size);
|
||||
addr = m68k_memory[i].addr + m68k_memory[i].size;
|
||||
if (addr > max_addr)
|
||||
max_addr = addr;
|
||||
|
|
Loading…
Reference in New Issue