Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Jul 2012 18:22:15 +0000 (11:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 22 Jul 2012 18:22:15 +0000 (11:22 -0700)
Pull smp/hotplug changes from Ingo Molnar:
 "Various cleanups to the SMP hotplug code - a continuing effort of
  Thomas et al"

* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  smpboot: Remove leftover declaration
  smp: Remove num_booting_cpus()
  smp: Remove ipi_call_lock[_irq]()/ipi_call_unlock[_irq]()
  POWERPC: Smp: remove call to ipi_call_lock()/ipi_call_unlock()
  SPARC: SMP: Remove call to ipi_call_lock_irq()/ipi_call_unlock_irq()
  ia64: SMP: Remove call to ipi_call_lock_irq()/ipi_call_unlock_irq()
  x86-smp-remove-call-to-ipi_call_lock-ipi_call_unlock
  tile: SMP: Remove call to ipi_call_lock()/ipi_call_unlock()
  S390: Smp: remove call to ipi_call_lock()/ipi_call_unlock()
  parisc: Smp: remove call to ipi_call_lock()/ipi_call_unlock()
  mn10300: SMP: Remove call to ipi_call_lock()/ipi_call_unlock()
  hexagon: SMP: Remove call to ipi_call_lock()/ipi_call_unlock()

1  2 
arch/x86/kernel/smpboot.c

index 7bd8a0823654115cdb476b1693cb3eaeb6affba3,b2fd28ff84b5fb0219ee400b90e5fc9e95fb8709..27e2eeff7a4be611a6e974e947ad5f94638613ab
@@@ -255,22 -255,13 +255,13 @@@ notrace static void __cpuinit start_sec
        check_tsc_sync_target();
  
        /*
-        * We need to hold call_lock, so there is no inconsistency
-        * between the time smp_call_function() determines number of
-        * IPI recipients, and the time when the determination is made
-        * for which cpus receive the IPI. Holding this
-        * lock helps us to not include this cpu in a currently in progress
-        * smp_call_function().
-        *
         * We need to hold vector_lock so there the set of online cpus
         * does not change while we are assigning vectors to cpus.  Holding
         * this lock ensures we don't half assign or remove an irq from a cpu.
         */
-       ipi_call_lock();
        lock_vector_lock();
        set_cpu_online(smp_processor_id(), true);
        unlock_vector_lock();
-       ipi_call_unlock();
        per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
        x86_platform.nmi_init();
  
@@@ -349,12 -340,9 +340,12 @@@ static bool __cpuinit match_llc(struct 
  
  static bool __cpuinit match_mc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
  {
 -      if (c->phys_proc_id == o->phys_proc_id)
 -              return topology_sane(c, o, "mc");
 +      if (c->phys_proc_id == o->phys_proc_id) {
 +              if (cpu_has(c, X86_FEATURE_AMD_DCM))
 +                      return true;
  
 +              return topology_sane(c, o, "mc");
 +      }
        return false;
  }
  
@@@ -385,15 -373,6 +376,15 @@@ void __cpuinit set_cpu_sibling_map(int 
                if ((i == cpu) || (has_mc && match_llc(c, o)))
                        link_mask(llc_shared, cpu, i);
  
 +      }
 +
 +      /*
 +       * This needs a separate iteration over the cpus because we rely on all
 +       * cpu_sibling_mask links to be set-up.
 +       */
 +      for_each_cpu(i, cpu_sibling_setup_mask) {
 +              o = &cpu_data(i);
 +
                if ((i == cpu) || (has_mc && match_mc(c, o))) {
                        link_mask(core, cpu, i);
  
  /* maps the cpu to the sched domain representing multi-core */
  const struct cpumask *cpu_coregroup_mask(int cpu)
  {
 -      struct cpuinfo_x86 *c = &cpu_data(cpu);
 -      /*
 -       * For perf, we return last level cache shared map.
 -       * And for power savings, we return cpu_core_map
 -       */
 -      if (!(cpu_has(c, X86_FEATURE_AMD_DCM)))
 -              return cpu_core_mask(cpu);
 -      else
 -              return cpu_llc_shared_mask(cpu);
 +      return cpu_llc_shared_mask(cpu);
  }
  
  static void impress_friends(void)