|
|
Log in / Subscribe / Register

cpufreq: cppc: Handle Highest Performance changes at runtime

From:  Xueqin Luo <luoxueqin-AT-kylinos.cn>
To:  sudeep.holla-AT-kernel.org, gregkh-AT-linuxfoundation.org, rafael-AT-kernel.org, dakr-AT-kernel.org, viresh.kumar-AT-linaro.org, zhanjie9-AT-hisilicon.com, zhenglifeng1-AT-huawei.com, pierre.gondois-AT-arm.com, sumitg-AT-nvidia.com, linux-kernel-AT-vger.kernel.org, driver-core-AT-lists.linux.dev, linux-pm-AT-vger.kernel.org
Subject:  [PATCH v4 0/3] cpufreq: cppc: Handle Highest Performance changes at runtime
Date:  Mon, 08 Jun 2026 18:07:43 +0800
Message-ID:  <20260608100746.372535-1-luoxueqin@kylinos.cn>
Cc:  Xueqin Luo <luoxueqin-AT-kylinos.cn>
Archive-link:  Article

Hi Rafael, Pierre,

This series adds support for handling ACPI CPPC Highest Performance
register changes at runtime, triggered by Notify(0x85) on a processor
device.

When the platform changes the Highest Performance value (e.g. due to
thermal or power budget adjustments), the OSPM must re-evaluate the
cached capability and propagate the change to the cpufreq policy,
the scheduler's CPU capacity model, and the frequency invariance
engine.

The series is split into three patches:
  Patch 1: Core update_limits callback implementation.
  Patch 2: Refactor autonomous perf bounds into a reusable helper
           and wire it into update_limits with error logging.
  Patch 3: Topology subsystem runtime capacity updates with
           concurrent-safe normalization.

v3 -> v4:
  - Do not set policy->max directly; use refresh_frequency_limits()
    to let the cpufreq core update it through cpufreq_set_policy()
    (Rafael)
  - Re-evaluate policy->boost_supported when highest_perf changes,
    as boost capability depends on highest_perf > nominal_perf
    (Rafael)
  - Add topology capacity runtime update: introduce
    topology_update_cpu_capacity() to refresh raw_capacity,
    capacity_freq_ref, and the normalized CPU capacity scale
    (Pierre)
  - Refactor autonomous selection performance bounds programming
    into cppc_cpufreq_set_autonomous_perf() helper, reused by both
    store_auto_select() and update_limits()
  - Add pr_debug error logging when autonomous perf update fails

Xueqin Luo (3):
  cpufreq: cppc: Add update_limits support for Highest Performance
    changes
  cpufreq: cppc: Refactor autonomous perf bounds into helper
  arch_topology: Add topology_update_cpu_capacity() for runtime updates

 drivers/base/arch_topology.c   |  70 ++++++++++++++++++++++
 drivers/cpufreq/cppc_cpufreq.c | 102 ++++++++++++++++++++++++++++-----
 include/linux/arch_topology.h  |   4 ++
 3 files changed, 163 insertions(+), 13 deletions(-)

-- 
2.43.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds