diff mbox

[3/3] cpufreq: intel_pstate: Fix the scaling of _PSS entry[0]

Message ID 1447124291-14059-4-git-send-email-srinivas.pandruvada@linux.intel.com (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

srinivas pandruvada Nov. 10, 2015, 2:58 a.m. UTC
Since even non core platforms like Atom SoC has _PSS table, we can't
hardcode scaling. Instead we can use cpu->pstate.scaling. We need to
convert to MHz as the scaling values are in KHz.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/cpufreq/intel_pstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki Nov. 14, 2015, 12:45 a.m. UTC | #1
On Monday, November 09, 2015 06:58:11 PM Srinivas Pandruvada wrote:
> Since even non core platforms like Atom SoC has _PSS table, we can't
> hardcode scaling. Instead we can use cpu->pstate.scaling. We need to
> convert to MHz as the scaling values are in KHz.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
>  drivers/cpufreq/intel_pstate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 69dc9b5..50d3cff 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -312,7 +312,7 @@ static int intel_pstate_init_perf_limits(struct cpufreq_policy *policy)
>  		 * Also need to convert to MHz as _PSS freq is in MHz.
>  		 */
>  		cpu->acpi_perf_data.states[0].core_frequency =
> -						turbo_pss_ctl * 100;
> +				turbo_pss_ctl * cpu->pstate.scaling / 1000;
>  	}
>  
>  	pr_debug("intel_pstate: Updated limits using _PSS 0x%x 0x%x 0x%x\n",
> 

Applied, thanks!

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 69dc9b5..50d3cff 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -312,7 +312,7 @@  static int intel_pstate_init_perf_limits(struct cpufreq_policy *policy)
 		 * Also need to convert to MHz as _PSS freq is in MHz.
 		 */
 		cpu->acpi_perf_data.states[0].core_frequency =
-						turbo_pss_ctl * 100;
+				turbo_pss_ctl * cpu->pstate.scaling / 1000;
 	}
 
 	pr_debug("intel_pstate: Updated limits using _PSS 0x%x 0x%x 0x%x\n",