m68k: mm: Extend table allocator for multiple sizes
authorPeter Zijlstra <peterz@infradead.org>
Fri, 31 Jan 2020 12:45:39 +0000 (13:45 +0100)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 10 Feb 2020 09:57:48 +0000 (10:57 +0100)
commit0e071ee6815692a3b241bbe9a9a29f7cdec023ed
treefa516f2a287d2f5315a98ebeeb472d46dc6f9ddc
parent61c64a25ae8df45c2cd2f76343e20c3d266382ea
m68k: mm: Extend table allocator for multiple sizes

In addition to the PGD/PMD table size (128*4) add a PTE table size
(64*4) to the table allocator. This completely removes the pte-table
overhead compared to the old code, even for dense tables.

Notes:

 - the allocator gained a list_empty() check to deal with there not
   being any pages at all.

 - the free mask is extended to cover more than the 8 bits required
   for the (512 byte) PGD/PMD tables.

 - NR_PAGETABLE accounting is restored.

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.882175409@infradead.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/include/asm/motorola_pgalloc.h
arch/m68k/mm/init.c
arch/m68k/mm/motorola.c