Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / arc / include / asm / fpu.h
blob006bcf88a7a5f21284ddb2fb015d4a75924b4490
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 struct task_struct;
48 extern void fpu_save_restore(struct task_struct *p, struct task_struct *n);
50 #else /* !CONFIG_ARC_FPU_SAVE_RESTORE */
52 #define fpu_save_restore(p, n)
53 #define fpu_init_task(regs)
55 #endif /* CONFIG_ARC_FPU_SAVE_RESTORE */
57 #endif /* _ASM_ARC_FPU_H */