diff mbox series

arm64: atomics: lse: remove stale dependency on JUMP_LABEL

Message ID 20221114125424.2998268-1-mark.rutland@arm.com (mailing list archive)
State New, archived
Headers show
Series arm64: atomics: lse: remove stale dependency on JUMP_LABEL | expand

Commit Message

Mark Rutland Nov. 14, 2022, 12:54 p.m. UTC
Currently CONFIG_ARM64_USE_LSE_ATOMICS depends upon CONFIG_JUMP_LABEL,
as the inline atomics were indirected with a static branch.

However, since commit:

  21fb26bfb01ffe0d ("arm64: alternatives: add alternative_has_feature_*()")

... we use an alternative_branch (which is always available) rather than
a static branch, and hence the dependency is unnecessary.

Remove the stale dependency, along with the stale include. This will
allow the use of LSE atomics in kernels built with CONFIG_JUMP_LABEL=n,
and reduces the risk of circular header dependencies via <asm/lse.h>.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
---
 arch/arm64/Kconfig           | 1 -
 arch/arm64/include/asm/lse.h | 1 -
 2 files changed, 2 deletions(-)

Comments

Will Deacon Nov. 14, 2022, 7:34 p.m. UTC | #1
On Mon, 14 Nov 2022 12:54:24 +0000, Mark Rutland wrote:
> Currently CONFIG_ARM64_USE_LSE_ATOMICS depends upon CONFIG_JUMP_LABEL,
> as the inline atomics were indirected with a static branch.
> 
> However, since commit:
> 
>   21fb26bfb01ffe0d ("arm64: alternatives: add alternative_has_feature_*()")
> 
> [...]

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

[1/1] arm64: atomics: lse: remove stale dependency on JUMP_LABEL
      https://git.kernel.org/arm64/c/657eef0a5420

Cheers,
Oleksandr Tymoshenko May 3, 2024, 1:45 a.m. UTC | #2
Hello,

Since all dependencies for this patch are available in 6.1 can it
be backported to the 6.1 LTS?
diff mbox series

Patch

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 505c8a1ccbe0..6a4704d4e36b 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1714,7 +1714,6 @@  config ARM64_LSE_ATOMICS
 
 config ARM64_USE_LSE_ATOMICS
 	bool "Atomic instructions"
-	depends on JUMP_LABEL
 	default y
 	help
 	  As part of the Large System Extensions, ARMv8.1 introduces new
diff --git a/arch/arm64/include/asm/lse.h b/arch/arm64/include/asm/lse.h
index c503db8e73b0..f99d74826a7e 100644
--- a/arch/arm64/include/asm/lse.h
+++ b/arch/arm64/include/asm/lse.h
@@ -10,7 +10,6 @@ 
 
 #include <linux/compiler_types.h>
 #include <linux/export.h>
-#include <linux/jump_label.h>
 #include <linux/stringify.h>
 #include <asm/alternative.h>
 #include <asm/alternative-macros.h>