]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Apr 2014 21:55:46 +0000 (14:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Apr 2014 21:55:46 +0000 (14:55 -0700)
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
  ...

18 files changed:
1  2 
arch/arm/kernel/hw_breakpoint.c
arch/arm64/kernel/debug-monitors.c
arch/s390/kernel/smp.c
arch/x86/kernel/cpu/perf_event_intel_uncore.c
arch/x86/kernel/hpet.c
arch/x86/kernel/vsyscall_64.c
arch/x86/kvm/x86.c
arch/x86/pci/amd_bus.c
drivers/base/topology.c
drivers/cpufreq/acpi-cpufreq.c
drivers/hwmon/coretemp.c
drivers/powercap/intel_rapl.c
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
drivers/xen/balloon.c
include/linux/cpu.h
kernel/profile.c
mm/vmstat.c
net/core/flow.c

Simple merge
index 14ba23c6115367b962922e5decd3afabb59e789e,c9855313eb27888f54e632bac0fcd7c10d67ec15..ed3955a95747286ebcb3f705c107dc1b3af90423
@@@ -154,13 -155,16 +154,17 @@@ static struct notifier_block os_lock_n
  
  static int debug_monitors_init(void)
  {
+       cpu_notifier_register_begin();
        /* Clear the OS lock. */
 -      smp_call_function(clear_os_lock, NULL, 1);
 -      clear_os_lock(NULL);
 +      on_each_cpu(clear_os_lock, NULL, 1);
 +      isb();
 +      local_dbg_enable();
  
        /* Register hotplug handler. */
-       register_cpu_notifier(&os_lock_nb);
+       __register_cpu_notifier(&os_lock_nb);
+       cpu_notifier_register_done();
        return 0;
  }
  postcore_initcall(debug_monitors_init);
Simple merge
index bd2253d40cffe16363569384084bdf6d6d73e7f5,28922f62eb2990be0552802c3c3630ec2a354d8d..65bbbea38b9c9c0f7246a3c4fee4176dd529647b
@@@ -4234,41 -3868,6 +4234,41 @@@ static int __init uncore_pmus_register(
        return 0;
  }
  
-       get_online_cpus();
 +static void __init uncore_cpumask_init(void)
 +{
 +      int cpu;
 +
 +      /*
 +       * ony invoke once from msr or pci init code
 +       */
 +      if (!cpumask_empty(&uncore_cpu_mask))
 +              return;
 +
-       register_cpu_notifier(&uncore_cpu_nb);
++      cpu_notifier_register_begin();
 +
 +      for_each_online_cpu(cpu) {
 +              int i, phys_id = topology_physical_package_id(cpu);
 +
 +              for_each_cpu(i, &uncore_cpu_mask) {
 +                      if (phys_id == topology_physical_package_id(i)) {
 +                              phys_id = -1;
 +                              break;
 +                      }
 +              }
 +              if (phys_id < 0)
 +                      continue;
 +
 +              uncore_cpu_prepare(cpu, phys_id);
 +              uncore_event_init_cpu(cpu);
 +      }
 +      on_each_cpu(uncore_cpu_setup, NULL, 1);
 +
-       put_online_cpus();
++      __register_cpu_notifier(&uncore_cpu_nb);
 +
++      cpu_notifier_register_done();
 +}
 +
 +
  static int __init intel_uncore_init(void)
  {
        int ret;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 1b266dbe755a983e0bca02bb50ca1ab47419488d,93b2a3fe0a6475f1396fedc0cecd91ee69575cdc..cb980f0c731b72ef3df3ff6b9afa2f6f44d15b9c
@@@ -599,10 -606,13 +606,13 @@@ int __ref create_proc_profile(void) /* 
        entry = proc_create("profile", S_IWUSR | S_IRUGO,
                            NULL, &proc_profile_operations);
        if (!entry)
-               return 0;
+               goto out;
        proc_set_size(entry, (1 + prof_len) * sizeof(atomic_t));
-       hotcpu_notifier(profile_cpu_callback, 0);
-       return 0;
+       __hotcpu_notifier(profile_cpu_callback, 0);
+ out:
+       cpu_notifier_register_done();
+       return err;
  }
 -module_init(create_proc_profile);
 +subsys_initcall(create_proc_profile);
  #endif /* CONFIG_PROC_FS */
diff --cc mm/vmstat.c
Simple merge
diff --cc net/core/flow.c
Simple merge