aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/smp.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@kernel.org>2018-09-04 16:11:29 -0700
committerVineet Gupta <vgupta@kernel.org>2021-08-24 14:25:47 -0700
commitcea43147905f1c2b7b48104a5304cf5229f45bec (patch)
treedfbe07ea6a98e506ce05ad8138dff5b0f66e5f42 /arch/arc/kernel/smp.c
parentARC: atomics: implement relaxed variants (diff)
downloadlinux-dev-cea43147905f1c2b7b48104a5304cf5229f45bec.tar.xz
linux-dev-cea43147905f1c2b7b48104a5304cf5229f45bec.zip
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/smp.c')
-rw-r--r--arch/arc/kernel/smp.c2
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;