Re: [PATCH] arm64: mte: Skip TFSR_EL1 checks and barriers in synchronous tag check mode

From: Catalin Marinas

Date: Thu Apr 09 2026 - 14:35:08 EST


On Wed, 11 Mar 2026 17:50:50 +0000, Muhammad Usama Anjum wrote:
> In MTE synchronous mode, tag check faults are reported as immediate
> Data Abort exceptions. The TFSR_EL1.TF1 bit is never set, since faults
> never go through the asynchronous path. Therefore, reading TFSR_EL1
> and executing data and instruction barriers on kernel entry, exit,
> context switch, and suspend is unnecessary overhead in sync mode.
>
> The exit path (mte_check_tfsr_exit) and the assembly paths
> (check_mte_async_tcf / clear_mte_async_tcf in entry.S) already had this
> check. Extend the same optimization on kernel entry/exit, context
> switch and suspend.
>
> [...]

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

[1/1] arm64: mte: Skip TFSR_EL1 checks and barriers in synchronous tag check mode
https://git.kernel.org/arm64/c/249bf9733198