ANDROID: sched: allow access to critical common code for CPU Pause
Allow module access to critical functionality to support CPU Pause from a vendor module. Bug: 205164003 Change-Id: Ia04608dae076469e265071f8e0d53aee66d49cfa Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
This commit is contained in:
committed by
Todd Kjos
parent
72a288144d
commit
ca2177d4a0
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user