From 2322ee63c2432a84597baaaee29c1d958700d4b5 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Thu, 19 Apr 2001 12:35:47 +0000 Subject: [PATCH] Don't unwrap the function descriptor used as the callout argument to fork_exit(). The MI version of fork_exit() needs a real function descriptor, not a simple function pointer. --- sys/ia64/ia64/vm_machdep.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index e00411094ca5..dbe53369d7e2 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -254,14 +254,9 @@ cpu_fork(p1, p2, flags) * Arrange for continuation at fork_return(), which * will return to exception_restore(). Note that the * child process doesn't stay in the kernel for long! - * - * We should really deal with the function descriptor - * for fork_return() in fork_trampoline() so that a - * kthread started from a loaded module can have the - * right value for gp. */ up->u_pcb.pcb_sp = (u_int64_t)p2tf - 16; - up->u_pcb.pcb_r4 = FDESC_FUNC(fork_return); + up->u_pcb.pcb_r4 = (u_int64_t)fork_return; up->u_pcb.pcb_r5 = FDESC_FUNC(exception_restore); up->u_pcb.pcb_r6 = (u_int64_t)p2; up->u_pcb.pcb_b0 = FDESC_FUNC(fork_trampoline); @@ -280,7 +275,7 @@ cpu_set_fork_handler(p, func, arg) void (*func) __P((void *)); void *arg; { - p->p_addr->u_pcb.pcb_r4 = FDESC_FUNC(func); + p->p_addr->u_pcb.pcb_r4 = (u_int64_t) func; p->p_addr->u_pcb.pcb_r6 = (u_int64_t) arg; }