mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Maurer <mmaurer@google.com>
To: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Sami Tolvanen" <samitolvanen@google.com>,
	"Timur Tabi" <ttabi@nvidia.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Dirk Beheme" <dirk.behme@de.bosch.com>
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	 Matthew Maurer <mmaurer@google.com>
Subject: [PATCH WIP 0/5] qcom-socinfo Rust Implementation
Date: Tue, 19 Aug 2025 23:12:31 +0000	[thread overview]
Message-ID: <20250819-qcom-socinfo-v1-0-e8d32cc81270@google.com> (raw)

THIS IS NOT A PROPOSAL TO LAND THIS SERIES

This is a demonstration of implementing a real driver that uses DebugFS,
primarily uploaded to serve as an example for API discussions on the
DebugFS series [1].

There are a number of rough edges (transmute, intra-module bindings) and
un-landed abstractions (SoC registration, randomness), but the main
purpose of this series is to look at sample usage of DebugFS in

* driver/soc/qcom/socinfo_rust/socinfo_rust_scoped.rs
* driver/soc/qcom/socinfo_rust/socinfo_rust_file.rs

to show how this would look in the two different APIs.

The example outputs byte-identical (as checked by recursive diff on
debugfs mounts) DebugFS files to the existing C driver. A real rewrite
would likely be simpler as it would be willing to not precisely mimic
newline quirks, etc.

[1] https://lore.kernel.org/all/20250819-debugfs-rust-v10-0-86e20f3cf3bb@google.com/

Signed-off-by: Matthew Maurer <mmaurer@google.com>
---
Matthew Maurer (5):
      rust: Add soc_device support
      rust: transmute: Cleanup + Fixes
      rust: Add support for feeding entropy to randomness pool
      soc: qcom: socinfo: `File`-based example
      soc: qcom: socinfo: `Scoped`-based example

 MAINTAINERS                                        |   1 +
 drivers/soc/qcom/Kconfig                           |  12 +
 drivers/soc/qcom/Makefile                          |   2 +
 drivers/soc/qcom/smem.c                            |   9 +
 drivers/soc/qcom/socinfo_rust/bindings.rs          | 126 +++++
 drivers/soc/qcom/socinfo_rust/data.rs              | 387 +++++++++++++++
 drivers/soc/qcom/socinfo_rust/socinfo_rust_file.rs | 538 +++++++++++++++++++++
 .../soc/qcom/socinfo_rust/socinfo_rust_scoped.rs   | 367 ++++++++++++++
 rust/bindings/bindings_helper.h                    |   8 +
 rust/kernel/lib.rs                                 |   4 +
 rust/kernel/rand.rs                                |  14 +
 rust/kernel/soc.rs                                 | 137 ++++++
 rust/kernel/transmute.rs                           | 126 +++--
 13 files changed, 1681 insertions(+), 50 deletions(-)
---
base-commit: f3c5631f70e434e318c44001e2417d4770f06cd0
change-id: 20250818-qcom-socinfo-c58407a81ac6
prerequisite-message-id: <20250811213851.65644-1-christiansantoslima21@gmail.com>
prerequisite-patch-id: 9448855f52cb137ad246ae5fde9eab12eac5da94
prerequisite-change-id: 20250428-debugfs-rust-3cd5c97eb7d1:v10
prerequisite-patch-id: 78c729bc8c164ce7a7c3ff841e720518a7f28c54
prerequisite-patch-id: ca7c06b342af0d1f5b03f8907206f8b69a189c9b
prerequisite-patch-id: f3e7541c4e907d874c8f303c2da14dd3aafe05f6
prerequisite-patch-id: e892f83de14710bea11f042ed874c05ccb3bc972
prerequisite-patch-id: ce8a5988c32a6491bc36e87fb33b2e9adf254db8
prerequisite-patch-id: 0762df7763820dd608da15dfbd8b5309d7692aa9
prerequisite-patch-id: 23da818045894ee8c6f2a7d8ade002ccfc96cc3a
prerequisite-patch-id: 2bfdaa7c29838c44d80003c623067051617f2b5e

Best regards,
-- 
Matthew Maurer <mmaurer@google.com>


             reply	other threads:[~2025-08-19 23:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 23:12 Matthew Maurer [this message]
2025-08-19 23:12 ` [PATCH WIP 1/5] rust: Add soc_device support Matthew Maurer
2025-08-19 23:12 ` [PATCH WIP 2/5] rust: transmute: Cleanup + Fixes Matthew Maurer
2025-08-19 23:12 ` [PATCH WIP 3/5] rust: Add support for feeding entropy to randomness pool Matthew Maurer
2025-08-19 23:12 ` [PATCH WIP 4/5] soc: qcom: socinfo: `File`-based example Matthew Maurer
2025-08-19 23:12 ` [PATCH WIP 5/5] soc: qcom: socinfo: `Scoped`-based example Matthew Maurer

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=20250819-qcom-socinfo-v1-0-e8d32cc81270@google.com \
    --to=mmaurer@google.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dirk.behme@de.bosch.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=samitolvanen@google.com \
    --cc=tmgross@umich.edu \
    --cc=ttabi@nvidia.com \
    /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

all inboxes | Powered by JetHome®