summaryrefslogtreecommitdiff
path: root/rust/kernel/sync/completion.rs
AgeCommit message (Collapse)Author
13 daysrust: workqueue: replace deprecated system_wq with system_{percpu,dfl}_wqDanilo Krummrich
system_wq is deprecated and triggers a runtime warning: [ 0.857414] workqueue: work func ...WorkItemPointerKy0_E3runB7_ enqueued on deprecated workqueue. Use system_{percpu|dfl}_wq instead. Replace system() with system_percpu() and system_dfl(), to match the previous behavior of the deprecated system() and convert doc examples and tests to system_dfl(). system_unbound_wq is deprecated in the same way, in favor of system_dfl_wq. Since system_unbound() has no users, just remove it as well. Fixes: 64d8eae3f895 ("workqueue: Add warnings and fallback if system_{unbound}_wq is used") Signed-off-by: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Boqun Feng <boqun@kernel.org> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn> Signed-off-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Gary Guo <gary@garyguo.net> Acked-by: Marco Crivellari <marco.crivellari@suse.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://patch.msgid.link/20261014-rust-workqueue-system-fix-v2-1-c018b8f870f9@google.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-06-09rust: sync: completion: Mark inline complete_all and wait_for_completionFabricio Parra
When building the kernel using the llvm-22.1.0-rust-1.93.1-x86_64 toolchain provided by kernel.org with ARCH=x86_64, the following symbols are generated: $ nm vmlinux | grep ' _R'.*Completion | rustfilt ffffffff81827930 T <kernel::sync::completion::Completion>::complete_all ffffffff81827950 T <kernel::sync::completion::Completion>::wait_for_completion These Rust methods are thin wrappers around the C completion helpers `complete_all` and `wait_for_completion`. Mark them `#[inline]` to keep the wrapper pattern consistent with other small Rust helper methods. After applying this patch, the above command will produce no output. Suggested-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Fabricio Parra <a@alice0.com> Signed-off-by: Boqun Feng <boqun@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://github.com/Rust-for-Linux/linux/issues/1145 Link: https://patch.msgid.link/20260316151056.287-1-a@alice0.com Link: https://patch.msgid.link/20260605052331.1628-4-boqun@kernel.org
2025-06-13rust: completion: implement initial abstractionDanilo Krummrich
Implement a minimal abstraction for the completion synchronization primitive. This initial abstraction only adds complete_all() and wait_for_completion(), since that is what is required for the subsequent Devres patch. Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ben Segall <bsegall@google.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Valentin Schneider <vschneid@redhat.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Acked-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20250612121817.1621-2-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>