Re: [PATCH v4 5/5] Auto-detect whether a FPU exists

2018-08-08 Thread Christoph Hellwig
> extern unsigned long elf_hwcap; > +#ifdef CONFIG_FPU > +extern bool no_fpu; > +#endif No need to have an ifdef around an extern declaration. > static inline void fstate_save(struct task_struct *task, > struct pt_regs *regs) > { > + if (unlikely(no_fpu)) > +

[PATCH v4 5/5] Auto-detect whether a FPU exists

2018-08-07 Thread Alan Kao
We expect that a kernel with CONFIG_FPU=y can still support no-FPU machines. To do so, the kernel should first examine the existence of a FPU, then do nothing if a FPU does exist; otherwise, it should disable/bypass all FPU-related functions. In this patch, a new global variable, no_fpu, is create