Thread (28 messages) 28 messages, 5 authors, 2024-08-26

[PATCH v3 0/3] rust: Add irq abstraction, SpinLockIrq

From: Lyude Paul <lyude@redhat.com>
Date: 2024-08-02 00:15:17
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help