* [PATCH] ACPI: CPPC: add sysfs entry for guaranteed performance
@ 2024-06-06 11:55 Petr Tesařík
2024-06-21 8:48 ` Petr Tesarik
0 siblings, 1 reply; 4+ messages in thread
From: Petr Tesařík @ 2024-06-06 11:55 UTC (permalink / raw)
To: Rafael J. Wysocki, Len Brown
Cc: linux-acpi, linux-kernel, Petr Tesařík
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.
Signed-off-by: Petr Tesařík <ptesarik@suse.com>
---
drivers/acpi/cppc_acpi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 1d857978f5f4..9976bb57356e 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -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,
--
2.45.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ACPI: CPPC: add sysfs entry for guaranteed performance
2024-06-06 11:55 [PATCH] ACPI: CPPC: add sysfs entry for guaranteed performance Petr Tesařík
@ 2024-06-21 8:48 ` Petr Tesarik
2024-06-21 10:16 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Petr Tesarik @ 2024-06-21 8:48 UTC (permalink / raw)
To: Rafael J. Wysocki, Len Brown; +Cc: linux-acpi, linux-kernel
On Thu, 6 Jun 2024 13:55:41 +0200
Petr Tesarik <ptesarik@suse.com> 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
> struct cppc_perf_caps (to be used by the intel_pstate driver), 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
> Signed-off-by: Petr Tesařík <ptesarik@suse.com>
> ---
> drivers/acpi/cppc_acpi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
> index 1d857978f5f4..9976bb57356e 100644
> --- a/drivers/acpi/cppc_acpi.c
> +++ b/drivers/acpi/cppc_acpi.c
> @@ -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,
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ACPI: CPPC: add sysfs entry for guaranteed performance
2024-06-21 8:48 ` Petr Tesarik
@ 2024-06-21 10:16 ` Rafael J. Wysocki
2024-06-21 11:09 ` Petr Tesarik
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2024-06-21 10:16 UTC (permalink / raw)
To: Petr Tesarik; +Cc: Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel
On Fri, Jun 21, 2024 at 10:49 AM Petr Tesarik <petr.tesarik@suse.com> wrote:
>
> On Thu, 6 Jun 2024 13:55:41 +0200
> Petr Tesarik <ptesarik@suse.com> 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
> > struct cppc_perf_caps (to be used by the intel_pstate driver), 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ACPI: CPPC: add sysfs entry for guaranteed performance
2024-06-21 10:16 ` Rafael J. Wysocki
@ 2024-06-21 11:09 ` Petr Tesarik
0 siblings, 0 replies; 4+ messages in thread
From: Petr Tesarik @ 2024-06-21 11:09 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Petr Tesarik, Len Brown, linux-acpi, linux-kernel
On Fri, 21 Jun 2024 12:16:06 +0200
"Rafael J. Wysocki" <rafael@kernel.org> wrote:
> On Fri, Jun 21, 2024 at 10:49 AM Petr Tesarik <petr.tesarik@suse.com> wrote:
> >
> > On Thu, 6 Jun 2024 13:55:41 +0200
> > Petr Tesarik <ptesarik@suse.com> 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
> > > struct cppc_perf_caps (to be used by the intel_pstate driver), 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.
Oh, OK, I could have checked myself. ;-)
Thanks!
Petr T
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-21 11:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 11:55 [PATCH] ACPI: CPPC: add sysfs entry for guaranteed performance Petr Tesařík
2024-06-21 8:48 ` Petr Tesarik
2024-06-21 10:16 ` Rafael J. Wysocki
2024-06-21 11:09 ` Petr Tesarik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox