Skip to content

Commit 0899a62

Browse files
Gavin Shanctmarinas
authored andcommitted
arm64: Remove system_uses_lse_atomics()
There are two variants of system_uses_lse_atomics(), depending on CONFIG_ARM64_LSE_ATOMICS. The function isn't called anywhere when CONFIG_ARM64_LSE_ATOMICS is disabled. It can be directly replaced by alternative_has_cap_likely(ARM64_HAS_LSE_ATOMICS) when the kernel option is enabled. No need to keep system_uses_lse_atomics() and just remove it. Signed-off-by: Gavin Shan <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent dba2ff4 commit 0899a62

File tree

1 file changed

+1
-8
lines changed
  • arch/arm64/include/asm

1 file changed

+1
-8
lines changed

arch/arm64/include/asm/lse.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,9 @@
1616
#include <asm/atomic_lse.h>
1717
#include <asm/cpucaps.h>
1818

19-
static __always_inline bool system_uses_lse_atomics(void)
20-
{
21-
return alternative_has_cap_likely(ARM64_HAS_LSE_ATOMICS);
22-
}
23-
2419
#define __lse_ll_sc_body(op, ...) \
2520
({ \
26-
system_uses_lse_atomics() ? \
21+
alternative_has_cap_likely(ARM64_HAS_LSE_ATOMICS) ? \
2722
__lse_##op(__VA_ARGS__) : \
2823
__ll_sc_##op(__VA_ARGS__); \
2924
})
@@ -34,8 +29,6 @@ static __always_inline bool system_uses_lse_atomics(void)
3429

3530
#else /* CONFIG_ARM64_LSE_ATOMICS */
3631

37-
static inline bool system_uses_lse_atomics(void) { return false; }
38-
3932
#define __lse_ll_sc_body(op, ...) __ll_sc_##op(__VA_ARGS__)
4033

4134
#define ARM64_LSE_ATOMIC_INSN(llsc, lse) llsc

0 commit comments

Comments
 (0)