aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
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 /arch/ia64
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 'arch/ia64')
-rw-r--r--arch/ia64/kernel/err_inject.c15
-rw-r--r--arch/ia64/kernel/palinfo.c6
-rw-r--r--arch/ia64/kernel/salinfo.c6
-rw-r--r--arch/ia64/kernel/topology.c6
4 files changed, 28 insertions, 5 deletions
diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c
index f59c0b844e88..0c161ed6d18e 100644
--- a/arch/ia64/kernel/err_inject.c
+++ b/arch/ia64/kernel/err_inject.c
@@ -269,12 +269,17 @@ err_inject_init(void)
269#ifdef ERR_INJ_DEBUG 269#ifdef ERR_INJ_DEBUG
270 printk(KERN_INFO "Enter error injection driver.\n"); 270 printk(KERN_INFO "Enter error injection driver.\n");
271#endif 271#endif
272
273 cpu_notifier_register_begin();
274
272 for_each_online_cpu(i) { 275 for_each_online_cpu(i) {
273 err_inject_cpu_callback(&err_inject_cpu_notifier, CPU_ONLINE, 276 err_inject_cpu_callback(&err_inject_cpu_notifier, CPU_ONLINE,
274 (void *)(long)i); 277 (void *)(long)i);
275 } 278 }
276 279
277 register_hotcpu_notifier(&err_inject_cpu_notifier); 280 __register_hotcpu_notifier(&err_inject_cpu_notifier);
281
282 cpu_notifier_register_done();
278 283
279 return 0; 284 return 0;
280} 285}
@@ -288,11 +293,17 @@ err_inject_exit(void)
288#ifdef ERR_INJ_DEBUG 293#ifdef ERR_INJ_DEBUG
289 printk(KERN_INFO "Exit error injection driver.\n"); 294 printk(KERN_INFO "Exit error injection driver.\n");
290#endif 295#endif
296
297 cpu_notifier_register_begin();
298
291 for_each_online_cpu(i) { 299 for_each_online_cpu(i) {
292 sys_dev = get_cpu_device(i); 300 sys_dev = get_cpu_device(i);
293 sysfs_remove_group(&sys_dev->kobj, &err_inject_attr_group); 301 sysfs_remove_group(&sys_dev->kobj, &err_inject_attr_group);
294 } 302 }
295 unregister_hotcpu_notifier(&err_inject_cpu_notifier); 303
304 __unregister_hotcpu_notifier(&err_inject_cpu_notifier);
305
306 cpu_notifier_register_done();
296} 307}
297 308
298module_init(err_inject_init); 309module_init(err_inject_init);
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index ab333284f4b2..c39c3cd3ac34 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -996,13 +996,17 @@ palinfo_init(void)
996 if (!palinfo_dir) 996 if (!palinfo_dir)
997 return -ENOMEM; 997 return -ENOMEM;
998 998
999 cpu_notifier_register_begin();
1000
999 /* Create palinfo dirs in /proc for all online cpus */ 1001 /* Create palinfo dirs in /proc for all online cpus */
1000 for_each_online_cpu(i) { 1002 for_each_online_cpu(i) {
1001 create_palinfo_proc_entries(i); 1003 create_palinfo_proc_entries(i);
1002 } 1004 }
1003 1005
1004 /* Register for future delivery via notify registration */ 1006 /* Register for future delivery via notify registration */
1005 register_hotcpu_notifier(&palinfo_cpu_notifier); 1007 __register_hotcpu_notifier(&palinfo_cpu_notifier);
1008
1009 cpu_notifier_register_done();
1006 1010
1007 return 0; 1011 return 0;
1008} 1012}
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index 960a396f5929..ee9719eebb1e 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -635,6 +635,8 @@ salinfo_init(void)
635 (void *)salinfo_entries[i].feature); 635 (void *)salinfo_entries[i].feature);
636 } 636 }
637 637
638 cpu_notifier_register_begin();
639
638 for (i = 0; i < ARRAY_SIZE(salinfo_log_name); i++) { 640 for (i = 0; i < ARRAY_SIZE(salinfo_log_name); i++) {
639 data = salinfo_data + i; 641 data = salinfo_data + i;
640 data->type = i; 642 data->type = i;
@@ -669,7 +671,9 @@ salinfo_init(void)
669 salinfo_timer.function = &salinfo_timeout; 671 salinfo_timer.function = &salinfo_timeout;
670 add_timer(&salinfo_timer); 672 add_timer(&salinfo_timer);
671 673
672 register_hotcpu_notifier(&salinfo_cpu_notifier); 674 __register_hotcpu_notifier(&salinfo_cpu_notifier);
675
676 cpu_notifier_register_done();
673 677
674 return 0; 678 return 0;
675} 679}
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index ca69a5a96dcc..f295f9abba4b 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -454,12 +454,16 @@ static int __init cache_sysfs_init(void)
454{ 454{
455 int i; 455 int i;
456 456
457 cpu_notifier_register_begin();
458
457 for_each_online_cpu(i) { 459 for_each_online_cpu(i) {
458 struct device *sys_dev = get_cpu_device((unsigned int)i); 460 struct device *sys_dev = get_cpu_device((unsigned int)i);
459 cache_add_dev(sys_dev); 461 cache_add_dev(sys_dev);
460 } 462 }
461 463
462 register_hotcpu_notifier(&cache_cpu_notifier); 464 __register_hotcpu_notifier(&cache_cpu_notifier);
465
466 cpu_notifier_register_done();
463 467
464 return 0; 468 return 0;
465} 469}