clone_thread: Add arch_clone_thread()

Fujitsu: POSTK_DEBUG_ARCH_DEP_23
Refs: #969
Change-Id: Ic15765b8c9e956c95fc50b333b01464d87450d3c
This commit is contained in:
Masamichi Takagi
2018-10-02 13:42:52 +09:00
committed by Dominique Martinet
parent 9db8d115d9
commit fb98664f49
4 changed files with 0 additions and 12 deletions

View File

@ -1157,7 +1157,6 @@ err:
static int check_and_allocate_fp_regs(struct thread *thread);
void save_fp_regs(struct thread *thread);
#ifdef POSTK_DEBUG_ARCH_DEP_23 /* add arch dep. clone_thread() function */
void arch_clone_thread(struct thread *othread, unsigned long pc,
unsigned long sp, struct thread *nthread)
{
@ -1167,10 +1166,6 @@ void arch_clone_thread(struct thread *othread, unsigned long pc,
asm("mrs %0, tpidr_el0" : "=r" (tls));
othread->tlsblock_base = nthread->tlsblock_base = tls;
if ((othread->fp_regs != NULL) && (check_and_allocate_fp_regs(nthread) == 0)) {
memcpy(nthread->fp_regs, othread->fp_regs, sizeof(fp_regs_struct));
}
/* if SVE enable, takeover lower 128 bit register */
if (likely(elf_hwcap & HWCAP_SVE)) {
fp_regs_struct fp_regs;
@ -1180,7 +1175,6 @@ void arch_clone_thread(struct thread *othread, unsigned long pc,
thread_fpsimd_to_sve(nthread, &fp_regs);
}
}
#endif /* POSTK_DEBUG_ARCH_DEP_23 */
/*@
@ requires \valid(handler);

View File

@ -1434,13 +1434,11 @@ long ihk_mc_show_cpuinfo(char *buf, size_t buf_size, unsigned long read_off, int
}
#endif /* POSTK_DEBUG_ARCH_DEP_42 */
#ifdef POSTK_DEBUG_ARCH_DEP_23 /* add arch dep. clone_thread() function */
void arch_clone_thread(struct thread *othread, unsigned long pc,
unsigned long sp, struct thread *nthread)
{
return;
}
#endif /* POSTK_DEBUG_ARCH_DEP_23 */
void ihk_mc_print_user_context(ihk_mc_user_context_t *uctx)
{

View File

@ -408,9 +408,7 @@ clone_thread(struct thread *org, unsigned long pc, unsigned long sp,
/* copy fp_regs from parent */
save_fp_regs(org);
copy_fp_regs(org, thread);
#ifdef POSTK_DEBUG_ARCH_DEP_23 /* add arch dep. clone_process() function */
arch_clone_thread(org, pc, sp, thread);
#endif /* POSTK_DEBUG_ARCH_DEP_23 */
memcpy(thread->uctx, org->uctx, sizeof(*org->uctx));
ihk_mc_modify_user_context(thread->uctx, IHK_UCR_STACK_POINTER, sp);

View File

@ -108,11 +108,9 @@ enum ihk_mc_user_context_regtype {
IHK_UCR_PROGRAM_COUNTER = 2,
};
#ifdef POSTK_DEBUG_ARCH_DEP_23 /* add arch dep. clone_process() function */
struct thread;
void arch_clone_thread(struct thread *othread, unsigned long pc,
unsigned long sp, struct thread *nthread);
#endif /* POSTK_DEBUG_ARCH_DEP_23 */
void ihk_mc_modify_user_context(ihk_mc_user_context_t *uctx,
enum ihk_mc_user_context_regtype reg,