[PATCH 0/2] arm64: simplify fixmap code
Mark Rutland
mark.rutland at arm.com
Tue Mar 14 07:21:23 PDT 2023
Currently arm64's fixmap code tries to use 2M blocks to map the FDT when
4K pages are in use. We do so for a number of historical reasons largely
boiling down to "it was simpler at the time", but there's no functional
or performance reason why we must use 2M block mappings for the FDT, and
using 2M blocks complicates the code and causes some potential issues
(e.g. mismatched aliases with memory surrounding the FDT).
These patches change the fixmap code to always map the FDT at page
granularity. This makes the code simpler, and gets rid of potential
issues. The first patch fators the fixmap code out into a separate file,
adding a few lines due to includes and function prototypes. The second
patch makes the actual strucutural changes to simplify the code.
I've botted tested this atop v6.3-rc2 using both 4K and 64K pages.
Thanks,
Mark.
Mark Rutland (2):
arm64: mm: move fixmap code to its own file
arm64: mm: always map fixmap at page granularity
arch/arm64/include/asm/fixmap.h | 15 +-
arch/arm64/include/asm/kernel-pgtable.h | 5 +-
arch/arm64/include/asm/mmu.h | 2 +
arch/arm64/mm/Makefile | 2 +-
arch/arm64/mm/fixmap.c | 203 ++++++++++++++++++++++++
arch/arm64/mm/mmu.c | 197 +----------------------
6 files changed, 219 insertions(+), 205 deletions(-)
create mode 100644 arch/arm64/mm/fixmap.c
--
2.30.2
More information about the linux-arm-kernel
mailing list