diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-01-31 13:45:38 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2020-02-10 10:57:48 +0100 |
commit | 61c64a25ae8df45c2cd2f76343e20c3d266382ea (patch) | |
tree | 5429aa4d674960c388cf23d3be026bda006d157a /arch/m68k/include/asm/motorola_pgtable.h | |
parent | ef9285f69f0efbc75d01cbb09fe65882effd0a25 (diff) |
m68k: mm: Use table allocator for pgtables
With the new page-table layout, using full (4k) pages for (256 byte)
pte-tables is immensely wastefull. Move the pte-tables over to the
same allocator already used for the (512 byte) higher level tables
(pgd/pmd).
This reduces the pte-table waste from 15x to 2x.
Due to no longer being bound to 16 consecutive tables, this might
actually already be more efficient than the old code for sparse
tables.
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.825295149@infradead.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/include/asm/motorola_pgtable.h')
-rw-r--r-- | arch/m68k/include/asm/motorola_pgtable.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/motorola_pgtable.h b/arch/m68k/include/asm/motorola_pgtable.h index 2ad0f4166841..4b91a470ad58 100644 --- a/arch/m68k/include/asm/motorola_pgtable.h +++ b/arch/m68k/include/asm/motorola_pgtable.h @@ -144,7 +144,13 @@ static inline void pud_set(pud_t *pudp, pmd_t *pmdp) #define pmd_bad(pmd) ((pmd_val(pmd) & _DESCTYPE_MASK) != _PAGE_TABLE) #define pmd_present(pmd) (pmd_val(pmd) & _PAGE_TABLE) #define pmd_clear(pmdp) ({ pmd_val(*pmdp) = 0; }) -#define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd))) + +/* + * m68k does not have huge pages (020/030 actually could), but generic code + * expects pmd_page() to exists, only to then DCE it all. Provide a dummy to + * make the compiler happy. + */ +#define pmd_page(pmd) NULL #define pud_none(pud) (!pud_val(pud)) |