* [PATCH v8 0/7] Enhanced autonomous selection and improvements
@ 2026-02-06 14:26 Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 1/7] ACPI: CPPC: Add cppc_get_perf() API to read performance controls Sumit Gupta
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-02-06 14:26 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
This patch series improves the CPPC cpufreq driver with new ACPI APIs
and enhancements for Autonomous Selection (auto_select).
CPPC auto_select enables hardware-driven CPU performance scaling using
Energy Performance Preference (EPP) hints. Currently, there's limited
runtime control and visibility into CPPC performance registers.
The series adds cppc_get_perf() API to read performance controls, updates
MIN_PERF/MAX_PERF in target callbacks using existing scaling_min/max_freq
interface similar to intel_cpufreq HWP handling, and exposes perf_limited
register via sysfs to detect throttling events.
The patches are grouped as below:
- Patch 1: Add cppc_get_perf() API (independent).
- Patch 2: Warn on missing mandatory DESIRED_PERF (independent).
- Patch 3: Extend cppc_set_epp_perf for FFH/SystemMemory (independent).
- Patch 4: Update cached perf_ctrls on sysfs write (independent).
- Patch 5: Update MIN_PERF/MAX_PERF in target callbacks (depends on 4).
- Patch 6-7: APIs, sysfs and doc for perf_limited (independent).
---
v7[7] -> v8:
- patch 4 (v7): Dropped min/max_perf sysfs patch.
- patch 5 (v8): New patch to update MIN/MAX_PERF in target callbacks
using scaling_min/max_freq interface similar to intel_cpufreq.
- patch 1-4, 6-7 (v8): Added Reviewed-by from Pierre and Lifeng on v7.
Sumit Gupta (7):
ACPI: CPPC: Add cppc_get_perf() API to read performance controls
ACPI: CPPC: Warn on missing mandatory DESIRED_PERF register
ACPI: CPPC: Extend cppc_set_epp_perf() for FFH/SystemMemory
cpufreq: CPPC: Update cached perf_ctrls on sysfs write
cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks
ACPI: CPPC: add APIs and sysfs interface for perf_limited
cpufreq: CPPC: Add sysfs documentation for perf_limited
.../ABI/testing/sysfs-devices-system-cpu | 18 ++
drivers/acpi/cppc_acpi.c | 170 +++++++++++++++++-
drivers/cpufreq/cppc_cpufreq.c | 83 ++++++++-
include/acpi/cppc_acpi.h | 20 +++
4 files changed, 285 insertions(+), 6 deletions(-)
[1] https://lore.kernel.org/lkml/20250211103737.447704-1-sumitg@nvidia.com/
[2] https://lore.kernel.org/lkml/20250823200121.1320197-1-sumitg@nvidia.com/
[3] https://lore.kernel.org/lkml/20251001150104.1275188-1-sumitg@nvidia.com/
[4] https://lore.kernel.org/lkml/20251105113844.4086250-1-sumitg@nvidia.com/
[5] https://lore.kernel.org/lkml/20251223121307.711773-1-sumitg@nvidia.com/
[6] https://lore.kernel.org/lkml/20260120145623.2959636-1-sumitg@nvidia.com/
[7] https://lore.kernel.org/lkml/20260129104817.3752340-1-sumitg@nvidia.com/
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v8 1/7] ACPI: CPPC: Add cppc_get_perf() API to read performance controls
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
@ 2026-02-06 14:26 ` Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 2/7] ACPI: CPPC: Warn on missing mandatory DESIRED_PERF register Sumit Gupta
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-02-06 14:26 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
Add cppc_get_perf() function to read values of performance control
registers including desired_perf, min_perf, max_perf, energy_perf,
and auto_sel.
This provides a read interface to complement the existing
cppc_set_perf() write interface for performance control registers.
Note that auto_sel is read by cppc_get_perf() but not written by
cppc_set_perf() to avoid unintended mode changes during performance
updates. It can be updated with existing dedicated cppc_set_auto_sel()
API.
Use cppc_get_perf() in cppc_cpufreq_get_cpu_data() to initialize
perf_ctrls with current hardware register values during cpufreq
policy initialization.
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
---
drivers/acpi/cppc_acpi.c | 80 ++++++++++++++++++++++++++++++++++
drivers/cpufreq/cppc_cpufreq.c | 6 +++
include/acpi/cppc_acpi.h | 5 +++
3 files changed, 91 insertions(+)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index a09bdabaa804..de35aeb07833 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -1739,6 +1739,86 @@ int cppc_set_enable(int cpu, bool enable)
}
EXPORT_SYMBOL_GPL(cppc_set_enable);
+/**
+ * cppc_get_perf - Get a CPU's performance controls.
+ * @cpu: CPU for which to get performance controls.
+ * @perf_ctrls: ptr to cppc_perf_ctrls. See cppc_acpi.h
+ *
+ * Return: 0 for success with perf_ctrls, -ERRNO otherwise.
+ */
+int cppc_get_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls)
+{
+ struct cpc_desc *cpc_desc = per_cpu(cpc_desc_ptr, cpu);
+ struct cpc_register_resource *desired_perf_reg,
+ *min_perf_reg, *max_perf_reg,
+ *energy_perf_reg, *auto_sel_reg;
+ u64 desired_perf = 0, min = 0, max = 0, energy_perf = 0, auto_sel = 0;
+ int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
+ struct cppc_pcc_data *pcc_ss_data = NULL;
+ int ret = 0, regs_in_pcc = 0;
+
+ if (!cpc_desc) {
+ pr_debug("No CPC descriptor for CPU:%d\n", cpu);
+ return -ENODEV;
+ }
+
+ if (!perf_ctrls) {
+ pr_debug("Invalid perf_ctrls pointer\n");
+ return -EINVAL;
+ }
+
+ desired_perf_reg = &cpc_desc->cpc_regs[DESIRED_PERF];
+ min_perf_reg = &cpc_desc->cpc_regs[MIN_PERF];
+ max_perf_reg = &cpc_desc->cpc_regs[MAX_PERF];
+ energy_perf_reg = &cpc_desc->cpc_regs[ENERGY_PERF];
+ auto_sel_reg = &cpc_desc->cpc_regs[AUTO_SEL_ENABLE];
+
+ /* Are any of the regs PCC ?*/
+ if (CPC_IN_PCC(desired_perf_reg) || CPC_IN_PCC(min_perf_reg) ||
+ CPC_IN_PCC(max_perf_reg) || CPC_IN_PCC(energy_perf_reg) ||
+ CPC_IN_PCC(auto_sel_reg)) {
+ if (pcc_ss_id < 0) {
+ pr_debug("Invalid pcc_ss_id for CPU:%d\n", cpu);
+ return -ENODEV;
+ }
+ pcc_ss_data = pcc_data[pcc_ss_id];
+ regs_in_pcc = 1;
+ down_write(&pcc_ss_data->pcc_lock);
+ /* Ring doorbell once to update PCC subspace */
+ if (send_pcc_cmd(pcc_ss_id, CMD_READ) < 0) {
+ ret = -EIO;
+ goto out_err;
+ }
+ }
+
+ /* Read optional elements if present */
+ if (CPC_SUPPORTED(max_perf_reg))
+ cpc_read(cpu, max_perf_reg, &max);
+ perf_ctrls->max_perf = max;
+
+ if (CPC_SUPPORTED(min_perf_reg))
+ cpc_read(cpu, min_perf_reg, &min);
+ perf_ctrls->min_perf = min;
+
+ if (CPC_SUPPORTED(desired_perf_reg))
+ cpc_read(cpu, desired_perf_reg, &desired_perf);
+ perf_ctrls->desired_perf = desired_perf;
+
+ if (CPC_SUPPORTED(energy_perf_reg))
+ cpc_read(cpu, energy_perf_reg, &energy_perf);
+ perf_ctrls->energy_perf = energy_perf;
+
+ if (CPC_SUPPORTED(auto_sel_reg))
+ cpc_read(cpu, auto_sel_reg, &auto_sel);
+ perf_ctrls->auto_sel = (bool)auto_sel;
+
+out_err:
+ if (regs_in_pcc)
+ up_write(&pcc_ss_data->pcc_lock);
+ return ret;
+}
+EXPORT_SYMBOL_GPL(cppc_get_perf);
+
/**
* cppc_set_perf - Set a CPU's performance controls.
* @cpu: CPU for which to set performance controls.
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 7e8042efedd1..1421f30e87e4 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -594,6 +594,12 @@ static struct cppc_cpudata *cppc_cpufreq_get_cpu_data(unsigned int cpu)
goto free_mask;
}
+ ret = cppc_get_perf(cpu, &cpu_data->perf_ctrls);
+ if (ret) {
+ pr_debug("Err reading CPU%d perf ctrls: ret:%d\n", cpu, ret);
+ goto free_mask;
+ }
+
return cpu_data;
free_mask:
diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h
index 4d644f03098e..3fc796c0d902 100644
--- a/include/acpi/cppc_acpi.h
+++ b/include/acpi/cppc_acpi.h
@@ -151,6 +151,7 @@ extern int cppc_get_desired_perf(int cpunum, u64 *desired_perf);
extern int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf);
extern int cppc_get_highest_perf(int cpunum, u64 *highest_perf);
extern int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_ctrs);
+extern int cppc_get_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
extern int cppc_set_enable(int cpu, bool enable);
extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
@@ -193,6 +194,10 @@ static inline int cppc_get_perf_ctrs(int cpu, struct cppc_perf_fb_ctrs *perf_fb_
{
return -EOPNOTSUPP;
}
+static inline int cppc_get_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls)
+{
+ return -EOPNOTSUPP;
+}
static inline int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls)
{
return -EOPNOTSUPP;
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v8 2/7] ACPI: CPPC: Warn on missing mandatory DESIRED_PERF register
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 1/7] ACPI: CPPC: Add cppc_get_perf() API to read performance controls Sumit Gupta
@ 2026-02-06 14:26 ` Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 3/7] ACPI: CPPC: Extend cppc_set_epp_perf() for FFH/SystemMemory Sumit Gupta
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-02-06 14:26 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
Add a warning during CPPC processor probe if the Desired Performance
register is not supported when it should be.
As per 8.4.6.1.2.3 section of ACPI 6.6 specification,
"The Desired Performance Register is optional only when OSPM indicates
support for CPPC2 in the platform-wide _OSC capabilities and the
Autonomous Selection Enable field is encoded as an Integer with a
value of 1."
In other words:
- In CPPC v1, DESIRED_PERF is mandatory
- In CPPC v2, it becomes optional only when AUTO_SEL_ENABLE is supported
This helps detect firmware configuration issues early during boot.
Link: https://lore.kernel.org/lkml/9fa21599-004a-4af8-acc2-190fd0404e35@nvidia.com/
Suggested-by: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
---
drivers/acpi/cppc_acpi.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index de35aeb07833..0eb1a6d54e88 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -854,6 +854,16 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
}
per_cpu(cpu_pcc_subspace_idx, pr->id) = pcc_subspace_id;
+ /*
+ * In CPPC v1, DESIRED_PERF is mandatory. In CPPC v2, it is optional
+ * only when AUTO_SEL_ENABLE is supported.
+ */
+ if (!CPC_SUPPORTED(&cpc_ptr->cpc_regs[DESIRED_PERF]) &&
+ (!osc_sb_cppc2_support_acked ||
+ !CPC_SUPPORTED(&cpc_ptr->cpc_regs[AUTO_SEL_ENABLE])))
+ pr_warn("Desired perf. register is mandatory if CPPC v2 is not supported "
+ "or autonomous selection is disabled\n");
+
/*
* Initialize the remaining cpc_regs as unsupported.
* Example: In case FW exposes CPPC v2, the below loop will initialize
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v8 3/7] ACPI: CPPC: Extend cppc_set_epp_perf() for FFH/SystemMemory
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 1/7] ACPI: CPPC: Add cppc_get_perf() API to read performance controls Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 2/7] ACPI: CPPC: Warn on missing mandatory DESIRED_PERF register Sumit Gupta
@ 2026-02-06 14:26 ` Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 4/7] cpufreq: CPPC: Update cached perf_ctrls on sysfs write Sumit Gupta
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-02-06 14:26 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
Extend cppc_set_epp_perf() to write both auto_sel and energy_perf
registers when they are in FFH or SystemMemory address space.
This keeps the behavior consistent with PCC case where both registers
are already updated together, but was missing for FFH/SystemMemory.
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
---
drivers/acpi/cppc_acpi.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 0eb1a6d54e88..08e62b58eb83 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -1572,6 +1572,8 @@ int cppc_set_epp_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls, bool enable)
struct cpc_register_resource *auto_sel_reg;
struct cpc_desc *cpc_desc = per_cpu(cpc_desc_ptr, cpu);
struct cppc_pcc_data *pcc_ss_data = NULL;
+ bool autosel_ffh_sysmem;
+ bool epp_ffh_sysmem;
int ret;
if (!cpc_desc) {
@@ -1582,6 +1584,11 @@ int cppc_set_epp_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls, bool enable)
auto_sel_reg = &cpc_desc->cpc_regs[AUTO_SEL_ENABLE];
epp_set_reg = &cpc_desc->cpc_regs[ENERGY_PERF];
+ epp_ffh_sysmem = CPC_SUPPORTED(epp_set_reg) &&
+ (CPC_IN_FFH(epp_set_reg) || CPC_IN_SYSTEM_MEMORY(epp_set_reg));
+ autosel_ffh_sysmem = CPC_SUPPORTED(auto_sel_reg) &&
+ (CPC_IN_FFH(auto_sel_reg) || CPC_IN_SYSTEM_MEMORY(auto_sel_reg));
+
if (CPC_IN_PCC(epp_set_reg) || CPC_IN_PCC(auto_sel_reg)) {
if (pcc_ss_id < 0) {
pr_debug("Invalid pcc_ss_id for CPU:%d\n", cpu);
@@ -1607,11 +1614,22 @@ int cppc_set_epp_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls, bool enable)
ret = send_pcc_cmd(pcc_ss_id, CMD_WRITE);
up_write(&pcc_ss_data->pcc_lock);
} else if (osc_cpc_flexible_adr_space_confirmed &&
- CPC_SUPPORTED(epp_set_reg) && CPC_IN_FFH(epp_set_reg)) {
- ret = cpc_write(cpu, epp_set_reg, perf_ctrls->energy_perf);
+ (epp_ffh_sysmem || autosel_ffh_sysmem)) {
+ if (autosel_ffh_sysmem) {
+ ret = cpc_write(cpu, auto_sel_reg, enable);
+ if (ret)
+ return ret;
+ }
+
+ if (epp_ffh_sysmem) {
+ ret = cpc_write(cpu, epp_set_reg,
+ perf_ctrls->energy_perf);
+ if (ret)
+ return ret;
+ }
} else {
ret = -ENOTSUPP;
- pr_debug("_CPC in PCC and _CPC in FFH are not supported\n");
+ pr_debug("_CPC in PCC/FFH/SystemMemory are not supported\n");
}
return ret;
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v8 4/7] cpufreq: CPPC: Update cached perf_ctrls on sysfs write
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
` (2 preceding siblings ...)
2026-02-06 14:26 ` [PATCH v8 3/7] ACPI: CPPC: Extend cppc_set_epp_perf() for FFH/SystemMemory Sumit Gupta
@ 2026-02-06 14:26 ` Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 5/7] cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks Sumit Gupta
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-02-06 14:26 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
Update the cached perf_ctrls values when writing via sysfs to keep
them in sync with hardware registers:
- store_auto_select(): update perf_ctrls.auto_sel
- store_energy_performance_preference_val(): update perf_ctrls.energy_perf
This ensures consistent cached values after sysfs writes, which
complements the cppc_get_perf() initialization during policy setup.
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
---
drivers/cpufreq/cppc_cpufreq.c | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 1421f30e87e4..e394cdac7f87 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -855,6 +855,7 @@ static ssize_t show_auto_select(struct cpufreq_policy *policy, char *buf)
static ssize_t store_auto_select(struct cpufreq_policy *policy,
const char *buf, size_t count)
{
+ struct cppc_cpudata *cpu_data = policy->driver_data;
bool val;
int ret;
@@ -866,6 +867,8 @@ static ssize_t store_auto_select(struct cpufreq_policy *policy,
if (ret)
return ret;
+ cpu_data->perf_ctrls.auto_sel = val;
+
return count;
}
@@ -916,8 +919,32 @@ static ssize_t store_##_name(struct cpufreq_policy *policy, \
CPPC_CPUFREQ_ATTR_RW_U64(auto_act_window, cppc_get_auto_act_window,
cppc_set_auto_act_window)
-CPPC_CPUFREQ_ATTR_RW_U64(energy_performance_preference_val,
- cppc_get_epp_perf, cppc_set_epp)
+static ssize_t
+show_energy_performance_preference_val(struct cpufreq_policy *policy, char *buf)
+{
+ return cppc_cpufreq_sysfs_show_u64(policy->cpu, cppc_get_epp_perf, buf);
+}
+
+static ssize_t
+store_energy_performance_preference_val(struct cpufreq_policy *policy,
+ const char *buf, size_t count)
+{
+ struct cppc_cpudata *cpu_data = policy->driver_data;
+ u64 val;
+ int ret;
+
+ ret = kstrtou64(buf, 0, &val);
+ if (ret)
+ return ret;
+
+ ret = cppc_set_epp(policy->cpu, val);
+ if (ret)
+ return ret;
+
+ cpu_data->perf_ctrls.energy_perf = val;
+
+ return count;
+}
cpufreq_freq_attr_ro(freqdomain_cpus);
cpufreq_freq_attr_rw(auto_select);
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v8 5/7] cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
` (3 preceding siblings ...)
2026-02-06 14:26 ` [PATCH v8 4/7] cpufreq: CPPC: Update cached perf_ctrls on sysfs write Sumit Gupta
@ 2026-02-06 14:26 ` Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 6/7] ACPI: CPPC: add APIs and sysfs interface for perf_limited Sumit Gupta
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-02-06 14:26 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
Update MIN_PERF and MAX_PERF registers from policy->min and policy->max
in the .target() and .fast_switch() callbacks. This allows controlling
performance bounds via standard scaling_min_freq and scaling_max_freq
sysfs interfaces.
Similar to intel_cpufreq which updates HWP min/max limits in .target(),
cppc_cpufreq now programs MIN_PERF/MAX_PERF along with DESIRED_PERF.
Since MIN_PERF/MAX_PERF can be updated even when auto_sel is disabled,
they are updated unconditionally.
Also program MIN_PERF/MAX_PERF in store_auto_select() when enabling
autonomous selection so the platform uses correct bounds immediately.
Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
---
drivers/cpufreq/cppc_cpufreq.c | 41 +++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index e394cdac7f87..b277530ac420 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -287,6 +287,21 @@ static inline void cppc_freq_invariance_exit(void)
}
#endif /* CONFIG_ACPI_CPPC_CPUFREQ_FIE */
+static void cppc_cpufreq_update_perf_limits(struct cppc_cpudata *cpu_data,
+ struct cpufreq_policy *policy)
+{
+ struct cppc_perf_caps *caps = &cpu_data->perf_caps;
+ u32 min_perf, max_perf;
+
+ min_perf = cppc_khz_to_perf(caps, policy->min);
+ max_perf = cppc_khz_to_perf(caps, policy->max);
+
+ cpu_data->perf_ctrls.min_perf =
+ clamp_t(u32, min_perf, caps->lowest_perf, caps->highest_perf);
+ cpu_data->perf_ctrls.max_perf =
+ clamp_t(u32, max_perf, caps->lowest_perf, caps->highest_perf);
+}
+
static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -298,6 +313,8 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
cpu_data->perf_ctrls.desired_perf =
cppc_khz_to_perf(&cpu_data->perf_caps, target_freq);
+ cppc_cpufreq_update_perf_limits(cpu_data, policy);
+
freqs.old = policy->cur;
freqs.new = target_freq;
@@ -322,8 +339,9 @@ static unsigned int cppc_cpufreq_fast_switch(struct cpufreq_policy *policy,
desired_perf = cppc_khz_to_perf(&cpu_data->perf_caps, target_freq);
cpu_data->perf_ctrls.desired_perf = desired_perf;
- ret = cppc_set_perf(cpu, &cpu_data->perf_ctrls);
+ cppc_cpufreq_update_perf_limits(cpu_data, policy);
+ ret = cppc_set_perf(cpu, &cpu_data->perf_ctrls);
if (ret) {
pr_debug("Failed to set target on CPU:%d. ret:%d\n",
cpu, ret);
@@ -869,6 +887,27 @@ static ssize_t store_auto_select(struct cpufreq_policy *policy,
cpu_data->perf_ctrls.auto_sel = val;
+ if (val) {
+ u32 old_min_perf = cpu_data->perf_ctrls.min_perf;
+ u32 old_max_perf = cpu_data->perf_ctrls.max_perf;
+
+ /*
+ * When enabling autonomous selection, program MIN_PERF and
+ * MAX_PERF from current policy limits so that the platform
+ * uses the correct performance bounds immediately.
+ */
+ cppc_cpufreq_update_perf_limits(cpu_data, policy);
+
+ ret = cppc_set_perf(policy->cpu, &cpu_data->perf_ctrls);
+ if (ret) {
+ cpu_data->perf_ctrls.min_perf = old_min_perf;
+ cpu_data->perf_ctrls.max_perf = old_max_perf;
+ cppc_set_auto_sel(policy->cpu, false);
+ cpu_data->perf_ctrls.auto_sel = false;
+ return ret;
+ }
+ }
+
return count;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v8 6/7] ACPI: CPPC: add APIs and sysfs interface for perf_limited
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
` (4 preceding siblings ...)
2026-02-06 14:26 ` [PATCH v8 5/7] cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks Sumit Gupta
@ 2026-02-06 14:26 ` Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 7/7] cpufreq: CPPC: Add sysfs documentation " Sumit Gupta
2026-02-26 13:59 ` [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
7 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-02-06 14:26 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
Add sysfs interface to read/write the Performance Limited register.
The Performance Limited register indicates to the OS that an
unpredictable event (like thermal throttling) has limited processor
performance. It contains two sticky bits set by the platform:
- Bit 0 (Desired_Excursion): Set when delivered performance is
constrained below desired performance. Not used when Autonomous
Selection is enabled.
- Bit 1 (Minimum_Excursion): Set when delivered performance is
constrained below minimum performance.
These bits remain set until OSPM explicitly clears them. The write
operation accepts a bitmask of bits to clear:
- Write 0x1 to clear bit 0
- Write 0x2 to clear bit 1
- Write 0x3 to clear both bits
This enables users to detect if platform throttling impacted a workload.
Users clear the register before execution, run the workload, then check
afterward - if set, hardware throttling occurred during that time window.
The interface is exposed as:
/sys/devices/system/cpu/cpuX/cpufreq/perf_limited
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
---
drivers/acpi/cppc_acpi.c | 56 ++++++++++++++++++++++++++++++++++
drivers/cpufreq/cppc_cpufreq.c | 5 +++
include/acpi/cppc_acpi.h | 15 +++++++++
3 files changed, 76 insertions(+)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 08e62b58eb83..9a879b5134f4 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -1979,6 +1979,62 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls)
}
EXPORT_SYMBOL_GPL(cppc_set_perf);
+/**
+ * cppc_get_perf_limited - Get the Performance Limited register value.
+ * @cpu: CPU from which to get Performance Limited register.
+ * @perf_limited: Pointer to store the Performance Limited value.
+ *
+ * The returned value contains sticky status bits indicating platform-imposed
+ * performance limitations.
+ *
+ * Return: 0 for success, -EIO on failure, -EOPNOTSUPP if not supported.
+ */
+int cppc_get_perf_limited(int cpu, u64 *perf_limited)
+{
+ return cppc_get_reg_val(cpu, PERF_LIMITED, perf_limited);
+}
+EXPORT_SYMBOL_GPL(cppc_get_perf_limited);
+
+/**
+ * cppc_set_perf_limited() - Clear bits in the Performance Limited register.
+ * @cpu: CPU on which to write register.
+ * @bits_to_clear: Bitmask of bits to clear in the perf_limited register.
+ *
+ * The Performance Limited register contains two sticky bits set by platform:
+ * - Bit 0 (Desired_Excursion): Set when delivered performance is constrained
+ * below desired performance. Not used when Autonomous Selection is enabled.
+ * - Bit 1 (Minimum_Excursion): Set when delivered performance is constrained
+ * below minimum performance.
+ *
+ * These bits are sticky and remain set until OSPM explicitly clears them.
+ * This function only allows clearing bits (the platform sets them).
+ *
+ * Return: 0 for success, -EINVAL for invalid bits, -EIO on register
+ * access failure, -EOPNOTSUPP if not supported.
+ */
+int cppc_set_perf_limited(int cpu, u64 bits_to_clear)
+{
+ u64 current_val, new_val;
+ int ret;
+
+ /* Only bits 0 and 1 are valid */
+ if (bits_to_clear & ~CPPC_PERF_LIMITED_MASK)
+ return -EINVAL;
+
+ if (!bits_to_clear)
+ return 0;
+
+ ret = cppc_get_perf_limited(cpu, ¤t_val);
+ if (ret)
+ return ret;
+
+ /* Clear the specified bits */
+ new_val = current_val & ~bits_to_clear;
+
+ return cppc_set_reg_val(cpu, PERF_LIMITED, new_val);
+}
+EXPORT_SYMBOL_GPL(cppc_set_perf_limited);
+
/**
* cppc_get_transition_latency - returns frequency transition latency in ns
* @cpu_num: CPU number for per_cpu().
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index b277530ac420..7c3de48ef2e0 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -985,16 +985,21 @@ store_energy_performance_preference_val(struct cpufreq_policy *policy,
return count;
}
+CPPC_CPUFREQ_ATTR_RW_U64(perf_limited, cppc_get_perf_limited,
+ cppc_set_perf_limited)
+
cpufreq_freq_attr_ro(freqdomain_cpus);
cpufreq_freq_attr_rw(auto_select);
cpufreq_freq_attr_rw(auto_act_window);
cpufreq_freq_attr_rw(energy_performance_preference_val);
+cpufreq_freq_attr_rw(perf_limited);
static struct freq_attr *cppc_cpufreq_attr[] = {
&freqdomain_cpus,
&auto_select,
&auto_act_window,
&energy_performance_preference_val,
+ &perf_limited,
NULL,
};
diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h
index 3fc796c0d902..f7afa20b8ad9 100644
--- a/include/acpi/cppc_acpi.h
+++ b/include/acpi/cppc_acpi.h
@@ -42,6 +42,11 @@
#define CPPC_EPP_PERFORMANCE_PREF 0x00
#define CPPC_EPP_ENERGY_EFFICIENCY_PREF 0xFF
+#define CPPC_PERF_LIMITED_DESIRED_EXCURSION BIT(0)
+#define CPPC_PERF_LIMITED_MINIMUM_EXCURSION BIT(1)
+#define CPPC_PERF_LIMITED_MASK (CPPC_PERF_LIMITED_DESIRED_EXCURSION | \
+ CPPC_PERF_LIMITED_MINIMUM_EXCURSION)
+
/* Each register has the folowing format. */
struct cpc_reg {
u8 descriptor;
@@ -174,6 +179,8 @@ extern int cppc_get_auto_act_window(int cpu, u64 *auto_act_window);
extern int cppc_set_auto_act_window(int cpu, u64 auto_act_window);
extern int cppc_get_auto_sel(int cpu, bool *enable);
extern int cppc_set_auto_sel(int cpu, bool enable);
+extern int cppc_get_perf_limited(int cpu, u64 *perf_limited);
+extern int cppc_set_perf_limited(int cpu, u64 bits_to_clear);
extern int amd_get_highest_perf(unsigned int cpu, u32 *highest_perf);
extern int amd_get_boost_ratio_numerator(unsigned int cpu, u64 *numerator);
extern int amd_detect_prefcore(bool *detected);
@@ -270,6 +277,14 @@ static inline int cppc_set_auto_sel(int cpu, bool enable)
{
return -EOPNOTSUPP;
}
+static inline int cppc_get_perf_limited(int cpu, u64 *perf_limited)
+{
+ return -EOPNOTSUPP;
+}
+static inline int cppc_set_perf_limited(int cpu, u64 bits_to_clear)
+{
+ return -EOPNOTSUPP;
+}
static inline int amd_get_highest_perf(unsigned int cpu, u32 *highest_perf)
{
return -ENODEV;
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v8 7/7] cpufreq: CPPC: Add sysfs documentation for perf_limited
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
` (5 preceding siblings ...)
2026-02-06 14:26 ` [PATCH v8 6/7] ACPI: CPPC: add APIs and sysfs interface for perf_limited Sumit Gupta
@ 2026-02-06 14:26 ` Sumit Gupta
2026-02-26 13:59 ` [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
7 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-02-06 14:26 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
Add ABI documentation for the Performance Limited Register sysfs
interface in the cppc_cpufreq driver.
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
---
.../ABI/testing/sysfs-devices-system-cpu | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 3a05604c21bf..82d10d556cc8 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -327,6 +327,24 @@ Description: Energy performance preference
This file is only present if the cppc-cpufreq driver is in use.
+What: /sys/devices/system/cpu/cpuX/cpufreq/perf_limited
+Date: February 2026
+Contact: linux-pm@vger.kernel.org
+Description: Performance Limited
+
+ Read to check if platform throttling (thermal/power/current
+ limits) caused delivered performance to fall below the
+ requested level. A non-zero value indicates throttling occurred.
+
+ Write the bitmask of bits to clear:
+
+ - 0x1 = clear bit 0 (desired performance excursion)
+ - 0x2 = clear bit 1 (minimum performance excursion)
+ - 0x3 = clear both bits
+
+ The platform sets these bits; OSPM can only clear them.
+
+ This file is only present if the cppc-cpufreq driver is in use.
What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
Date: August 2008
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v8 0/7] Enhanced autonomous selection and improvements
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
` (6 preceding siblings ...)
2026-02-06 14:26 ` [PATCH v8 7/7] cpufreq: CPPC: Add sysfs documentation " Sumit Gupta
@ 2026-02-26 13:59 ` Sumit Gupta
2026-02-27 20:36 ` Rafael J. Wysocki
7 siblings, 1 reply; 11+ messages in thread
From: Sumit Gupta @ 2026-02-26 13:59 UTC (permalink / raw)
To: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel
Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
> This patch series improves the CPPC cpufreq driver with new ACPI APIs
> and enhancements for Autonomous Selection (auto_select).
>
> CPPC auto_select enables hardware-driven CPU performance scaling using
> Energy Performance Preference (EPP) hints. Currently, there's limited
> runtime control and visibility into CPPC performance registers.
>
> The series adds cppc_get_perf() API to read performance controls, updates
> MIN_PERF/MAX_PERF in target callbacks using existing scaling_min/max_freq
> interface similar to intel_cpufreq HWP handling, and exposes perf_limited
> register via sysfs to detect throttling events.
>
> The patches are grouped as below:
> - Patch 1: Add cppc_get_perf() API (independent).
> - Patch 2: Warn on missing mandatory DESIRED_PERF (independent).
> - Patch 3: Extend cppc_set_epp_perf for FFH/SystemMemory (independent).
> - Patch 4: Update cached perf_ctrls on sysfs write (independent).
> - Patch 5: Update MIN_PERF/MAX_PERF in target callbacks (depends on 4).
> - Patch 6-7: APIs, sysfs and doc for perf_limited (independent).
Gentle ping.
If there are no further comments, could this be considered for merging.
Thank you,
Sumit Gupta
> ---
> v7[7] -> v8:
> - patch 4 (v7): Dropped min/max_perf sysfs patch.
> - patch 5 (v8): New patch to update MIN/MAX_PERF in target callbacks
> using scaling_min/max_freq interface similar to intel_cpufreq.
> - patch 1-4, 6-7 (v8): Added Reviewed-by from Pierre and Lifeng on v7.
>
> Sumit Gupta (7):
> ACPI: CPPC: Add cppc_get_perf() API to read performance controls
> ACPI: CPPC: Warn on missing mandatory DESIRED_PERF register
> ACPI: CPPC: Extend cppc_set_epp_perf() for FFH/SystemMemory
> cpufreq: CPPC: Update cached perf_ctrls on sysfs write
> cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks
> ACPI: CPPC: add APIs and sysfs interface for perf_limited
> cpufreq: CPPC: Add sysfs documentation for perf_limited
>
> .../ABI/testing/sysfs-devices-system-cpu | 18 ++
> drivers/acpi/cppc_acpi.c | 170 +++++++++++++++++-
> drivers/cpufreq/cppc_cpufreq.c | 83 ++++++++-
> include/acpi/cppc_acpi.h | 20 +++
> 4 files changed, 285 insertions(+), 6 deletions(-)
>
> [1] https://lore.kernel.org/lkml/20250211103737.447704-1-sumitg@nvidia.com/
> [2] https://lore.kernel.org/lkml/20250823200121.1320197-1-sumitg@nvidia.com/
> [3] https://lore.kernel.org/lkml/20251001150104.1275188-1-sumitg@nvidia.com/
> [4] https://lore.kernel.org/lkml/20251105113844.4086250-1-sumitg@nvidia.com/
> [5] https://lore.kernel.org/lkml/20251223121307.711773-1-sumitg@nvidia.com/
> [6] https://lore.kernel.org/lkml/20260120145623.2959636-1-sumitg@nvidia.com/
> [7] https://lore.kernel.org/lkml/20260129104817.3752340-1-sumitg@nvidia.com/
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v8 0/7] Enhanced autonomous selection and improvements
2026-02-26 13:59 ` [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
@ 2026-02-27 20:36 ` Rafael J. Wysocki
2026-03-03 17:32 ` Sumit Gupta
0 siblings, 1 reply; 11+ messages in thread
From: Rafael J. Wysocki @ 2026-02-27 20:36 UTC (permalink / raw)
To: Sumit Gupta
Cc: rafael, viresh.kumar, pierre.gondois, zhenglifeng1,
ionela.voinescu, lenb, robert.moore, corbet, rdunlap, ray.huang,
gautham.shenoy, mario.limonciello, perry.yuan, zhanjie9,
yumpusamongus, dedekind1, linux-pm, linux-acpi, linux-doc,
acpica-devel, linux-kernel, linux-tegra, treding, jonathanh,
vsethi, ksitaraman, sanjayc, nhartman, mochs, bbasu
On Thu, Feb 26, 2026 at 2:59 PM Sumit Gupta <sumitg@nvidia.com> wrote:
>
>
> > This patch series improves the CPPC cpufreq driver with new ACPI APIs
> > and enhancements for Autonomous Selection (auto_select).
> >
> > CPPC auto_select enables hardware-driven CPU performance scaling using
> > Energy Performance Preference (EPP) hints. Currently, there's limited
> > runtime control and visibility into CPPC performance registers.
> >
> > The series adds cppc_get_perf() API to read performance controls, updates
> > MIN_PERF/MAX_PERF in target callbacks using existing scaling_min/max_freq
> > interface similar to intel_cpufreq HWP handling, and exposes perf_limited
> > register via sysfs to detect throttling events.
> >
> > The patches are grouped as below:
> > - Patch 1: Add cppc_get_perf() API (independent).
> > - Patch 2: Warn on missing mandatory DESIRED_PERF (independent).
> > - Patch 3: Extend cppc_set_epp_perf for FFH/SystemMemory (independent).
> > - Patch 4: Update cached perf_ctrls on sysfs write (independent).
> > - Patch 5: Update MIN_PERF/MAX_PERF in target callbacks (depends on 4).
> > - Patch 6-7: APIs, sysfs and doc for perf_limited (independent).
>
> Gentle ping.
>
> If there are no further comments, could this be considered for merging.
Applied as 7.1 material, thanks!
That said, wouldn't it be prudent to check cpc_read() return values everywhere?
They are handled quite inconsistently and this series doesn't improve that.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v8 0/7] Enhanced autonomous selection and improvements
2026-02-27 20:36 ` Rafael J. Wysocki
@ 2026-03-03 17:32 ` Sumit Gupta
0 siblings, 0 replies; 11+ messages in thread
From: Sumit Gupta @ 2026-03-03 17:32 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: viresh.kumar, pierre.gondois, zhenglifeng1, ionela.voinescu, lenb,
robert.moore, corbet, rdunlap, ray.huang, gautham.shenoy,
mario.limonciello, perry.yuan, zhanjie9, yumpusamongus, dedekind1,
linux-pm, linux-acpi, linux-doc, acpica-devel, linux-kernel,
linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
nhartman, mochs, bbasu, sumitg
On 28/02/26 02:06, Rafael J. Wysocki wrote:
> External email: Use caution opening links or attachments
>
>
> On Thu, Feb 26, 2026 at 2:59 PM Sumit Gupta <sumitg@nvidia.com> wrote:
>>
>>> This patch series improves the CPPC cpufreq driver with new ACPI APIs
>>> and enhancements for Autonomous Selection (auto_select).
>>>
>>> CPPC auto_select enables hardware-driven CPU performance scaling using
>>> Energy Performance Preference (EPP) hints. Currently, there's limited
>>> runtime control and visibility into CPPC performance registers.
>>>
>>> The series adds cppc_get_perf() API to read performance controls, updates
>>> MIN_PERF/MAX_PERF in target callbacks using existing scaling_min/max_freq
>>> interface similar to intel_cpufreq HWP handling, and exposes perf_limited
>>> register via sysfs to detect throttling events.
>>>
>>> The patches are grouped as below:
>>> - Patch 1: Add cppc_get_perf() API (independent).
>>> - Patch 2: Warn on missing mandatory DESIRED_PERF (independent).
>>> - Patch 3: Extend cppc_set_epp_perf for FFH/SystemMemory (independent).
>>> - Patch 4: Update cached perf_ctrls on sysfs write (independent).
>>> - Patch 5: Update MIN_PERF/MAX_PERF in target callbacks (depends on 4).
>>> - Patch 6-7: APIs, sysfs and doc for perf_limited (independent).
>> Gentle ping.
>>
>> If there are no further comments, could this be considered for merging.
> Applied as 7.1 material, thanks!
Thank you for applying the series.
>
> That said, wouldn't it be prudent to check cpc_read() return values
> everywhere? They are handled quite inconsistently and this series
> doesn't improve that.
I will send a follow-up patch to address this.
Thank you
Sumit Gupta
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-03-03 17:33 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 14:26 [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 1/7] ACPI: CPPC: Add cppc_get_perf() API to read performance controls Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 2/7] ACPI: CPPC: Warn on missing mandatory DESIRED_PERF register Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 3/7] ACPI: CPPC: Extend cppc_set_epp_perf() for FFH/SystemMemory Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 4/7] cpufreq: CPPC: Update cached perf_ctrls on sysfs write Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 5/7] cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 6/7] ACPI: CPPC: add APIs and sysfs interface for perf_limited Sumit Gupta
2026-02-06 14:26 ` [PATCH v8 7/7] cpufreq: CPPC: Add sysfs documentation " Sumit Gupta
2026-02-26 13:59 ` [PATCH v8 0/7] Enhanced autonomous selection and improvements Sumit Gupta
2026-02-27 20:36 ` Rafael J. Wysocki
2026-03-03 17:32 ` Sumit Gupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox