sched/walt: Make wake_up_idle related functions public

wake_up_idle related functions are meant for other modules
usage. Make them public by moving to appropriate header.

Change-Id: I888b511e656d6c160c98b5da44bc873573a9beed
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti 2021-02-03 19:48:03 +05:30 committed by Rishabh Bhatnagar
parent bcb5863521
commit 6599bdd0dc
2 changed files with 36 additions and 24 deletions

View File

@ -94,6 +94,28 @@ struct walt_task_struct {
bool iowaited;
};
static inline bool sched_get_wake_up_idle(struct task_struct *p)
{
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
return wts->wake_up_idle;
}
static inline int sched_set_wake_up_idle(struct task_struct *p, bool wake_up_idle)
{
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
wts->wake_up_idle = wake_up_idle;
return 0;
}
static inline void set_wake_up_idle(bool wake_up_idle)
{
struct walt_task_struct *wts = (struct walt_task_struct *) current->android_vendor_data1;
wts->wake_up_idle = wake_up_idle;
}
extern int sched_lpm_disallowed_time(int cpu, u64 *timeout);
extern int set_task_boost(int boost, u64 period);
#else
@ -105,6 +127,20 @@ static inline int set_task_boost(int boost, u64 period)
{
return 0;
}
static inline bool sched_get_wake_up_idle(struct task_struct *p)
{
return false;
}
static inline int sched_set_wake_up_idle(struct task_struct *p, bool wake_up_idle)
{
return 0;
}
static inline void set_wake_up_idle(bool wake_up_idle)
{
}
#endif
#endif /* _LINUX_SCHED_WALT_H */

View File

@ -865,30 +865,6 @@ static inline void walt_irq_work_queue(struct irq_work *work)
irq_work_queue_on(work, cpumask_any(cpu_online_mask));
}
#define PF_WAKE_UP_IDLE 1
static inline u32 sched_get_wake_up_idle(struct task_struct *p)
{
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
return wts->wake_up_idle;
}
static inline int sched_set_wake_up_idle(struct task_struct *p,
int wake_up_idle)
{
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
wts->wake_up_idle = !!wake_up_idle;
return 0;
}
static inline void set_wake_up_idle(bool enabled)
{
struct walt_task_struct *wts = (struct walt_task_struct *) current->android_vendor_data1;
wts->wake_up_idle = enabled;
}
static inline struct task_group *css_tg(struct cgroup_subsys_state *css)
{
return css ? container_of(css, struct task_group, css) : NULL;