[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1607051144190.4076@tp.orcam.me.uk>
Date: Tue, 5 Jul 2016 11:53:17 +0100
From: "Maciej W. Rozycki" <macro@...tec.com>
To: PrasannaKumar Muralidharan <prasannatsmkumar@...il.com>
CC: <linux-mips@...ux-mips.org>, <linux-kernel@...r.kernel.org>,
Alexey Dobriyan <adobriyan@...il.com>,
John Stultz <john.stultz@...aro.org>, <mguzik@...hat.com>,
<athorlton@....com>, <mhocko@...e.com>, <ebiederm@...ssion.com>,
<gorcunov@...nvz.org>, <luto@...nel.org>, <cl@...ux.com>,
<serge.hallyn@...ntu.com>, Kees Cook <keescook@...omium.org>,
<jslaby@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>,
Florian Fainelli <f.fainelli@...il.com>, <mingo@...nel.org>,
<alex.smith@...tec.com>, <markos.chandras@...tec.com>,
Leonid Yegoshin <Leonid.Yegoshin@...tec.com>,
<david.daney@...ium.com>, <zhaoxiu.zeng@...il.com>,
<chenhc@...ote.com>, <Zubair.Kakakhel@...tec.com>,
James Hogan <james.hogan@...tec.com>,
Paul Burton <paul.burton@...tec.com>,
Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [RFC] mips: Add MXU context switching support
On Tue, 5 Jul 2016, PrasannaKumar Muralidharan wrote:
> >> + asm volatile(".word 0x700803ee\n\t");
> >> + tsk->thread.mxu.xr[15] = reg_val;
> >> +}
> >
> > Not using an output operand with asms here?
>
> I think the instruction saves the xr* register value to reg_val
> without need for output operand.
It does, a classic `asm' is supposed to act as an optimisation barrier.
However since you've used an operand `asm' in `__restore_mxu' I think
it would be good for consistency to use one here as well; it would make
this piece of code a little bit more readable too, as you wouldn't have
to guess that the `asm' writes to `reg_val' then.
So I suggest that you convert `__save_mxu' to use an operand `asm' as
well.
Maciej
Powered by blists - more mailing lists