Allow to disable FPU support
FPU codes have been separated from common part in previous patches. This patch add the CONFIG_FPU option and some stubs, so that a no-FPU configuration is allowed. Signed-off-by: Alan Kao <alankao@andestech.com> Cc: Greentime Hu <greentime@andestech.com> Cc: Vincent Chen <vincentc@andestech.com> Cc: Zong Li <zong@andestech.com> Cc: Nick Hu <nickhu@andestech.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
@@ -76,7 +76,7 @@ void show_regs(struct pt_regs *regs)
|
||||
void start_thread(struct pt_regs *regs, unsigned long pc,
|
||||
unsigned long sp)
|
||||
{
|
||||
regs->sstatus = SR_SPIE /* User mode, irqs on */ | SR_FS_INITIAL;
|
||||
regs->sstatus = DEFAULT_SSTATUS;
|
||||
regs->sepc = pc;
|
||||
regs->sp = sp;
|
||||
set_fs(USER_DS);
|
||||
@@ -84,12 +84,14 @@ void start_thread(struct pt_regs *regs, unsigned long pc,
|
||||
|
||||
void flush_thread(void)
|
||||
{
|
||||
#ifdef CONFIG_FPU
|
||||
/*
|
||||
* Reset FPU context
|
||||
* frm: round to nearest, ties to even (IEEE default)
|
||||
* fflags: accrued exceptions cleared
|
||||
*/
|
||||
memset(¤t->thread.fstate, 0, sizeof(current->thread.fstate));
|
||||
#endif
|
||||
}
|
||||
|
||||
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
|
||||
|
Reference in New Issue
Block a user