mbox series

[RFC,0/6] rust: cpufreq: Add cppc_cpufreq driver implementation

Message ID 20240815082916.1210110-1-pierre.gondois@arm.com (mailing list archive)
Headers show
Series rust: cpufreq: Add cppc_cpufreq driver implementation | expand

Message

Pierre Gondois Aug. 15, 2024, 8:29 a.m. UTC
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