diff options
author | Vineet Gupta <vgupta@kernel.org> | 2018-09-04 16:11:29 -0700 |
---|---|---|
committer | Vineet Gupta <vgupta@kernel.org> | 2021-08-24 14:25:47 -0700 |
commit | cea43147905f1c2b7b48104a5304cf5229f45bec (patch) | |
tree | dfbe07ea6a98e506ce05ad8138dff5b0f66e5f42 /arch/arc/kernel | |
parent | b64be6836993c431e54fad239fcba0543854ee35 (diff) |
ARC: switch to generic bitops
- !LLSC now only needs a single spinlock for atomics and bitops
- Some codegen changes (slight bloat) with generic bitops
1. code increase due to LD-check-atomic paradigm vs. unconditonal
atomic (but dirty'ing the cache line even if set already).
So despite increase, generic is right thing to do.
2. code decrease (but use of costlier instructions such as DIV vs.
shifts based math) due to signed arithmetic.
This needs to be revisited seperately.
arc:
static inline int test_bit(unsigned int nr, const volatile unsigned long *addr)
^^^^^^^^^^^^
generic:
static inline int test_bit(int nr, const volatile unsigned long *addr)
^^^
Link: https://lore.kernel.org/r/20180830135749.GA13005@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
[vgupta: wrote patch based on Will's poc, analysed codegen diffs]
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r-- | arch/arc/kernel/smp.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index b5b5fe2c6e1e..78e6d069b1c1 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c @@ -29,10 +29,8 @@ #ifndef CONFIG_ARC_HAS_LLSC arch_spinlock_t smp_atomic_ops_lock = __ARCH_SPIN_LOCK_UNLOCKED; -arch_spinlock_t smp_bitops_lock = __ARCH_SPIN_LOCK_UNLOCKED; EXPORT_SYMBOL_GPL(smp_atomic_ops_lock); -EXPORT_SYMBOL_GPL(smp_bitops_lock); #endif struct plat_smp_ops __weak plat_smp_ops; |