Commit 725e2d7e authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'locking-urgent-2023-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fixes from Ingo Molnar:
 "Fix a include/linux/atomic/atomic-arch-fallback.h breakage that
  generated incorrect code, and fix a lockdep reporting race that may
  result in lockups"

* tag 'locking-urgent-2023-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/seqlock: Do the lockdep annotation before locking in do_write_seqcount_begin_nested()
  locking/atomic: scripts: fix fallback ifdeffery
parents dc912ba9 41b43b6c
...@@ -459,8 +459,6 @@ raw_atomic_read_acquire(const atomic_t *v) ...@@ -459,8 +459,6 @@ raw_atomic_read_acquire(const atomic_t *v)
{ {
#if defined(arch_atomic_read_acquire) #if defined(arch_atomic_read_acquire)
return arch_atomic_read_acquire(v); return arch_atomic_read_acquire(v);
#elif defined(arch_atomic_read)
return arch_atomic_read(v);
#else #else
int ret; int ret;
...@@ -508,8 +506,6 @@ raw_atomic_set_release(atomic_t *v, int i) ...@@ -508,8 +506,6 @@ raw_atomic_set_release(atomic_t *v, int i)
{ {
#if defined(arch_atomic_set_release) #if defined(arch_atomic_set_release)
arch_atomic_set_release(v, i); arch_atomic_set_release(v, i);
#elif defined(arch_atomic_set)
arch_atomic_set(v, i);
#else #else
if (__native_word(atomic_t)) { if (__native_word(atomic_t)) {
smp_store_release(&(v)->counter, i); smp_store_release(&(v)->counter, i);
...@@ -2575,8 +2571,6 @@ raw_atomic64_read_acquire(const atomic64_t *v) ...@@ -2575,8 +2571,6 @@ raw_atomic64_read_acquire(const atomic64_t *v)
{ {
#if defined(arch_atomic64_read_acquire) #if defined(arch_atomic64_read_acquire)
return arch_atomic64_read_acquire(v); return arch_atomic64_read_acquire(v);
#elif defined(arch_atomic64_read)
return arch_atomic64_read(v);
#else #else
s64 ret; s64 ret;
...@@ -2624,8 +2618,6 @@ raw_atomic64_set_release(atomic64_t *v, s64 i) ...@@ -2624,8 +2618,6 @@ raw_atomic64_set_release(atomic64_t *v, s64 i)
{ {
#if defined(arch_atomic64_set_release) #if defined(arch_atomic64_set_release)
arch_atomic64_set_release(v, i); arch_atomic64_set_release(v, i);
#elif defined(arch_atomic64_set)
arch_atomic64_set(v, i);
#else #else
if (__native_word(atomic64_t)) { if (__native_word(atomic64_t)) {
smp_store_release(&(v)->counter, i); smp_store_release(&(v)->counter, i);
...@@ -4657,4 +4649,4 @@ raw_atomic64_dec_if_positive(atomic64_t *v) ...@@ -4657,4 +4649,4 @@ raw_atomic64_dec_if_positive(atomic64_t *v)
} }
#endif /* _LINUX_ATOMIC_FALLBACK_H */ #endif /* _LINUX_ATOMIC_FALLBACK_H */
// 202b45c7db600ce36198eb1f1fc2c2d5268ace2d // 2fdd6702823fa842f9cea57a002e6e4476ae780c
...@@ -512,8 +512,8 @@ do { \ ...@@ -512,8 +512,8 @@ do { \
static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass) static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass)
{ {
do_raw_write_seqcount_begin(s);
seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_); seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_);
do_raw_write_seqcount_begin(s);
} }
/** /**
......
...@@ -102,7 +102,7 @@ gen_proto_order_variant() ...@@ -102,7 +102,7 @@ gen_proto_order_variant()
fi fi
# Allow ACQUIRE/RELEASE/RELAXED ops to be defined in terms of FULL ops # Allow ACQUIRE/RELEASE/RELAXED ops to be defined in terms of FULL ops
if [ ! -z "${order}" ]; then if [ ! -z "${order}" ] && ! meta_is_implicitly_relaxed "${meta}"; then
printf "#elif defined(arch_${basename})\n" printf "#elif defined(arch_${basename})\n"
printf "\t${retstmt}arch_${basename}(${args});\n" printf "\t${retstmt}arch_${basename}(${args});\n"
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment