Merge branch 'irq-irqdomain-arm-for-linus' of git://git.kernel.org/pub/scm/linux...
[deliverable/linux.git] / kernel / smpboot.c
index eb89e1807408575257b8ea60b64559b1adf8afde..f032fb5284e3a340108359a0a17eccfa3b20e115 100644 (file)
@@ -110,7 +110,7 @@ static int smpboot_thread_fn(void *data)
                set_current_state(TASK_INTERRUPTIBLE);
                preempt_disable();
                if (kthread_should_stop()) {
-                       set_current_state(TASK_RUNNING);
+                       __set_current_state(TASK_RUNNING);
                        preempt_enable();
                        if (ht->cleanup)
                                ht->cleanup(td->cpu, cpu_online(td->cpu));
@@ -136,26 +136,27 @@ static int smpboot_thread_fn(void *data)
                /* Check for state change setup */
                switch (td->status) {
                case HP_THREAD_NONE:
+                       __set_current_state(TASK_RUNNING);
                        preempt_enable();
                        if (ht->setup)
                                ht->setup(td->cpu);
                        td->status = HP_THREAD_ACTIVE;
-                       preempt_disable();
-                       break;
+                       continue;
+
                case HP_THREAD_PARKED:
+                       __set_current_state(TASK_RUNNING);
                        preempt_enable();
                        if (ht->unpark)
                                ht->unpark(td->cpu);
                        td->status = HP_THREAD_ACTIVE;
-                       preempt_disable();
-                       break;
+                       continue;
                }
 
                if (!ht->thread_should_run(td->cpu)) {
-                       preempt_enable();
+                       preempt_enable_no_resched();
                        schedule();
                } else {
-                       set_current_state(TASK_RUNNING);
+                       __set_current_state(TASK_RUNNING);
                        preempt_enable();
                        ht->thread_fn(td->cpu);
                }
This page took 0.03153 seconds and 5 git commands to generate.