From: Rafael J. Wysocki Date: Thu, 26 Jan 2017 23:08:59 +0000 (+0100) Subject: Merge branches 'pm-sleep' and 'pm-cpufreq' X-Git-Tag: MMI-PSA29.97-13-9~6330^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ff7e593c9cf3ccceaab7ac600cbd52cb9ff4c57a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Merge branches 'pm-sleep' and 'pm-cpufreq' * pm-sleep: Revert "PM / sleep / ACPI: Use the ACPI_FADT_LOW_POWER_S0 flag" * pm-cpufreq: cpufreq: intel_pstate: Fix sysfs limits enforcement for performance policy --- ff7e593c9cf3ccceaab7ac600cbd52cb9ff4c57a diff --cc drivers/cpufreq/intel_pstate.c index f91c25718d16,4737520ec823,ed215c5592f6..a54d65aa776d --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@@@ -1995,19 -1516,11 -1941,20 +1995,20 @@@@ static int intel_pstate_set_policy(stru policy->max = policy->cpuinfo.max_freq; } - if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE) { - limits = &performance_limits; - if (policy->max >= policy->cpuinfo.max_freq) { + if (per_cpu_limits) + perf_limits = cpu->perf_limits; + + mutex_lock(&intel_pstate_limits_lock); + + if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) { + if (!perf_limits) { + limits = &performance_limits; + perf_limits = limits; + } - if (policy->max >= policy->cpuinfo.max_freq) { ++ if (policy->max >= policy->cpuinfo.max_freq && ++ !limits->no_turbo) { pr_debug("set performance\n"); - intel_pstate_set_performance_limits(limits); + intel_pstate_set_performance_limits(perf_limits); goto out; } } else {