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.
The CPU Pause feature was originally part of the GKI Common code, but due
to lack of support from ARM it was decided that the feature would be
abandoned in common code. It is now implemented downstream in Qualcomm's
vendor modules.

Bug: 205164003
Change-Id: Ia04608dae076469e265071f8e0d53aee66d49cfa
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
This commit is contained in:
Stephen Dickey authored and Todd Kjos committed 2022-09-21 00:09:57 +00:00
1 parent bd8c099034
commit 60d2746309
4 files changed
+12 -3

No files matched your search

+1
View File
@@ -303,6 +303,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
+5 -3
View File
@@ -2407,8 +2407,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))
@@ -2419,6 +2419,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
@@ -3454,7 +3455,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;
@@ -3528,6 +3529,7 @@ out:
return dest_cpu;
}
EXPORT_SYMBOL_GPL(select_fallback_rq);
/*
* The caller (fork, wakeup) owns p->pi_lock, ->cpus_ptr is stable.
+5
View File
@@ -1564,6 +1564,11 @@ struct rq_flags {
#endif
};
#ifdef CONFIG_SMP
extern struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
struct task_struct *p, int dest_cpu);
#endif
extern struct callback_head balance_push_callback;
/*
+1
View File
@@ -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 {