public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fixes for boost enablement
@ 2024-06-26  4:11 Mario Limonciello
  2024-06-26  4:11 ` [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled Mario Limonciello
  2024-06-26  4:11 ` [PATCH 2/2] cpufreq: acpi: Mark boost policy as enabled when setting boost Mario Limonciello
  0 siblings, 2 replies; 9+ messages in thread
From: Mario Limonciello @ 2024-06-26  4:11 UTC (permalink / raw)
  To: linux-pm; +Cc: linux-kernel, Mario Limonciello

This series is split up from the amd-pstate CPB development.
It's two fixes related to setting up boost that should be targeted
towards 6.10 if possible.

Mario Limonciello (2):
  cpufreq: Allow drivers to advertise boost enabled
  cpufreq: acpi: Mark boost policy as enabled when setting boost

 drivers/cpufreq/acpi-cpufreq.c | 1 +
 drivers/cpufreq/cpufreq.c      | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled
  2024-06-26  4:11 [PATCH 0/2] Fixes for boost enablement Mario Limonciello
@ 2024-06-26  4:11 ` Mario Limonciello
  2024-06-26  5:11   ` Gautham R.Shenoy
                     ` (3 more replies)
  2024-06-26  4:11 ` [PATCH 2/2] cpufreq: acpi: Mark boost policy as enabled when setting boost Mario Limonciello
  1 sibling, 4 replies; 9+ messages in thread
From: Mario Limonciello @ 2024-06-26  4:11 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-kernel, Mario Limonciello, Viresh Kumar, Gautham R . Shenoy,
	Sibi Sankar, Dietmar Eggemann, Dhruva Gole, Yipeng Zou,
	Rafael J . Wysocki

The behavior introduced in commit f37a4d6b4a2c ("cpufreq: Fix per-policy
boost behavior on SoCs using cpufreq_boost_set_sw()") sets up the boost
policy incorrectly when boost has been enabled by the platform firmware
initially even if a driver sets the policy up.

This is because policy_has_boost_freq() assumes that there is a frequency
table set up by the driver and that the boost frequencies are advertised
in that table. This assumption doesn't work for acpi-cpufreq or
amd-pstate. Only use this check to enable boost if it's not already
enabled instead of also disabling it if alreayd enabled.

Fixes: f37a4d6b4a2c ("cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw()")
Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Dhruva Gole <d-gole@ti.com>
Cc: Yipeng Zou <zouyipeng@huawei.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
v14->v15:
 * Use Viresh's suggestion
---
 drivers/cpufreq/cpufreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 1fdabb660231..270ea04fb616 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1430,7 +1430,8 @@ static int cpufreq_online(unsigned int cpu)
 		}
 
 		/* Let the per-policy boost flag mirror the cpufreq_driver boost during init */
