mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 20:37:27 +00:00
Power management fixes for v4.7-rc5
- Fix a latent initialization issue in the pcc-cpufreq driver (incorrect initial value of a structure field) that has been uncovered by a recent ACPICA commit (Mike Galbraith). - Add a missing notification in an update_devfreq() error code path forgotten by a recent devfreq commit (Chanwoo Choi). - Fix devfreq device frequency initialization (Lukasz Luba). - Fix an incorrect IS_ERR() check in the devfreq framework discovered by the Smatch checker (Dan Carpenter). - Drop two excessive put_device() calls from the devfreq framework (MyungJoo Ham, Cai Zhiyong). - Fix a possible memory leak in the devfreq framework and drop an unnecessary kfree() invocation from it (MyungJoo Ham). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABCAAGBQJXbbELAAoJEILEb/54YlRxyMIP/3Su+TreD8KWEHzAIjddk8ba 2iaQGF8gwcglNq4GMKmmkVaCzmvE6/9sLHLMJ4OW7hXvEdkU2cbhL7l7Yvna17rU XY9UgNaewCXLflDZ1S6XirjL438CIpZiAgumRJnSVOG3miuA4bL4wivuCAuJL9sE s9Hib0UZ6otLQidQojRMaXAUSNnmfrzmis35PGeG42MEFdr6NtCHnR7AA1XuxKy4 82JawNAZb9l4YJd1g9r0VJpbKwY7Hzbr3ZWEZ+fDp9RfjAqal83QGXxExyojRCsb B1xg3YQNmmRmxRWNsIfKg6nlLfGIOy4eNNflUvOY0/PE5hFmypcayEC3s7BEzbM/ WTRsUM8KBIy6h/qwgYhiAoBNJ667HH/AE+d6JnUmPaEBQm592ZkFHdYMCeyLLj0T TfXVj5El4+XQMQAStFRSEI7cRs6BWx9Z9E8LN3A40KXsFf1QEGrAFuDy+RnCKsEv yuGkjx5BFO9lGu5UyzznCd79t/0MbBhJZjy587EMOyK1HlXvhlsmN8sK/RTnosmY FphG0Z9ffgunnHDlRzXRYwKamiSWJ8FsaI/Swpss9MJSJbsMES/sli0k/fp+rygp gG6gHdpjslCEk/Xur9RV2Q8e9n1dG2vLnmJstCEcFgF1nSOsfcO85nFCVsW3IYh1 BM3BJN9fIDVdg1xpSk8q =8eXG -----END PGP SIGNATURE----- Merge tag 'pm-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fix for a latent cpufreq driver bug uncovered by a recent ACPICA change and several fixes for the devfreq framework, including one fix for an issue introduced recently. Specifics: - Fix a latent initialization issue in the pcc-cpufreq driver (incorrect initial value of a structure field) that has been uncovered by a recent ACPICA commit (Mike Galbraith). - Add a missing notification in an update_devfreq() error code path forgotten by a recent devfreq commit (Chanwoo Choi). - Fix devfreq device frequency initialization (Lukasz Luba). - Fix an incorrect IS_ERR() check in the devfreq framework discovered by the Smatch checker (Dan Carpenter). - Drop two excessive put_device() calls from the devfreq framework (MyungJoo Ham, Cai Zhiyong). - Fix a possible memory leak in the devfreq framework and drop an unnecessary kfree() invocation from it (MyungJoo Ham)" * tag 'pm-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / devfreq: Send the DEVFREQ_POSTCHANGE notification when target() is failed cpufreq: pcc-cpufreq: Fix doorbell.access_width PM / devfreq: fix initialization of current frequency in last status PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check PM / devfreq: remove double put_device PM / devfreq: fix double call put_device PM / devfreq: fix duplicated kfree on devfreq pointer PM / devfreq: devm_kzalloc to have dev pointer more precisely
This commit is contained in:
commit
3522b35cb2
@ -487,7 +487,7 @@ static int __init pcc_cpufreq_probe(void)
|
||||
doorbell.space_id = reg_resource->space_id;
|
||||
doorbell.bit_width = reg_resource->bit_width;
|
||||
doorbell.bit_offset = reg_resource->bit_offset;
|
||||
doorbell.access_width = 64;
|
||||
doorbell.access_width = 4;
|
||||
doorbell.address = reg_resource->address;
|
||||
|
||||
pr_debug("probe: doorbell: space_id is %d, bit_width is %d, "
|
||||
|
@ -268,8 +268,11 @@ int update_devfreq(struct devfreq *devfreq)
|
||||
devfreq_notify_transition(devfreq, &freqs, DEVFREQ_PRECHANGE);
|
||||
|
||||
err = devfreq->profile->target(devfreq->dev.parent, &freq, flags);
|
||||
if (err)
|
||||
if (err) {
|
||||
freqs.new = cur_freq;
|
||||
devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE);
|
||||
return err;
|
||||
}
|
||||
|
||||
freqs.new = freq;
|
||||
devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE);
|
||||
@ -552,6 +555,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
||||
devfreq->profile = profile;
|
||||
strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN);
|
||||
devfreq->previous_freq = profile->initial_freq;
|
||||
devfreq->last_status.current_frequency = profile->initial_freq;
|
||||
devfreq->data = data;
|
||||
devfreq->nb.notifier_call = devfreq_notifier_call;
|
||||
|
||||
@ -561,23 +565,22 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
||||
mutex_lock(&devfreq->lock);
|
||||
}
|
||||
|
||||
devfreq->trans_table = devm_kzalloc(dev, sizeof(unsigned int) *
|
||||
devfreq->profile->max_state *
|
||||
devfreq->profile->max_state,
|
||||
GFP_KERNEL);
|
||||
devfreq->time_in_state = devm_kzalloc(dev, sizeof(unsigned long) *
|
||||
devfreq->profile->max_state,
|
||||
GFP_KERNEL);
|
||||
devfreq->last_stat_updated = jiffies;
|
||||
|
||||
dev_set_name(&devfreq->dev, "%s", dev_name(dev));
|
||||
err = device_register(&devfreq->dev);
|
||||
if (err) {
|
||||
put_device(&devfreq->dev);
|
||||
mutex_unlock(&devfreq->lock);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
devfreq->trans_table = devm_kzalloc(&devfreq->dev, sizeof(unsigned int) *
|
||||
devfreq->profile->max_state *
|
||||
devfreq->profile->max_state,
|
||||
GFP_KERNEL);
|
||||
devfreq->time_in_state = devm_kzalloc(&devfreq->dev, sizeof(unsigned long) *
|
||||
devfreq->profile->max_state,
|
||||
GFP_KERNEL);
|
||||
devfreq->last_stat_updated = jiffies;
|
||||
|
||||
srcu_init_notifier_head(&devfreq->transition_notifier_list);
|
||||
|
||||
mutex_unlock(&devfreq->lock);
|
||||
@ -603,7 +606,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
|
||||
err_init:
|
||||
list_del(&devfreq->node);
|
||||
device_unregister(&devfreq->dev);
|
||||
kfree(devfreq);
|
||||
err_out:
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
@ -621,7 +623,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
|
||||
return -EINVAL;
|
||||
|
||||
device_unregister(&devfreq->dev);
|
||||
put_device(&devfreq->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -220,9 +220,6 @@ static int exynos_nocp_parse_dt(struct platform_device *pdev,
|
||||
|
||||
/* Maps the memory mapped IO to control nocp register */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (IS_ERR(res))
|
||||
return PTR_ERR(res);
|
||||
|
||||
base = devm_ioremap_resource(dev, res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
Loading…
Reference in New Issue
Block a user