treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arc / include / asm / fpu.h
blob64347250fdf55e58453e90982e90182ee68b1fc4
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2020 Synopsys, Inc. (www.synopsys.com)
5 */
7 #ifndef _ASM_ARC_FPU_H
8 #define _ASM_ARC_FPU_H
10 #ifdef CONFIG_ARC_FPU_SAVE_RESTORE
12 #include <asm/ptrace.h>
14 #ifdef CONFIG_ISA_ARCOMPACT
16 /* These DPFP regs need to be saved/restored across ctx-sw */
17 struct arc_fpu {
18 struct {
19 unsigned int l, h;
20 } aux_dpfp[2];
23 #define fpu_init_task(regs)
25 #else
28 * ARCv2 FPU Control aux register
29 * - bits to enable Traps on Exceptions
30 * - Rounding mode
32 * ARCv2 FPU Status aux register
33 * - FPU exceptions flags (Inv, Div-by-Zero, overflow, underflow, inexact)
34 * - Flag Write Enable to clear flags explicitly (vs. by fpu instructions
35 * only
38 struct arc_fpu {
39 unsigned int ctrl, status;
42 extern void fpu_init_task(struct pt_regs *regs);
44 #endif /* !CONFIG_ISA_ARCOMPACT */
46 extern void fpu_save_restore(struct task_struct *p, struct task_struct *n);
48 #else /* !CONFIG_ARC_FPU_SAVE_RESTORE */
50 #define fpu_save_restore(p, n)
51 #define fpu_init_task(regs)
53 #endif /* CONFIG_ARC_FPU_SAVE_RESTORE */
55 #endif /* _ASM_ARC_FPU_H */