summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/perf_regs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/perf_regs.c')
-rw-r--r--arch/s390/kernel/perf_regs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/kernel/perf_regs.c b/arch/s390/kernel/perf_regs.c
index 6e9e5d5e92..3d93656bd9 100644
--- a/arch/s390/kernel/perf_regs.c
+++ b/arch/s390/kernel/perf_regs.c
@@ -20,8 +20,10 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
return 0;
idx -= PERF_REG_S390_FP0;
- fp = MACHINE_HAS_VX ? *(freg_t *)(current->thread.fpu.vxrs + idx)
- : current->thread.fpu.fprs[idx];
+ if (cpu_has_vx())
+ fp = *(freg_t *)(current->thread.fpu.vxrs + idx);
+ else
+ fp = current->thread.fpu.fprs[idx];
return fp.ui;
}