rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/3] rust: Add irq abstraction, SpinLockIrq
@ 2024-09-16 21:28 Lyude Paul
  2024-09-16 21:28 ` [PATCH v6 1/3] rust: Introduce irq module Lyude Paul
                   ` (4 more replies)
  0 siblings, 5 replies; 75+ messages in thread
From: Lyude Paul @ 2024-09-16 21:28 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

This series depends on
https://lore.kernel.org/rust-for-linux/ZuKNszXSw-LbgW1e@boqun-archlinux/

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                |  96 +++++++++++++++++++++++++++
 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, 242 insertions(+), 3 deletions(-)
 create mode 100644 rust/helpers/irq.c
 create mode 100644 rust/kernel/irq.rs


base-commit: a2f11547052001bd448ccec81dd1e68409078fbb
prerequisite-patch-id: 926565461e47df321ce1bed92894cc1f265896ef
-- 
2.46.0


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

end of thread, other threads:[~2025-07-24 21:59 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 21:28 [PATCH v6 0/3] rust: Add irq abstraction, SpinLockIrq Lyude Paul
2024-09-16 21:28 ` [PATCH v6 1/3] rust: Introduce irq module Lyude Paul
2024-09-29 20:36   ` Trevor Gross
2024-09-29 23:45   ` Boqun Feng
2024-10-02 20:20   ` Thomas Gleixner
2024-10-04  8:58     ` Benno Lossin
2024-10-04 17:18       ` Lyude Paul
2024-10-17 18:51       ` Lyude Paul
2024-10-04 17:02     ` Lyude Paul
2024-10-10 21:00   ` Daniel Almeida
2024-09-16 21:28 ` [PATCH v6 2/3] rust: sync: Introduce lock::Backend::Context Lyude Paul
2024-09-29 20:40   ` Trevor Gross
2024-09-29 23:52   ` Boqun Feng
2024-09-16 21:28 ` [PATCH v6 3/3] rust: sync: Add SpinLockIrq Lyude Paul
2024-09-29 20:50   ` Trevor Gross
2024-09-29 23:59   ` Boqun Feng
2024-10-02 20:53   ` Thomas Gleixner
2024-10-03 12:51     ` Boqun Feng
2024-10-04 18:48     ` Lyude Paul
2024-10-05 18:19       ` Lyude Paul
2024-10-07 12:42         ` Boqun Feng
2024-10-07 18:13           ` Lyude Paul
2024-10-15 12:57           ` Andreas Hindborg
2024-10-15 20:17             ` Boqun Feng
2024-10-15 20:21               ` Boqun Feng
2024-10-16 20:57                 ` Lyude Paul
2024-10-17 13:34                   ` Andreas Hindborg
2024-10-07 12:01       ` Thomas Gleixner
2024-10-07 18:30         ` Lyude Paul
2024-10-08 15:21           ` Thomas Gleixner
2024-10-12  8:01             ` Boqun Feng
2024-10-10 16:39 ` [PATCH v6 0/3] rust: Add irq abstraction, SpinLockIrq Daniel Almeida
2024-10-12  5:29 ` Dirk Behme
2024-10-13 19:06   ` Thomas Gleixner
2024-10-13 21:43     ` Boqun Feng
2024-10-16 21:00       ` Thomas Gleixner
2024-10-16 21:31         ` Boqun Feng
2024-10-17 20:49           ` Lyude Paul
2024-10-17 22:27             ` Boqun Feng
2024-10-18  5:51           ` [POC 0/6] Allow SpinLockIrq to use a normal Guard interface Boqun Feng
2024-10-18  5:51             ` [POC 1/6] irq & spin_lock: Add counted interrupt disabling/enabling Boqun Feng
2024-10-21  7:04               ` kernel test robot
2024-10-21  7:35               ` kernel test robot
2024-10-21 20:44               ` Lyude Paul
2024-10-24 16:18                 ` Peter Zijlstra
2024-10-23 19:34               ` Thomas Gleixner
2024-10-23 19:51                 ` Peter Zijlstra
2024-10-23 20:38                   ` Thomas Gleixner
2024-10-24 10:05                     ` Peter Zijlstra
2024-10-24 17:22                       ` Thomas Gleixner
2024-10-24 21:57                         ` Boqun Feng
2024-10-25 15:04                           ` Thomas Gleixner
2024-10-25 18:28                             ` Peter Zijlstra
2024-10-24 19:12                       ` Lyude Paul
2025-07-24 20:36                   ` w/r/t "irq & spin_lock: Add counted interrupt disabling/enabling": holes in pcpu_hot? Lyude Paul
2025-07-24 21:59                     ` Thomas Gleixner
2024-10-24  5:05                 ` [POC 1/6] irq & spin_lock: Add counted interrupt disabling/enabling Boqun Feng
2024-10-24  8:17                   ` Thomas Gleixner
2024-10-24 16:20                     ` Boqun Feng
2024-10-18  5:51             ` [POC 2/6] rust: Introduce interrupt module Boqun Feng
2024-10-31 20:45               ` Lyude Paul
2024-10-31 20:47                 ` Lyude Paul
2024-10-18  5:51             ` [POC 3/6] rust: helper: Add spin_{un,}lock_irq_{enable,disable}() helpers Boqun Feng
2024-10-18  5:51             ` [POC 4/6] rust: sync: Add SpinLockIrq Boqun Feng
2024-10-18 19:23               ` Lyude Paul
2024-10-18 20:22                 ` Boqun Feng
2024-10-18  5:51             ` [POC 5/6] rust: sync: Introduce lock::Backend::Context Boqun Feng
2024-10-31 20:54               ` Lyude Paul
2024-10-18  5:51             ` [POC 6/6] rust: sync: lock: Add `Backend::BackendInContext` Boqun Feng
2024-10-18 10:22             ` [POC 0/6] Allow SpinLockIrq to use a normal Guard interface Andreas Hindborg
2024-10-18 12:42               ` Boqun Feng
2024-10-18 11:16             ` Andreas Hindborg
2024-10-18 16:05               ` Dirk Behme
2024-10-31 20:56             ` Lyude Paul
2024-10-17 20:42         ` [PATCH v6 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).