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: v4.14-rc1~1641^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff7e593c9cf3ccceaab7ac600cbd52cb9ff4c57a;p=platform%2Fkernel%2Flinux-rpi.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 f91c257,4737520,ed215c5..a54d65a --- 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 {