Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 03:04:55 +0000 (19:04 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 03:04:55 +0000 (19:04 -0800)
Pull preparatory smp/hotplug patches from Ingo Molnar:
 "Some early preparatory changes for the WIP hotplug rework by Thomas
  Gleixner."

* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  stop_machine: Use smpboot threads
  stop_machine: Store task reference in a separate per cpu variable
  smpboot: Allow selfparking per cpu threads

1  2 
kernel/cpu.c

diff --combined kernel/cpu.c
index e5d5e8e1e03048424c41cb17bff75d4e91a6f060,c91e30d1ef058134c39932daf37d4cda7658e748..b5e4ab2d427e874404347c7e20186ed4cfd2f488
@@@ -224,13 -224,11 +224,13 @@@ void clear_tasks_mm_cpumask(int cpu
  static inline void check_for_tasks(int cpu)
  {
        struct task_struct *p;
 +      cputime_t utime, stime;
  
        write_lock_irq(&tasklist_lock);
        for_each_process(p) {
 +              task_cputime(p, &utime, &stime);
                if (task_cpu(p) == cpu && p->state == TASK_RUNNING &&
 -                  (p->utime || p->stime))
 +                  (utime || stime))
                        printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d "
                                "(state = %ld, flags = %x)\n",
                                p->comm, task_pid_nr(p), cpu,
@@@ -256,6 -254,8 +256,8 @@@ static int __ref take_cpu_down(void *_p
                return err;
  
        cpu_notify(CPU_DYING | param->mod, param->hcpu);
+       /* Park the stopper thread */
+       kthread_park(current);
        return 0;
  }