Currently trying to unmap a region results in slow and largely broken behaviour as we unnecessarily split blocks and manually set thousands of individual 4k pages instead of higher level blocks.
This series fixes the behaviour of set_one_region() so that it works properly when called to unmap regions. See patch 4 for details. Patches 1 & 2 improve the existing debug functionality, the pagetable dumper will now print most explicitly unmapped regions (since they still have their PA intact), as well as adding a new function which does a very basic software TLB lookup to help with debugging. Patch 3 de-duplicates some code by moving the loop that always surrounds set_one_region() calls into its own function, this also helps with readability in the calling functions. Changes in v3: - Reworked entirely to be correct, v2 would cause unrelated pages to get updated too if the region was inside a block. - Added additional patches with debugging improvements and code cleanup - V2: https://lore.kernel.org/u-boot/[email protected]/ --- Casey Connolly (4): armv8: mmu: add a function to help debug TLB lookups armv8: mmu: teach the pagetable dumper to show explicit FAULT maps armv8: mmu: commonize the set_one_region() loop armv8: mmu: fix and optimise explicitly unmapping regions arch/arm/cpu/armv8/cache_v8.c | 172 +++++++++++++++++++++++---------------- arch/arm/include/asm/armv8/mmu.h | 7 ++ 2 files changed, 107 insertions(+), 72 deletions(-) --- base-commit: bb0f3eebb3c196d9b6efbbd1e5aa9b16abbb9ad6 // Casey (she/they)

