From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09C2F47CC75; Tue, 16 Jun 2026 17:38:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781631533; cv=none; b=uaEx1oXfV07/6E3MVD89rVDibj+D1onaBSQFnoxerQ/Cuhfv1UBU3OO/879f5IsgEmiJ/QfWXNQqDjenl/3FTeD0EUC46YvozzofcZZIpngPUMwG7yTRjZg9ogU6fmo1Aep3tY6gZb3OLv3SWlOEKvmAl1SpP39mbyikEqdbEWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781631533; c=relaxed/simple; bh=8mnfP17HscjIIEIsOOtfBvg9kFRU2L4WJo7U83fwRRE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rqPKMRX4548hwk+uPaeAVg6q/dgoRv9s+OZ5MjZIR964JDrYTP6Lf/BWZMcqAsR2fl3Nxe1aSLPZB5Er9/UqXiOaJ3tY1c9yhoz4A9LvdN2TyURoyP8brZoPRIXYcbAayww7aMFPLwntz0Tafc8FP16K/CUrcIJ4wz7ITAJqIQU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uUmtDHRb; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uUmtDHRb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09BD91F000E9; Tue, 16 Jun 2026 17:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781631531; bh=aVe+bkfgqYHF2uO1aqoQCKKI4ycNpFFkGB+QK4UmvrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uUmtDHRbYtjBiqbFC2510aOIn0uoBXZjlcp3I/P6VT1JCqq2ZGNXYW9wccIL4WhAz zARDXYNNtxhTloij0QKOQp7mdXEuATlGcFjmZ7FriiGr60Xf5MK+WeiX9MzIv7Dsl0 FmgXqj1pQ/e97WZ5HUn4+au0zI9JfJpdOMscXM2M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mark Rutland , Catalin Marinas , Marc Zyngier , Oliver Upton , Ryan Roberts , Will Deacon , Sasha Levin Subject: [PATCH 6.1 237/522] arm64: tlb: Allow XZR argument to TLBI ops Date: Tue, 16 Jun 2026 20:26:24 +0530 Message-ID: <20260616145137.073017364@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145125.307082728@linuxfoundation.org> References: <20260616145125.307082728@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mark Rutland commit bfd9c931d19aa59fb8371d557774fa169b15db9a upstream. The TLBI instruction accepts XZR as a register argument, and for TLBI operations with a register argument, there is no functional difference between using XZR or another GPR which contains zeroes. Operations without a register argument are encoded as if XZR were used. Allow the __TLBI_1() macro to use XZR when a register argument is all zeroes. Today this only results in a trivial code saving in __do_compat_cache_op()'s workaround for Neoverse-N1 erratum #1542419. In subsequent patches this pattern will be used more generally. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Marc Zyngier Cc: Oliver Upton Cc: Ryan Roberts Cc: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Greg Kroah-Hartman [Mark: Backport to v6.1.y] Signed-off-by: Mark Rutland Signed-off-by: Sasha Levin --- arch/arm64/include/asm/tlbflush.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index 412a3b9a3c25dc..2626a45849c241 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -37,12 +37,12 @@ : : ) #define __TLBI_1(op, arg) asm (ARM64_ASM_PREAMBLE \ - "tlbi " #op ", %0\n" \ + "tlbi " #op ", %x0\n" \ ALTERNATIVE("nop\n nop", \ - "dsb ish\n tlbi " #op ", %0", \ + "dsb ish\n tlbi " #op ", %x0", \ ARM64_WORKAROUND_REPEAT_TLBI, \ CONFIG_ARM64_WORKAROUND_REPEAT_TLBI) \ - : : "r" (arg)) + : : "rZ" (arg)) #define __TLBI_N(op, arg, n, ...) __TLBI_##n(op, arg) -- 2.53.0