diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-01-31 13:45:37 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2020-02-10 10:57:48 +0100 |
commit | ef9285f69f0efbc75d01cbb09fe65882effd0a25 (patch) | |
tree | 79be6657cea036325005b2be529dac70299383e8 /arch/m68k/mm/init.c | |
parent | ef22d8abd876e805b604e8f655127de2beee2869 (diff) | |
download | linux-ef9285f69f0efbc75d01cbb09fe65882effd0a25.tar.gz linux-ef9285f69f0efbc75d01cbb09fe65882effd0a25.tar.bz2 linux-ef9285f69f0efbc75d01cbb09fe65882effd0a25.zip |
m68k: mm: Improve kernel_page_table()
With the PTE-tables now only being 256 bytes, allocating a full page
for them is a giant waste. Start by improving the boot time allocator
such that init_mm initialization will at least have optimal memory
density.
Much thanks to Will Deacon in help with debugging and ferreting out
lost information on these dusty MMUs.
Notes:
- _TABLE_MASK is reduced to account for the shorter (256 byte)
alignment of pte-tables, per the manual, table entries should only
ever have state in the low 4 bits (Used,WrProt,Desc1,Desc0) so it is
still longer than strictly required. (Thanks Will!!!)
- Also use kernel_page_table() for the 020/030 zero_pgtable case and
consequently remove the zero_pgtable init hack (will fix up later).
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will@kernel.org>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Tested-by: Greg Ungerer <gerg@linux-m68k.org>
Link: https://lore.kernel.org/r/20200131125403.768263973@infradead.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mm/init.c')
-rw-r--r-- | arch/m68k/mm/init.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index 27c453f4fffe..a9b6d26cff8a 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c @@ -42,7 +42,6 @@ EXPORT_SYMBOL(empty_zero_page); #if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) extern void init_pointer_table(unsigned long ptable); -extern pmd_t *zero_pgtable; #endif #ifdef CONFIG_MMU @@ -135,10 +134,6 @@ static inline void init_pointer_tables(void) if (pud_present(*pud)) init_pointer_table(pgd_page_vaddr(kernel_pg_dir[i])); } - - /* insert also pointer table that we used to unmap the zero page */ - if (zero_pgtable) - init_pointer_table((unsigned long)zero_pgtable); #endif } |