|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * General floating pointer and vector register helpers
|
|
|
+ * FPU state and register content conversion primitives
|
|
|
*
|
|
|
* Copyright IBM Corp. 2015
|
|
|
* Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
|
|
@@ -8,42 +8,9 @@
|
|
|
#ifndef _ASM_S390_FPU_INTERNAL_H
|
|
|
#define _ASM_S390_FPU_INTERNAL_H
|
|
|
|
|
|
-#include <linux/errno.h>
|
|
|
#include <linux/string.h>
|
|
|
-#include <asm/linkage.h>
|
|
|
#include <asm/ctl_reg.h>
|
|
|
-#include <asm/sigcontext.h>
|
|
|
-
|
|
|
-struct fpu {
|
|
|
- __u32 fpc; /* Floating-point control */
|
|
|
- union {
|
|
|
- void *regs;
|
|
|
- freg_t *fprs; /* Floating-point register save area */
|
|
|
- __vector128 *vxrs; /* Vector register save area */
|
|
|
- };
|
|
|
-};
|
|
|
-
|
|
|
-void save_fpu_regs(void);
|
|
|
-
|
|
|
-/* VX array structure for address operand constraints in inline assemblies */
|
|
|
-struct vx_array { __vector128 _[__NUM_VXRS]; };
|
|
|
-
|
|
|
-static inline int test_fp_ctl(u32 fpc)
|
|
|
-{
|
|
|
- u32 orig_fpc;
|
|
|
- int rc;
|
|
|
-
|
|
|
- asm volatile(
|
|
|
- " efpc %1\n"
|
|
|
- " sfpc %2\n"
|
|
|
- "0: sfpc %1\n"
|
|
|
- " la %0,0\n"
|
|
|
- "1:\n"
|
|
|
- EX_TABLE(0b,1b)
|
|
|
- : "=d" (rc), "=d" (orig_fpc)
|
|
|
- : "d" (fpc), "0" (-EINVAL));
|
|
|
- return rc;
|
|
|
-}
|
|
|
+#include <asm/fpu/types.h>
|
|
|
|
|
|
static inline void save_vx_regs_safe(__vector128 *vxrs)
|
|
|
{
|