Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-10-02 Thread Ard Biesheuvel
On 1 October 2018 at 03:43, Jason A. Donenfeld wrote: > On Sun, Sep 30, 2018 at 7:35 AM Andy Lutomirski wrote: >> >>> Oh, and another thing (and I'm surprised checkpatch.pl didn't >> >>> complain >> >>> about it): the use of typedef in new code is strongly discouraged. >> >>> Thi

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-10-01 Thread Jason A. Donenfeld
On Sun, Sep 30, 2018 at 7:35 AM Andy Lutomirski wrote: > >>> Oh, and another thing (and I'm surprised checkpatch.pl didn't complain > >>> about it): the use of typedef in new code is strongly discouraged. > >>> This policy predates my involvement, so perhaps Joe can elaborate on >

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-29 Thread Andy Lutomirski
> On Sep 29, 2018, at 9:20 PM, Joe Perches wrote: > >> On Fri, 2018-09-28 at 16:01 +0200, Jason A. Donenfeld wrote: >> On Fri, Sep 28, 2018 at 4:00 PM Ard Biesheuvel >> wrote: >>> On 28 September 2018 at 15:59, Jason A. Donenfeld wrote: On Fri, Sep 28, 2018 at 3:58 PM Ard Biesheuv

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-29 Thread Joe Perches
On Fri, 2018-09-28 at 16:01 +0200, Jason A. Donenfeld wrote: > On Fri, Sep 28, 2018 at 4:00 PM Ard Biesheuvel > wrote: > > > > On 28 September 2018 at 15:59, Jason A. Donenfeld wrote: > > > On Fri, Sep 28, 2018 at 3:58 PM Ard Biesheuvel > > > wrote: > > > > > > > > On 28 September 2018 at 15:4

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-28 Thread Jason A. Donenfeld
On Fri, Sep 28, 2018 at 4:00 PM Ard Biesheuvel wrote: > > On 28 September 2018 at 15:59, Jason A. Donenfeld wrote: > > On Fri, Sep 28, 2018 at 3:58 PM Ard Biesheuvel > > wrote: > >> > >> On 28 September 2018 at 15:47, Jason A. Donenfeld wrote: > >> > On Fri, Sep 28, 2018 at 10:49 AM Ard Biesheu

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-28 Thread Ard Biesheuvel
On 28 September 2018 at 15:59, Jason A. Donenfeld wrote: > On Fri, Sep 28, 2018 at 3:58 PM Ard Biesheuvel > wrote: >> >> On 28 September 2018 at 15:47, Jason A. Donenfeld wrote: >> > On Fri, Sep 28, 2018 at 10:49 AM Ard Biesheuvel >> > wrote: >> >> >> +typedef enum { >> >> >> + HAVE_NO_SI

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-28 Thread Jason A. Donenfeld
On Fri, Sep 28, 2018 at 3:58 PM Ard Biesheuvel wrote: > > On 28 September 2018 at 15:47, Jason A. Donenfeld wrote: > > On Fri, Sep 28, 2018 at 10:49 AM Ard Biesheuvel > > wrote: > >> >> +typedef enum { > >> >> + HAVE_NO_SIMD = 1 << 0, > >> >> + HAVE_FULL_SIMD = 1 << 1, > >> >> +

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-28 Thread Ard Biesheuvel
On 28 September 2018 at 15:47, Jason A. Donenfeld wrote: > On Fri, Sep 28, 2018 at 10:49 AM Ard Biesheuvel > wrote: >> >> +typedef enum { >> >> + HAVE_NO_SIMD = 1 << 0, >> >> + HAVE_FULL_SIMD = 1 << 1, >> >> + HAVE_SIMD_IN_USE = 1 << 31 >> >> +} simd_context_t; >> >> + >> >> Oh,

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-28 Thread Jason A. Donenfeld
On Fri, Sep 28, 2018 at 10:49 AM Ard Biesheuvel wrote: > >> +typedef enum { > >> + HAVE_NO_SIMD = 1 << 0, > >> + HAVE_FULL_SIMD = 1 << 1, > >> + HAVE_SIMD_IN_USE = 1 << 31 > >> +} simd_context_t; > >> + > > Oh, and another thing (and I'm surprised checkpatch.pl didn't complain >

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-28 Thread Jason A. Donenfeld
On Fri, Sep 28, 2018 at 10:28 AM Ard Biesheuvel wrote: > Given that this patch applies to all architectures at once, it is > probably better to drop the unrelated reordering hunks to avoid > conflicts. Ack. Will retain order for v7. > > +static __must_check inline bool may_use_simd(void) > > +{

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-28 Thread Ard Biesheuvel
(+ Joe) On 28 September 2018 at 10:28, Ard Biesheuvel wrote: > On 25 September 2018 at 16:56, Jason A. Donenfeld wrote: >> Sometimes it's useful to amortize calls to XSAVE/XRSTOR and the related >> FPU/SIMD functions over a number of calls, because FPU restoration is >> quite expensive. This add

Re: [PATCH net-next v6 01/23] asm: simd context helper API

2018-09-28 Thread Ard Biesheuvel
On 25 September 2018 at 16:56, Jason A. Donenfeld wrote: > Sometimes it's useful to amortize calls to XSAVE/XRSTOR and the related > FPU/SIMD functions over a number of calls, because FPU restoration is > quite expensive. This adds a simple header for carrying out this pattern: > > simd_contex

[PATCH net-next v6 01/23] asm: simd context helper API

2018-09-25 Thread Jason A. Donenfeld
Sometimes it's useful to amortize calls to XSAVE/XRSTOR and the related FPU/SIMD functions over a number of calls, because FPU restoration is quite expensive. This adds a simple header for carrying out this pattern: simd_context_t simd_context; simd_get(&simd_context); while ((item =