From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>, "Miguel Ojeda" <ojeda@kernel.org>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>
Cc: linux-pm@vger.kernel.org,
"Vincent Guittot" <vincent.guittot@linaro.org>,
"Stephen Boyd" <sboyd@kernel.org>, "Nishanth Menon" <nm@ti.com>,
rust-for-linux@vger.kernel.org,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Erik Schilling" <erik.schilling@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Joakim Bech" <joakim.bech@linaro.org>,
"Rob Herring" <robh@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [RFC PATCH V2 0/8] Rust bindings for cpufreq and OPP core + sample driver
Date: Fri, 7 Jun 2024 14:42:15 +0530 [thread overview]
Message-ID: <cover.1717750631.git.viresh.kumar@linaro.org> (raw)
Hello,
This RFC adds initial rust bindings for two subsystems, cpufreq and operating
performance points (OPP). The bindings are provided for most of the interface
these subsystems expose.
This series also provides a sample cpufreq driver rcpufreq-dt, which is a
duplicate of the merged cpufreq-dt driver (A generic platform agnostic device
tree based cpufreq driver) used on most of the ARM platforms.
This is tested with the help of QEMU for now and frequency transitions and
configurations work as expected. No performance measurement is done as of now
with this.
These patches (along with few other dependencies) are pushed here for anyone to
give them a try:
git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/linux.git rust/cpufreq-dt
This depends on basic bindings for few other modules: device/driver, platform
driver, OF, clk, and cpumask. I am not looking to upstream a full fledged
support for them yet.
Based staging/rust-device from the Rust tree (which is based over v6.10-rc1).
V1->V2:
- Create and use separate bindings for OF, clk, cpumask, etc (not included in
this patchset but pushed to the above branch). This helped removing direct
calls from the driver.
- Fix wrong usage of Pinning + Vec.
- Use Token for OPP Config.
- Use Opaque, transparent and Aref for few structures.
- Broken down into smaller patches to make it easy for reviewers.
- Based over staging/rust-device.
Thanks.
Viresh Kumar (8):
rust: Add initial bindings for OPP framework
rust: Extend OPP bindings for the OPP table
rust: Extend OPP bindings for the configuration options
rust: Add initial bindings for cpufreq framework
rust: Extend cpufreq bindings for policy and driver ops
rust: Extend cpufreq bindings for driver registration
rust: Extend OPP bindings with CPU frequency table
cpufreq: Add Rust based cpufreq-dt driver
drivers/cpufreq/Kconfig | 12 +
drivers/cpufreq/Makefile | 1 +
drivers/cpufreq/rcpufreq_dt.rs | 229 +++++++
rust/bindings/bindings_helper.h | 2 +
rust/helpers.c | 15 +
rust/kernel/cpufreq.rs | 1070 +++++++++++++++++++++++++++++++
rust/kernel/lib.rs | 4 +
rust/kernel/opp.rs | 886 +++++++++++++++++++++++++
8 files changed, 2219 insertions(+)
create mode 100644 drivers/cpufreq/rcpufreq_dt.rs
create mode 100644 rust/kernel/cpufreq.rs
create mode 100644 rust/kernel/opp.rs
--
2.31.1.272.g89b43f80a514
next reply other threads:[~2024-06-07 9:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 9:12 Viresh Kumar [this message]
2024-06-07 9:12 ` [RFC PATCH V2 1/8] rust: Add initial bindings for OPP framework Viresh Kumar
2024-06-07 10:32 ` Manos Pitsidianakis
2024-06-07 10:51 ` Alice Ryhl
2024-06-07 11:18 ` Manos Pitsidianakis
2024-06-07 11:30 ` Alice Ryhl
2024-06-14 6:28 ` Viresh Kumar
2024-06-07 9:12 ` [RFC PATCH V2 2/8] rust: Extend OPP bindings for the OPP table Viresh Kumar
2024-06-07 10:38 ` Manos Pitsidianakis
2024-06-10 6:17 ` Viresh Kumar
2024-06-10 8:30 ` Alice Ryhl
2024-06-07 9:12 ` [RFC PATCH V2 3/8] rust: Extend OPP bindings for the configuration options Viresh Kumar
2024-06-17 9:02 ` Manos Pitsidianakis
2024-06-07 9:12 ` [RFC PATCH V2 4/8] rust: Add initial bindings for cpufreq framework Viresh Kumar
2024-06-17 9:23 ` Manos Pitsidianakis
2024-06-07 9:12 ` [RFC PATCH V2 5/8] rust: Extend cpufreq bindings for policy and driver ops Viresh Kumar
2024-06-07 9:12 ` [RFC PATCH V2 6/8] rust: Extend cpufreq bindings for driver registration Viresh Kumar
2024-06-07 9:12 ` [RFC PATCH V2 7/8] rust: Extend OPP bindings with CPU frequency table Viresh Kumar
2024-06-07 9:12 ` [RFC PATCH V2 8/8] cpufreq: Add Rust based cpufreq-dt driver Viresh Kumar
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=cover.1717750631.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=a.hindborg@samsung.com \
--cc=alex.bennee@linaro.org \
--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=erik.schilling@linaro.org \
--cc=gary@garyguo.net \
--cc=joakim.bech@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=nm@ti.com \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=wedsonaf@gmail.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;
as well as URLs for NNTP newsgroup(s).