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

Michael Ellerman mpe at ellerman.id.au
Wed Jun 14 23:07:02 AEST 2017


Nicholas Piggin <npiggin at gmail.com> writes:

> 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


More information about the Linuxppc-dev mailing list