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

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

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

 rust/helpers/helpers.c            |   1 +
 rust/helpers/irq.c                |  22 +++++++
 rust/kernel/irq.rs                |  90 +++++++++++++++++++++++++
 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 ++++++++++++++++++++++++++++++
 8 files changed, 236 insertions(+), 3 deletions(-)
 create mode 100644 rust/helpers/irq.c
 create mode 100644 rust/kernel/irq.rs


base-commit: 93dc3be19450447a3a7090bd1dfb9f3daac3e8d2
-- 
2.46.0


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

end of thread, other threads:[~2024-09-14 16:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12 19:04 [PATCH v5 0/3] rust: Add irq abstraction, SpinLockIrq Lyude Paul
2024-09-12 19:04 ` [PATCH v5 1/3] rust: Introduce irq module Lyude Paul
2024-09-13 13:33   ` Benno Lossin
2024-09-13 15:48   ` Daniel Almeida
2024-09-14 16:13   ` Gary Guo
2024-09-12 19:04 ` [PATCH v5 2/3] rust: sync: Introduce lock::Backend::Context Lyude Paul
2024-09-13 14:14   ` Benno Lossin
2024-09-13 15:49   ` Daniel Almeida
2024-09-12 19:04 ` [PATCH v5 3/3] rust: sync: Add SpinLockIrq Lyude Paul
2024-09-13 14:15   ` Benno Lossin
2024-09-13 15:49   ` Daniel Almeida
2024-09-13 15:49 ` [PATCH v5 0/3] rust: Add irq abstraction, SpinLockIrq Daniel Almeida
2024-09-14 16:18 ` Gary Guo

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).