aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
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/s390
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/s390')
-rw-r--r--arch/s390/kernel/cache.c5
-rw-r--r--arch/s390/kernel/smp.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/arch/s390/kernel/cache.c b/arch/s390/kernel/cache.c
index 3a414c0f93ed..c0b03c28d157 100644
--- a/arch/s390/kernel/cache.c
+++ b/arch/s390/kernel/cache.c
@@ -378,9 +378,12 @@ static int __init cache_init(void)
378 if (!test_facility(34)) 378 if (!test_facility(34))
379 return 0; 379 return 0;
380 cache_build_info(); 380 cache_build_info();
381
382 cpu_notifier_register_begin();
381 for_each_online_cpu(cpu) 383 for_each_online_cpu(cpu)
382 cache_add_cpu(cpu); 384 cache_add_cpu(cpu);
383 hotcpu_notifier(cache_hotplug, 0); 385 __hotcpu_notifier(cache_hotplug, 0);
386 cpu_notifier_register_done();
384 return 0; 387 return 0;
385} 388}
386device_initcall(cache_init); 389device_initcall(cache_init);
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 8827883310dd..5a640b395bd4 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -1057,19 +1057,24 @@ static DEVICE_ATTR(rescan, 0200, NULL, rescan_store);
1057 1057
1058static int __init s390_smp_init(void) 1058static int __init s390_smp_init(void)
1059{ 1059{
1060 int cpu, rc; 1060 int cpu, rc = 0;
1061 1061
1062 hotcpu_notifier(smp_cpu_notify, 0);
1063#ifdef CONFIG_HOTPLUG_CPU 1062#ifdef CONFIG_HOTPLUG_CPU
1064 rc = device_create_file(cpu_subsys.dev_root, &dev_attr_rescan); 1063 rc = device_create_file(cpu_subsys.dev_root, &dev_attr_rescan);
1065 if (rc) 1064 if (rc)
1066 return rc; 1065 return rc;
1067#endif 1066#endif
1067 cpu_notifier_register_begin();
1068 for_each_present_cpu(cpu) { 1068 for_each_present_cpu(cpu) {
1069 rc = smp_add_present_cpu(cpu); 1069 rc = smp_add_present_cpu(cpu);
1070 if (rc) 1070 if (rc)
1071 return rc; 1071 goto out;
1072 } 1072 }
1073 return 0; 1073
1074 __hotcpu_notifier(smp_cpu_notify, 0);
1075
1076out:
1077 cpu_notifier_register_done();
1078 return rc;
1074} 1079}
1075subsys_initcall(s390_smp_init); 1080subsys_initcall(s390_smp_init);