RE: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-28 Thread David Laight
From: Chris Smart > Sent: 28 April 2016 00:52 ... > >In that case what actually completes the copy? > >I think you'd need to be inside a 'restartable atomic sequence' > >in which case the cp_abort need only be done when the/a RAS > >block is detected. > > > >Or have I missed something?? > > It's u

Re: powerpc: Add support for userspace P9 copy paste

2016-04-28 Thread Michael Ellerman
On Tue, 2016-26-04 at 00:28:50 UTC, Chris Smart wrote: > The copy paste facility introduced in POWER9 provides an optimised > mechanism for a userspace application to copy a cacheline. This is > provided by a pair of instructions, copy and paste, while a third, > cp_abort (copy paste abort), provid

Re: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-27 Thread Chris Smart
On Wed, Apr 27, 2016 at 03:25:59PM +, David Laight wrote: From: Chris Smart Sent: 26 April 2016 01:29 The copy paste facility introduced in POWER9 provides an optimised mechanism for a userspace application to copy a cacheline. This is provided by a pair of instructions, copy and paste, whil

RE: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-27 Thread David Laight
From: Chris Smart > Sent: 26 April 2016 01:29 > The copy paste facility introduced in POWER9 provides an optimised > mechanism for a userspace application to copy a cacheline. This is > provided by a pair of instructions, copy and paste, while a third, > cp_abort (copy paste abort), provides a clea

Re: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-26 Thread Michael Neuling
On Tue, 2016-04-26 at 17:45 +1000, Balbir Singh wrote: > >  > > /* > >  * System calls. > > @@ -508,6 +509,14 @@ BEGIN_FTR_SECTION > > ldarxr6,0,r1 > > END_FTR_SECTION_IFSET(CPU_FTR_STCX_CHECKS_ADDRESS) > >  > > +BEGIN_FTR_SECTION > > +/* > > + * A cp_abort (copy paste abort) here ensures t

Re: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-26 Thread Balbir Singh
> /* > * System calls. > @@ -508,6 +509,14 @@ BEGIN_FTR_SECTION > ldarxr6,0,r1 > END_FTR_SECTION_IFSET(CPU_FTR_STCX_CHECKS_ADDRESS) > > +BEGIN_FTR_SECTION > +/* > + * A cp_abort (copy paste abort) here ensures that when context switching, a > + * copy from one process can't leak into the

Re: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-25 Thread Chris Smart
On Tue, Apr 26, 2016 at 04:42:09PM +1000, Cyril Bur wrote: Hi Chris, Patch looks good. Looks like you've put 8 spaces (instead of a tab) on the PPC_CP_ABORT line. Argh. I'm not sure how that happened, thanks. Apart from that, Reviewed-by: Cyril Bur Cheers, -c __

Re: [PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-25 Thread Cyril Bur
On Tue, 26 Apr 2016 10:28:50 +1000 Chris Smart wrote: > The copy paste facility introduced in POWER9 provides an optimised > mechanism for a userspace application to copy a cacheline. This is > provided by a pair of instructions, copy and paste, while a third, > cp_abort (copy paste abort), provi

[PATCH] powerpc: Add support for userspace P9 copy paste

2016-04-25 Thread Chris Smart
The copy paste facility introduced in POWER9 provides an optimised mechanism for a userspace application to copy a cacheline. This is provided by a pair of instructions, copy and paste, while a third, cp_abort (copy paste abort), provides a clean up of the state in case of a failure. The copy ins