rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gary Guo <gary@garyguo.net>
To: Lyude Paul <lyude@redhat.com>
Cc: rust-for-linux@vger.kernel.org,
	"Danilo Krummrich" <dakr@redhat.com>,
	airlied@redhat.com, "Ingo Molnar" <mingo@redhat.com>,
	"Will Deacon" <will@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@samsung.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>
Subject: Re: [PATCH v5 0/3] rust: Add irq abstraction, SpinLockIrq
Date: Sat, 14 Sep 2024 17:18:36 +0100	[thread overview]
Message-ID: <20240914171836.6afbbe78.gary@garyguo.net> (raw)
In-Reply-To: <20240912190540.53221-1-lyude@redhat.com>

On Thu, 12 Sep 2024 15:04:15 -0400
Lyude Paul <lyude@redhat.com> wrote:

> 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

With the invariant documentation of `IrqDisabled` fixed:

Reviewed-by: Gary Guo <gary@garyguo.net>

      parent reply	other threads:[~2024-09-14 16:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240914171836.6afbbe78.gary@garyguo.net \
    --to=gary@garyguo.net \
    --cc=a.hindborg@samsung.com \
    --cc=airlied@redhat.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=lyude@redhat.com \
    --cc=mingo@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tmgross@umich.edu \
    --cc=wedsonaf@gmail.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).