diff options
| author | Tony Luck <tony.luck@intel.com> | 2005-11-07 09:05:22 -0800 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2005-11-07 09:05:22 -0800 |
| commit | 0ad3a96f8ad910ecf87a25ec69ed360b284dee2e (patch) | |
| tree | 12d292fd58fc0f7a3eb56c89dfc23569f3ab6c00 /kernel/sched.c | |
| parent | f79b348856fbaf77e4a0c5cb08a808e5879967a9 (diff) | |
| parent | 5b2f7ffcb734d3046144dfbd5ac6d76254a9e522 (diff) | |
Auto-update from upstream
Diffstat (limited to 'kernel/sched.c')
| -rw-r--r-- | kernel/sched.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 340dd238c16d..3ce26954be12 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1468,7 +1468,7 @@ void fastcall sched_exit(task_t *p) * the sleep_avg of the parent as well. */ rq = task_rq_lock(p->parent, &flags); - if (p->first_time_slice) { + if (p->first_time_slice && task_cpu(p) == task_cpu(p->parent)) { p->parent->time_slice += p->time_slice; if (unlikely(p->parent->time_slice > task_timeslice(p))) p->parent->time_slice = task_timeslice(p); @@ -3563,8 +3563,6 @@ int idle_cpu(int cpu) return cpu_curr(cpu) == cpu_rq(cpu)->idle; } -EXPORT_SYMBOL_GPL(idle_cpu); - /** * idle_task - return the idle task for a given cpu. * @cpu: the processor in question. @@ -4680,7 +4678,8 @@ static int migration_call(struct notifier_block *nfb, unsigned long action, #ifdef CONFIG_HOTPLUG_CPU case CPU_UP_CANCELED: /* Unbind it from offline cpu so it can run. Fall thru. */ - kthread_bind(cpu_rq(cpu)->migration_thread,smp_processor_id()); + kthread_bind(cpu_rq(cpu)->migration_thread, + any_online_cpu(cpu_online_map)); kthread_stop(cpu_rq(cpu)->migration_thread); cpu_rq(cpu)->migration_thread = NULL; break; |
