diff options
-rw-r--r-- | include/linux/sched.h | 5 | ||||
-rw-r--r-- | kernel/sched.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8764cda0feca..4b912e753ca0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1633,10 +1633,7 @@ static inline unsigned int task_cpu(const struct task_struct *p) | |||
1633 | return task_thread_info(p)->cpu; | 1633 | return task_thread_info(p)->cpu; |
1634 | } | 1634 | } |
1635 | 1635 | ||
1636 | static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) | 1636 | extern void set_task_cpu(struct task_struct *p, unsigned int cpu); |
1637 | { | ||
1638 | task_thread_info(p)->cpu = cpu; | ||
1639 | } | ||
1640 | 1637 | ||
1641 | #else | 1638 | #else |
1642 | 1639 | ||
diff --git a/kernel/sched.c b/kernel/sched.c index 46b23f0fee24..d6624978feb2 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1111,6 +1111,12 @@ unsigned long weighted_cpuload(const int cpu) | |||
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | #ifdef CONFIG_SMP | 1113 | #ifdef CONFIG_SMP |
1114 | |||
1115 | void set_task_cpu(struct task_struct *p, unsigned int cpu) | ||
1116 | { | ||
1117 | task_thread_info(p)->cpu = cpu; | ||
1118 | } | ||
1119 | |||
1114 | struct migration_req { | 1120 | struct migration_req { |
1115 | struct list_head list; | 1121 | struct list_head list; |
1116 | 1122 | ||