mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 00/22] ARM: mmu: refactor 32-bit and 64-bit code
@ 2025-08-06 12:36 Ahmad Fatoum
  2025-08-06 12:36 ` [PATCH 01/22] ARM: mmu: introduce new maptype_t type Ahmad Fatoum
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: Ahmad Fatoum @ 2025-08-06 12:36 UTC (permalink / raw)
  To: barebox

There is duplication and subtle differences between the 32-bit and
64-bit MMU code for historical reasons.

Let's refactor the code for more similarity, implement
flush_cacheable_pages for 32-bit and prepare for observing
break-before-make requirements.

Ahmad Fatoum (22):
  ARM: mmu: introduce new maptype_t type
  ARM: mmu: compare only lowest 16 bits for map type
  ARM: mmu: prefix pre-MMU functions with early_
  ARM: mmu: panic when alloc_pte fails
  ARM: mmu32: introduce new mmu_addr_t type
  ARM: mmu: provide zero page control in PBL
  ARM: mmu: print map type as string
  ARM: mmu64: rename create_sections to __arch_remap_range
  ARM: mmu: move get_pte_attrs call into __arch_remap_range
  ARM: mmu64: print debug message in __arch_remap_range
  ARM: mmu: make force_pages a maptype_t flag
  ARM: mmu64: move granule_size to the top of the file
  ARM: mmu64: fix benign off-by-one in flush_cacheable_pages
  ARM: mmu64: make flush_cacheable_pages less 64-bit dependent
  ARM: mmu64: allow asserting last level page in __find_pte
  ARM: mmu64: rename __find_pte to find_pte
  ARM: mmu32: rework find_pte to have ARM64 find_pte semantics
  ARM: mmu64: factor out flush_cacheable_pages for reusability
  ARM: mmu32: flush only cacheable pages on remap
  ARM: mmu32: factor out set_pte_range helper
  ARM: mmu64: factor out set_pte_range helper
  ARM: mmu: define dma_alloc_writecombine in common code

 arch/arm/cpu/Makefile                |   2 +-
 arch/arm/cpu/flush_cacheable_pages.h |  77 +++++
 arch/arm/cpu/mmu-common.c            |  23 +-
 arch/arm/cpu/mmu-common.h            |  29 +-
 arch/arm/cpu/mmu_32.c                | 237 +++++++++-----
 arch/arm/cpu/mmu_32.h                |   2 +
 arch/arm/cpu/mmu_64.c                | 445 ++++++++++++---------------
 arch/arm/cpu/mmu_64.h                |   2 +
 arch/arm/include/asm/mmu.h           |   2 +-
 arch/powerpc/cpu-85xx/mmu.c          |   4 +-
 arch/powerpc/include/asm/mmu.h       |   2 +-
 commands/memtest.c                   |   8 +-
 include/linux/types.h                |   2 +
 include/mmu.h                        |  25 +-
 include/zero_page.h                  |   2 +-
 15 files changed, 509 insertions(+), 353 deletions(-)
 create mode 100644 arch/arm/cpu/flush_cacheable_pages.h

-- 
2.39.5




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

end of thread, other threads:[~2025-08-07  7:25 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-06 12:36 [PATCH 00/22] ARM: mmu: refactor 32-bit and 64-bit code Ahmad Fatoum
2025-08-06 12:36 ` [PATCH 01/22] ARM: mmu: introduce new maptype_t type Ahmad Fatoum
2025-08-06 12:36 ` [PATCH 02/22] ARM: mmu: compare only lowest 16 bits for map type Ahmad Fatoum
2025-08-06 12:36 ` [PATCH 03/22] ARM: mmu: prefix pre-MMU functions with early_ Ahmad Fatoum
2025-08-06 12:36 ` [PATCH 04/22] ARM: mmu: panic when alloc_pte fails Ahmad Fatoum
2025-08-06 12:36 ` [PATCH 05/22] ARM: mmu32: introduce new mmu_addr_t type Ahmad Fatoum
2025-08-06 12:36 ` [PATCH 06/22] ARM: mmu: provide zero page control in PBL Ahmad Fatoum
2025-08-06 12:36 ` [PATCH 07/22] ARM: mmu: print map type as string Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 08/22] ARM: mmu64: rename create_sections to __arch_remap_range Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 09/22] ARM: mmu: move get_pte_attrs call into __arch_remap_range Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 10/22] ARM: mmu64: print debug message in __arch_remap_range Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 11/22] ARM: mmu: make force_pages a maptype_t flag Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 12/22] ARM: mmu64: move granule_size to the top of the file Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 13/22] ARM: mmu64: fix benign off-by-one in flush_cacheable_pages Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 14/22] ARM: mmu64: make flush_cacheable_pages less 64-bit dependent Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 15/22] ARM: mmu64: allow asserting last level page in __find_pte Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 16/22] ARM: mmu64: rename __find_pte to find_pte Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 17/22] ARM: mmu32: rework find_pte to have ARM64 find_pte semantics Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 18/22] ARM: mmu64: factor out flush_cacheable_pages for reusability Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 19/22] ARM: mmu32: flush only cacheable pages on remap Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 20/22] ARM: mmu32: factor out set_pte_range helper Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 21/22] ARM: mmu64: " Ahmad Fatoum
2025-08-06 12:37 ` [PATCH 22/22] ARM: mmu: define dma_alloc_writecombine in common code Ahmad Fatoum
2025-08-07  7:24 ` [PATCH 00/22] ARM: mmu: refactor 32-bit and 64-bit code Sascha Hauer

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