Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: simplify fixmap code
@ 2023-03-14 14:21 Mark Rutland
  2023-03-14 14:21 ` [PATCH 1/2] arm64: mm: move fixmap code to its own file Mark Rutland
  2023-03-14 14:21 ` [PATCH 2/2] arm64: mm: always map fixmap at page granularity Mark Rutland
  0 siblings, 2 replies; 7+ messages in thread
From: Mark Rutland @ 2023-03-14 14:21 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: anshuman.khandual, ardb, catalin.marinas, mark.rutland,
	ryan.roberts, will

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-23 15:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 14:21 [PATCH 0/2] arm64: simplify fixmap code Mark Rutland
2023-03-14 14:21 ` [PATCH 1/2] arm64: mm: move fixmap code to its own file Mark Rutland
2023-03-14 14:21 ` [PATCH 2/2] arm64: mm: always map fixmap at page granularity Mark Rutland
2023-03-15 10:23   ` Ryan Roberts
2023-03-21 14:18     ` Mark Rutland
2023-03-21 14:34       ` Ryan Roberts
2023-03-23 15:24         ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox