Thread (7 messages) flat view 7 messages, 4 authors, 2017-06-19

Re: [PATCH 2/4] powerpc/64: context switch avoid reservation-clearing instruction

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-06-14 13:07:03

Nicholas Piggin [off-list ref] writes:
quoted hunk ↗ jump to hunk
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 803c3bc274c4..1f0688ad09d7 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2875,6 +2875,12 @@ context_switch(struct rq *rq, struct task_struct *prev,
 	rq_unpin_lock(rq, rf);
 	spin_release(&rq->lock.dep_map, 1, _THIS_IP_);
 
+	/*
+	 * Some architectures require that a spin lock is taken before
+	 * _switch. The rq_lock satisfies this condition. See powerpc
+	 * _switch for details.
+	 */
+
 	/* Here we just switch the register state and the stack. */
 	switch_to(prev, next, prev);
 	barrier();
I dropped this hunk, if you want to merge it you can resend it and get
an ack from Peterz.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help