[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240916213025.477225-1-lyude@redhat.com>
Date: Mon, 16 Sep 2024 17:28:03 -0400
From: Lyude Paul <lyude@...hat.com>
To: rust-for-linux@...r.kernel.org
Cc: Danilo Krummrich <dakr@...hat.com>,
airlied@...hat.com,
Ingo Molnar <mingo@...hat.com>,
Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...sung.com>,
Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>
Subject: [PATCH v6 0/3] rust: Add irq abstraction, SpinLockIrq
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
Powered by blists - more mailing lists