aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-06-15 04:47:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-06-15 04:47:46 -0400
commit92091c438bad93ba2591e8c4ba86126227327be2 (patch)
treecd5fe916d62259d13df357f82b8033f282fd0913
parentb45edc2d02d50ba4657f29c0e2380e337d324aef (diff)
parentf63e4f7d4179c9157c51bbe82af7c8f6b5fb39dd (diff)
Merge tag 'pm-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: "These revert a recent cpufreq schedutil governor change that turned out to be problematic and fix a few minor issues in cpufreq, cpuidle and the Exynos devfreq drivers. Specifics: - Revert a recent cpufreq schedutil governor change that caused some systems to behave undesirably (Rafael Wysocki). - Fix a cpufreq conservative governor issue introduced during the 3.10 cycle that prevents it from working as expected in some situations (Tomasz WilczyƄski). - Fix an error code path in the generic cpuidle driver for DT-based systems (Christophe Jaillet). - Fix three minor issues in devfreq drivers for Exynos (Arvind Yadav, Krzysztof Kozlowski)" * tag 'pm-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: dt: Add missing 'of_node_put()' cpufreq: conservative: Allow down_threshold to take values from 1 to 10 Revert "cpufreq: schedutil: Reduce frequencies slower" PM / devfreq: exynos-ppmu: Staticize event list PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enable PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c4
-rw-r--r--drivers/cpuidle/dt_idle_states.c4
-rw-r--r--drivers/devfreq/event/exynos-nocp.c6
-rw-r--r--drivers/devfreq/event/exynos-ppmu.c8
-rw-r--r--kernel/sched/cpufreq_schedutil.c3
5 files changed, 16 insertions, 9 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 992f7c20760f..88220ff3e1c2 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -185,8 +185,8 @@ static ssize_t store_down_threshold(struct gov_attr_set *attr_set,
185 int ret; 185 int ret;
186 ret = sscanf(buf, "%u", &input); 186 ret = sscanf(buf, "%u", &input);
187 187
188 /* cannot be lower than 11 otherwise freq will not fall */ 188 /* cannot be lower than 1 otherwise freq will not fall */
189 if (ret != 1 || input < 11 || input > 100 || 189 if (ret != 1 || input < 1 || input > 100 ||
190 input >= dbs_data->up_threshold) 190 input >= dbs_data->up_threshold)
191 return -EINVAL; 191 return -EINVAL;
192 192
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index ffca4fc0061d..ae8eb0359889 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -180,8 +180,10 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
180 if (!state_node) 180 if (!state_node)
181 break; 181 break;
182 182
183 if (!of_device_is_available(state_node)) 183 if (!of_device_is_available(state_node)) {
184 of_node_put(state_node);
184 continue; 185 continue;
186 }
185 187
186 if (!idle_state_valid(state_node, i, cpumask)) { 188 if (!idle_state_valid(state_node, i, cpumask)) {
187 pr_warn("%s idle state not valid, bailing out\n", 189 pr_warn("%s idle state not valid, bailing out\n",
diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
index 5c3e7b11e8a6..f6e7956fc91a 100644
--- a/drivers/devfreq/event/exynos-nocp.c
+++ b/drivers/devfreq/event/exynos-nocp.c
@@ -267,7 +267,11 @@ static int exynos_nocp_probe(struct platform_device *pdev)
267 } 267 }
268 platform_set_drvdata(pdev, nocp); 268 platform_set_drvdata(pdev, nocp);
269 269
270 clk_prepare_enable(nocp->clk); 270 ret = clk_prepare_enable(nocp->clk);
271 if (ret) {
272 dev_err(&pdev->dev, "failed to prepare ppmu clock\n");
273 return ret;
274 }
271 275
272 pr_info("exynos-nocp: new NoC Probe device registered: %s\n", 276 pr_info("exynos-nocp: new NoC Probe device registered: %s\n",
273 dev_name(dev)); 277 dev_name(dev));
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index 9b7350935b73..d96e3dc71cf8 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -44,7 +44,7 @@ struct exynos_ppmu {
44 { "ppmu-event2-"#name, PPMU_PMNCNT2 }, \ 44 { "ppmu-event2-"#name, PPMU_PMNCNT2 }, \
45 { "ppmu-event3-"#name, PPMU_PMNCNT3 } 45 { "ppmu-event3-"#name, PPMU_PMNCNT3 }
46 46
47struct __exynos_ppmu_events { 47static struct __exynos_ppmu_events {
48 char *name; 48 char *name;
49 int id; 49 int id;
50} ppmu_events[] = { 50} ppmu_events[] = {
@@ -648,7 +648,11 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
648 dev_name(&pdev->dev), desc[i].name); 648 dev_name(&pdev->dev), desc[i].name);
649 } 649 }
650 650
651 clk_prepare_enable(info->ppmu.clk); 651 ret = clk_prepare_enable(info->ppmu.clk);
652 if (ret) {
653 dev_err(&pdev->dev, "failed to prepare ppmu clock\n");
654 return ret;
655 }
652 656
653 return 0; 657 return 0;
654} 658}
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 622eed1b7658..076a2e31951c 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -101,9 +101,6 @@ static void sugov_update_commit(struct sugov_policy *sg_policy, u64 time,
101 if (sg_policy->next_freq == next_freq) 101 if (sg_policy->next_freq == next_freq)
102 return; 102 return;
103 103
104 if (sg_policy->next_freq > next_freq)
105 next_freq = (sg_policy->next_freq + next_freq) >> 1;
106
107 sg_policy->next_freq = next_freq; 104 sg_policy->next_freq = next_freq;
108 sg_policy->last_freq_update_time = time; 105 sg_policy->last_freq_update_time = time;
109 106