aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 17:55:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 17:55:46 -0400
commit467a9e1633043810259a7f5368fbcc1e84746137 (patch)
treec8a5bfd2a65455d7f6a59b312e348e069375bd9b /drivers/thermal
parentb8780c363d808a726a34793caa900923d32b6b80 (diff)
parenta0e247a8059223593f9c5c3d5c1fd50eedf415c0 (diff)
Merge tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull CPU hotplug notifiers registration fixes from Rafael Wysocki: "The purpose of this single series of commits from Srivatsa S Bhat (with a small piece from Gautham R Shenoy) touching multiple subsystems that use CPU hotplug notifiers is to provide a way to register them that will not lead to deadlocks with CPU online/offline operations as described in the changelog of commit 93ae4f978ca7f ("CPU hotplug: Provide lockless versions of callback registration functions"). The first three commits in the series introduce the API and document it and the rest simply goes through the users of CPU hotplug notifiers and converts them to using the new method" * tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits) net/iucv/iucv.c: Fix CPU hotplug callback registration net/core/flow.c: Fix CPU hotplug callback registration mm, zswap: Fix CPU hotplug callback registration mm, vmstat: Fix CPU hotplug callback registration profile: Fix CPU hotplug callback registration trace, ring-buffer: Fix CPU hotplug callback registration xen, balloon: Fix CPU hotplug callback registration hwmon, via-cputemp: Fix CPU hotplug callback registration hwmon, coretemp: Fix CPU hotplug callback registration thermal, x86-pkg-temp: Fix CPU hotplug callback registration octeon, watchdog: Fix CPU hotplug callback registration oprofile, nmi-timer: Fix CPU hotplug callback registration intel-idle: Fix CPU hotplug callback registration clocksource, dummy-timer: Fix CPU hotplug callback registration drivers/base/topology.c: Fix CPU hotplug callback registration acpi-cpufreq: Fix CPU hotplug callback registration zsmalloc: Fix CPU hotplug callback registration scsi, fcoe: Fix CPU hotplug callback registration scsi, bnx2fc: Fix CPU hotplug callback registration scsi, bnx2i: Fix CPU hotplug callback registration ...
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/x86_pkg_temp_thermal.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/thermal/x86_pkg_temp_thermal.c b/drivers/thermal/x86_pkg_temp_thermal.c
index 081fd7e6a9f0..9ea3d9d49ffc 100644
--- a/drivers/thermal/x86_pkg_temp_thermal.c
+++ b/drivers/thermal/x86_pkg_temp_thermal.c
@@ -590,12 +590,12 @@ static int __init pkg_temp_thermal_init(void)
590 platform_thermal_package_rate_control = 590 platform_thermal_package_rate_control =
591 pkg_temp_thermal_platform_thermal_rate_control; 591 pkg_temp_thermal_platform_thermal_rate_control;
592 592
593 get_online_cpus(); 593 cpu_notifier_register_begin();
594 for_each_online_cpu(i) 594 for_each_online_cpu(i)
595 if (get_core_online(i)) 595 if (get_core_online(i))
596 goto err_ret; 596 goto err_ret;
597 register_hotcpu_notifier(&pkg_temp_thermal_notifier); 597 __register_hotcpu_notifier(&pkg_temp_thermal_notifier);
598 put_online_cpus(); 598 cpu_notifier_register_done();
599 599
600 pkg_temp_debugfs_init(); /* Don't care if fails */ 600 pkg_temp_debugfs_init(); /* Don't care if fails */
601 601
@@ -604,7 +604,7 @@ static int __init pkg_temp_thermal_init(void)
604err_ret: 604err_ret:
605 for_each_online_cpu(i) 605 for_each_online_cpu(i)
606 put_core_offline(i); 606 put_core_offline(i);
607 put_online_cpus(); 607 cpu_notifier_register_done();
608 kfree(pkg_work_scheduled); 608 kfree(pkg_work_scheduled);
609 platform_thermal_package_notify = NULL; 609 platform_thermal_package_notify = NULL;
610 platform_thermal_package_rate_control = NULL; 610 platform_thermal_package_rate_control = NULL;
@@ -617,8 +617,8 @@ static void __exit pkg_temp_thermal_exit(void)
617 struct phy_dev_entry *phdev, *n; 617 struct phy_dev_entry *phdev, *n;
618 int i; 618 int i;
619 619
620 get_online_cpus(); 620 cpu_notifier_register_begin();
621 unregister_hotcpu_notifier(&pkg_temp_thermal_notifier); 621 __unregister_hotcpu_notifier(&pkg_temp_thermal_notifier);
622 mutex_lock(&phy_dev_list_mutex); 622 mutex_lock(&phy_dev_list_mutex);
623 list_for_each_entry_safe(phdev, n, &phy_dev_list, list) { 623 list_for_each_entry_safe(phdev, n, &phy_dev_list, list) {
624 /* Retore old MSR value for package thermal interrupt */ 624 /* Retore old MSR value for package thermal interrupt */
@@ -636,7 +636,7 @@ static void __exit pkg_temp_thermal_exit(void)
636 for_each_online_cpu(i) 636 for_each_online_cpu(i)
637 cancel_delayed_work_sync( 637 cancel_delayed_work_sync(
638 &per_cpu(pkg_temp_thermal_threshold_work, i)); 638 &per_cpu(pkg_temp_thermal_threshold_work, i));
639 put_online_cpus(); 639 cpu_notifier_register_done();
640 640
641 kfree(pkg_work_scheduled); 641 kfree(pkg_work_scheduled);
642 642