From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 802DF19A288; Fri, 24 Apr 2026 13:41:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777038063; cv=none; b=br6s7liB0nsiQLLBKUbPrpb0djFYp3qRYfzbtlkMbACoAK9ZQBhtMQrhImbQ2gSSzFNbY3f4jhlz2B/RWnCbQf2ZND9O95lZhVUf+STYNga/xuHt9vJFE9XzSL0BhFsNG7nR+DnAAimpbR9zmj5IYGGEyDqz53sI6/LTTFVPeog= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777038063; c=relaxed/simple; bh=RCx3PG0FYdfhcB07R9QKlxQsZ7rl8BTJJZuQDdwpm3o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iVz9dBKPsrdlnTtLLRZJ/jvcpOR5G8KJe+3W6n1kgEyBY0whlyWfS0l7gmLTbiky8t2mP/m/bbuVBvAQsKBkZxiHNrNIbS0Tck5qzYdOhqQsxo7IN9Nw9+r88A15DYReGufwlRlSOLsdVbasy/ugvuelPG2h6NeAOX8ncqSpaa8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OiXEOYlJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OiXEOYlJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 183B3C2BCB2; Fri, 24 Apr 2026 13:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777038063; bh=RCx3PG0FYdfhcB07R9QKlxQsZ7rl8BTJJZuQDdwpm3o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OiXEOYlJQGUl3oRa0caBkBivQzXhSPb3x/y1l6aAXrQHlG7BJbvcUDkfwsINbbXbJ E1JnuYonYt7Av582AI5eNElbiZW+lm6xyYHqekr93RMKOtGw4v1rE9kbhn0pWLVA8n FsiV6T7tI4dRykjFsiGnukKl9Y3+8uIDnT0tuOiw= 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 Subject: [PATCH 6.18 10/55] arm64: tlb: Allow XZR argument to TLBI ops Date: Fri, 24 Apr 2026 15:30:49 +0200 Message-ID: <20260424132432.247271226@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260424132430.006424517@linuxfoundation.org> References: <20260424132430.006424517@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-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 --- arch/arm64/include/asm/tlbflush.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -38,12 +38,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)