]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Jul 2017 01:08:06 +0000 (18:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Jul 2017 01:08:06 +0000 (18:08 -0700)
Pull SMP hotplug updates from Thomas Gleixner:
 "This update is primarily a cleanup of the CPU hotplug locking code.

  The hotplug locking mechanism is an open coded RWSEM, which allows
  recursive locking. The main problem with that is the recursive nature
  as it evades the full lockdep coverage and hides potential deadlocks.

  The rework replaces the open coded RWSEM with a percpu RWSEM and
  establishes full lockdep coverage that way.

  The bulk of the changes fix up recursive locking issues and address
  the now fully reported potential deadlocks all over the place. Some of
  these deadlocks have been observed in the RT tree, but on mainline the
  probability was low enough to hide them away."

* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits)
  cpu/hotplug: Constify attribute_group structures
  powerpc: Only obtain cpu_hotplug_lock if called by rtasd
  ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
  cpu/hotplug: Remove unused check_for_tasks() function
  perf/core: Don't release cred_guard_mutex if not taken
  cpuhotplug: Link lock stacks for hotplug callbacks
  acpi/processor: Prevent cpu hotplug deadlock
  sched: Provide is_percpu_thread() helper
  cpu/hotplug: Convert hotplug locking to percpu rwsem
  s390: Prevent hotplug rwsem recursion
  arm: Prevent hotplug rwsem recursion
  arm64: Prevent cpu hotplug rwsem recursion
  kprobes: Cure hotplug lock ordering issues
  jump_label: Reorder hotplug lock and jump_label_lock
  perf/tracing/cpuhotplug: Fix locking order
  ACPI/processor: Use cpu_hotplug_disable() instead of get_online_cpus()
  PCI: Replace the racy recursion prevention
  PCI: Use cpu_hotplug_disable() instead of get_online_cpus()
  perf/x86/intel: Drop get_online_cpus() in intel_snb_check_microcode()
  x86/perf: Drop EXPORT of perf_check_microcode
  ...

12 files changed:
1  2 
arch/powerpc/include/asm/topology.h
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/platforms/powernv/subcore.c
arch/x86/events/core.c
arch/x86/events/intel/core.c
drivers/cpufreq/cpufreq.c
include/linux/cpuhotplug.h
include/linux/pci.h
include/linux/sched.h
kernel/cpu.c
kernel/events/core.c
kernel/kprobes.c

index 329771559cbbb16048d67d27450865703a248c90,a2d36b7703ae2e0c8cf04c3798f08649452050a5..dc4e15937ccf847f4fa040d4b77cf0ae07a7ba8d
@@@ -43,23 -43,10 +43,24 @@@ extern void __init dump_numa_cpu_topolo
  
  extern int sysfs_add_device_to_node(struct device *dev, int nid);
  extern void sysfs_remove_device_from_node(struct device *dev, int nid);
+ extern int numa_update_cpu_topology(bool cpus_locked);
  
 +static inline int early_cpu_to_node(int cpu)
 +{
 +      int nid;
 +
 +      nid = numa_cpu_lookup_table[cpu];
 +
 +      /*
 +       * Fall back to node 0 if nid is unset (it should be, except bugs).
 +       * This allows callers to safely do NODE_DATA(early_cpu_to_node(cpu)).
 +       */
 +      return (nid < 0) ? 0 : nid;
 +}
  #else
  
 +static inline int early_cpu_to_node(int cpu) { return 0; }
 +
  static inline void dump_numa_cpu_topology(void) {}
  
  static inline int sysfs_add_device_to_node(struct device *dev, int nid)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc kernel/cpu.c
Simple merge
Simple merge
Simple merge