mbox series

[v3,0/3] arm64: tlb: add support for TLBI RANGE instructions

Message ID 20200715071945.897-1-yezhenyu2@huawei.com (mailing list archive)
Headers show
Series arm64: tlb: add support for TLBI RANGE instructions | expand

Message

Zhenyu Ye July 15, 2020, 7:19 a.m. UTC
NOTICE: this series are based on the arm64 for-next/tlbi branch:
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/tlbi

ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a
range of input addresses. This series add support for this feature.

--
ChangeList:
v3:
- add check on whether binutils supports ARMv8.4-a instructions.
- pass -march=armv8.4-a to KBUILD_CFLAGS.
- make __TLBI_RANGE_PAGES to be 'unsigned long' explicitly.

v2:
- remove the __tlbi_last_level() macro.
- add check for parameters in __TLBI_VADDR_RANGE macro.

RFC patches:
- Link: https://lore.kernel.org/linux-arm-kernel/20200708124031.1414-1-yezhenyu2@huawei.com/


Zhenyu Ye (3):
  arm64: tlb: Detect the ARMv8.4 TLBI RANGE feature
  arm64: enable tlbi range instructions
  arm64: tlb: Use the TLBI RANGE feature in arm64

 arch/arm64/Kconfig                |  14 +++
 arch/arm64/Makefile               |   7 ++
 arch/arm64/include/asm/cpucaps.h  |   3 +-
 arch/arm64/include/asm/sysreg.h   |   3 +
 arch/arm64/include/asm/tlbflush.h | 156 ++++++++++++++++++++++++------
 arch/arm64/kernel/cpufeature.c    |  10 ++
 6 files changed, 163 insertions(+), 30 deletions(-)

Comments

Catalin Marinas July 15, 2020, 5:05 p.m. UTC | #1
On Wed, 15 Jul 2020 15:19:42 +0800, Zhenyu Ye wrote:
> NOTICE: this series are based on the arm64 for-next/tlbi branch:
> git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/tlbi
> 
> ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a
> range of input addresses. This series add support for this feature.
> 
> --
> ChangeList:
> v3:
> - add check on whether binutils supports ARMv8.4-a instructions.
> - pass -march=armv8.4-a to KBUILD_CFLAGS.
> - make __TLBI_RANGE_PAGES to be 'unsigned long' explicitly.
> 
> [...]

Applied to arm64 (for-next/tlbi), thanks!

[1/3] arm64: tlb: Detect the ARMv8.4 TLBI RANGE feature
      https://git.kernel.org/arm64/c/b620ba54547c
[2/3] arm64: enable tlbi range instructions
      https://git.kernel.org/arm64/c/7c78f67e9bd9
[3/3] arm64: tlb: Use the TLBI RANGE feature in arm64
      https://git.kernel.org/arm64/c/d1d3aa98b1d4

(I introduced a system_supports_tlb_range() to avoid the IS_ENABLED
twice)