Skip to content

rust: sync: Arc: Any downcasting and assume_init()

Asahi Lina asahi lkml rust-for-linux 2 versions – Applied

Status from this message: Applied to `rust-next`. Thanks!

Get series with b4
b4 am [email protected] change-id 20230224-rust-arc-ba3c26ed4e6a

Versions newest first

  1. v2 Latest2 patches 2 repliesApplied
  2. v12 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- #1: Moved the new function to a separate file, to keep the licensing clearer.
- #2: Replaced the safety comment with Benno's, from his pin-init series (we both wrote the same patch).
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2rust: sync: arc: Implement Arc<dyn Any + Send + Sync>::downcast()rust/kernel/sync/arc.rs rust/kernel/sync/arc/std_vendor.rs+30 -00 replies
2/2rust: sync: arc: Add UniqueArc<MaybeUninit<T>::assume_init()rust/kernel/sync/arc.rs+11 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMartin Rodriguez ReboredoAndreas HindborgVincenzo PalazzoGary GuoBenno Lossin
1/2R-b R-b R-b R-b
2/2R-b Co-authored-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/2] rust: sync: Arc: Any downcasting and assume_init()

Hi everyone,

This short series is part of the set of dependencies for the drm/asahi Apple M1/M2 GPU driver.

The two patches simply add two missing features to the kernel Arc implementation which are present in the Rust std version: Any downcasting and assume_init().

---
Changes in v2:
- #1: Moved the new function to a separate file, to keep the licensing clearer.
- #2: Replaced the safety comment with Benno's, from his pin-init series (we both wrote the same patch).
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Asahi Lina (2):
rust: sync: arc: Implement Arc<dyn Any + Send + Sync>::downcast()
rust: sync: arc: Add UniqueArc<MaybeUninit<T>::assume_init()

 rust/kernel/sync/arc.rs            | 13 +++++++++++++
 rust/kernel/sync/arc/std_vendor.rs | 28 ++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

---
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
change-id: 20230224-rust-arc-ba3c26ed4e6a

Thank you,
~~ Lina