[CRIU] [PATCH 4/4] cr: renamed restore_fpu() to sigreturn_prep_fpu_frame() and vice versa
Alexander Kartashov
alekskartashov at parallels.com
Fri May 31 01:20:48 EDT 2013
The names of these functions should be swapped to avoid confusion.
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
Cc: Andrey Vagin <avagin at openvz.org>
---
arch/arm/crtools.c | 5 ++---
arch/arm/include/asm/restore.h | 2 +-
arch/arm/include/asm/restorer.h | 2 +-
arch/x86/crtools.c | 4 ++--
arch/x86/include/asm/restore.h | 2 +-
arch/x86/include/asm/restorer.h | 2 +-
sigframe.c | 4 ++--
7 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/arch/arm/crtools.c b/arch/arm/crtools.c
index 1ecb383..f70fd11 100644
--- a/arch/arm/crtools.c
+++ b/arch/arm/crtools.c
@@ -197,7 +197,7 @@ void arch_free_thread_info(CoreEntry *core)
}
}
-int sigreturn_prep_fpu_frame(fpu_state_t *fpu_state, CoreEntry *core)
+int restore_fpu(fpu_state_t *fpu_state, CoreEntry *core)
{
memcpy(fpu_state->ufp.fpregs, CORE_THREAD_ARCH_INFO(core)->fpstate->vfp_regs,
sizeof(fpu_state->ufp.fpregs));
@@ -253,13 +253,12 @@ int restore_gpregs(struct rt_sigframe *f, UserArmRegsEntry *r)
return 0;
}
-int restore_fpu(struct rt_sigframe *sigframe, fpu_state_t *fpu_state)
+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;
- builtin_memcpy(&aux->vfp.ufp, &fpu_state->ufp, sizeof(aux->vfp.ufp));
return 0;
}
diff --git a/arch/arm/include/asm/restore.h b/arch/arm/include/asm/restore.h
index 7835974..87b9e2b 100644
--- a/arch/arm/include/asm/restore.h
+++ b/arch/arm/include/asm/restore.h
@@ -20,6 +20,6 @@ static inline void core_get_tls(CoreEntry *pcore, u32 *ptls)
}
-int sigreturn_prep_fpu_frame(fpu_state_t *fpu_state, CoreEntry *core);
+int restore_fpu(fpu_state_t *fpu_state, CoreEntry *core);
#endif
diff --git a/arch/arm/include/asm/restorer.h b/arch/arm/include/asm/restorer.h
index 92db831..fc835ca 100644
--- a/arch/arm/include/asm/restorer.h
+++ b/arch/arm/include/asm/restorer.h
@@ -132,7 +132,7 @@ struct rt_sigframe {
int restore_gpregs(struct rt_sigframe *f, UserArmRegsEntry *r);
int restore_nonsigframe_gpregs(UserArmRegsEntry *r);
-int restore_fpu(struct rt_sigframe *sigframe, fpu_state_t *fpu_state);
+int sigreturn_prep_fpu_frame(struct rt_sigframe *sigframe, fpu_state_t *fpu_state);
static inline void restore_tls(u32 tls) {
asm (
diff --git a/arch/x86/crtools.c b/arch/x86/crtools.c
index bab502a..b565ad9 100644
--- a/arch/x86/crtools.c
+++ b/arch/x86/crtools.c
@@ -373,7 +373,7 @@ static void show_rt_xsave_frame(struct xsave_struct *x)
pr_debug("-----------------------\n");
}
-int sigreturn_prep_fpu_frame(fpu_state_t *fpu_state, CoreEntry *core)
+int restore_fpu(fpu_state_t *fpu_state, CoreEntry *core)
{
struct xsave_struct *x = &fpu_state->xsave;
@@ -479,7 +479,7 @@ int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r)
return 0;
}
-int restore_fpu(struct rt_sigframe *sigframe, fpu_state_t *fpu_state)
+int sigreturn_prep_fpu_frame(struct rt_sigframe *sigframe, fpu_state_t *fpu_state)
{
unsigned long addr = (unsigned long)(void *)&fpu_state->xsave;
diff --git a/arch/x86/include/asm/restore.h b/arch/x86/include/asm/restore.h
index bc20625..3394507 100644
--- a/arch/x86/include/asm/restore.h
+++ b/arch/x86/include/asm/restore.h
@@ -18,6 +18,6 @@
#define core_get_tls(pcore, ptls)
-int sigreturn_prep_fpu_frame(fpu_state_t *fpu_state, CoreEntry *core);
+int restore_fpu(fpu_state_t *fpu_state, CoreEntry *core);
#endif
diff --git a/arch/x86/include/asm/restorer.h b/arch/x86/include/asm/restorer.h
index 70bdf0a..d066f44 100644
--- a/arch/x86/include/asm/restorer.h
+++ b/arch/x86/include/asm/restorer.h
@@ -139,7 +139,7 @@ struct rt_sigframe {
int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r);
int restore_nonsigframe_gpregs(UserX86RegsEntry *r);
-int restore_fpu(struct rt_sigframe *sigframe, fpu_state_t *fpu_state);
+int sigreturn_prep_fpu_frame(struct rt_sigframe *sigframe, fpu_state_t *fpu_state);
static inline void restore_tls(u32 tls) { }
diff --git a/sigframe.c b/sigframe.c
index a8f4d16..c260aa4 100644
--- a/sigframe.c
+++ b/sigframe.c
@@ -21,11 +21,11 @@ int construct_sigframe(struct rt_sigframe *sigframe,
memset(blk_sigset, 0, sizeof(k_rtsigset_t));
sigframe->fpu_state.has_fpu = true;
- if (sigreturn_prep_fpu_frame(&sigframe->fpu_state, core))
+ if (restore_fpu(&sigframe->fpu_state, core))
return -1;
if (sigframe->fpu_state.has_fpu)
- if (restore_fpu(sigframe, &rsigframe->fpu_state))
+ if (sigreturn_prep_fpu_frame(sigframe, &rsigframe->fpu_state))
return -1;
if (restore_gpregs(sigframe, CORE_THREAD_ARCH_INFO(core)->gpregs))
--
1.7.10.4
More information about the CRIU
mailing list