android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Linus Torvalds 88ceaf8e2c asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation
[ Upstream commit 125b0bb95dd6bec81b806b997a4ccb026eeecf8f ]

We really don't want to do atomic_read() or anything like that, since we
already have the value, not the lock.  The whole point of this is that
we've loaded the lock from memory, and we want to check whether the
value we loaded was a locked one or not.

The main use of this is the lockref code, which loads both the lock and
the reference count in one atomic operation, and then works on that
combined value.  With the atomic_read(), the compiler would pointlessly
spill the value to the stack, in order to then be able to read it back
"atomically".

This is the qspinlock version of commit c6f4a9002252 ("asm-generic:
ticket-lock: Optimize arch_spin_value_unlocked()") which fixed this same
bug for ticket locks.

Cc: Guo Ren <guoren@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Link: https://lore.kernel.org/all/CAHk-=whNRv0v6kQiV5QO6DJhjH4KEL36vWQ6Re8Csrnh4zbRkQ@mail.gmail.com/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-20 15:41:22 +01:00
..
acpi
asm-generic asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation 2023-12-20 15:41:22 +01:00
clocksource
crypto
drm drm/display/dp: Fix the DP DSC Receiver cap size 2023-08-30 16:27:26 +02:00
dt-bindings
keys
kvm
linux cred: switch to using atomic_long_t 2023-12-20 15:41:18 +01:00
math-emu
media media: v4l2-mem2mem: add lock to protect parameter num_rdy 2023-08-30 16:27:10 +02:00
misc
net net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX 2023-12-20 15:41:13 +01:00
pcmcia
ras
rdma
scsi scsi: core: Introduce the scsi_cmd_to_rq() function 2023-12-08 08:44:28 +01:00
soc firmware: raspberrypi: Introduce devm_rpi_firmware_get() 2023-05-17 11:35:52 +02:00
sound ALSA: pcm: Set per-card upper limit of PCM buffer allocations 2023-08-30 16:27:22 +02:00
target
trace neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section 2023-10-25 11:53:22 +02:00
uapi perf/core: Add a new read format to get a number of lost samples 2023-12-13 18:18:15 +01:00
vdso
video
xen dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00