[CRIU] [PATCH] arm: use PTRACE_GETVFPREGS instead of GETFPREGS

Chanho Park chanho61.park at samsung.com
Thu May 2 08:05:44 EDT 2013


If enabled CONFIG_VFP, we should use PTRACE_GETVFPREGS instead of GETFPREGS.
Most of arm hardwares(since then armv6) use VFP. If we need runtime checking of
vfp, we should parse /proc/cpu_info or use any other techniques.

Signed-off-by: Chanho Park <chanho61.park at samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham at samsung.com>
---
 arch/arm/crtools.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/crtools.c b/arch/arm/crtools.c
index 64a0d23..d90d4db 100644
--- a/arch/arm/crtools.c
+++ b/arch/arm/crtools.c
@@ -84,6 +84,7 @@ int syscall_seized(struct parasite_ctl *ctl, int nr, unsigned long *ret,
 
 #define assign_reg(dst, src, e)		dst->e = (__typeof__(dst->e))src.ARM_##e
 
+#define PTRACE_GETVFPREGS 27
 int get_task_regs(pid_t pid, CoreEntry *core, const struct parasite_ctl *ctl)
 {
 	user_regs_struct_t regs = {{-1}};
@@ -101,7 +102,7 @@ int get_task_regs(pid_t pid, CoreEntry *core, const struct parasite_ctl *ctl)
 		}
 	}
 
-	if (ptrace(PTRACE_GETFPREGS, pid, NULL, &vfp)) {
+	if (ptrace(PTRACE_GETVFPREGS, pid, NULL, &vfp)) {
 		pr_err("Can't obtain FPU registers for %d\n", pid);
 		goto err;
 	}
-- 
1.7.9.5



More information about the CRIU mailing list