diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-01-12 05:01:12 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-01-12 05:01:12 -0500 |
commit | 1f16f116b01c110db20ab808562c8b8bc3ee3d6e (patch) | |
tree | 44db563f64cf5f8d62af8f99a61e2b248c44ea3a /drivers/cpufreq | |
parent | 03724ac3d48f8f0e3caf1d30fa134f8fd96c94e2 (diff) | |
parent | f9eccf24615672896dc13251410c3f2f33a14f95 (diff) |
Merge branches 'clockevents/4.4-fixes' and 'clockevents/4.5-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent
Pull in fixes from Daniel Lezcano:
- Fix the vt8500 timer leading to a system lock up when dealing with too
small delta (Roman Volkov)
- Select the CLKSRC_MMIO when the fsl_ftm_timer is enabled with COMPILE_TEST
(Daniel Lezcano)
- Prevent to compile timers using the 'iomem' API when the architecture has
not HAS_IOMEM set (Richard Weinberger)
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/Kconfig.arm | 4 | ||||
-rw-r--r-- | drivers/cpufreq/cppc_cpufreq.c | 3 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 21 | ||||
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 6 | ||||
-rw-r--r-- | drivers/cpufreq/s3c24xx-cpufreq.c | 2 | ||||
-rw-r--r-- | drivers/cpufreq/scpi-cpufreq.c | 2 |
6 files changed, 23 insertions, 15 deletions
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 8014c2307332..b1f8a73e5a94 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm | |||
@@ -202,7 +202,7 @@ config ARM_SA1110_CPUFREQ | |||
202 | 202 | ||
203 | config ARM_SCPI_CPUFREQ | 203 | config ARM_SCPI_CPUFREQ |
204 | tristate "SCPI based CPUfreq driver" | 204 | tristate "SCPI based CPUfreq driver" |
205 | depends on ARM_BIG_LITTLE_CPUFREQ && ARM_SCPI_PROTOCOL | 205 | depends on ARM_BIG_LITTLE_CPUFREQ && ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI |
206 | help | 206 | help |
207 | This adds the CPUfreq driver support for ARM big.LITTLE platforms | 207 | This adds the CPUfreq driver support for ARM big.LITTLE platforms |
208 | using SCPI protocol for CPU power management. | 208 | using SCPI protocol for CPU power management. |
@@ -226,7 +226,7 @@ config ARM_TEGRA20_CPUFREQ | |||
226 | 226 | ||
227 | config ARM_TEGRA124_CPUFREQ | 227 | config ARM_TEGRA124_CPUFREQ |
228 | tristate "Tegra124 CPUFreq support" | 228 | tristate "Tegra124 CPUFreq support" |
229 | depends on ARCH_TEGRA && CPUFREQ_DT | 229 | depends on ARCH_TEGRA && CPUFREQ_DT && REGULATOR |
230 | default y | 230 | default y |
231 | help | 231 | help |
232 | This adds the CPUFreq driver support for Tegra124 SOCs. | 232 | This adds the CPUFreq driver support for Tegra124 SOCs. |
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index e8cb334094b0..7c0bdfb1a2ca 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c | |||
@@ -98,10 +98,11 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
98 | policy->max = cpu->perf_caps.highest_perf; | 98 | policy->max = cpu->perf_caps.highest_perf; |
99 | policy->cpuinfo.min_freq = policy->min; | 99 | policy->cpuinfo.min_freq = policy->min; |
100 | policy->cpuinfo.max_freq = policy->max; | 100 | policy->cpuinfo.max_freq = policy->max; |
101 | policy->shared_type = cpu->shared_type; | ||
101 | 102 | ||
102 | if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) | 103 | if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) |
103 | cpumask_copy(policy->cpus, cpu->shared_cpu_map); | 104 | cpumask_copy(policy->cpus, cpu->shared_cpu_map); |
104 | else { | 105 | else if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL) { |
105 | /* Support only SW_ANY for now. */ | 106 | /* Support only SW_ANY for now. */ |
106 | pr_debug("Unsupported CPU co-ord type\n"); | 107 | pr_debug("Unsupported CPU co-ord type\n"); |
107 | return -EFAULT; | 108 | return -EFAULT; |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 7c48e7316d91..8412ce5f93a7 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -976,10 +976,14 @@ static int cpufreq_init_policy(struct cpufreq_policy *policy) | |||
976 | 976 | ||
977 | new_policy.governor = gov; | 977 | new_policy.governor = gov; |
978 | 978 | ||
979 | /* Use the default policy if its valid. */ | 979 | /* Use the default policy if there is no last_policy. */ |
980 | if (cpufreq_driver->setpolicy) | 980 | if (cpufreq_driver->setpolicy) { |
981 | cpufreq_parse_governor(gov->name, &new_policy.policy, NULL); | 981 | if (policy->last_policy) |
982 | 982 | new_policy.policy = policy->last_policy; | |
983 | else | ||
984 | cpufreq_parse_governor(gov->name, &new_policy.policy, | ||
985 | NULL); | ||
986 | } | ||
983 | /* set default policy */ | 987 | /* set default policy */ |
984 | return cpufreq_set_policy(policy, &new_policy); | 988 | return cpufreq_set_policy(policy, &new_policy); |
985 | } | 989 | } |
@@ -1330,6 +1334,8 @@ static void cpufreq_offline_prepare(unsigned int cpu) | |||
1330 | if (has_target()) | 1334 | if (has_target()) |
1331 | strncpy(policy->last_governor, policy->governor->name, | 1335 | strncpy(policy->last_governor, policy->governor->name, |
1332 | CPUFREQ_NAME_LEN); | 1336 | CPUFREQ_NAME_LEN); |
1337 | else | ||
1338 | policy->last_policy = policy->policy; | ||
1333 | } else if (cpu == policy->cpu) { | 1339 | } else if (cpu == policy->cpu) { |
1334 | /* Nominate new CPU */ | 1340 | /* Nominate new CPU */ |
1335 | policy->cpu = cpumask_any(policy->cpus); | 1341 | policy->cpu = cpumask_any(policy->cpus); |
@@ -1401,13 +1407,10 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) | |||
1401 | } | 1407 | } |
1402 | 1408 | ||
1403 | cpumask_clear_cpu(cpu, policy->real_cpus); | 1409 | cpumask_clear_cpu(cpu, policy->real_cpus); |
1410 | remove_cpu_dev_symlink(policy, cpu); | ||
1404 | 1411 | ||
1405 | if (cpumask_empty(policy->real_cpus)) { | 1412 | if (cpumask_empty(policy->real_cpus)) |
1406 | cpufreq_policy_free(policy, true); | 1413 | cpufreq_policy_free(policy, true); |
1407 | return; | ||
1408 | } | ||
1409 | |||
1410 | remove_cpu_dev_symlink(policy, cpu); | ||
1411 | } | 1414 | } |
1412 | 1415 | ||
1413 | static void handle_update(struct work_struct *work) | 1416 | static void handle_update(struct work_struct *work) |
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 001a532e342e..98fb8821382d 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -1101,6 +1101,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
1101 | policy->max >= policy->cpuinfo.max_freq) { | 1101 | policy->max >= policy->cpuinfo.max_freq) { |
1102 | pr_debug("intel_pstate: set performance\n"); | 1102 | pr_debug("intel_pstate: set performance\n"); |
1103 | limits = &performance_limits; | 1103 | limits = &performance_limits; |
1104 | if (hwp_active) | ||
1105 | intel_pstate_hwp_set(); | ||
1104 | return 0; | 1106 | return 0; |
1105 | } | 1107 | } |
1106 | 1108 | ||
@@ -1108,7 +1110,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
1108 | limits = &powersave_limits; | 1110 | limits = &powersave_limits; |
1109 | limits->min_policy_pct = (policy->min * 100) / policy->cpuinfo.max_freq; | 1111 | limits->min_policy_pct = (policy->min * 100) / policy->cpuinfo.max_freq; |
1110 | limits->min_policy_pct = clamp_t(int, limits->min_policy_pct, 0 , 100); | 1112 | limits->min_policy_pct = clamp_t(int, limits->min_policy_pct, 0 , 100); |
1111 | limits->max_policy_pct = (policy->max * 100) / policy->cpuinfo.max_freq; | 1113 | limits->max_policy_pct = DIV_ROUND_UP(policy->max * 100, |
1114 | policy->cpuinfo.max_freq); | ||
1112 | limits->max_policy_pct = clamp_t(int, limits->max_policy_pct, 0 , 100); | 1115 | limits->max_policy_pct = clamp_t(int, limits->max_policy_pct, 0 , 100); |
1113 | 1116 | ||
1114 | /* Normalize user input to [min_policy_pct, max_policy_pct] */ | 1117 | /* Normalize user input to [min_policy_pct, max_policy_pct] */ |
@@ -1120,6 +1123,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
1120 | limits->max_sysfs_pct); | 1123 | limits->max_sysfs_pct); |
1121 | limits->max_perf_pct = max(limits->min_policy_pct, | 1124 | limits->max_perf_pct = max(limits->min_policy_pct, |
1122 | limits->max_perf_pct); | 1125 | limits->max_perf_pct); |
1126 | limits->max_perf = round_up(limits->max_perf, FRAC_BITS); | ||
1123 | 1127 | ||
1124 | /* Make sure min_perf_pct <= max_perf_pct */ | 1128 | /* Make sure min_perf_pct <= max_perf_pct */ |
1125 | limits->min_perf_pct = min(limits->max_perf_pct, limits->min_perf_pct); | 1129 | limits->min_perf_pct = min(limits->max_perf_pct, limits->min_perf_pct); |
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index 733aa5153e74..68ef8fd9482f 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq.c +++ b/drivers/cpufreq/s3c24xx-cpufreq.c | |||
@@ -648,7 +648,7 @@ late_initcall(s3c_cpufreq_initcall); | |||
648 | * | 648 | * |
649 | * Register the given set of PLLs with the system. | 649 | * Register the given set of PLLs with the system. |
650 | */ | 650 | */ |
651 | int __init s3c_plltab_register(struct cpufreq_frequency_table *plls, | 651 | int s3c_plltab_register(struct cpufreq_frequency_table *plls, |
652 | unsigned int plls_no) | 652 | unsigned int plls_no) |
653 | { | 653 | { |
654 | struct cpufreq_frequency_table *vals; | 654 | struct cpufreq_frequency_table *vals; |
diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c index 2c3b16fd3a01..de5e89b2eaaa 100644 --- a/drivers/cpufreq/scpi-cpufreq.c +++ b/drivers/cpufreq/scpi-cpufreq.c | |||
@@ -31,7 +31,7 @@ static struct scpi_ops *scpi_ops; | |||
31 | 31 | ||
32 | static struct scpi_dvfs_info *scpi_get_dvfs_info(struct device *cpu_dev) | 32 | static struct scpi_dvfs_info *scpi_get_dvfs_info(struct device *cpu_dev) |
33 | { | 33 | { |
34 | u8 domain = topology_physical_package_id(cpu_dev->id); | 34 | int domain = topology_physical_package_id(cpu_dev->id); |
35 | 35 | ||
36 | if (domain < 0) | 36 | if (domain < 0) |
37 | return ERR_PTR(-EINVAL); | 37 | return ERR_PTR(-EINVAL); |