Subject: COMPAT_LINUX/i386: setregs instead of linux_setregs
To: None <mycroft@netbsd.org, fvdl@netbsd.org>
From: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
List: tech-kern
Date: 01/18/2001 17:30:55
Hi!

Is it on purpose that in sys/kern/exec_conf.c, on the COMPAT_LINUX entry
of the execsw, we use the native NetBSD setregs instead of
linux_setregs?

This does not affect alpha, m68k and powerpc, but on i386, there are
some extra stuff in linux_setregs.

linux_setregs(p, epp, stack)
        struct proc *p;
        struct exec_package *epp;
        u_long stack;
{
        struct pcb *pcb = &p->p_addr->u_pcb; 

        setregs(p, epp, stack);
        pcb->pcb_savefpu.sv_env.en_cw = __Linux_NPXCW__; 
}

Is this extra code needed? If it is, we should change setregs into
linux_setregs in sys/kern/exec_conf.c (it will not affect other ports,
they all just all setregs). If it is not, then I think it should be
removed, because if we want to enable a Linux specific setreg on another
port, it will affect (and maybe break) i386.

-- 
Emmanuel Dreyfus
UNIX *is* user friendly. It is just a bit selective about his friends
p99dreyf@criens.u-psud.fr