Commit 03b95b57 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

fpu: Move definitions to asm/fpu.h

The FPU data is quite CPU-type oriented,
thus move it to asm/fpu.h.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent dfa686db
#ifndef __CR_ASM_FPU_H__
#define __CR_ASM_FPU_H__
#endif /* __CR_ASM_FPU_H__ */
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "asm/bitops.h" #include "asm/bitops.h"
#include "asm/types.h" #include "asm/types.h"
#include "asm/cpu.h" #include "asm/cpu.h"
#include "asm/fpu.h"
#include "compiler.h" #include "compiler.h"
...@@ -16,7 +17,6 @@ ...@@ -16,7 +17,6 @@
#include "util.h" #include "util.h"
#include "log.h" #include "log.h"
#include "fpu.h"
#include "cpu.h" #include "cpu.h"
#undef LOG_PREFIX #undef LOG_PREFIX
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include <unistd.h> #include <unistd.h>
#include "asm/types.h" #include "asm/types.h"
#include "asm/fpu.h"
#include "compiler.h" #include "compiler.h"
#include "ptrace.h" #include "ptrace.h"
#include "asm/processor-flags.h" #include "asm/processor-flags.h"
...@@ -13,7 +14,6 @@ ...@@ -13,7 +14,6 @@
#include "log.h" #include "log.h"
#include "util.h" #include "util.h"
#include "cpu.h" #include "cpu.h"
#include "fpu.h"
#include "elf.h" #include "elf.h"
#include "parasite-syscall.h" #include "parasite-syscall.h"
#include "restorer.h" #include "restorer.h"
......
#ifndef __CR_FPU_H__ #ifndef __CR_ASM_FPU_H__
#define __CR_FPU_H__ #define __CR_ASM_FPU_H__
#include <sys/types.h> #include <sys/types.h>
...@@ -81,4 +81,19 @@ struct xsave_struct { ...@@ -81,4 +81,19 @@ struct xsave_struct {
struct ymmh_struct ymmh; struct ymmh_struct ymmh;
} __aligned(FP_MIN_ALIGN_BYTES) __packed; } __aligned(FP_MIN_ALIGN_BYTES) __packed;
#endif /* __CR_FPU_H__ */ /*
* This one is used in restorer.
*/
typedef struct {
/*
* The FPU xsave area must be continious and FP_MIN_ALIGN_BYTES
* aligned, thus make sure the compiler won't insert any hole here.
*/
union {
struct xsave_struct xsave;
unsigned char __pad[sizeof(struct xsave_struct) + FP_XSTATE_MAGIC2_SIZE];
};
} fpu_state_t;
#endif /* __CR_ASM_FPU_H__ */
...@@ -245,20 +245,6 @@ typedef struct { ...@@ -245,20 +245,6 @@ typedef struct {
typedef uint64_t auxv_t; typedef uint64_t auxv_t;
#include "fpu.h"
typedef struct {
/*
* The FPU xsave area must be continious and FP_MIN_ALIGN_BYTES
* aligned, thus make sure the compiler won't insert any hole here.
*/
union {
struct xsave_struct xsave;
unsigned char __pad[sizeof(struct xsave_struct) + FP_XSTATE_MAGIC2_SIZE];
};
} fpu_state_t;
#define REG_RES(regs) ((regs).ax) #define REG_RES(regs) ((regs).ax)
#define REG_IP(regs) ((regs).ip) #define REG_IP(regs) ((regs).ip)
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
#include "restorer.h" #include "restorer.h"
#include "asm/restorer.h" #include "asm/restorer.h"
#include "asm/fpu.h"
#include "syscall.h" #include "syscall.h"
#include "log.h" #include "log.h"
#include "fpu.h"
#include "cpu.h" #include "cpu.h"
int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r) int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r)
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
#include "net.h" #include "net.h"
#include "sk-packet.h" #include "sk-packet.h"
#include "cpu.h" #include "cpu.h"
#include "fpu.h"
#include "elf.h" #include "elf.h"
#include "file-lock.h" #include "file-lock.h"
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
#include "net.h" #include "net.h"
#include "tty.h" #include "tty.h"
#include "cpu.h" #include "cpu.h"
#include "fpu.h"
#include "file-lock.h" #include "file-lock.h"
#include "protobuf.h" #include "protobuf.h"
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
#include "compiler.h" #include "compiler.h"
#include "asm/types.h" #include "asm/types.h"
#include "asm/fpu.h"
#include "image.h" #include "image.h"
#include "lock.h" #include "lock.h"
#include "util.h" #include "util.h"
#include "crtools.h" #include "crtools.h"
#include "fpu.h"
#include "protobuf/mm.pb-c.h" #include "protobuf/mm.pb-c.h"
#include "protobuf/vma.pb-c.h" #include "protobuf/vma.pb-c.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment