Hi Geert,
Am 03.12.2018 um 20:49 schrieb Geert Uytterhoeven:
Hi Michael, Mike,
On Mon, Dec 3, 2018 at 5:53 AM Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
Am 03.12.2018 um 00:04 schrieb Mike Rapoport:
I don't know what were the shortcomings of the old memory model, and why
ST-RAM and FastRAM are treated differently, so probably the simplest way
would be just inform memblock that the ST-RAM is not available to it:
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c
index 7497cf3..0bda2c4 100644
--- a/arch/m68k/mm/motorola.c
+++ b/arch/m68k/mm/motorola.c
@@ -233,6 +233,7 @@ void __init paging_init(void)
printk("Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n",
m68k_memory[i].addr, m68k_memory[i].size);
printk("Fix your bootloader or use a memfile to make use of this area!\n");
+ memblock_remove(m68k_memory[i].addr, m68k_memory[i].size);
m68k_num_memory--;
memmove(m68k_memory + i, m68k_memory + i + 1,
(m68k_num_memory - i) * sizeof(struct m68k_mem_info));
Thanks, that's fixed it for me. Andreas?
Amigas with both Zorro III and Zorro II memory probably have a similar
issue, so I think we also need (gmail-whitespace-damaged):
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -427,6 +427,8 @@ void __init config_amiga(void)
continue;
}
disabled_z2mem += m68k_memory[i].size;
+ memblock_remove(m68k_memory[i].addr,
+ m68k_memory[i].size);
m68k_num_memory--;
for (j = i; j < m68k_num_memory; j++)
m68k_memory[j] = m68k_memory[j+1];
I thought Amigas can (and do) work around the memory ordering by using a
memfile, but on second thought, this is a separate issue. The effect of
removing the Zorro-II RAM here i.e. before paging_init() runs is the
same as removing it there, so this patch is indeed also needed.
Cheers,
Michael