-		policy->boost_enabled = cpufreq_boost_enabled() && policy_has_boost_freq(policy);
+		if (cpufreq_boost_enabled() && policy_has_boost_freq(policy))
+			policy->boost_enabled = true;
 
 		/*
 		 * The initialization has succeeded and the policy is online.
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] cpufreq: acpi: Mark boost policy as enabled when setting boost
  2024-06-26  4:11 [PATCH 0/2] Fixes for boost enablement Mario Limonciello
  2024-06-26  4:11 ` [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled Mario Limonciello
@ 2024-06-26  4:11 ` Mario Limonciello
  2024-06-26  5:04   ` Viresh Kumar
  2024-06-26  5:25   ` Gautham R.Shenoy
  1 sibling, 2 replies; 9+ messages in thread
From: Mario Limonciello @ 2024-06-26  4:11 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-kernel, Mario Limonciello, Gautham R . Shenoy, Sibi Sankar,
	Dietmar Eggemann, Viresh Kumar, Dhruva Gole, Yipeng Zou,
	Rafael J . Wysocki

When boost is set for CPUs using acpi-cpufreq the policy is not
updated which can cause boost to be incorrectly not reported.

Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
Cc: Sibi Sankar <quic_sibis@quicinc.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Dhruva Gole <d-gole@ti.com>
Cc: Yipeng Zou <zouyipeng@huawei.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
v14->v15:
 * Use Gautham's suggestion instead
---
 drivers/cpufreq/acpi-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 37f1cdf46d29..bd3f95a7a4fe 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -139,6 +139,7 @@ static int set_boost(struct cpufreq_policy *policy, int val)
 			 (void *)(long)val, 1);
 	pr_debug("CPU %*pbl: Core Boosting %s.\n",
 		 cpumask_pr_args(policy->cpus), str_enabled_disabled(val));
+	policy->boost_enabled = val;
 
 	return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] cpufreq: acpi: Mark boost policy as enabled when setting boost
  2024-06-26  4:11 ` [PATCH 2/2] cpufreq: acpi: Mark boost policy as enabled when setting boost Mario Limonciello
@ 2024-06-26  5:04   ` Viresh Kumar
  2024-06-26  5:25   ` Gautham R.Shenoy
  1 sibling, 0 replies; 9+ messages in thread
From: Viresh Kumar @ 2024-06-26  5:04 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: linux-pm, linux-kernel, Gautham R . Shenoy, Sibi Sankar,
	Dietmar Eggemann, Dhruva Gole, Yipeng Zou, Rafael J . Wysocki

On 25-06-24, 23:11, Mario Limonciello wrote:
> When boost is set for CPUs using acpi-cpufreq the policy is not
> updated which can cause boost to be incorrectly not reported.
> 
> Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> Cc: Sibi Sankar <quic_sibis@quicinc.com>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Dhruva Gole <d-gole@ti.com>
> Cc: Yipeng Zou <zouyipeng@huawei.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> v14->v15:
>  * Use Gautham's suggestion instead
> ---
>  drivers/cpufreq/acpi-cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> index 37f1cdf46d29..bd3f95a7a4fe 100644
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -139,6 +139,7 @@ static int set_boost(struct cpufreq_policy *policy, int val)
>  			 (void *)(long)val, 1);
>  	pr_debug("CPU %*pbl: Core Boosting %s.\n",
>  		 cpumask_pr_args(policy->cpus), str_enabled_disabled(val));
> +	policy->boost_enabled = val;
>  
>  	return 0;
>  }

This is probably the wrong location to make this change as this
function gets called from cpufreq core too, which also sets the
policy->boost_enabled flag.

You should set this separately in the init() function itself after
set_boost() is called.

-- 
viresh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled
  2024-06-26  4:11 ` [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled Mario Limonciello
@ 2024-06-26  5:11   ` Gautham R.Shenoy
  2024-06-26  5:18   ` Viresh Kumar
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Gautham R.Shenoy @ 2024-06-26  5:11 UTC (permalink / raw)
  To: Mario Limonciello, linux-pm
  Cc: linux-kernel, Mario Limonciello, Viresh Kumar, Sibi Sankar,
	Dietmar Eggemann, Dhruva Gole, Yipeng Zou, Rafael J . Wysocki

Mario Limonciello <mario.limonciello@amd.com> writes:

> The behavior introduced in commit f37a4d6b4a2c ("cpufreq: Fix per-policy
> boost behavior on SoCs using cpufreq_boost_set_sw()") sets up the boost
> policy incorrectly when boost has been enabled by the platform firmware
> initially even if a driver sets the policy up.
>
> This is because policy_has_boost_freq() assumes that there is a frequency
> table set up by the driver and that the boost frequencies are advertised
> in that table. This assumption doesn't work for acpi-cpufreq or
> amd-pstate. Only use this check to enable boost if it's not already
> enabled instead of also disabling it if alreayd enabled.
>
> Fixes: f37a4d6b4a2c ("cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw()")
> Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
> Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> Cc: Sibi Sankar <quic_sibis@quicinc.com>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Dhruva Gole <d-gole@ti.com>
> Cc: Yipeng Zou <zouyipeng@huawei.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> v14->v15:
>  * Use Viresh's suggestion

This will work. The drivers that don't depend onn
policy_has_boost_freq() should ensure that they keep policy->enabled
in-sync with cpufreq_boost_enabled().

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>


> ---
>  drivers/cpufreq/cpufreq.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 1fdabb660231..270ea04fb616 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1430,7 +1430,8 @@ static int cpufreq_online(unsigned int cpu)
>  		}
>  
>  		/* Let the per-policy boost flag mirror the cpufreq_driver boost during init */
> -		policy->boost_enabled = cpufreq_boost_enabled() && policy_has_boost_freq(policy);
> +		if (cpufreq_boost_enabled() && policy_has_boost_freq(policy))
> +			policy->boost_enabled = true;
>  
>  		/*
>  		 * The initialization has succeeded and the policy is online.
> -- 
> 2.43.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled
  2024-06-26  4:11 ` [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled Mario Limonciello
  2024-06-26  5:11   ` Gautham R.Shenoy
@ 2024-06-26  5:18   ` Viresh Kumar
  2024-06-26  8:16   ` Dhruva Gole
  2024-06-26 16:32   ` Sibi Sankar
  3 siblings, 0 replies; 9+ messages in thread
From: Viresh Kumar @ 2024-06-26  5:18 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: linux-pm, linux-kernel, Gautham R . Shenoy, Sibi Sankar,
	Dietmar Eggemann, Dhruva Gole, Yipeng Zou, Rafael J . Wysocki

On 25-06-24, 23:11, Mario Limonciello wrote:
> The behavior introduced in commit f37a4d6b4a2c ("cpufreq: Fix per-policy
> boost behavior on SoCs using cpufreq_boost_set_sw()") sets up the boost
> policy incorrectly when boost has been enabled by the platform firmware
> initially even if a driver sets the policy up.
> 
> This is because policy_has_boost_freq() assumes that there is a frequency
> table set up by the driver and that the boost frequencies are advertised
> in that table. This assumption doesn't work for acpi-cpufreq or
> amd-pstate. Only use this check to enable boost if it's not already
> enabled instead of also disabling it if alreayd enabled.
> 
> Fixes: f37a4d6b4a2c ("cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw()")
> Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
> Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> Cc: Sibi Sankar <quic_sibis@quicinc.com>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Dhruva Gole <d-gole@ti.com>
> Cc: Yipeng Zou <zouyipeng@huawei.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> v14->v15:
>  * Use Viresh's suggestion
> ---
>  drivers/cpufreq/cpufreq.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 1fdabb660231..270ea04fb616 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1430,7 +1430,8 @@ static int cpufreq_online(unsigned int cpu)
>  		}
>  
>  		/* Let the per-policy boost flag mirror the cpufreq_driver boost during init */
> -		policy->boost_enabled = cpufreq_boost_enabled() && policy_has_boost_freq(policy);
> +		if (cpufreq_boost_enabled() && policy_has_boost_freq(policy))
> +			policy->boost_enabled = true;
>  
>  		/*
>  		 * The initialization has succeeded and the policy is online.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Rafael, this can go in to the next rc I believe (along with patch to
acpi-cpufreq).

-- 
viresh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] cpufreq: acpi: Mark boost policy as enabled when setting boost
  2024-06-26  4:11 ` [PATCH 2/2] cpufreq: acpi: Mark boost policy as enabled when setting boost Mario Limonciello
  2024-06-26  5:04   ` Viresh Kumar
@ 2024-06-26  5:25   ` Gautham R.Shenoy
  1 sibling, 0 replies; 9+ messages in thread
From: Gautham R.Shenoy @ 2024-06-26  5:25 UTC (permalink / raw)
  To: Mario Limonciello, linux-pm
  Cc: linux-kernel, Mario Limonciello, Sibi Sankar, Dietmar Eggemann,
	Viresh Kumar, Dhruva Gole, Yipeng Zou, Rafael J . Wysocki

Mario Limonciello <mario.limonciello@amd.com> writes:

> When boost is set for CPUs using acpi-cpufreq the policy is not
> updated which can cause boost to be incorrectly not reported.
>
> Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>

> ---
> Cc: Sibi Sankar <quic_sibis@quicinc.com>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Dhruva Gole <d-gole@ti.com>
> Cc: Yipeng Zou <zouyipeng@huawei.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> v14->v15:
>  * Use Gautham's suggestion instead
> ---
>  drivers/cpufreq/acpi-cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> index 37f1cdf46d29..bd3f95a7a4fe 100644
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -139,6 +139,7 @@ static int set_boost(struct cpufreq_policy *policy, int val)
>  			 (void *)(long)val, 1);
>  	pr_debug("CPU %*pbl: Core Boosting %s.\n",
>  		 cpumask_pr_args(policy->cpus), str_enabled_disabled(val));
> +	policy->boost_enabled = val;
>  
>  	return 0;
>  }
> -- 
> 2.43.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled
  2024-06-26  4:11 ` [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled Mario Limonciello
  2024-06-26  5:11   ` Gautham R.Shenoy
  2024-06-26  5:18   ` Viresh Kumar
@ 2024-06-26  8:16   ` Dhruva Gole
  2024-06-26 16:32   ` Sibi Sankar
  3 siblings, 0 replies; 9+ messages in thread
From: Dhruva Gole @ 2024-06-26  8:16 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: linux-pm, linux-kernel, Viresh Kumar, Gautham R . Shenoy,
	Sibi Sankar, Dietmar Eggemann, Yipeng Zou, Rafael J . Wysocki

On Jun 25, 2024 at 23:11:34 -0500, Mario Limonciello wrote:
> The behavior introduced in commit f37a4d6b4a2c ("cpufreq: Fix per-policy
> boost behavior on SoCs using cpufreq_boost_set_sw()") sets up the boost
> policy incorrectly when boost has been enabled by the platform firmware
> initially even if a driver sets the policy up.
> 
> This is because policy_has_boost_freq() assumes that there is a frequency
> table set up by the driver and that the boost frequencies are advertised
> in that table. This assumption doesn't work for acpi-cpufreq or
> amd-pstate. Only use this check to enable boost if it's not already
> enabled instead of also disabling it if alreayd enabled.
> 
> Fixes: f37a4d6b4a2c ("cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw()")
> Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
> Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> Cc: Sibi Sankar <quic_sibis@quicinc.com>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Dhruva Gole <d-gole@ti.com>
> Cc: Yipeng Zou <zouyipeng@huawei.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> v14->v15:
>  * Use Viresh's suggestion
> ---
>  drivers/cpufreq/cpufreq.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 1fdabb660231..270ea04fb616 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1430,7 +1430,8 @@ static int cpufreq_online(unsigned int cpu)
>  		}
>  
>  		/* Let the per-policy boost flag mirror the cpufreq_driver boost during init */
> -		policy->boost_enabled = cpufreq_boost_enabled() && policy_has_boost_freq(policy);
> +		if (cpufreq_boost_enabled() && policy_has_boost_freq(policy))
> +			policy->boost_enabled = true;

