Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-08 Thread Andreas Schwab
Scott Wood writes: > and that objdump decodes it as "dcbz r0,r3" rather than "dcbz 0,r3". Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for somethin

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-07 Thread Benjamin Herrenschmidt
On Thu, 2012-06-07 at 12:51 -0500, Scott Wood wrote: > > The assembler can't tell that you used r0 rather than 0, because > that's > handled by the preprocessor, but it seems like a bug (or at least lax > error checking) that it accepts %r0 there, and that objdump decodes it > as "dcbz r0,r3" rath

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-07 Thread Scott Wood
On 06/06/2012 10:04 PM, Paul Mackerras wrote: > On Wed, Jun 06, 2012 at 06:40:54PM +0200, Segher Boessenkool wrote: >>> +err1; dcbzr0,r3 >> >> There is no such instruction, you probably meant "dcbz 0,r3"? > > There certainly is such an instruction, though it doesn't do exactly > what a na

RE: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-07 Thread David Laight
chard; o...@lixom.net; linuxppc-dev@lists.ozlabs.org > Subject: Re: [PATCH] powerpc: Optimise the 64bit optimised > __clear_user > > On Thu, 2012-06-07 at 16:05 +1000, Michael Neuling wrote: > > > One problem with this is when we construct the > instructions, like usi

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Benjamin Herrenschmidt
On Thu, 2012-06-07 at 16:05 +1000, Michael Neuling wrote: > One problem with this is when we construct the instructions, like using > anything from ppc-opcode.h. eg. using PPC_POPCNTB would need to go from: > PPC_POPCNTB(r3,r3) > to: > PPC_POPCNTB(3,3) > Which is less readable IMHO. Ye

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Michael Ellerman
On Thu, 2012-06-07 at 16:12 +1000, Michael Neuling wrote: > Michael Ellerman wrote: > > > On Thu, 2012-06-07 at 16:05 +1000, Michael Neuling wrote: > > > Benjamin Herrenschmidt wrote: > > > > > > > On Wed, 2012-06-06 at 18:40 +0200, Segher Boessenkool wrote: > > > > > > +err1; dcbzr0,r

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Michael Neuling
Michael Ellerman wrote: > On Thu, 2012-06-07 at 16:05 +1000, Michael Neuling wrote: > > Benjamin Herrenschmidt wrote: > > > > > On Wed, 2012-06-06 at 18:40 +0200, Segher Boessenkool wrote: > > > > > +err1;dcbzr0,r3 > > > > > > > > There is no such instruction, you probably meant "d

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Michael Ellerman
On Thu, 2012-06-07 at 16:05 +1000, Michael Neuling wrote: > Benjamin Herrenschmidt wrote: > > > On Wed, 2012-06-06 at 18:40 +0200, Segher Boessenkool wrote: > > > > +err1; dcbzr0,r3 > > > > > > There is no such instruction, you probably meant "dcbz 0,r3"? > > > > This reminds me... what wo

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Michael Neuling
Benjamin Herrenschmidt wrote: > On Wed, 2012-06-06 at 18:40 +0200, Segher Boessenkool wrote: > > > +err1;dcbzr0,r3 > > > > There is no such instruction, you probably meant "dcbz 0,r3"? > > This reminds me... what would happen if we changed all our > > #define r0 0 > #define

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Paul Mackerras
On Wed, Jun 06, 2012 at 06:40:54PM +0200, Segher Boessenkool wrote: > >+err1; dcbzr0,r3 > > There is no such instruction, you probably meant "dcbz 0,r3"? There certainly is such an instruction, though it doesn't do exactly what a naive reader might expect. Using 0 rather than r0 or %r0

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Olof Johansson
On Mon, Jun 4, 2012 at 7:02 PM, Anton Blanchard wrote: > > I blame Mikey for this. He elevated my slightly dubious testcase: > > # dd if=/dev/zero of=/dev/null bs=1M count=1 > > to benchmark status. And naturally we need to be number 1 at creating > zeros. So lets improve __clear_user some mor

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Benjamin Herrenschmidt
On Wed, 2012-06-06 at 18:40 +0200, Segher Boessenkool wrote: > > +err1; dcbzr0,r3 > > There is no such instruction, you probably meant "dcbz 0,r3"? This reminds me... what would happen if we changed all our #define r0 0 #define r1 1 etc... to: #define r0 %r0 #define r1

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-06 Thread Segher Boessenkool
+err1; dcbzr0,r3 There is no such instruction, you probably meant "dcbz 0,r3"? Segher ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-04 Thread Kumar Gala
On Jun 4, 2012, at 8:12 AM, Olof Johansson wrote: > Hi, > > On Mon, Jun 4, 2012 at 12:58 AM, Anton Blanchard wrote: >> >> I blame Mikey for this. He elevated my slightly dubious testcase: >> >> # dd if=/dev/zero of=/dev/null bs=1M count=1 >> >> to benchmark status. And naturally we need

Re: [PATCH] powerpc: Optimise the 64bit optimised __clear_user

2012-06-04 Thread Olof Johansson
Hi, On Mon, Jun 4, 2012 at 12:58 AM, Anton Blanchard wrote: > > I blame Mikey for this. He elevated my slightly dubious testcase: > > # dd if=/dev/zero of=/dev/null bs=1M count=1 > > to benchmark status. And naturally we need to be number 1 at creating > zeros. So lets improve __clear_user so