[CRIU] [PATCH 6/8] arm: initialize the ARM VFP header in the routine restore_fpu()
Alexander Kartashov
alekskartashov at parallels.com
Thu Oct 10 23:48:03 PDT 2013
The ARM VFP header is a part of the VFP frame that makes
it unreasonable to have frame initialization split into
two routines. This patch moerges the ARM version of
the routine sigreturn_prep_fpu_frame() into restore_fpu()
and reduces the former into a stub.
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
arch/arm/crtools.c | 13 ++-----------
arch/arm/include/asm/restorer.h | 2 +-
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/arch/arm/crtools.c b/arch/arm/crtools.c
index a93c4f1..29af1aa 100644
--- a/arch/arm/crtools.c
+++ b/arch/arm/crtools.c
@@ -195,7 +195,8 @@ int restore_fpu(struct rt_sigframe *sigframe, CoreEntry *core)
memcpy(&aux->vfp.ufp.fpregs, CORE_THREAD_ARCH_INFO(core)->fpstate->vfp_regs, sizeof(aux->vfp.ufp.fpregs));
aux->vfp.ufp.fpscr = CORE_THREAD_ARCH_INFO(core)->fpstate->fpscr;
-
+ aux->vfp.magic = VFP_MAGIC;
+ aux->vfp.size = VFP_STORAGE_SIZE;
return 0;
}
@@ -245,13 +246,3 @@ int restore_gpregs(struct rt_sigframe *f, UserArmRegsEntry *r)
return 0;
}
-
-int sigreturn_prep_fpu_frame(struct rt_sigframe *sigframe, fpu_state_t *fpu_state)
-{
- struct aux_sigframe *aux = (struct aux_sigframe *)&sigframe->sig.uc.uc_regspace;
-
- aux->vfp.magic = VFP_MAGIC;
- aux->vfp.size = VFP_STORAGE_SIZE;
-
- return 0;
-}
diff --git a/arch/arm/include/asm/restorer.h b/arch/arm/include/asm/restorer.h
index 661959c..74df4cf 100644
--- a/arch/arm/include/asm/restorer.h
+++ b/arch/arm/include/asm/restorer.h
@@ -134,7 +134,7 @@ struct rt_sigframe {
int restore_gpregs(struct rt_sigframe *f, UserArmRegsEntry *r);
int restore_nonsigframe_gpregs(UserArmRegsEntry *r);
-int sigreturn_prep_fpu_frame(struct rt_sigframe *sigframe, fpu_state_t *fpu_state);
+static inline int sigreturn_prep_fpu_frame(struct rt_sigframe *sigframe, fpu_state_t *fpu_state) { return 0; }
static inline void restore_tls(u32 tls) {
asm (
--
1.7.9.5
More information about the CRIU
mailing list