rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] rust: cpufreq: Add cppc_cpufreq driver implementation
@ 2024-08-15  8:29 Pierre Gondois
  2024-08-15  8:29 ` [RFC PATCH 1/6] ACPI: CPPC: Move struct cppc_cpudata to cppc_cpufreq driver Pierre Gondois
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Pierre Gondois @ 2024-08-15  8:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Pierre Gondois, Rafael J. Wysocki, Len Brown, Viresh Kumar,
	Robert Moore, Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Martin Rodriguez Reboredo,
	Manos Pitsidianakis, FUJITA Tomonori, Mika Westerberg,
	Danilo Krummrich, Thomas Bertschinger, linux-acpi, linux-pm,
	acpica-devel, rust-for-linux

Hello,
This patchset is based on Viresh's Rust cpufreq patchset [1] and
implements a basic cppc cpufreq driver in Rust. The following features/
possibilities are not supported yet:
- vendor specific workarounds
- Frequency Invariance Engine (FIE)
- artificial Energy Model (EM)
- (struct cpufreq_driver).attr field
- QoS requests

Testing:
The patchset was tested on a CPPC based Juno-r2 platform. It was
checked that the underlying firmware received the freq. requests
the OS made.
The platform doesn't support Delivered/Reference Performance Counters
which are used to infer the current frequency of a perf. domain. The
.get() function of the driver was thus implemented, but bypassed
during testing.

[1]
Can be found at:
- git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/linux.git rust/cpufreq-dt
- latest commit: 2b6d636d1c7db3b21198105ad3ed5f458f027637
  ("defconfig: Update Rust and initramfs")
- Latest version is available at:
  - https://lore.kernel.org/lkml/cover.1722334569.git.viresh.kumar@linaro.org/

Pierre Gondois (6):
  ACPI: CPPC: Move struct cppc_cpudata to cppc_cpufreq driver
  cpufreq: cppc: Remove perf_fb_ctrs field from struct cppc_cpudata
  rust: module: Allow modules to specify initcall section
  rust: cpufreq: Add methods to struct Cpufreq
  rust: bindings: Add bindings for rcppc_cpufreq driver
  rust: cpufreq: Add rust implementation of cppc_cpufreq driver

 drivers/acpi/cppc_acpi.c         |  26 ++-
 drivers/cpufreq/Kconfig          |  16 ++
 drivers/cpufreq/Makefile         |   1 +
 drivers/cpufreq/cppc_cpufreq.c   |  12 +-
 drivers/cpufreq/rcppc_cpufreq.rs | 333 +++++++++++++++++++++++++++++++
 include/acpi/cppc_acpi.h         |  13 +-
 rust/bindings/bindings_helper.h  |   1 +
 rust/helpers.c                   |   6 +
 rust/kernel/cpufreq.rs           |  53 +++++
 rust/macros/module.rs            |  21 +-
 10 files changed, 457 insertions(+), 25 deletions(-)
 create mode 100644 drivers/cpufreq/rcppc_cpufreq.rs

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-08-16  7:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15  8:29 [RFC PATCH 0/6] rust: cpufreq: Add cppc_cpufreq driver implementation Pierre Gondois
2024-08-15  8:29 ` [RFC PATCH 1/6] ACPI: CPPC: Move struct cppc_cpudata to cppc_cpufreq driver Pierre Gondois
2024-08-15  8:29 ` [RFC PATCH 2/6] cpufreq: cppc: Remove perf_fb_ctrs field from struct cppc_cpudata Pierre Gondois
2024-08-15  8:29 ` [RFC PATCH 3/6] rust: module: Allow modules to specify initcall section Pierre Gondois
2024-08-15  8:29 ` [RFC PATCH 4/6] rust: cpufreq: Add methods to struct Cpufreq Pierre Gondois
2024-08-15  8:29 ` [RFC PATCH 5/6] rust: bindings: Add bindings for rcppc_cpufreq driver Pierre Gondois
2024-08-15  8:29 ` [RFC PATCH 6/6] rust: cpufreq: Add rust implementation of cppc_cpufreq driver Pierre Gondois
2024-08-15  9:24   ` Greg KH
2024-08-15 13:04   ` Miguel Ojeda
2024-08-16  6:59     ` Pierre Gondois
2024-08-16  7:06       ` Greg Kroah-Hartman

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).