rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] rust: Add irq abstraction, SpinLockIrq
@ 2024-08-02  0:09 Lyude Paul
  2024-08-02  0:10 ` [PATCH v3 1/3] rust: Introduce irq module Lyude Paul
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Lyude Paul @ 2024-08-02  0:09 UTC (permalink / raw)
  To: rust-for-linux, linux-kernel
  Cc: Danilo Krummrich, airlied, Ingo Molnar, Will Deacon, Waiman Long,
	Peter Zijlstra, Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl

This adds a simple interface for disabling and enabling CPUs, along with
the ability to mark a function as expecting interrupts be disabled -
along with adding bindings for spin_lock_irqsave/spin_lock_irqrestore().

Current example usecase (very much WIP driver) in rvkms:

https://gitlab.freedesktop.org/lyudess/linux/-/commits/rvkms-example-08012024

specifically drivers/gpu/drm/rvkms/crtc.rs

(The kunit tests also compile)

Lyude Paul (3):
  rust: Introduce irq module
  rust: sync: Introduce lock::Backend::Context
  rust: sync: Add SpinLockIrq

 rust/helpers.c                    |  22 +++++++
 rust/kernel/irq.rs                |  84 ++++++++++++++++++++++++
 rust/kernel/lib.rs                |   1 +
 rust/kernel/sync.rs               |   2 +-
 rust/kernel/sync/lock.rs          |  17 ++++-
 rust/kernel/sync/lock/mutex.rs    |   1 +
 rust/kernel/sync/lock/spinlock.rs | 105 ++++++++++++++++++++++++++++++
 7 files changed, 229 insertions(+), 3 deletions(-)
 create mode 100644 rust/kernel/irq.rs


base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b
-- 
2.45.2


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2024-08-26 15:35 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02  0:09 [PATCH v3 0/3] rust: Add irq abstraction, SpinLockIrq Lyude Paul
2024-08-02  0:10 ` [PATCH v3 1/3] rust: Introduce irq module Lyude Paul
2024-08-14 17:10   ` Boqun Feng
2024-08-14 17:35   ` Boqun Feng
2024-08-14 19:38     ` Lyude Paul
2024-08-14 20:17       ` Boqun Feng
2024-08-14 20:44         ` Benno Lossin
2024-08-14 20:57           ` Boqun Feng
2024-08-15  4:53             ` Boqun Feng
2024-08-15  6:40               ` Benno Lossin
2024-08-15 16:02                 ` Boqun Feng
2024-08-15 21:05                   ` Lyude Paul
2024-08-15 21:31                     ` Lyude Paul
2024-08-15 21:46                       ` Benno Lossin
2024-08-15 22:13                         ` Lyude Paul
2024-08-16 15:28                           ` Boqun Feng
2024-08-15 21:41                     ` Benno Lossin
2024-08-15 21:43                       ` Lyude Paul
2024-08-15 20:31         ` Lyude Paul
2024-08-15 21:48           ` Benno Lossin
2024-08-26 11:21   ` Dirk Behme
2024-08-26 14:21     ` Boqun Feng
2024-08-26 14:59       ` Dirk Behme
2024-08-26 15:34         ` Boqun Feng
2024-08-02  0:10 ` [PATCH v3 2/3] rust: sync: Introduce lock::Backend::Context Lyude Paul
2024-08-20 10:26   ` Dirk Behme
2024-08-02  0:10 ` [PATCH v3 3/3] rust: sync: Add SpinLockIrq Lyude Paul
2024-08-13 20:26 ` [PATCH v3 0/3] rust: Add irq abstraction, SpinLockIrq Lyude Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).