Re: [PATCH 23/23] x86/fpu: Defer FPU state load until return to userspace
On 2018-11-07 20:48:58 [+0100], To linux-kernel@vger.kernel.org wrote: > index 8c03b42416656..d10b60d80d35a 100644 > --- a/arch/x86/include/asm/fpu/api.h > +++ b/arch/x86/include/asm/fpu/api.h The bot complained about missing definition for local_bh_disable() so I swapped the preempt.h for bottom_half.h at the beginning of this file. > @@ -27,17 +27,31 @@ extern void __kernel_fpu_end(void); > extern void kernel_fpu_begin(void); > extern void kernel_fpu_end(void); > extern bool irq_fpu_usable(void); > +extern void fpregs_mark_activate(void); > > static inline void __fpregs_changes_begin(void) > { > preempt_disable(); > + local_bh_disable(); > } > > static inline void __fpregs_changes_end(void) > { > + local_bh_enable(); > preempt_enable(); > } Sebastian
Re: [PATCH 23/23] x86/fpu: Defer FPU state load until return to userspace
On 2018-11-07 20:48:58 [+0100], To linux-kernel@vger.kernel.org wrote: > index 8c03b42416656..d10b60d80d35a 100644 > --- a/arch/x86/include/asm/fpu/api.h > +++ b/arch/x86/include/asm/fpu/api.h The bot complained about missing definition for local_bh_disable() so I swapped the preempt.h for bottom_half.h at the beginning of this file. > @@ -27,17 +27,31 @@ extern void __kernel_fpu_end(void); > extern void kernel_fpu_begin(void); > extern void kernel_fpu_end(void); > extern bool irq_fpu_usable(void); > +extern void fpregs_mark_activate(void); > > static inline void __fpregs_changes_begin(void) > { > preempt_disable(); > + local_bh_disable(); > } > > static inline void __fpregs_changes_end(void) > { > + local_bh_enable(); > preempt_enable(); > } Sebastian