From nobody Sun Feb 8 05:37:34 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 1C4D2315D3E for ; Tue, 23 Dec 2025 11:07:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766488063; cv=none; b=P3jMYd41hLC2pq45W2qGnH4dvoodkxLgsNwDE+l0AA2leBvqm1c8FYq/hhRxDUwlmxoemYvhOhs2pkBD3LJ/s25z1261HFr/3JC9Udxrw/bMFK8TNbz1v6myib2pDVS7IBDqU2ms2dbJztLYTwARZ2fN9jbJHCNV8sdAzmZnqTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766488063; c=relaxed/simple; bh=ZSyke85YPxTSIfFJuV2SGg90/yVv72oYZRxGZyVemXA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FfZ98zeRRrmE/H5SqGCsNAhxxNW7a2J07lo8dWmUQuraJsX5SGQmnkQYsWMrjVPUQyxQxZvbL8NOk/hms8m2hlvA6CfcEARXPOoNgp9TT4hwK/RuH6wV0rVF+9SkN/0aQ+QEjlukEnLL/0BODKgygU3Uhaq1aZZ5wZEQAgqVtOo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SWu/QYSL; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=OcLcswP5; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SWu/QYSL"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="OcLcswP5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1766488059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MueTHjJz1MUqVwC1Z42zQoG8AmO3MZUaIIU3E1xfDt4=; b=SWu/QYSLAavkEkMFN/Uucjc4a3YABi9LSqHWHQ6xSMAWC+kx4uCfNY1Njm0va5ZJY2zq2V hlWW9w/85aPEorGIu5Z8mmBTqJjLOFd407taKvRFbr/O66F1kMQUl1N/4o911f0nJrTMZy 09NbEhN+FZRFZX2tAFdJ/3emp09BPEI= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-190-bKBVfIf2N6auig0NF9DWpg-1; Tue, 23 Dec 2025 06:07:37 -0500 X-MC-Unique: bKBVfIf2N6auig0NF9DWpg-1 X-Mimecast-MFC-AGG-ID: bKBVfIf2N6auig0NF9DWpg_1766488056 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-477771366cbso32056895e9.0 for ; Tue, 23 Dec 2025 03:07:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1766488056; x=1767092856; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MueTHjJz1MUqVwC1Z42zQoG8AmO3MZUaIIU3E1xfDt4=; b=OcLcswP5w++dzl4QsJM2WixOs991U0kJo3cLQxqldlhNcg8Y1lvRD0myLcZnhK+EMY XMs4OjFCCxwgxR3p7UggebKIuyDdHYXI/C8ZilCq22JSzwF6119AEFsw2j6UoLsVZKFO +cy4ubiIiU/E0NmSKOqMCsaXvJKzBC3Eq75Dc/zjDEZ0p9p5Gi7013fxwP4Wx9M1P2K0 0etAYd7RnBuYPkeTrHLJOW2OO2bgNQEAT7pT+6KzQEnISNW0CpeYALbTpPPk7sDqoq69 KNF6Nr0wWQ2gU5O9nbGmf+IhpNizQ/6I293gk699yJjvgb02vly+m9hN5NeyEQcoj/S7 cetg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766488056; x=1767092856; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MueTHjJz1MUqVwC1Z42zQoG8AmO3MZUaIIU3E1xfDt4=; b=jt6QmcRVM59OfqNmN38uBDP0D5UWmkIyaS1mp8/PcvhLmFKTj3vo9weFt+qy+/VjKs 0u/WcjitIpD30nO5OF4GY3D+Y66snnEw208Lttx9d04pDs+YBIatE/NlKUftz3HBPdz/ WwL0DNj4pJatYR9ikhQMht5t4XKX7iH0Sda6CJr9zODlFxA7IGtNXhYbXLmuTh45Pa95 rEcqD7WGPSHsW2sbuCQ4W7xZZeoMpfwUnipq24w4niJ4C30kIR3FqIRn2Yw/CfU7fej9 6/Ildi7C2qkxLwq5OP2de56ELEtE2QXYtojuhPaHEnLNHei1wTr4X78rXPVVuTMnNvox RUEA== X-Forwarded-Encrypted: i=1; AJvYcCXR/wBfAD2/gnrd0kImx2J6j4pFowNjA+Cts2WLumI3skLiTv/vb94AUYIaVm/Zbsy/Q141kPFmDYyvKWE=@vger.kernel.org X-Gm-Message-State: AOJu0YwBe1vc0hgocbpuODNg+GdqWyij/US6zdK1uB2cKrR3tzQhVpqz QcuH1kN8s1OSZ147YqXhDbNb+d0yfSlINrjkLQxbQ045/GB35Cbu7/zn0z6BG9Up5sPFOGecNXT uLxgRlY7ArOVCBB6TRwk88H9pijyhGvzVE8uRw7WhaiJyaTNqP8yNEWr9oK9xbgTO7A== X-Gm-Gg: AY/fxX5Aee4ypkmQdfdoUzOxRQOn7i3d3W52bGJD2tzZ+BmwNoa3bGRzHItH23cnI13 vP6H+7/2+pYxKBZENHJCOhOp8znruhVZjUX7BVG6P5ZE/sbJpmRGbelPz5BGjlgFB6Elw+owdhq ksotOigz47n7jy6kc2B2WOsvDfLH6g2y7SfzKfl5qnnuuytrETEH41I0p5ZDUW8C+EMB+nqPCey yxMOj3GX4Ec59AD63C2tARfJg6GEa5Gt5dsT+VKXeE5egkqV0qMAm5GUviyGu/tLGKDY08c6mYi Hs6tBFiEp4xATUY61sOVNshJfVMkZoJvdRQm6P5boRB0ZwDufSqTs02tGLI4H6twRcglBbT7bWb GVP1Ky/OAD897dQow/DTtI/qnbnz6xI2u7+Ad0PdGRSKFlT6oUEKDa3S+PWQ= X-Received: by 2002:a05:600c:6388:b0:477:7b16:5f88 with SMTP id 5b1f17b1804b1-47d1953345cmr125349765e9.6.1766488056269; Tue, 23 Dec 2025 03:07:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdGGtBa3hQA5jZUcQ3Uf3/GwrAQNNoAzyxpHojdJYdt3xnSt88zf6PWkdODE0mU8D/O2ZGoQ== X-Received: by 2002:a05:600c:6388:b0:477:7b16:5f88 with SMTP id 5b1f17b1804b1-47d1953345cmr125349485e9.6.1766488055878; Tue, 23 Dec 2025 03:07:35 -0800 (PST) Received: from lbulwahn-thinkpadx1carbongen12.rmtde.csb ([2a02:810d:7e01:ef00:1622:5a48:afdc:799f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be3a33c1csm125461535e9.1.2025.12.23.03.07.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 03:07:35 -0800 (PST) From: Lukas Bulwahn X-Google-Original-From: Lukas Bulwahn To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Cc: Mark Rutland , Arnd Bergmann , Vegard Nossum , Kees Cook , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH] arm64: Kconfig: deprecate redundant ARM64_USE_LSE_ATOMICS Date: Tue, 23 Dec 2025 12:07:30 +0100 Message-ID: <20251223110730.121239-1-lukas.bulwahn@redhat.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Lukas Bulwahn Currently, the config options ARM64_USE_LSE_ATOMICS and ARM64_LSE_ATOMICS are equivalent, i.e., ARM64_LSE_ATOMICS is true if and only if ARM64_USE_LSE_ATOMICS is true. Prior to commit 395af861377d ("arm64: Move the LSE gas support detection to Kconfig")---included in v5.6-rc1---only the config option ARM64_LSE_ATOMICS was defined, and the check for gas support was done in the Makefile. This mentioned commit then introduces the config option ARM64_USE_LSE_ATOMICS to be the promptable option, and changes the semantics of ARM64_LSE_ATOMICS to check for the gas support. Note that there is then some minor refactoring in commit 2decad92f473 ("arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically"), putting this gas support check into its own config option AS_HAS_LSE_ATOMICS, but the logic remains the same. Since every binutils version defined suitable for kernel compilation then eventually included the required support, the config option AS_HAS_LSE_ATOMICS and the dependency was dropped with commit 2555d4c68720 ("arm64: drop binutils version checks"). This then makes ARM64_USE_LSE_ATOMICS and ARM64_LSE_ATOMICS equivalent. Hence, one of the two config options can be dropped now. Considerations for the decision which config option to drop: - ARM64_USE_LSE_ATOMICS is promptable by the user since its introduction in 2020. So there might be some Kconfig fragments that define this config option and expect that this then implies ARM64_LSE_ATOMICS to be set. However, within the kernel tree, there is no existing config file referring to that option. So, it is unlikely to be widely used. - ARM64_LSE_ATOMICS is used in nine places within the arm64 directory in the current kernel tree. - ARM64_USE_LSE_ATOMICS is the only config option that contains the infix string _USE_ to enable support and use of an arm64 architectural feature. However, there is not a very stringent and consistent naming convention for Kconfig options throughout the kernel tree anyway. - The use of the transitional attribute allows to simplify transitioning to a different Kconfig symbol name, but also adds some intermediate definition to be removed later eventually. After thoughtful consideration, keep ARM_LSE_ATOMICS and remove ARM64_USE_LSE_ATOMICS in a two-step approach, first deprecate ARM64_USE_LSE_ATOMICS with the transitional attribute here and then plan to completely remove it in two or three years with a further dedicated commit then. Signed-off-by: Lukas Bulwahn --- CC-ing Vegard and Kees to check that the use of the transitional attribute is done as it is intended. =20 Note I have set myself a reminder in my personal calendar for three years in the future from now to remove the transitional Kconfig definition, assuming by then all users that maintain their Kconfig fragments with ARM64_USE_LSE_ATOMICS included have transitioned (if such users exist at all). arch/arm64/Kconfig | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 3fb4603c0e16..e113555ef6cd 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1875,11 +1875,8 @@ config ARM64_PAN instruction if the cpu does not implement the feature. =20 config ARM64_LSE_ATOMICS - bool - default ARM64_USE_LSE_ATOMICS - -config ARM64_USE_LSE_ATOMICS bool "Atomic instructions" + default ARM64_USE_LSE_ATOMICS default y help As part of the Large System Extensions, ARMv8.1 introduces new @@ -1890,6 +1887,13 @@ config ARM64_USE_LSE_ATOMICS atomic routines. This incurs a small overhead on CPUs that do not support these instructions. =20 +config ARM64_USE_LSE_ATOMICS + bool + transitional + help + Transitional config for ARM64_USE_LSE_ATOMICS to ARM64_LSE_ATOMICS + migration. + endmenu # "ARMv8.1 architectural features" =20 menu "ARMv8.2 architectural features" --=20 2.52.0