hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/arch/nds32/include/uapi/asm/sigcontext.h
....@@ -1,4 +1,4 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 // Copyright (C) 2005-2017 Andes Technology Corporation
33
44 #ifndef _ASMNDS32_SIGCONTEXT_H
....@@ -9,6 +9,29 @@
99 * before the signal handler was invoked. Note: only add new entries
1010 * to the end of the structure.
1111 */
12
+struct fpu_struct {
13
+ unsigned long long fd_regs[32];
14
+ unsigned long fpcsr;
15
+ /*
16
+ * When CONFIG_SUPPORT_DENORMAL_ARITHMETIC is defined, kernel prevents
17
+ * hardware from treating the denormalized output as an underflow case
18
+ * and rounding it to a normal number. Hence kernel enables the UDF and
19
+ * IEX trap in the fpcsr register to step in the calculation.
20
+ * However, the UDF and IEX trap enable bit in $fpcsr also lose
21
+ * their use.
22
+ *
23
+ * UDF_IEX_trap replaces the feature of UDF and IEX trap enable bit in
24
+ * $fpcsr to control the trap of underflow and inexact. The bit filed
25
+ * of UDF_IEX_trap is the same as $fpcsr, 10th bit is used to enable UDF
26
+ * exception trapping and 11th bit is used to enable IEX exception
27
+ * trapping.
28
+ *
29
+ * UDF_IEX_trap is only modified through fp_udfiex_crtl syscall.
30
+ * Therefore, UDF_IEX_trap needn't be saved and restored in each
31
+ * context switch.
32
+ */
33
+ unsigned long UDF_IEX_trap;
34
+};
1235
1336 struct zol_struct {
1437 unsigned long nds32_lc; /* $LC */
....@@ -54,6 +77,7 @@
5477 unsigned long fault_address;
5578 unsigned long used_math_flag;
5679 /* FPU Registers */
80
+ struct fpu_struct fpu;
5781 struct zol_struct zol;
5882 };
5983