Re: [RFC v2 1/2] ppc/fpu: Add generic FPU api similar to x86

2021-07-20 Thread Christoph Hellwig
> + > +/* > + * Use kernel_fpu_begin/end() if you intend to use FPU in kernel context. It > + * disables preemption so be careful if you intend to use it for long periods > + * of time. > + * TODO: If you intend to use the FPU in irq/softirq you need to check first > with > + * irq_fpu_usable() if

[RFC v2 1/2] ppc/fpu: Add generic FPU api similar to x86

2021-07-20 Thread Anson Jacob
- Add kernel_fpu_begin & kernel_fpu_end API as x86 - Add logic similar to x86 to ensure fpu begin/end call correctness - Add kernel_fpu_enabled to know if FPU is enabled v2: - Added asm/fpu/api.h powerpc variant with kernel_fpu_begin/end() and kernel_fpu_enabled() declarations - Updated kernel