summaryrefslogtreecommitdiffstats
path: root/kernel/sched/idle.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-11-17 18:19:31 -0500
committerPeter Zijlstra <peterz@infradead.org>2021-05-12 11:43:26 +0200
commit5cb9eaa3d274f75539077a28cf01e3563195fa53 (patch)
treee1f3c463f682add25856cae8d02fd258dd8cbb8a /kernel/sched/idle.c
parent39d371b7c0c299d489041884d005aacc4bba8c15 (diff)
downloadlinux-5cb9eaa3d274f75539077a28cf01e3563195fa53.tar.bz2
sched: Wrap rq::lock access
In preparation of playing games with rq->lock, abstract the thing using an accessor. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Don Hiatt <dhiatt@digitalocean.com> Tested-by: Hongyu Ning <hongyu.ning@linux.intel.com> Tested-by: Vincent Guittot <vincent.guittot@linaro.org> Link: https://lkml.kernel.org/r/20210422123308.136465446@infradead.org
Diffstat (limited to 'kernel/sched/idle.c')
-rw-r--r--kernel/sched/idle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 7ca3d3d86c2a..0194768ea9e7 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -455,10 +455,10 @@ struct task_struct *pick_next_task_idle(struct rq *rq)
static void
dequeue_task_idle(struct rq *rq, struct task_struct *p, int flags)
{
- raw_spin_unlock_irq(&rq->lock);
+ raw_spin_rq_unlock_irq(rq);
printk(KERN_ERR "bad: scheduling from the idle thread!\n");
dump_stack();
- raw_spin_lock_irq(&rq->lock);
+ raw_spin_rq_lock_irq(rq);
}
/*