Re: [PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-27 Thread Michael Ellerman
Matt Brown writes: > On Thu, Jul 27, 2017 at 11:26 AM, Michael Ellerman > wrote: >> Segher Boessenkool writes: >> >>> On Wed, Jul 26, 2017 at 08:03:30PM +1000, Michael Ellerman wrote: Segher Boessenkool writes: > A general question about these patches: some things are inside #ifdef

Re: [PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-27 Thread Matt Brown
On Thu, Jul 27, 2017 at 11:26 AM, Michael Ellerman wrote: > Segher Boessenkool writes: > >> On Wed, Jul 26, 2017 at 08:03:30PM +1000, Michael Ellerman wrote: >>> Segher Boessenkool writes: >>> > A general question about these patches: some things are inside #ifdef >>> > __powerpc64__, some are n

Re: [PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-26 Thread Michael Ellerman
Segher Boessenkool writes: > On Wed, Jul 26, 2017 at 08:03:30PM +1000, Michael Ellerman wrote: >> Segher Boessenkool writes: >> > A general question about these patches: some things are inside #ifdef >> > __powerpc64__, some are not. It seems it is the wrong macro, and it >> > should be used (o

Re: [PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-26 Thread Segher Boessenkool
On Wed, Jul 26, 2017 at 08:03:30PM +1000, Michael Ellerman wrote: > Segher Boessenkool writes: > > A general question about these patches: some things are inside #ifdef > > __powerpc64__, some are not. It seems it is the wrong macro, and it > > should be used (or not used) consistently? > > Why

Re: [PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-26 Thread Michael Ellerman
Segher Boessenkool writes: > On Tue, Jul 25, 2017 at 01:33:19PM +1000, Matt Brown wrote: >> +static nokprobe_inline void do_prty(struct pt_regs *regs, unsigned long v, >> +int size, int ra) >> +{ >> +unsigned long long res = v; >> + >> +res = (0x000100010001000

Re: [PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-26 Thread Gabriel Paubert
On Tue, Jul 25, 2017 at 06:08:05PM +1000, Balbir Singh wrote: > On Tue, 2017-07-25 at 13:33 +1000, Matt Brown wrote: > > This adds emulation for the prtyw and prtyd instructions. > > Tested for logical correctness against the prtyw and prtyd instructions > > on ppc64le. > > > > Signed-off-by: Matt

Re: [PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-25 Thread Segher Boessenkool
On Tue, Jul 25, 2017 at 01:33:19PM +1000, Matt Brown wrote: > +static nokprobe_inline void do_prty(struct pt_regs *regs, unsigned long v, > + int size, int ra) > +{ > + unsigned long long res = v; > + > + res = (0x0001000100010001 & res) + (0x0001000100010001 & (

Re: [PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-25 Thread Balbir Singh
On Tue, 2017-07-25 at 13:33 +1000, Matt Brown wrote: > This adds emulation for the prtyw and prtyd instructions. > Tested for logical correctness against the prtyw and prtyd instructions > on ppc64le. > > Signed-off-by: Matt Brown > --- > v3: > - optimised using the Giles-Miller method of s

[PATCH v3 4/5] powerpc/lib/sstep: Add prty instruction emulation

2017-07-24 Thread Matt Brown
This adds emulation for the prtyw and prtyd instructions. Tested for logical correctness against the prtyw and prtyd instructions on ppc64le. Signed-off-by: Matt Brown --- v3: - optimised using the Giles-Miller method of side-ways addition v2: - fixed opcodes - fixed bitsh