[CRIU] [PATCH 6/7] arm: initialize the ARM VFP header in the routine restore_fpu()
Alexander Kartashov
alekskartashov at parallels.com
Wed Oct 9 10:23:04 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 | 12 ++----------
arch/arm/include/asm/restorer.h | 2 +-
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/arch/arm/crtools.c b/arch/arm/crtools.c
index cf9b016..df2c783 100644
--- a/arch/arm/crtools.c
+++ b/arch/arm/crtools.c
@@ -200,6 +200,8 @@ int restore_fpu(struct rt_sigframe *sigframe, CoreEntry *core)
for (i = 0; i < ARRAY_SIZE(vfp->ufp.fpregs); ++i)
vfp->ufp.fpregs[i] = CORE_THREAD_ARCH_INFO(core)->fpstate->vfp_regs[i];
vfp->ufp.fpscr = CORE_THREAD_ARCH_INFO(core)->fpstate->fpscr;
+ vfp->magic = VFP_MAGIC;
+ vfp->size = VFP_STORAGE_SIZE;
return 0;
}
@@ -249,13 +251,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