diff mbox series

cpufreq: intel_pstate: Replace boot_cpu_has()

Message ID 20240624162714.1431182-1-srinivas.pandruvada@linux.intel.com (mailing list archive)
State In Next
Delegated to: Rafael Wysocki
Headers show
Series cpufreq: intel_pstate: Replace boot_cpu_has() | expand

Commit Message

Srinivas Pandruvada June 24, 2024, 4:27 p.m. UTC
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(-)

Comments

Rafael J. Wysocki June 25, 2024, 7:01 p.m. UTC | #1
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!
diff mbox series

Patch

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 */