Do not use lwp_trampoline for cpu_setfunc, but a simplified setfunc_trampoline
that does not call lwp_startup().
This commit is contained in:
parent
d478d33fa1
commit
c113d9a27f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore.S,v 1.34 2009/05/24 09:17:59 skrll Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.35 2009/06/03 21:08:51 skrll Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -982,6 +982,7 @@ ENTRY_NOPROFILE(lwp_trampoline,HPPA_FRAME_SIZE)
|
|||
.import lwp_startup, code
|
||||
CALL(lwp_startup, %r1)
|
||||
|
||||
ALTENTRY(setfunc_trampoline)
|
||||
/* get trampoline func (%t3) and arg (%arg0) */
|
||||
ldw HPPA_FRAME_ARG(3)(%sp), %arg0
|
||||
ldw HPPA_FRAME_ARG(2)(%sp), %t3
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.33 2009/05/13 14:33:42 skrll Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.34 2009/06/03 21:08:51 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */
|
||||
|
||||
|
@ -270,6 +270,7 @@ int spstrcpy(pa_space_t, const void *, pa_space_t, void *, size_t,
|
|||
size_t *);
|
||||
int copy_on_fault(void);
|
||||
void lwp_trampoline(void);
|
||||
void setfunc_trampoline(void);
|
||||
int cpu_dumpsize(void);
|
||||
int cpu_dump(void);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vm_machdep.c,v 1.35 2009/04/30 07:01:27 skrll Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.36 2009/06/03 21:08:51 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: vm_machdep.c,v 1.64 2008/09/30 18:54:26 miod Exp $ */
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.35 2009/04/30 07:01:27 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.36 2009/06/03 21:08:51 skrll Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -200,11 +200,11 @@ cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg)
|
|||
*/
|
||||
osp = sp;
|
||||
|
||||
/* lwp_trampoline's frame */
|
||||
/* setfunc_trampoline's frame */
|
||||
sp += HPPA_FRAME_SIZE;
|
||||
|
||||
*(register_t *)(sp + HPPA_FRAME_PSP) = osp;
|
||||
*(register_t *)(sp + HPPA_FRAME_CRP) = (register_t)lwp_trampoline;
|
||||
*(register_t *)(sp + HPPA_FRAME_CRP) = (register_t)setfunc_trampoline;
|
||||
|
||||
*HPPA_FRAME_CARG(2, sp) = KERNMODE(func);
|
||||
*HPPA_FRAME_CARG(3, sp) = (register_t)arg;
|
||||
|
|
Loading…
Reference in New Issue