summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/fpu-types.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-02-03 13:45:02 +0300
committerHeiko Carstens <hca@linux.ibm.com>2024-02-16 16:30:14 +0300
commitfd2527f20915d041e838b6e4a08122dbc73c7abc (patch)
tree2ba9e5c6a1b66cf3f3246a61c53ca25420e9ad37 /arch/s390/include/asm/fpu-types.h
parent31d3ec15dc95ad73ea403892840624465d377fd9 (diff)
downloadlinux-fd2527f20915d041e838b6e4a08122dbc73c7abc.tar.xz
s390/fpu: move, rename, and merge header files
Move, rename, and merge the fpu and vx header files. This way fpu header files have a consistent naming scheme (fpu*.h). Also get rid of the fpu subdirectory and move header files to asm directory, so that all fpu and vx header files can be found at the same location. Merge internal.h header file into other header files, since the internal helpers are used at many locations. so those helper functions are really not internal. Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/fpu-types.h')
-rw-r--r--arch/s390/include/asm/fpu-types.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/s390/include/asm/fpu-types.h b/arch/s390/include/asm/fpu-types.h
new file mode 100644
index 000000000000..1caaf31209fc
--- /dev/null
+++ b/arch/s390/include/asm/fpu-types.h
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * FPU data structures
+ *
+ * Copyright IBM Corp. 2015
+ * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
+ */
+
+#ifndef _ASM_S390_FPU_TYPES_H
+#define _ASM_S390_FPU_TYPES_H
+
+#include <asm/sigcontext.h>
+
+struct fpu {
+ __u32 fpc; /* Floating-point control */
+ void *regs; /* Pointer to the current save area */
+ union {
+ /* Floating-point register save area */
+ freg_t fprs[__NUM_FPRS];
+ /* Vector register save area */
+ __vector128 vxrs[__NUM_VXRS];
+ };
+};
+
+/* VX array structure for address operand constraints in inline assemblies */
+struct vx_array {
+ __vector128 _[__NUM_VXRS];
+};
+
+/* In-kernel FPU state structure */
+struct kernel_fpu {
+ u32 mask;
+ u32 fpc;
+ union {
+ freg_t fprs[__NUM_FPRS];
+ __vector128 vxrs[__NUM_VXRS];
+ };
+};
+
+#define DECLARE_KERNEL_FPU_ONSTACK(name) \
+ struct kernel_fpu name __uninitialized
+
+#endif /* _ASM_S390_FPU_TYPES_H */