diff --git a/include/linux/sched.h b/include/linux/sched.h index 0f0544ffdbaa..2431931f1502 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -299,6 +299,7 @@ extern void io_schedule_finish(int token); extern long io_schedule_timeout(long timeout); extern void io_schedule(void); extern struct task_struct *pick_migrate_task(struct rq *rq); +extern int select_fallback_rq(int cpu, struct task_struct *p); /** * struct prev_cputime - snapshot of system and user cputime diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 22cb8bfe7328..200e6804e690 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2305,8 +2305,8 @@ struct set_affinity_pending { * So we race with normal scheduler movements, but that's OK, as long * as the task is no longer on this CPU. */ -static struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf, - struct task_struct *p, int dest_cpu) +struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf, + struct task_struct *p, int dest_cpu) { /* Affinity changed (again). */ if (!is_cpu_allowed(p, dest_cpu)) @@ -2317,6 +2317,7 @@ static struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf, return rq; } +EXPORT_SYMBOL_GPL(__migrate_task); /* * migration_cpu_stop - this will be executed by a highprio stopper thread @@ -3350,7 +3351,7 @@ EXPORT_SYMBOL_GPL(kick_process); * select_task_rq() below may allow selection of !active CPUs in order * to satisfy the above rules. */ -static int select_fallback_rq(int cpu, struct task_struct *p) +int select_fallback_rq(int cpu, struct task_struct *p) { int nid = cpu_to_node(cpu); const struct cpumask *nodemask = NULL; @@ -3424,6 +3425,7 @@ out: return dest_cpu; } +EXPORT_SYMBOL_GPL(select_fallback_rq); /* * The caller (fork, wakeup) owns p->pi_lock, ->cpus_ptr is stable. diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 5e0e2c3d87a9..ac3fc7f9dd91 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -152,6 +152,7 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) wait_for_completion(&done.completion); return done.ret; } +EXPORT_SYMBOL_GPL(stop_one_cpu); /* This controls the threads on each CPU. */ enum multi_stop_state {