* [PATCH] cpufreq: intel_pstate: Replace boot_cpu_has()
@ 2024-06-24 16:27 Srinivas Pandruvada
2024-06-25 19:01 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Pandruvada @ 2024-06-24 16:27 UTC (permalink / raw)
To: rafael, viresh.kumar; +Cc: linux-pm, linux-kernel, Srinivas Pandruvada
Replace boot_cpu_has() with cpu_feature_enabled().
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
This is based on comment from Borislov for the change to suppot HWP
highest interrupt.
drivers/cpufreq/intel_pstate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index d53b99bab687..4ee244f59f54 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1635,7 +1635,7 @@ void notify_hwp_interrupt(void)
u64 value, status_mask;
unsigned long flags;
- if (!hwp_active || !boot_cpu_has(X86_FEATURE_HWP_NOTIFY))
+ if (!hwp_active || !cpu_feature_enabled(X86_FEATURE_HWP_NOTIFY))
return;
status_mask = HWP_GUARANTEED_PERF_CHANGE_STATUS;
@@ -1667,7 +1667,7 @@ static void intel_pstate_disable_hwp_interrupt(struct cpudata *cpudata)
{
bool cancel_work;
- if (!boot_cpu_has(X86_FEATURE_HWP_NOTIFY))
+ if (!cpu_feature_enabled(X86_FEATURE_HWP_NOTIFY))
return;
/* wrmsrl_on_cpu has to be outside spinlock as this can result in IPC */
--
2.44.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] cpufreq: intel_pstate: Replace boot_cpu_has()
2024-06-24 16:27 [PATCH] cpufreq: intel_pstate: Replace boot_cpu_has() Srinivas Pandruvada
@ 2024-06-25 19:01 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2024-06-25 19:01 UTC (permalink / raw)
To: Srinivas Pandruvada; +Cc: rafael, viresh.kumar, linux-pm, linux-kernel
On Mon, Jun 24, 2024 at 6:27 PM Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
>
> Replace boot_cpu_has() with cpu_feature_enabled().
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> This is based on comment from Borislov for the change to suppot HWP
> highest interrupt.
>
> drivers/cpufreq/intel_pstate.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index d53b99bab687..4ee244f59f54 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -1635,7 +1635,7 @@ void notify_hwp_interrupt(void)
> u64 value, status_mask;
> unsigned long flags;
>
> - if (!hwp_active || !boot_cpu_has(X86_FEATURE_HWP_NOTIFY))
> + if (!hwp_active || !cpu_feature_enabled(X86_FEATURE_HWP_NOTIFY))
> return;
>
> status_mask = HWP_GUARANTEED_PERF_CHANGE_STATUS;
> @@ -1667,7 +1667,7 @@ static void intel_pstate_disable_hwp_interrupt(struct cpudata *cpudata)
> {
> bool cancel_work;
>
> - if (!boot_cpu_has(X86_FEATURE_HWP_NOTIFY))
> + if (!cpu_feature_enabled(X86_FEATURE_HWP_NOTIFY))
> return;
>
> /* wrmsrl_on_cpu has to be outside spinlock as this can result in IPC */
> --
Applied as 6.11 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-25 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-24 16:27 [PATCH] cpufreq: intel_pstate: Replace boot_cpu_has() Srinivas Pandruvada
2024-06-25 19:01 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®