linux/rust/kernel/sync
Alice Ryhl ccf9e07011 rust: sync: Inline various lock related methods
While debugging a different issue [1], the following relocation was
noticed in the rust_binder.ko file:

	R_AARCH64_CALL26	_RNvXNtNtNtCsdfZWD8DztAw_6kernel4sync4lock8spinlockNtB2_15SpinLockBackendNtB4_7Backend6unlock

This relocation (and a similar one for lock) occurred many times
throughout the module. That is not really useful because all this
function does is call spin_unlock(), so what we actually want here is
that a call to spin_unlock() dirctly is generated in favor of this
wrapper method.

Thus, mark these methods inline.

[boqun: Reword the commit message a bit]

Link: https://lore.kernel.org/p/20251111-binder-fix-list-remove-v1-0-8ed14a0da63d@google.com
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20251218-inline-lock-unlock-v2-1-fbadac8bd61b@google.com
2026-01-10 10:53:46 +08:00
..
arc rust: provide proper code documentation titles 2024-10-07 21:39:57 +02:00
atomic rust: sync: atomic: Add atomic bool tests 2026-01-09 19:01:41 +08:00
lock rust: sync: Inline various lock related methods 2026-01-10 10:53:46 +08:00
arc.rs Rust changes for v6.18 2025-09-30 19:12:49 -07:00
aref.rs rust: sync: Implement Unpin for ARef 2026-01-09 19:01:40 +08:00
atomic.rs rust: sync: atomic: separate import "blocks" 2025-12-06 08:44:10 -08:00
barrier.rs rust: sync: Add memory barriers 2025-09-15 09:38:34 +02:00
completion.rs rust: completion: implement initial abstraction 2025-06-13 23:46:56 +02:00
condvar.rs Rust changes for v6.19 2025-12-03 14:16:49 -08:00
lock.rs rust: sync: Inline various lock related methods 2026-01-10 10:53:46 +08:00
locked_by.rs rust: sync: add missing newline in locked_by log example 2025-03-06 20:44:06 +01:00
poll.rs Scheduler updates for v6.17: 2025-07-29 17:42:52 -07:00
rcu.rs rust: sync: rcu: Mark Guard methods as inline 2025-05-16 09:00:54 -04:00
refcount.rs rust: block: convert block::mq to use Refcount 2025-09-15 09:38:36 +02:00
set_once.rs rust: sync: set_once: Implement Send and Sync 2026-01-09 19:01:40 +08:00