[2/4] arch: Introduce user_fpregs_struct_t on arm and aarch64

Submitted by Pavel Emelianov on Sept. 26, 2016, 8:24 a.m.

Details

Message ID 57E8DB2A.5040706@virtuozzo.com
State Accepted
Series "Split get_task_regs routines"
Commit f93a14912f075fcfbf4e3f140254ce1a460b9118
Headers show

Commit Message

Pavel Emelianov Sept. 26, 2016, 8:24 a.m.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
---
 criu/arch/aarch64/crtools.c           | 2 +-
 criu/arch/aarch64/include/asm/types.h | 1 +
 criu/arch/arm/crtools.c               | 2 +-
 criu/arch/arm/include/asm/types.h     | 2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/arch/aarch64/crtools.c b/criu/arch/aarch64/crtools.c
index e131498..9e0bd99 100644
--- a/criu/arch/aarch64/crtools.c
+++ b/criu/arch/aarch64/crtools.c
@@ -84,7 +84,7 @@  int syscall_seized(struct parasite_ctl *ctl, int nr, unsigned long *ret,
 int get_task_regs(pid_t pid, user_regs_struct_t regs, CoreEntry *core)
 {
 	struct iovec iov;
-	struct user_fpsimd_state fpsimd;
+	user_fpregs_struct_t fpsimd;
 	int i, ret;
 
 	pr_info("Dumping GP/FPU registers for %d\n", pid);
diff --git a/criu/arch/aarch64/include/asm/types.h b/criu/arch/aarch64/include/asm/types.h
index 078a8f2..42a2e72 100644
--- a/criu/arch/aarch64/include/asm/types.h
+++ b/criu/arch/aarch64/include/asm/types.h
@@ -45,6 +45,7 @@  typedef struct {
  */
 
 typedef struct user_pt_regs user_regs_struct_t;
+typedef struct user_fpsimd_state user_fpregs_struct_t;
 
 
 #define REG_RES(r)		((u64)(r).regs[0])
diff --git a/criu/arch/arm/crtools.c b/criu/arch/arm/crtools.c
index 8887262..5325ff0 100644
--- a/criu/arch/arm/crtools.c
+++ b/criu/arch/arm/crtools.c
@@ -85,7 +85,7 @@  int syscall_seized(struct parasite_ctl *ctl, int nr, unsigned long *ret,
 #define PTRACE_GETVFPREGS 27
 int get_task_regs(pid_t pid, user_regs_struct_t regs, CoreEntry *core)
 {
-	struct user_vfp vfp;
+	user_fpregs_struct_t vfp;
 	int ret = -1;
 
 	pr_info("Dumping GP/FPU registers for %d\n", pid);
diff --git a/criu/arch/arm/include/asm/types.h b/criu/arch/arm/include/asm/types.h
index aafc4bb..3286066 100644
--- a/criu/arch/arm/include/asm/types.h
+++ b/criu/arch/arm/include/asm/types.h
@@ -49,6 +49,8 @@  typedef struct {
         long uregs[18];
 } user_regs_struct_t;
 
+typedef struct user_vfp user_fpregs_struct_t;
+
 #define ARM_cpsr        uregs[16]
 #define ARM_pc          uregs[15]
 #define ARM_lr          uregs[14]

Comments

Christopher Covington Sept. 26, 2016, 12:53 p.m.
On 09/26/2016 04:24 AM, Pavel Emelyanov wrote:
> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
> ---
>  criu/arch/aarch64/crtools.c           | 2 +-
>  criu/arch/aarch64/include/asm/types.h | 1 +
>  criu/arch/arm/crtools.c               | 2 +-
>  criu/arch/arm/include/asm/types.h     | 2 ++
>  4 files changed, 5 insertions(+), 2 deletions(-)

Reviewed-by: Christopher Covington <cov@codeaurora.org>