Reviewed-by: Dhruva Gole <d-gole@ti.com>

-- 
Best regards,
Dhruva

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled
  2024-06-26  4:11 ` [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled Mario Limonciello
                     ` (2 preceding siblings ...)
  2024-06-26  8:16   ` Dhruva Gole
@ 2024-06-26 16:32   ` Sibi Sankar
  3 siblings, 0 replies; 9+ messages in thread
From: Sibi Sankar @ 2024-06-26 16:32 UTC (permalink / raw)
  To: Mario Limonciello, linux-pm
  Cc: linux-kernel, Viresh Kumar, Gautham R . Shenoy, Dietmar Eggemann,
	Dhruva Gole, Yipeng Zou, Rafael J . Wysocki



On 6/26/24 09:41, Mario Limonciello wrote:
> The behavior introduced in commit f37a4d6b4a2c ("cpufreq: Fix per-policy
> boost behavior on SoCs using cpufreq_boost_set_sw()") sets up the boost
> policy incorrectly when boost has been enabled by the platform firmware
> initially even if a driver sets the policy up.
> 
> This is because policy_has_boost_freq() assumes that there is a frequency
> table set up by the driver and that the boost frequencies are advertised
> in that table. This assumption doesn't work for acpi-cpufreq or
> amd-pstate. Only use this check to enable boost if it's not already
> enabled instead of also disabling it if alreayd enabled.
> 
> Fixes: f37a4d6b4a2c ("cpufreq: Fix per-policy boost behavior on SoCs using cpufreq_boost_set_sw()")
> Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
> Suggested-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> Cc: Sibi Sankar <quic_sibis@quicinc.com>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Dhruva Gole <d-gole@ti.com>
> Cc: Yipeng Zou <zouyipeng@huawei.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> v14->v15:
>   * Use Viresh's suggestion

Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>

> ---
>   drivers/cpufreq/cpufreq.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 1fdabb660231..270ea04fb616 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1430,7 +1430,8 @@ static int cpufreq_online(unsigned int cpu)
>   		}
>   
>   		/* Let the per-policy boost flag mirror the cpufreq_driver boost during init */
> -		policy->boost_enabled = cpufreq_boost_enabled() && policy_has_boost_freq(policy);
> +		if (cpufreq_boost_enabled() && policy_has_boost_freq(policy))
> +			policy->boost_enabled = true;
>   
>   		/*
>   		 * The initialization has succeeded and the policy is online.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-06-26 16:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26  4:11 [PATCH 0/2] Fixes for boost enablement Mario Limonciello
2024-06-26  4:11 ` [PATCH 1/2] cpufreq: Allow drivers to advertise boost enabled Mario Limonciello
2024-06-26  5:11   ` Gautham R.Shenoy
2024-06-26  5:18   ` Viresh Kumar
2024-06-26  8:16   ` Dhruva Gole
2024-06-26 16:32   ` Sibi Sankar
2024-06-26  4:11 ` [PATCH 2/2] cpufreq: acpi: Mark boost policy as enabled when setting boost Mario Limonciello
2024-06-26  5:04   ` Viresh Kumar
2024-06-26  5:25   ` Gautham R.Shenoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox