mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
Merge branch 'pm-cpufreq'
Merge cpufreq fixes and cleanups, mostly on top of those fixes, for 6.18-rc1: - Make cpufreq drivers setting the default CPU transition latency to CPUFREQ_ETERNAL specify a proper default transition latency value instead which addresses a regression introduced during the 6.6 cycle that broke CPUFREQ_ETERNAL handling (Rafael Wysocki) - Make the cpufreq CPPC driver use a proper transition delay value when CPUFREQ_ETERNAL is returned by cppc_get_transition_latency() to indicate an error condition (Rafael Wysocki) - Make cppc_get_transition_latency() return a negative error code to indicate error conditions instead of using CPUFREQ_ETERNAL for this purpose and drop CPUFREQ_ETERNAL that has no other users (Rafael Wysocki, Gopi Krishna Menon) - Fix device leak in the mediatek cpufreq driver (Johan Hovold) - Set target frequency on all CPUs sharing a policy during frequency updates in the tegra186 cpufreq driver and make it initialize all cores to max frequencies (Aaron Kling) - Rust cpufreq helper cleanup (Thorsten Blum) * pm-cpufreq: docs/zh_CN: Fix malformed table docs/zh_TW: Fix malformed table cpufreq: Drop unused symbol CPUFREQ_ETERNAL ACPI: CPPC: Do not use CPUFREQ_ETERNAL as an error value cpufreq: CPPC: Avoid using CPUFREQ_ETERNAL as transition delay cpufreq: Make drivers using CPUFREQ_ETERNAL specify transition latency cpufreq: tegra186: Initialize all cores to max frequencies cpufreq: tegra186: Set target frequency for all cpus in policy rust: cpufreq: streamline find_supply_names cpufreq: mediatek: fix device leak on probe failure
This commit is contained in:
@@ -38,7 +38,8 @@ use macros::vtable;
|
||||
const CPUFREQ_NAME_LEN: usize = bindings::CPUFREQ_NAME_LEN as usize;
|
||||
|
||||
/// Default transition latency value in nanoseconds.
|
||||
pub const ETERNAL_LATENCY_NS: u32 = bindings::CPUFREQ_ETERNAL as u32;
|
||||
pub const DEFAULT_TRANSITION_LATENCY_NS: u32 =
|
||||
bindings::CPUFREQ_DEFAULT_TRANSITION_LATENCY_NS;
|
||||
|
||||
/// CPU frequency driver flags.
|
||||
pub mod flags {
|
||||
@@ -399,13 +400,13 @@ impl TableBuilder {
|
||||
/// The following example demonstrates how to create a CPU frequency table.
|
||||
///
|
||||
/// ```
|
||||
/// use kernel::cpufreq::{ETERNAL_LATENCY_NS, Policy};
|
||||
/// use kernel::cpufreq::{DEFAULT_TRANSITION_LATENCY_NS, Policy};
|
||||
///
|
||||
/// fn update_policy(policy: &mut Policy) {
|
||||
/// policy
|
||||
/// .set_dvfs_possible_from_any_cpu(true)
|
||||
/// .set_fast_switch_possible(true)
|
||||
/// .set_transition_latency_ns(ETERNAL_LATENCY_NS);
|
||||
/// .set_transition_latency_ns(DEFAULT_TRANSITION_LATENCY_NS);
|
||||
///
|
||||
/// pr_info!("The policy details are: {:?}\n", (policy.cpu(), policy.cur()));
|
||||
/// }
|
||||
|
||||
Reference in New Issue
Block a user