From owner-p4-projects Sun Nov 17 12:15:10 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA8CF37B404; Sun, 17 Nov 2002 12:14:41 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AB3F37B401 for ; Sun, 17 Nov 2002 12:14:41 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 564D643E42 for ; Sun, 17 Nov 2002 12:14:40 -0800 (PST) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gAHKBpmV017383 for ; Sun, 17 Nov 2002 12:11:51 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gAHKBoYd017380 for perforce@freebsd.org; Sun, 17 Nov 2002 12:11:50 -0800 (PST) Date: Sun, 17 Nov 2002 12:11:50 -0800 (PST) Message-Id: <200211172011.gAHKBoYd017380@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 21180 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=21180 Change 21180 by peter@peter_overcee on 2002/11/17 12:11:00 IFC @21104 (same as DP2 last integ) Affected files ... .. //depot/projects/ia64/kerberos5/usr.bin/krb5-config/Makefile#7 integrate .. //depot/projects/ia64/lib/libc/alpha/gen/Makefile.inc#5 integrate .. //depot/projects/ia64/lib/libc/alpha/gen/makecontext.c#2 integrate .. //depot/projects/ia64/lib/libc/gen/sysconf.c#8 integrate .. //depot/projects/ia64/lib/libc/i386/gen/Makefile.inc#6 integrate .. //depot/projects/ia64/lib/libc/ia64/gen/Makefile.inc#9 integrate .. //depot/projects/ia64/sbin/newfs/mkfs.c#17 integrate .. //depot/projects/ia64/sys/alpha/alpha/machdep.c#21 integrate .. //depot/projects/ia64/sys/alpha/include/cpu.h#4 integrate .. //depot/projects/ia64/sys/alpha/include/fpu.h#2 integrate .. //depot/projects/ia64/sys/alpha/include/signal.h#4 integrate .. //depot/projects/ia64/sys/alpha/include/ucontext.h#4 integrate .. //depot/projects/ia64/sys/conf/files#48 integrate .. //depot/projects/ia64/sys/i386/i386/machdep.c#31 integrate .. //depot/projects/ia64/sys/i386/include/signal.h#5 integrate .. //depot/projects/ia64/sys/i386/include/ucontext.h#6 integrate .. //depot/projects/ia64/sys/i386/isa/npx.c#13 integrate .. //depot/projects/ia64/sys/ia64/ia64/machdep.c#53 integrate .. //depot/projects/ia64/sys/kern/init_sysent.c#20 integrate .. //depot/projects/ia64/sys/kern/kern_context.c#1 branch .. //depot/projects/ia64/sys/kern/kern_exec.c#32 integrate .. //depot/projects/ia64/sys/kern/syscalls.c#21 integrate .. //depot/projects/ia64/sys/kern/syscalls.master#21 integrate .. //depot/projects/ia64/sys/kern/vfs_aio.c#22 integrate .. //depot/projects/ia64/sys/kern/vfs_bio.c#26 integrate .. //depot/projects/ia64/sys/net/route.c#5 integrate .. //depot/projects/ia64/sys/netinet/ip_input.c#18 integrate .. //depot/projects/ia64/sys/netinet/ip_mroute.c#15 integrate .. //depot/projects/ia64/sys/netinet/ip_mroute.h#3 integrate .. //depot/projects/ia64/sys/netinet/ip_output.c#17 integrate .. //depot/projects/ia64/sys/netinet/ip_var.h#9 integrate .. //depot/projects/ia64/sys/netinet/raw_ip.c#17 integrate .. //depot/projects/ia64/sys/posix4/ksched.c#7 integrate .. //depot/projects/ia64/sys/posix4/p1003_1b.c#4 integrate .. //depot/projects/ia64/sys/posix4/posix4.h#4 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/machdep.c#19 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/machdep.c#27 integrate .. //depot/projects/ia64/sys/sys/syscall.h#20 integrate .. //depot/projects/ia64/sys/sys/syscall.mk#20 integrate .. //depot/projects/ia64/sys/sys/sysproto.h#22 integrate .. //depot/projects/ia64/sys/sys/ucontext.h#6 integrate .. //depot/projects/ia64/sys/vm/vm_fault.c#21 integrate .. //depot/projects/ia64/sys/vm/vm_object.c#24 integrate .. //depot/projects/ia64/sys/vm/vm_page.c#23 integrate .. //depot/projects/ia64/sys/vm/vm_pageout.c#19 integrate .. //depot/projects/ia64/sys/vm/vnode_pager.c#19 integrate Differences ... ==== //depot/projects/ia64/kerberos5/usr.bin/krb5-config/Makefile#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/kerberos5/usr.bin/krb5-config/Makefile,v 1.7 2002/09/19 12:59:18 nectar Exp $ +# $FreeBSD: src/kerberos5/usr.bin/krb5-config/Makefile,v 1.8 2002/11/16 02:23:17 nectar Exp $ SCRIPTS= krb5-config MAN= krb5-config.1 @@ -15,6 +15,7 @@ -e "s,@LIB_dbopen\@,,g" \ -e "s,@LIB_des_appl\@,-lcrypto,g" \ -e "s,@LIBS\@,-lcom_err,g" \ + -e "s,@INCLUDE_des@,,g" \ ${.ALLSRC} > ${.TARGET} chmod +x ${.TARGET} ==== //depot/projects/ia64/lib/libc/alpha/gen/Makefile.inc#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libc/alpha/gen/Makefile.inc,v 1.9 2002/03/21 06:45:32 peter Exp $ +# $FreeBSD: src/lib/libc/alpha/gen/Makefile.inc,v 1.10 2002/11/16 06:39:10 deischen Exp $ SRCS+= _setjmp.S fabs.S frexp.c infinity.c isinf.c ldexp.c modf.c setjmp.S SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ @@ -8,7 +8,7 @@ SRCS+= __divqu.S __divq.S __divlu.S __divl.S SRCS+= __remqu.S __remq.S __remlu.S __reml.S SRCS+= rfork_thread.S -SRCS+= _ctx_start.S getcontext.S makecontext.c swapcontext.c +SRCS+= _ctx_start.S makecontext.c CLEANFILES+= __divqu.S __divq.S __divlu.S __divl.S CLEANFILES+= __remqu.S __remq.S __remlu.S __reml.S ==== //depot/projects/ia64/lib/libc/alpha/gen/makecontext.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/makecontext.c,v 1.1 2002/01/10 02:40:53 deischen Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/alpha/gen/makecontext.c,v 1.2 2002/11/16 06:39:10 deischen Exp $"); #include #include @@ -90,7 +90,7 @@ * Make sure the context is valid. For now, we only allow * trapframe format contexts to be used for makecontext. */ - else if (ucp->uc_mcontext.mc_format == __UC_REV0_SIGFRAME) { + else if (ucp->uc_mcontext.mc_format == _MC_REV0_SIGFRAME) { /* * Alpha passes the first 6 parameters in registers and * remaining parameters on the stack. Set up the context ==== //depot/projects/ia64/lib/libc/gen/sysconf.c#8 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)sysconf.c 8.2 (Berkeley) 3/20/94"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/sysconf.c,v 1.17 2002/10/27 18:03:02 wollman Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/sysconf.c,v 1.18 2002/11/16 06:35:20 alfred Exp $"); #include #include @@ -254,14 +254,17 @@ return (_POSIX_TIMERS); #endif case _SC_AIO_LISTIO_MAX: + defaultresult = _POSIX_AIO_LISTIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_LISTIO_MAX; goto yesno; case _SC_AIO_MAX: + defaultresult = _POSIX_AIO_MAX; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_MAX; goto yesno; case _SC_AIO_PRIO_DELTA_MAX: + defaultresult = 0; mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_AIO_PRIO_DELTA_MAX; goto yesno; ==== //depot/projects/ia64/lib/libc/i386/gen/Makefile.inc#6 (text+ko) ==== @@ -1,6 +1,6 @@ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/libc/i386/gen/Makefile.inc,v 1.17 2002/09/17 19:43:53 bde Exp $ +# $FreeBSD: src/lib/libc/i386/gen/Makefile.inc,v 1.18 2002/11/16 06:39:11 deischen Exp $ -SRCS+= _ctx_start.S _setjmp.S alloca.S fabs.S frexp.c getcontext.S \ +SRCS+= _ctx_start.S _setjmp.S alloca.S fabs.S frexp.c \ infinity.c isinf.c ldexp.c makecontext.c modf.S \ - rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S swapcontext.c + rfork_thread.S setjmp.S signalcontext.c sigsetjmp.S ==== //depot/projects/ia64/lib/libc/ia64/gen/Makefile.inc#9 (text+ko) ==== @@ -1,10 +1,9 @@ -# $FreeBSD: src/lib/libc/ia64/gen/Makefile.inc,v 1.4 2002/04/13 04:06:34 marcel Exp $ +# $FreeBSD: src/lib/libc/ia64/gen/Makefile.inc,v 1.5 2002/11/16 01:41:33 marcel Exp $ -SRCS+= _setjmp.S fabs.S frexp.c infinity.c isinf.c ldexp.c modf.c setjmp.S -SRCS+= sigsetjmp.S fpsetmask.c fpgetmask.c -SRCS+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S -SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S -SRCS+= __divdf3.S __divsf3.S +SRCS+= __divdf3.S __divdi3.S __divsf3.S __divsi3.S __moddi3.S __modsi3.S \ + __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S _setjmp.S fabs.S \ + fpgetmask.c fpsetmask.c frexp.c infinity.c isinf.c ldexp.c modf.c \ + setjmp.S sigsetjmp.S # The following may go away if function _Unwind_FindTableEntry() # will be part of GCC. ==== //depot/projects/ia64/sbin/newfs/mkfs.c#17 (text+ko) ==== @@ -48,7 +48,7 @@ static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/newfs/mkfs.c,v 1.63 2002/10/18 23:17:30 mckusick Exp $"; + "$FreeBSD: src/sbin/newfs/mkfs.c,v 1.64 2002/11/15 23:50:14 mckusick Exp $"; #endif /* not lint */ #include @@ -405,7 +405,8 @@ howmany(csfrags, sblock.fs_frag); sblock.fs_cstotal.cs_nffree = fragnum(&sblock, sblock.fs_size) + - (csfrags > 0 ? sblock.fs_frag - csfrags : 0); + (numfrags(&sblock, csfrags) > 0 ? + sblock.fs_frag - numfrags(&sblock, csfrags) : 0); sblock.fs_cstotal.cs_nifree = sblock.fs_ncg * sblock.fs_ipg - ROOTINO; sblock.fs_cstotal.cs_ndir = 0; sblock.fs_dsize -= csfrags; ==== //depot/projects/ia64/sys/alpha/alpha/machdep.c#21 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.191 2002/11/09 16:19:13 des Exp $ + * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.192 2002/11/16 06:35:51 deischen Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -210,7 +210,9 @@ u_long code); #endif +static void get_fpcontext(struct thread *td, mcontext_t *mcp); static void identifycpu(void); +static int set_fpcontext(struct thread *td, const mcontext_t *mcp); struct kva_md_info kmi; @@ -1405,7 +1407,7 @@ frame->tf_regs[FRAME_TRAPARG_A1]; sf.sf_uc.uc_mcontext.mc_regs[R_TRAPARG_A2] = frame->tf_regs[FRAME_TRAPARG_A2]; - sf.sf_uc.uc_mcontext.mc_format = __UC_REV0_SIGFRAME; + sf.sf_uc.uc_mcontext.mc_format = _MC_REV0_SIGFRAME; /* * Allocate and validate space for the signal handler @@ -1664,13 +1666,15 @@ return (error); } #ifdef COMPAT_43 - if (((struct osigcontext*)&uc)->sc_regs[R_ZERO] == 0xACEDBADE) - return osigreturn(td, (struct osigreturn_args *)uap); + if (((struct osigcontext*)&uc)->sc_regs[R_ZERO] == 0xACEDBADE) + return osigreturn(td, (struct osigreturn_args *)uap); #endif /* * Restore the user-supplied information */ + if ((error = set_fpcontext(td, &uc.uc_mcontext)) != 0) + return (error); set_regs(td, (struct reg *)uc.uc_mcontext.mc_regs); val = (uc.uc_mcontext.mc_regs[R_PS] | ALPHA_PSL_USERSET) & ~ALPHA_PSL_USERCLR; @@ -1692,12 +1696,6 @@ signotify(p); PROC_UNLOCK(p); - /* XXX ksc.sc_ownedfp ? */ - alpha_fpstate_drop(td); - bcopy((struct fpreg *)uc.uc_mcontext.mc_fpregs, - &td->td_pcb->pcb_fp, sizeof(struct fpreg)); - td->td_pcb->pcb_fp_control = uc.uc_mcontext.mc_fp_control; - return (EJUSTRETURN); } @@ -2011,6 +2009,133 @@ } int +get_mcontext(struct thread *td, mcontext_t *mcp) +{ + /* + * Use a trapframe for getsetcontext, so just copy the + * threads trapframe. + */ + bcopy(&td->td_frame, &mcp->mc_regs, sizeof(td->td_frame)); + + /* + * When the thread is the current thread, the user stack pointer + * is not in the PCB; it must be read from the PAL. + */ + if (td == curthread) + mcp->mc_regs[FRAME_SP] = alpha_pal_rdusp(); + + mcp->mc_format = _MC_REV0_TRAPFRAME; + mcp->mc_onstack = sigonstack(alpha_pal_rdusp()) ? 1 : 0; + get_fpcontext(td, mcp); + return (0); +} + +int +set_mcontext(struct thread *td, const mcontext_t *mcp) +{ + int ret; + unsigned long val; + + if ((mcp->mc_format != _MC_REV0_TRAPFRAME) && + (mcp->mc_format != _MC_REV0_SIGFRAME)) + return (EINVAL); + else if ((ret = set_fpcontext(td, mcp)) != 0) + return (ret); + + if (mcp->mc_format == _MC_REV0_SIGFRAME) { + set_regs(td, (struct reg *)&mcp->mc_regs); + val = (mcp->mc_regs[R_PS] | ALPHA_PSL_USERSET) & + ~ALPHA_PSL_USERCLR; + td->td_frame->tf_regs[FRAME_PS] = val; + td->td_frame->tf_regs[FRAME_PC] = mcp->mc_regs[R_PC]; + td->td_frame->tf_regs[FRAME_FLAGS] = 0; + if (td == curthread) + alpha_pal_wrusp(mcp->mc_regs[R_SP]); + + } else { + if (td == curthread) + alpha_pal_wrusp(mcp->mc_regs[FRAME_SP]); + /* + * The context is a trapframe, so just copy it over the + * threads frame. + */ + bcopy(&mcp->mc_regs, &td->td_frame, sizeof(td->td_frame)); + } + return (0); +} + +static void +get_fpcontext(struct thread *td, mcontext_t *mcp) +{ + register_t s; + + s = intr_disable(); + if ((td->td_md.md_flags & MDTD_FPUSED) == 0) { + intr_restore(s); + mcp->mc_ownedfp = _MC_FPOWNED_NONE; + } else if (PCPU_GET(fpcurthread) == td) { + /* See comments in alpha_fpstate_save() regarding FEN. */ + if (td != curthread) + alpha_pal_wrfen(1); + /* + * The last field (fpr_cr) of struct fpreg isn't + * included in mc_fpregs, but it immediately follows + * it in mcontext_t. + */ + savefpstate((struct fpreg *)&mcp->mc_fpregs); + if (td != curthread) + alpha_pal_wrfen(0); + intr_restore(s); + mcp->mc_ownedfp = _MC_FPOWNED_FPU; + } else { + /* + * The thread doesn't own the FPU so get the state from + * the PCB. + */ + intr_restore(s); + bcopy(&td->td_pcb->pcb_fp, &mcp->mc_fpregs, + sizeof(td->td_pcb->pcb_fp)); + mcp->mc_ownedfp = _MC_FPOWNED_PCB; + } + /* There's no harm in always doing the following. */ + mcp->mc_fp_control = td->td_pcb->pcb_fp_control; +} + +static int +set_fpcontext(struct thread *td, const mcontext_t *mcp) +{ + register_t s; + + if (mcp->mc_ownedfp == _MC_FPOWNED_NONE) { + /* XXX - Drop fpu state so we get a clean state? */ + alpha_fpstate_drop(td); + } + else if ((mcp->mc_ownedfp != _MC_FPOWNED_FPU) && + (mcp->mc_ownedfp != _MC_FPOWNED_PCB)) + return (EINVAL); + else { + s = intr_disable(); + if (PCPU_GET(fpcurthread) == td) { + /* + * The last field (fpr_cr) of struct fpreg isn't + * included in mc_fpregs, but it immediately follows + * it in mcontext_t. + */ + restorefpstate((struct fpreg *)&mcp->mc_fpregs); + intr_restore(s); + } + else { + /* Just save the state in the PCB. */ + intr_restore(s); + bcopy(&mcp->mc_fpregs, &td->td_pcb->pcb_fp, + sizeof (td->td_pcb->pcb_fp)); + } + td->td_pcb->pcb_fp_control = mcp->mc_fp_control; + } + return (0); +} + +int fill_dbregs(struct thread *td, struct dbreg *dbregs) { ==== //depot/projects/ia64/sys/alpha/include/cpu.h#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.33 2002/10/06 05:24:13 obrien Exp $ */ +/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.34 2002/11/16 06:35:51 deischen Exp $ */ /* From: NetBSD: cpu.h,v 1.18 1997/09/23 23:17:49 mjacob Exp */ /* @@ -115,11 +115,11 @@ void XentSys(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */ void XentUna(u_int64_t, u_int64_t, u_int64_t); /* MAGIC */ void alpha_init(u_long, u_long, u_long, u_long, u_long); +void alpha_fpstate_check(struct thread *td); +void alpha_fpstate_drop(struct thread *td); +void alpha_fpstate_save(struct thread *td, int write); +void alpha_fpstate_switch(struct thread *td); int alpha_pa_access(u_long); -void alpha_fpstate_check(struct thread *p); -void alpha_fpstate_save(struct thread *p, int write); -void alpha_fpstate_drop(struct thread *p); -void alpha_fpstate_switch(struct thread *p); int badaddr (void *, size_t); int badaddr_read(void *, size_t, void *); u_int64_t console_restart(u_int64_t, u_int64_t, u_int64_t); ==== //depot/projects/ia64/sys/alpha/include/fpu.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/include/fpu.h,v 1.5 2001/09/12 08:36:54 julian Exp $ + * $FreeBSD: src/sys/alpha/include/fpu.h,v 1.6 2002/11/16 06:35:51 deischen Exp $ */ #ifndef _MACHINE_FPU_H_ @@ -116,9 +116,7 @@ __asm__("trapb") #ifdef _KERNEL - -extern int fp_software_completion(u_int64_t regmask, struct thread *p); - +extern int fp_software_completion(u_int64_t regmask, struct thread *td); #endif #endif /* ! _MACHINE_FPU_H_ */ ==== //depot/projects/ia64/sys/alpha/include/signal.h#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/signal.h,v 1.10 2002/10/25 19:10:55 peter Exp $ */ +/* $FreeBSD: src/sys/alpha/include/signal.h,v 1.11 2002/11/16 06:35:51 deischen Exp $ */ /* From: NetBSD: signal.h,v 1.3 1997/04/06 08:47:43 cgd Exp */ /* @@ -94,10 +94,9 @@ unsigned long sc_fpregs[32]; /* FP register set (see above) */ unsigned long sc_fpcr; /* FP control register (see above) */ unsigned long sc_fp_control; /* FP software control word */ - long sc_ownedfp; /* fp has been used */ - long sc_xxx1[2]; /* sc_ssize, sc_sbase on DUX */ - long sc_xxx2[3]; /* sc_fp_trap_pc, sc_fp_trigger_sum, sc_fp_trigger_inst */ - long sc_reserved[2]; /* XXX */ + long sc_ownedfp; /* fp has been used; see mcontext_t */ + long sc_format; /* see mcontext_t */ + long sc_spare[6]; /* XXX */ }; #define sc_sp sc_regs[R_SP] ==== //depot/projects/ia64/sys/alpha/include/ucontext.h#4 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/include/ucontext.h,v 1.5 2002/10/25 19:10:55 peter Exp $ + * $FreeBSD: src/sys/alpha/include/ucontext.h,v 1.6 2002/11/16 06:35:51 deischen Exp $ */ #ifndef _MACHINE_UCONTEXT_H_ @@ -43,11 +43,14 @@ unsigned long mc_fpregs[32]; unsigned long mc_fpcr; unsigned long mc_fp_control; +#define _MC_FPOWNED_NONE 0 /* FP state not used */ +#define _MC_FPOWNED_FPU 1 /* FP state came from FPU */ +#define _MC_FPOWNED_PCB 2 /* FP state came from PCB */ long mc_ownedfp; -#define __UC_REV0_SIGFRAME 1 /* context is a signal frame */ -#define __UC_REV0_TRAPFRAME 2 /* context is a trap frame */ +#define _MC_REV0_SIGFRAME 1 /* context is a signal frame */ +#define _MC_REV0_TRAPFRAME 2 /* context is a trap frame */ long mc_format; - long __spare__[6]; + long mc_spare[6]; } mcontext_t; #if defined(_KERNEL) && defined(COMPAT_FREEBSD4) ==== //depot/projects/ia64/sys/conf/files#48 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.734 2002/11/12 15:22:18 simokawa Exp $ +# $FreeBSD: src/sys/conf/files,v 1.736 2002/11/16 06:35:51 deischen Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -975,6 +975,7 @@ kern/kern_clock.c standard kern/kern_condvar.c standard kern/kern_conf.c standard +kern/kern_context.c standard kern/kern_descrip.c standard kern/kern_poll.c optional device_polling kern/kern_environment.c standard @@ -1318,7 +1319,7 @@ netinet/ip_fw2.c optional ipfirewall netinet/ip_icmp.c optional inet netinet/ip_input.c optional inet -netinet/ip_mroute.c optional inet +netinet/ip_mroute.c optional mrouting netinet/ip_output.c optional inet netinet/raw_ip.c optional inet netinet/tcp_debug.c optional tcpdebug ==== //depot/projects/ia64/sys/i386/i386/machdep.c#31 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.549 2002/11/09 21:17:41 iwasaki Exp $ + * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.550 2002/11/16 06:35:52 deischen Exp $ */ #include "opt_atalk.h" @@ -2317,7 +2317,7 @@ /* * Get machine context. */ -void +int get_mcontext(struct thread *td, mcontext_t *mcp) { struct trapframe *tp; @@ -2344,6 +2344,7 @@ mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); get_fpcontext(td, mcp); + return (0); } /* ==== //depot/projects/ia64/sys/i386/include/signal.h#5 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)signal.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD: src/sys/i386/include/signal.h,v 1.18 2002/10/25 19:10:56 peter Exp $ + * $FreeBSD: src/sys/i386/include/signal.h,v 1.19 2002/11/16 06:35:52 deischen Exp $ */ #ifndef _MACHINE_SIGNAL_H_ @@ -119,7 +119,7 @@ int sc_efl; int sc_esp; int sc_ss; - int sc_len; /* sizeof(struct mcontext_t) */ + int sc_len; /* sizeof(mcontext_t) */ /* * XXX - See and for * the following fields. @@ -127,7 +127,7 @@ int sc_fpformat; int sc_ownedfp; int sc_spare1[1]; - int sc_fpregs[128]; + int sc_fpstate[128]; int sc_spare2[8]; }; ==== //depot/projects/ia64/sys/i386/include/ucontext.h#6 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/include/ucontext.h,v 1.8 2002/10/25 19:10:56 peter Exp $ + * $FreeBSD: src/sys/i386/include/ucontext.h,v 1.9 2002/11/16 06:35:52 deischen Exp $ */ #ifndef _MACHINE_UCONTEXT_H_ @@ -38,7 +38,7 @@ * and ucontext_t at the same time. */ int mc_onstack; /* XXX - sigcontext compat. */ - int mc_gs; + int mc_gs; /* machine state (trapframe) */ int mc_fs; int mc_es; int mc_ds; @@ -55,7 +55,7 @@ int mc_eip; int mc_cs; int mc_eflags; - int mc_esp; /* machine state */ + int mc_esp; int mc_ss; int mc_len; /* sizeof(mcontext_t) */ @@ -72,8 +72,7 @@ int mc_spare2[8]; } mcontext_t; -#ifdef _KERNEL -#ifdef COMPAT_FREEBSD4 +#if defined(_KERNEL) && defined(COMPAT_FREEBSD4) /* For 4.x binaries */ struct mcontext4 { int mc_onstack; /* XXX - sigcontext compat. */ @@ -101,10 +100,4 @@ }; #endif -struct thread; - -void get_mcontext(struct thread *td, mcontext_t *mcp); -int set_mcontext(struct thread *td, const mcontext_t *mcp); -#endif - #endif /* !_MACHINE_UCONTEXT_H_ */ ==== //depot/projects/ia64/sys/i386/isa/npx.c#13 (text+ko) ==== @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/i386/isa/npx.c,v 1.135 2002/11/05 04:03:42 davidxu Exp $ + * $FreeBSD: src/sys/i386/isa/npx.c,v 1.136 2002/11/16 06:35:52 deischen Exp $ */ #include "opt_cpu.h" @@ -161,14 +161,14 @@ typedef u_char bool_t; +static void fpusave(union savefpu *); +static void fpurstor(union savefpu *); static int npx_attach(device_t dev); static void npx_identify(driver_t *driver, device_t parent); #ifndef SMP static void npx_intr(void *); #endif static int npx_probe(device_t dev); -static void fpusave(union savefpu *); -static void fpurstor(union savefpu *); #ifdef I586_CPU_XXX static long timezero(const char *funcname, void (*func)(void *buf, size_t len)); ==== //depot/projects/ia64/sys/ia64/ia64/machdep.c#53 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.121 2002/11/09 16:19:14 des Exp $ + * $FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.122 2002/11/16 06:35:52 deischen Exp $ */ #include "opt_compat.h" @@ -1038,6 +1038,20 @@ } #endif +int +get_mcontext(struct thread *td, mcontext_t *mcp) +{ + + return (ENOSYS); +} + +int +set_mcontext(struct thread *td, const mcontext_t *mcp) +{ + + return (ENOSYS); +} + /* * Machine dependent boot() routine */ ==== //depot/projects/ia64/sys/kern/init_sysent.c#20 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.142 2002/11/05 17:48:04 rwatson Exp $ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.136 2002/11/05 17:47:08 rwatson Exp + * $FreeBSD: src/sys/kern/init_sysent.c,v 1.143 2002/11/16 06:36:56 deischen Exp $ + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.137 2002/11/16 06:35:53 deischen Exp */ #include "opt_compat.h" @@ -449,4 +449,7 @@ { 0, (sy_call_t *)nosys }, /* 418 = __xstat */ { 0, (sy_call_t *)nosys }, /* 419 = __xfstat */ { 0, (sy_call_t *)nosys }, /* 420 = __xlstat */ + { SYF_MPSAFE | AS(getcontext_args), (sy_call_t *)getcontext }, /* 421 = getcontext */ + { SYF_MPSAFE | AS(setcontext_args), (sy_call_t *)setcontext }, /* 422 = setcontext */ + { SYF_MPSAFE | AS(swapcontext_args), (sy_call_t *)swapcontext }, /* 423 = swapcontext */ }; ==== //depot/projects/ia64/sys/kern/kern_exec.c#32 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/kern_exec.c,v 1.198 2002/11/10 07:12:04 alc Exp $ + * $FreeBSD: src/sys/kern/kern_exec.c,v 1.199 2002/11/16 07:44:25 alc Exp $ */ #include "opt_ktrace.h" @@ -771,7 +771,7 @@ (ma[0]->valid == 0)) { if (ma[0]) { vm_page_lock_queues(); - pmap_page_protect(ma[0], VM_PROT_NONE); + pmap_remove_all(ma[0]); vm_page_free(ma[0]); vm_page_unlock_queues(); } ==== //depot/projects/ia64/sys/kern/syscalls.c#21 (text+ko) ==== @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/syscalls.c,v 1.128 2002/11/05 17:48:04 rwatson Exp $ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.136 2002/11/05 17:47:08 rwatson Exp + * $FreeBSD: src/sys/kern/syscalls.c,v 1.129 2002/11/16 06:36:56 deischen Exp $ + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.137 2002/11/16 06:35:53 deischen Exp */ const char *syscallnames[] = { @@ -428,4 +428,7 @@ "#418", /* 418 = __xstat */ "#419", /* 419 = __xfstat */ "#420", /* 420 = __xlstat */ + "getcontext", /* 421 = getcontext */ + "setcontext", /* 422 = setcontext */ + "swapcontext", /* 423 = swapcontext */ }; ==== //depot/projects/ia64/sys/kern/syscalls.master#21 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/kern/syscalls.master,v 1.136 2002/11/05 17:47:08 rwatson Exp $ + $FreeBSD: src/sys/kern/syscalls.master,v 1.137 2002/11/16 06:35:53 deischen Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; ; System call name/number master file. @@ -608,6 +608,10 @@ 418 UNIMPL BSD __xstat 419 UNIMPL BSD __xfstat 420 UNIMPL BSD __xlstat +421 MSTD BSD { int getcontext(struct __ucontext *ucp); } +422 MSTD BSD { int setcontext(const struct __ucontext *ucp); } +423 MSTD BSD { int swapcontext(struct __ucontext *oucp, \ + const struct __ucontext *ucp); } ; Please copy any additions and changes to the following compatability tables: ; sys/ia64/ia32/syscalls.master (take a best guess) ==== //depot/projects/ia64/sys/kern/vfs_aio.c#22 (text+ko) ==== @@ -13,7 +13,7 @@ * bad that happens because of using this software isn't the responsibility * of the author. This software is distributed AS-IS. * - * $FreeBSD: src/sys/kern/vfs_aio.c,v 1.143 2002/11/07 20:46:37 rwatson Exp $ + * $FreeBSD: src/sys/kern/vfs_aio.c,v 1.145 2002/11/16 06:38:07 alfred Exp $ */ /* @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -350,6 +351,9 @@ aiod_lifetime = AIOD_LIFETIME_DEFAULT; jobrefid = 1; async_io_version = _POSIX_VERSION; + p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, AIO_LISTIO_MAX); + p31b_setcfg(CTL_P1003_1B_AIO_MAX, MAX_AIO_QUEUE); + p31b_setcfg(CTL_P1003_1B_AIO_PRIO_DELTA_MAX, 0); } /* @@ -372,6 +376,9 @@ rm_at_exit(aio_proc_rundown); rm_at_exec(aio_proc_rundown); kqueue_del_filteropts(EVFILT_AIO); + p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, 0); + p31b_setcfg(CTL_P1003_1B_AIO_MAX, 0); + p31b_setcfg(CTL_P1003_1B_AIO_PRIO_DELTA_MAX, 0); return (0); } ==== //depot/projects/ia64/sys/kern/vfs_bio.c#26 (text+ko) ==== @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $FreeBSD: src/sys/kern/vfs_bio.c,v 1.340 2002/11/10 07:12:04 alc Exp $ + * $FreeBSD: src/sys/kern/vfs_bio.c,v 1.341 2002/11/16 07:44:25 alc Exp $ */ /* @@ -1504,7 +1504,7 @@ if ((bp->b_flags & B_ASYNC) == 0 && !m->valid && m->hold_count == 0) { vm_page_busy(m); - pmap_page_protect(m, VM_PROT_NONE); + pmap_remove_all(m); vm_page_free(m); } else if (bp->b_flags & B_DIRECT) { vm_page_try_to_free(m); @@ -3268,7 +3268,7 @@ * It may not work properly with small-block devices. * We need to find a better way. */ - pmap_page_protect(m, VM_PROT_NONE); + pmap_remove_all(m); if (clear_modify) vfs_page_set_valid(bp, foff, i, m); else if (m->valid == VM_PAGE_BITS_ALL && ==== //depot/projects/ia64/sys/net/route.c#5 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)route.c 8.3 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/net/route.c,v 1.70 2002/05/31 04:27:51 silby Exp $ + * $FreeBSD: src/sys/net/route.c,v 1.71 2002/11/15 22:53:53 luigi Exp $ */ #include "opt_inet.h" @@ -403,7 +403,7 @@ { #ifdef INET /* Multicast goop, grrr... */ - return mrt_ioctl(req, data); + return mrt_ioctl ? mrt_ioctl(req, data) : EOPNOTSUPP; #else /* INET */ return ENXIO; #endif /* INET */ ==== //depot/projects/ia64/sys/netinet/ip_input.c#18 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/netinet/ip_input.c,v 1.215 2002/10/20 22:52:06 phk Exp $ + * $FreeBSD: src/sys/netinet/ip_input.c,v 1.216 2002/11/15 22:53:52 luigi Exp $ */ #include "opt_bootp.h" @@ -600,7 +600,8 @@ * ip_mforward() returns a non-zero value, the packet * must be discarded, else it may be accepted below. */ - if (ip_mforward(ip, m->m_pkthdr.rcvif, m, 0) != 0) { + if (ip_mforward && + ip_mforward(ip, m->m_pkthdr.rcvif, m, 0) != 0) { ipstat.ips_cantforward++; m_freem(m); return; @@ -2073,10 +2074,10 @@ { if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_RSVP) - return EOPNOTSUPP; + return EOPNOTSUPP; if (ip_rsvpd != NULL) - return EADDRINUSE; + return EADDRINUSE; ip_rsvpd = so; /* @@ -2105,3 +2106,29 @@ } return 0; } + +void +rsvp_input(struct mbuf *m, int off) /* XXX must fixup manually */ +{ + if (rsvp_input_p) { /* call the real one if loaded */ + rsvp_input_p(m, off); + return; + } + + /* Can still get packets with rsvp_on = 0 if there is a local member + * of the group to which the RSVP packet is addressed. But in this + * case we want to throw the packet away. + */ + + if (!rsvp_on) { + m_freem(m); + return; + } + + if (ip_rsvpd != NULL) { + rip_input(m, off); + return; + } + /* Drop the packet */ + m_freem(m); +} ==== //depot/projects/ia64/sys/netinet/ip_mroute.c#15 (text+ko) ==== @@ -9,7 +9,7 @@ * Modified by Bill Fenner, PARC, April 1995 * * MROUTING Revision: 3.5 - * $FreeBSD: src/sys/netinet/ip_mroute.c,v 1.82 2002/11/08 14:52:26 jhb Exp $ + * $FreeBSD: src/sys/netinet/ip_mroute.c,v 1.83 2002/11/15 22:53:52 luigi Exp $ */ #include "opt_mac.h" @@ -45,157 +45,30 @@ #include #include -#ifndef MROUTING -extern u_long _ip_mcast_src(int vifi); -extern int _ip_mforward(struct ip *ip, struct ifnet *ifp, struct mbuf *m, - struct ip_moptions *imo); -extern int _ip_mrouter_done(void); -extern int _ip_mrouter_get(struct socket *so, struct sockopt *sopt); -extern int _ip_mrouter_set(struct socket *so, struct sockopt *sopt); -extern int _mrt_ioctl(int req, caddr_t data); - /* - * Dummy routines and globals used when multicast routing is not compiled in. + * Control debugging code for rsvp and multicast routing code. + * Can only set them with the debugger. */ +static u_int rsvpdebug; /* non-zero enables debugging */ -struct socket *ip_mrouter = NULL; -u_int rsvpdebug = 0; +static u_int mrtdebug; /* any set of the flags below */ +#define DEBUG_MFC 0x02 +#define DEBUG_FORWARD 0x04 +#define DEBUG_EXPIRE 0x08 +#define DEBUG_XMIT 0x10 -int -_ip_mrouter_set(so, sopt) - struct socket *so; - struct sockopt *sopt; -{ - return(EOPNOTSUPP); -} - -int (*ip_mrouter_set)(struct socket *, struct sockopt *) = _ip_mrouter_set; - - -int -_ip_mrouter_get(so, sopt) - struct socket *so; - struct sockopt *sopt; -{ - return(EOPNOTSUPP); -} - -int (*ip_mrouter_get)(struct socket *, struct sockopt *) = _ip_mrouter_get; - -int -_ip_mrouter_done() -{ - return(0); -} - -int (*ip_mrouter_done)(void) = _ip_mrouter_done; - -int >>> TRUNCATED FOR MAIL (1000 lines) <<< To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message