Merge branch 'android12-5.10' into android12-5.10-lts
Sync up with android12-5.10 for the following commits:e41c993723
ANDROID: scsi: ufs: Enable CONFIG_SCSI_UFS_HPB82b96336e5
ANDROID: scsi: ufs: Make CONFIG_SCSI_UFS_HPB compatible with the GKIb2cbc7e5aa
UPSTREAM: arm64: vdso: Avoid ISB after reading from cntvct_el0a1a3544a4c
ANDROID: GKI: Disable X86_MCE drivers23db10c83f
ANDROID: GKI: Update symbols to symbol liste06796855d
ANDROID: ABI: update allowed list for exynosbfc334cc0b
FROMGIT: sched: Skip priority checks with SCHED_FLAG_KEEP_PARAMSaaf62dc816
FROMGIT: sched: Don't report SCHED_FLAG_SUGOV in sched_getattr()4bb5a5c55b
FROMGIT: sched/deadline: Fix reset_on_fork reporting of DL tasksac42699756
BACKPORT: FROMGIT: sched: Fix UCLAMP_FLAG_IDLE settingd479d97cb7
FROMGIT: Revert "usb: dwc3: gadget: Use list_replace_init() before traversing lists"9520a2129f
ANDROID: ABI: Update allowed list for galaxy Change-Id: I159116a65fc0609488dd834dcbcaf5cffbb35bad Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -1324,6 +1324,23 @@ static inline void uclamp_rq_dec(struct rq *rq, struct task_struct *p)
|
||||
uclamp_rq_dec_id(rq, p, clamp_id);
|
||||
}
|
||||
|
||||
static inline void uclamp_rq_reinc_id(struct rq *rq, struct task_struct *p,
|
||||
enum uclamp_id clamp_id)
|
||||
{
|
||||
if (!p->uclamp[clamp_id].active)
|
||||
return;
|
||||
|
||||
uclamp_rq_dec_id(rq, p, clamp_id);
|
||||
uclamp_rq_inc_id(rq, p, clamp_id);
|
||||
|
||||
/*
|
||||
* Make sure to clear the idle flag if we've transiently reached 0
|
||||
* active tasks on rq.
|
||||
*/
|
||||
if (clamp_id == UCLAMP_MAX && (rq->uclamp_flags & UCLAMP_FLAG_IDLE))
|
||||
rq->uclamp_flags &= ~UCLAMP_FLAG_IDLE;
|
||||
}
|
||||
|
||||
static inline void
|
||||
uclamp_update_active(struct task_struct *p)
|
||||
{
|
||||
@@ -1347,12 +1364,8 @@ uclamp_update_active(struct task_struct *p)
|
||||
* affecting a valid clamp bucket, the next time it's enqueued,
|
||||
* it will already see the updated clamp bucket value.
|
||||
*/
|
||||
for_each_clamp_id(clamp_id) {
|
||||
if (p->uclamp[clamp_id].active) {
|
||||
uclamp_rq_dec_id(rq, p, clamp_id);
|
||||
uclamp_rq_inc_id(rq, p, clamp_id);
|
||||
}
|
||||
}
|
||||
for_each_clamp_id(clamp_id)
|
||||
uclamp_rq_reinc_id(rq, p, clamp_id);
|
||||
|
||||
task_rq_unlock(rq, p, &rf);
|
||||
}
|
||||
@@ -5887,6 +5900,16 @@ err_size:
|
||||
return -E2BIG;
|
||||
}
|
||||
|
||||
static void get_params(struct task_struct *p, struct sched_attr *attr)
|
||||
{
|
||||
if (task_has_dl_policy(p))
|
||||
__getparam_dl(p, attr);
|
||||
else if (task_has_rt_policy(p))
|
||||
attr->sched_priority = p->rt_priority;
|
||||
else
|
||||
attr->sched_nice = task_nice(p);
|
||||
}
|
||||
|
||||
/**
|
||||
* sys_sched_setscheduler - set/change the scheduler policy and RT priority
|
||||
* @pid: the pid in question.
|
||||
@@ -5948,6 +5971,8 @@ SYSCALL_DEFINE3(sched_setattr, pid_t, pid, struct sched_attr __user *, uattr,
|
||||
rcu_read_unlock();
|
||||
|
||||
if (likely(p)) {
|
||||
if (attr.sched_flags & SCHED_FLAG_KEEP_PARAMS)
|
||||
get_params(p, &attr);
|
||||
retval = sched_setattr(p, &attr);
|
||||
put_task_struct(p);
|
||||
}
|
||||
@@ -6096,12 +6121,8 @@ SYSCALL_DEFINE4(sched_getattr, pid_t, pid, struct sched_attr __user *, uattr,
|
||||
kattr.sched_policy = p->policy;
|
||||
if (p->sched_reset_on_fork)
|
||||
kattr.sched_flags |= SCHED_FLAG_RESET_ON_FORK;
|
||||
if (task_has_dl_policy(p))
|
||||
__getparam_dl(p, &kattr);
|
||||
else if (task_has_rt_policy(p))
|
||||
kattr.sched_priority = p->rt_priority;
|
||||
else
|
||||
kattr.sched_nice = task_nice(p);
|
||||
get_params(p, &kattr);
|
||||
kattr.sched_flags &= SCHED_FLAG_ALL;
|
||||
|
||||
#ifdef CONFIG_UCLAMP_TASK
|
||||
/*
|
||||
|
Reference in New Issue
Block a user