summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/fpu/types.h
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2015-02-18 14:46:00 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-06-14 16:54:11 +0200
commit04864808029e59ea1bf075c756a0f35c8398fc11 (patch)
tree266b3ce8c6c7d6f3389778ffafb4112b528114b0 /arch/s390/include/asm/fpu/types.h
parentde3fa841e429de7e288facf9b642948677fac581 (diff)
s390/vx: add support functions for in-kernel FPU use
Introduce the kernel_fpu_begin() and kernel_fpu_end() function to enclose any in-kernel use of FPU instructions and registers. In enclosed sections, you can perform floating-point or vector (SIMD) computations. The functions take care of saving and restoring FPU register contents and controls. For usage details, see the guidelines in arch/s390/include/asm/fpu/api.h Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/fpu/types.h')
-rw-r--r--arch/s390/include/asm/fpu/types.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/include/asm/fpu/types.h b/arch/s390/include/asm/fpu/types.h
index fe937c9b6471..bce255ead72b 100644
--- a/arch/s390/include/asm/fpu/types.h
+++ b/arch/s390/include/asm/fpu/types.h
@@ -24,4 +24,14 @@ struct fpu {
/* 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];
+ };
+};
+
#endif /* _ASM_S390_FPU_TYPES_H */