]> www.infradead.org Git - users/hch/block.git/commit
arm64: tlb: Improve __TLBI_VADDR_RANGE()
authorGavin Shan <gshan@redhat.com>
Fri, 5 Apr 2024 03:58:51 +0000 (13:58 +1000)
committerWill Deacon <will@kernel.org>
Thu, 11 Apr 2024 10:42:57 +0000 (11:42 +0100)
commite07255d69702bc9131427fda8f9749355b10780f
treef2a13fceb112103b69156034278cdb13a170a548
parente3ba51ab24fddef79fc212f9840de54db8fd1685
arm64: tlb: Improve __TLBI_VADDR_RANGE()

The macro returns the operand of TLBI RANGE instruction. A mask needs
to be applied to each individual field upon producing the operand, to
avoid the adjacent fields can interfere with each other when invalid
arguments have been provided. The code looks more tidy at least with
a mask and FIELD_PREP().

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Link: https://lore.kernel.org/r/20240405035852.1532010-3-gshan@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/tlbflush.h