]> www.infradead.org Git - users/hch/misc.git/commit
locking: Move common qspinlock helpers to a private header
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Sun, 16 Mar 2025 04:05:18 +0000 (21:05 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 19 Mar 2025 15:02:29 +0000 (08:02 -0700)
commitac08f68f1fe32326fbe60a02f9ff5f6749a35ab8
treefcb20d3e1c0b0e7b3bafde1e4b3a45e6752c60ab
parent8707d1eedcfbe85c4ff5191e233ddff01d39f4ba
locking: Move common qspinlock helpers to a private header

Move qspinlock helper functions that encode, decode tail word, set and
clear the pending and locked bits, and other miscellaneous definitions
and macros to a private header. To this end, create a qspinlock.h header
file in kernel/locking. Subsequent commits will introduce a modified
qspinlock slow path function, thus moving shared code to a private
header will help minimize unnecessary code duplication.

Reviewed-by: Barret Rhoden <brho@google.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20250316040541.108729-3-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/locking/qspinlock.c
kernel/locking/qspinlock.h [new file with mode: 0644]