ACPI: CPPC: add sysfs entry for guaranteed performance
PATCH 1/1 ACPI: CPPC: add sysfs entry for guaranteed performance
Expose the CPPC guaranteed performance as reported by the platform through GuaranteedPerformanceRegister.
The current value is already read in cppc_get_perf_caps() and stored in struct cppc_perf_caps (to be used by the intel_pstate driver), so only the attribute itself needs to be defined.
--- drivers/acpi/cppc_acpi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/cppc_acpi.c +2 -0
@@ -160,6 +160,7 @@ show_cppc_data(cppc_get_perf_caps, cppc_perf_caps, highest_perf);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, lowest_perf);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, nominal_perf);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, lowest_nonlinear_perf); +show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, guaranteed_perf);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, lowest_freq);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, nominal_freq);
@@ -196,6 +197,7 @@ static struct attribute *cppc_attrs[] = { &highest_perf.attr, &lowest_perf.attr, &lowest_nonlinear_perf.attr, + &guaranteed_perf.attr, &nominal_perf.attr, &nominal_freq.attr, &lowest_freq.attr,
Signature · 1 line
2.45.1
Quoted 6 lines · On Thu, 6 Jun 2024 13:55:41 +0200 Petr Tesarik <[email protected]> wrote:
Expose the CPPC guaranteed performance as reported by the platform through GuaranteedPerformanceRegister.
The current value is already read in
cppc_get_perf_caps()and stored in structcppc_perf_caps(to be used by theintel_pstatedriver), so only the attribute itself needs to be defined.
Are there any objections to exposing this CPPC register through sysfs? I mean, if everybody is OK with it, the patch could be acked and queued for 6.11, right?
Petr T
Quoted 25 lines
Signed-off-by Petr Tesařík <[email protected]>--- drivers/acpi/cppc_acpi.c | 2 ++ 1 file changed, 2 insertions(+)drivers/acpi/cppc_acpi.c +2
-0@@ -160,6 +160,7 @@ show_cppc_data(cppc_get_perf_caps, cppc_perf_caps, highest_perf);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, lowest_perf);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, nominal_perf);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, lowest_nonlinear_perf); +show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, guaranteed_perf);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, lowest_freq);show_cppc_data (cppc_get_perf_caps, cppc_perf_caps, nominal_freq);@@ -196,6 +197,7 @@ static struct attribute *cppc_attrs[] = { &highest_perf.attr, &lowest_perf.attr, &lowest_nonlinear_perf.attr, + &guaranteed_perf.attr, &nominal_perf.attr, &nominal_freq.attr, &lowest_freq.attr,
Rafael J. Wysocki
maintainerQuoted 7 lines · Petr Tesarik
Quoted 3 lines · On Thu, 6 Jun 2024 13:55:41 +0200 Petr Tesarik <[email protected]> wrote:
Expose the CPPC guaranteed performance as reported by the platform through GuaranteedPerformanceRegister.
Quoted 7 lines
Quoted 3 lines
The current value is already read in
cppc_get_perf_caps()and stored in structcppc_perf_caps(to be used by theintel_pstatedriver), so only the attribute itself needs to be defined.Are there any objections to exposing this CPPC register through sysfs? I mean, if everybody is OK with it, the patch could be acked and queued for 6.11, right?
It actually has been queued already, sorry for the missing notice.
It's been in linux-next for some time even.
Quoted 12 lines · On Fri, 21 Jun 2024 12:16:06 +0200 "Rafael J. Wysocki" <[email protected]>…
Quoted 11 lines · Petr Tesarik
Quoted 6 lines · On Thu, 6 Jun 2024 13:55:41 +0200 Petr Tesarik <[email protected]> wrote:
Expose the CPPC guaranteed performance as reported by the platform through GuaranteedPerformanceRegister.
The current value is already read in
cppc_get_perf_caps()and stored in structcppc_perf_caps(to be used by theintel_pstatedriver), so only the attribute itself needs to be defined.
Quoted 7 lines
Quoted 3 lines
Are there any objections to exposing this CPPC register through sysfs? I mean, if everybody is OK with it, the patch could be acked and queued for 6.11, right?
It actually has been queued already, sorry for the missing notice.
It's been in linux-next for some time even.
Oh, OK, I could have checked myself. ;-)
Thanks!
Petr T