linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] arm64: Replace TLB invalidation preprocessor macros with C functions
@ 2025-07-11 16:17 Will Deacon
  2025-07-11 16:17 ` [PATCH 01/10] arm64: mm: Introduce a C wrapper for by-level TLB invalidation helpers Will Deacon
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Will Deacon @ 2025-07-11 16:17 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, Will Deacon, Ard Biesheuvel, Catalin Marinas,
	Ryan Roberts, Mark Rutland, Linus Torvalds, Oliver Upton,
	Marc Zyngier

Hi all,

I cooked this series following a complaint from Linus back in March
about our range-based TLB invalidation macro after we fixed an
over-invalidation bug thanks to incorrect handling of its arguments:

  https://lore.kernel.org/all/CAHk-=wgiX0q0WCL+SFwVCYtG7JR3=2Rshse-5J3AO2Y4AgT7Jw@mail.gmail.com/

Once I started trying to rework the range macro into a C function, I
spotted a few other opportunities for cleanup and so I've ended up with
this series.

Testing and feedback welcome.

Cheers,

Will

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Marc Zyngier <maz@kernel.org>

--->8

Will Deacon (10):
  arm64: mm: Introduce a C wrapper for by-level TLB invalidation helpers
  arm64: mm: Introduce a C wrapper for by-range TLB invalidation helpers
  arm64: mm: Implicitly invalidate user ASID based on TLBI operation
  arm64: mm: Remove unused 'tlbi_user' argument from
    __flush_tlb_range_op()
  arm64: mm: Re-implement the __tlbi_level macro in C
  arm64: mm: Simplify __TLBI_RANGE_NUM() macro
  arm64: mm: Push __TLBI_VADDR() into __tlbi_level()
  arm64: mm: Inline __TLBI_VADDR_RANGE() into __tlbi_range()
  arm64: mm: Simplify __flush_tlb_range_limit_excess()
  arm64: mm: Re-implement the __flush_tlb_range_op macro in C

 arch/arm64/include/asm/tlbflush.h | 230 ++++++++++++++++++------------
 arch/arm64/kernel/sys_compat.c    |   2 +-
 arch/arm64/kvm/hyp/nvhe/mm.c      |   2 +-
 arch/arm64/kvm/hyp/pgtable.c      |   4 +-
 4 files changed, 140 insertions(+), 98 deletions(-)

-- 
2.50.0.727.gbf7dc18ff4-goog



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

end of thread, other threads:[~2025-07-15  5:44 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 16:17 [PATCH 00/10] arm64: Replace TLB invalidation preprocessor macros with C functions Will Deacon
2025-07-11 16:17 ` [PATCH 01/10] arm64: mm: Introduce a C wrapper for by-level TLB invalidation helpers Will Deacon
2025-07-14  8:38   ` Ryan Roberts
2025-07-11 16:17 ` [PATCH 02/10] arm64: mm: Introduce a C wrapper for by-range " Will Deacon
2025-07-14  8:26   ` Ryan Roberts
2025-07-11 16:17 ` [PATCH 03/10] arm64: mm: Implicitly invalidate user ASID based on TLBI operation Will Deacon
2025-07-14  8:44   ` Ryan Roberts
2025-07-14  9:46     ` Ryan Roberts
2025-07-11 16:17 ` [PATCH 04/10] arm64: mm: Remove unused 'tlbi_user' argument from __flush_tlb_range_op() Will Deacon
2025-07-11 16:17 ` [PATCH 05/10] arm64: mm: Re-implement the __tlbi_level macro in C Will Deacon
2025-07-14  9:02   ` Ryan Roberts
2025-07-11 16:17 ` [PATCH 06/10] arm64: mm: Simplify __TLBI_RANGE_NUM() macro Will Deacon
2025-07-14  9:06   ` Ryan Roberts
2025-07-15  5:13   ` Dev Jain
2025-07-11 16:17 ` [PATCH 07/10] arm64: mm: Push __TLBI_VADDR() into __tlbi_level() Will Deacon
2025-07-11 16:17 ` [PATCH 08/10] arm64: mm: Inline __TLBI_VADDR_RANGE() into __tlbi_range() Will Deacon
2025-07-14  9:17   ` Ryan Roberts
2025-07-11 16:17 ` [PATCH 09/10] arm64: mm: Simplify __flush_tlb_range_limit_excess() Will Deacon
2025-07-14  9:30   ` Ryan Roberts
2025-07-15  5:38     ` Dev Jain
2025-07-11 16:17 ` [PATCH 10/10] arm64: mm: Re-implement the __flush_tlb_range_op macro in C Will Deacon
2025-07-11 18:16   ` Linus Torvalds
2025-07-13 13:35     ` Will Deacon
2025-07-14  9:44   ` Ryan Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).