linux/arch/m68k/mm
Peter Zijlstra ef22d8abd8 m68k: mm: Restructure Motorola MMU page-table layout
The Motorola 68xxx MMUs, 040 (and later) have a fixed 7,7,{5,6}
page-table setup, where the last depends on the page-size selected (8k
vs 4k resp.), and head.S selects 4K pages. For 030 (and earlier) we
explicitly program 7,7,6 and 4K pages in %tc.

However, the current code implements this mightily weird. What it does
is group 16 of those (6 bit) pte tables into one 4k page to not waste
space. The down-side is that that forces pmd_t to be a 16-tuple
pointing to consecutive pte tables.

This breaks the generic code which assumes READ_ONCE(*pmd) will be
word sized.

Therefore implement a straight forward 7,7,6 3 level page-table setup,
with the addition (for 020/030) of (partial) large-page support. For
now this increases the memory footprint for pte-tables 15 fold.

Tested with ARAnyM/68040 emulation.

Suggested-by: Will Deacon <will@kernel.org>
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.711478295@infradead.org
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-02-10 10:57:48 +01:00
..
cache.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fault.c signal: Remove the task parameter from force_sig_fault 2019-05-29 09:31:43 -05:00
hwtest.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
init.c m68k: mm: use pgtable-nopXd instead of 4level-fixup 2019-12-04 19:44:15 -08:00
kmap.c m68k: mm: Restructure Motorola MMU page-table layout 2020-02-10 10:57:48 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mcfmmu.c m68k: mm: use pgtable-nopXd instead of 4level-fixup 2019-12-04 19:44:15 -08:00
memory.c m68k: mm: Move the pointer table allocator to motorola.c 2020-02-10 10:57:48 +01:00
motorola.c m68k: mm: Restructure Motorola MMU page-table layout 2020-02-10 10:57:48 +01:00
sun3kmap.c m68k/mm: sun3 - Modernize printing of kernel messages 2017-02-12 10:36:53 +01:00
sun3mmu.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00