Commit 9c581739 authored by Chanho Park's avatar Chanho Park Committed by Pavel Emelyanov

arm: use PTRACE_GETVFPREGS instead of GETFPREGS

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: 's avatarChanho Park <chanho61.park@samsung.com>
Signed-off-by: 's avatarMyungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 076ad01e
...@@ -84,6 +84,7 @@ int syscall_seized(struct parasite_ctl *ctl, int nr, unsigned long *ret, ...@@ -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 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) int get_task_regs(pid_t pid, CoreEntry *core, const struct parasite_ctl *ctl)
{ {
user_regs_struct_t regs = {{-1}}; user_regs_struct_t regs = {{-1}};
...@@ -101,7 +102,7 @@ int get_task_regs(pid_t pid, CoreEntry *core, const struct parasite_ctl *ctl) ...@@ -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); pr_err("Can't obtain FPU registers for %d\n", pid);
goto err; goto err;
} }
......
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