Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 22 May 2012 02:43:57 +0000 (19:43 -0700)]
Pull smp hotplug cleanups from Thomas Gleixner:
 "This series is merily a cleanup of code copied around in arch/* and
  not changing any of the real cpu hotplug horrors yet.  I wish I'd had
  something more substantial for 3.5, but I underestimated the lurking
  horror..."

Fix up trivial conflicts in arch/{arm,sparc,x86}/Kconfig and
arch/sparc/include/asm/thread_info_32.h

* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (79 commits)
  um: Remove leftover declaration of alloc_task_struct_node()
  task_allocator: Use config switches instead of magic defines
  sparc: Use common threadinfo allocator
  score: Use common threadinfo allocator
  sh-use-common-threadinfo-allocator
  mn10300: Use common threadinfo allocator
  powerpc: Use common threadinfo allocator
  mips: Use common threadinfo allocator
  hexagon: Use common threadinfo allocator
  m32r: Use common threadinfo allocator
  frv: Use common threadinfo allocator
  cris: Use common threadinfo allocator
  x86: Use common threadinfo allocator
  c6x: Use common threadinfo allocator
  fork: Provide kmemcache based thread_info allocator
  tile: Use common threadinfo allocator
  fork: Provide weak arch_release_[task_struct|thread_info] functions
  fork: Move thread info gfp flags to header
  fork: Remove the weak insanity
  sh: Remove cpu_idle_wait()
  ...

27 files changed:
1  2 
arch/alpha/Kconfig
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/kernel/Makefile
arch/arm/kernel/smp.c
arch/blackfin/Kconfig
arch/blackfin/Makefile
arch/mn10300/kernel/smp.c
arch/parisc/kernel/smp.c
arch/powerpc/Kconfig
arch/s390/Kconfig
arch/s390/kernel/smp.c
arch/sparc/Kconfig
arch/sparc/Makefile
arch/sparc/include/asm/leon.h
arch/sparc/include/asm/thread_info_32.h
arch/sparc/kernel/Makefile
arch/sparc/kernel/leon_smp.c
arch/sparc/kernel/smp_32.c
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_smp.c
arch/tile/include/asm/thread_info.h
arch/tile/kernel/process.c
arch/x86/Kconfig
arch/x86/Makefile
kernel/fork.c
kernel/sched/core.c

Simple merge
@@@ -36,7 -33,8 +36,8 @@@ config AR
        select GENERIC_IRQ_SHOW
        select CPU_PM if (SUSPEND || CPU_IDLE)
        select GENERIC_PCI_IOMAP
 -      select HAVE_BPF_JIT if NET
 +      select HAVE_BPF_JIT
+       select GENERIC_SMP_IDLE_THREAD
        help
          The ARM series is a line of low-power-consumption RISC chip designs
          licensed by ARM Ltd and targeted at embedded applications and
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -141,9 -137,10 +137,10 @@@ config PP
        select IRQ_FORCED_THREADING
        select HAVE_RCU_TABLE_FREE if SMP
        select HAVE_SYSCALL_TRACEPOINTS
 -      select HAVE_BPF_JIT if (PPC64 && NET)
 +      select HAVE_BPF_JIT if PPC64
        select HAVE_ARCH_JUMP_LABEL
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
+       select GENERIC_SMP_IDLE_THREAD
  
  config EARLY_PRINTK
        bool
Simple merge
Simple merge
@@@ -30,7 -30,7 +30,8 @@@ config SPAR
        select USE_GENERIC_SMP_HELPERS if SMP
        select GENERIC_PCI_IOMAP
        select HAVE_NMI_WATCHDOG if SPARC64
 +      select HAVE_BPF_JIT
+       select GENERIC_SMP_IDLE_THREAD
  
  config SPARC32
        def_bool !64BIT
@@@ -50,10 -62,9 +50,9 @@@ endi
  endif
  
  head-y                 := arch/sparc/kernel/head_$(BITS).o
- head-y                 += arch/sparc/kernel/init_task.o
  
 -core-y                 += arch/sparc/kernel/
 -core-y                 += arch/sparc/mm/ arch/sparc/math-emu/
 +# See arch/sparc/Kbuild for the core part of the kernel
 +core-y                 += arch/sparc/
  
  libs-y                 += arch/sparc/prom/
  libs-y                 += arch/sparc/lib/
Simple merge
@@@ -79,10 -80,11 +79,8 @@@ register struct thread_info *current_th
   */
  #define THREAD_INFO_ORDER  1
  
- #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
 -BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info_node, int)
 -#define alloc_thread_info_node(tsk, node) BTFIXUP_CALL(alloc_thread_info_node)(node)
 -
 -BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
 -#define free_thread_info(ti) BTFIXUP_CALL(free_thread_info)(ti)
 +struct thread_info * alloc_thread_info_node(struct task_struct *tsk, int node);
 +void free_thread_info(struct thread_info *);
  
  #endif /* __ASSEMBLY__ */
  
Simple merge
Simple merge
@@@ -263,14 -418,22 +263,14 @@@ int __cpuinit __cpu_up(unsigned int cpu
        int ret=0;
  
        switch(sparc_cpu_model) {
 -      case sun4:
 -              printk("SUN4\n");
 -              BUG();
 -              break;
 -      case sun4c:
 -              printk("SUN4C\n");
 -              BUG();
 -              break;
        case sun4m:
-               ret = smp4m_boot_one_cpu(cpu);
+               ret = smp4m_boot_one_cpu(cpu, tidle);
                break;
        case sun4d:
-               ret = smp4d_boot_one_cpu(cpu);
+               ret = smp4d_boot_one_cpu(cpu, tidle);
                break;
        case sparc_leon:
-               ret = leon_boot_one_cpu(cpu);
+               ret = leon_boot_one_cpu(cpu, tidle);
                break;
        case sun4e:
                printk("SUN4E\n");
@@@ -126,13 -123,13 +126,12 @@@ void __init smp4d_boot_cpus(void
        smp4d_ipi_init();
        if (boot_cpu_id)
                current_set[0] = NULL;
 -      smp_setup_percpu_timer();
 -      local_flush_cache_all();
 +      local_ops->cache_all();
  }
  
- int __cpuinit smp4d_boot_one_cpu(int i)
+ int __cpuinit smp4d_boot_one_cpu(int i, struct task_struct *idle)
  {
        unsigned long *entry = &sun4d_cpu_startup;
-       struct task_struct *p;
        int timeout;
        int cpu_node;
  
@@@ -86,14 -86,14 +86,13 @@@ void __cpuinit smp4m_callin(void
   */
  void __init smp4m_boot_cpus(void)
  {
 -      smp4m_ipi_init();
 -      smp_setup_percpu_timer();
 -      local_flush_cache_all();
 +      sun4m_unmask_profile_irq();
 +      local_ops->cache_all();
  }
  
- int __cpuinit smp4m_boot_one_cpu(int i)
+ int __cpuinit smp4m_boot_one_cpu(int i, struct task_struct *idle)
  {
        unsigned long *entry = &sun4m_cpu_startup;
-       struct task_struct *p;
        int timeout;
        int cpu_node;
  
Simple merge
Simple merge
@@@ -81,7 -81,8 +81,8 @@@ config X8
        select CLKEVT_I8253
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
        select GENERIC_IOMAP
 -      select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC
 +      select DCACHE_WORD_ACCESS
+       select GENERIC_SMP_IDLE_THREAD
  
  config INSTRUCTION_DECODER
        def_bool (KPROBES || PERF_EVENTS)
Simple merge
diff --cc kernel/fork.c
Simple merge
Simple merge