Skip to content

rust: Add local_irq abstraction, SpinLockIrq

Lyude Paul lkml rust-for-linux 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 2 repliesIn review
  2. v73 patches 1 replySuperseded
  3. v63 patches 36 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v53 patches9 repliesSuperseded
v43 patches3 repliesSuperseded
v33 patches24 repliesSuperseded
v23 patches14 repliesSuperseded
v13 patches19 repliesSuperseded

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rust: Introduce local_irq modulerust/helpers/helpers.c rust/helpers/irq.c rust/kernel/lib.rs +1 more+66 -01 reply
2/3rust: sync: Introduce lock::Backend::Context and lock::BackendWithContextrust/kernel/sync/lock.rs rust/kernel/sync/lock/mutex.rs rust/kernel/sync/lock/spinlock.rs+115 -51 reply
3/3rust: sync: Add SpinLockIrqrust/helpers/spinlock.c rust/kernel/sync.rs rust/kernel/sync/lock/spinlock.rs+164 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH v8 0/3] rust: Add local_irq abstraction, SpinLockIrq

This adds a token for annotating contexts where IRQs may be disabled on non-PREEMPT_RT kernels, a way to use these tokens with Lock types, and introduces bindings for spin_lock_irqsave() and spin_unlock_irqrestore().

This patch series depends on the NotThreadSafe type from Alice:

https://lore.kernel.org/rust-for-linux/[email protected]/

(Please re-review, since there's been some changes here!)

Lyude Paul (3):
rust: Introduce local_irq module
rust: sync: Introduce lock::Backend::Context and
lock::BackendWithContext
rust: sync: Add SpinLockIrq

 rust/helpers/helpers.c            |   1 +
 rust/helpers/irq.c                |   8 ++
 rust/helpers/spinlock.c           |  14 +++
 rust/kernel/lib.rs                |   1 +
 rust/kernel/local_irq.rs          |  56 +++++++++++
 rust/kernel/sync.rs               |   2 +-
 rust/kernel/sync/lock.rs          | 118 ++++++++++++++++++++++-
 rust/kernel/sync/lock/mutex.rs    |   1 +
 rust/kernel/sync/lock/spinlock.rs | 150 ++++++++++++++++++++++++++++++
 9 files changed, 345 insertions(+), 6 deletions(-)
 create mode 100644 rust/helpers/irq.c
 create mode 100644 rust/kernel/local_irq.rs

base-commit: 6ce162a002657910104c7a07fb50017681bc476c
prerequisite-patch-id: 4e3cfb97c9dc94e99912e67f383497848ac6f81d

Signature · 1 line
2.47.0