From owner-p4-projects@FreeBSD.ORG Sun Apr 13 01:11:59 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF8CD37B404; Sun, 13 Apr 2003 01:11:58 -0700 (PDT) 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 4A0A537B401 for ; Sun, 13 Apr 2003 01:11:58 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B997243FA3 for ; Sun, 13 Apr 2003 01:11:57 -0700 (PDT) (envelope-from marcel@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 h3D8Bv0U031399 for ; Sun, 13 Apr 2003 01:11:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3D8Bvgm031396 for perforce@freebsd.org; Sun, 13 Apr 2003 01:11:57 -0700 (PDT) Date: Sun, 13 Apr 2003 01:11:57 -0700 (PDT) Message-Id: <200304130811.h3D8Bvgm031396@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28862 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 08:11:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=28862 Change 28862 by marcel@marcel_nfs on 2003/04/13 01:11:20 o User scratch predicate registers in exception handling code. o Switch back to the user BSP on exception return. o Set ar.k4, ar.k6 and ar.k7 on exception return. o Add code to fork_trampoline to actually jump to userland. This probably needs to be tweaked to match the EPC syscall path later on. o Bring exec_setregs() in sync. This brings us all the way to the first syscall, which is next on the agenda, after which we need to add support for signal delivery. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#7 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#8 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#10 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#7 (text+ko) ==== @@ -44,6 +44,13 @@ * Arguments: * r16 address of bundle that contains the branch. The * return address will be the next bundle. + * Returns: + * p15 interrupted from user stack + * p14 interrupted from kernel stack + * p13 interrupted from user backing store + * p12 interrupted from kernel backing store + * p11 interrupts were enabled + * p10 interrupts were disabled */ ENTRY(exception_save, 0) { .mii @@ -143,7 +150,7 @@ { .mmi st8 [r30]=r18,16 // fpsr st8 [r31]=r17,16 // psr - nop 0 + tbit.nz p11,p10=r17,14 // p11=interrupts enabled ;; } { .mmi @@ -481,32 +488,43 @@ ld8.fill r29=[r30],16 // tp ld8 r22=[r31],16 // rsc ;; +{ .mmi ld8 r23=[r30],16 // fpsr ld8 r24=[r31],16 // psr + extr.u r28=r20,61,3 ;; +} +{ .mmi ld8.fill r1=[r30],16 // gp ld8 r25=[r31],16 // ndirty + cmp.le p14,p15=5,r28 ;; +} +{ .mmb ld8 r26=[r30] // cfm ld8 r27=[r31] // ip +(p14) br.cond.sptk 1f ;; +} // Switch register stack -#if 0 alloc r31=ar.pfs,0,0,0,0 // discard current frame shl r30=r25,16 // value for ar.rsc ;; mov ar.rsc=r30 // setup for loadrs ;; loadrs // load user regs + mov r31=ar.bspstore ;; mov ar.bspstore=r20 + mov ar.k6=r31 ;; mov ar.rnat=r21 -#endif + mov ar.k4=r13 + mov r13=r29 + ;; - // Don't restore r13 if returning to kernel - +1: mov ar.unat=r16 mov ar.pfs=r19 mov ar.fpsr=r23 @@ -538,7 +556,7 @@ mov r16=ip ; \ br.sptk.few exception_save ; \ } ; \ -(p3) ssm psr.i; \ +(p11) ssm psr.i; \ alloc r15=ar.pfs,0,0,3,0; \ mov out0=_n_; \ mov out1=r14; \ @@ -589,8 +607,8 @@ ;; ld8 r21=[r21] // check VHPT tag ;; - cmp.ne p1,p0=r21,r19 -(p1) br.dpnt.few 1f + cmp.ne p15,p0=r21,r19 +(p15) br.dpnt.few 1f ;; ld8 r21=[r18] // read pte mov pr=r17,0x1ffff @@ -604,15 +622,15 @@ ;; srlz.d // serialize ;; -2: cmp.eq p1,p0=r0,r20 // done? -(p1) br.cond.spnt.few 9f // bail if done +2: cmp.eq p15,p0=r0,r20 // done? +(p15) br.cond.spnt.few 9f // bail if done ;; add r21=16,r20 // tag location ;; ld8 r21=[r21] // read tag ;; - cmp.ne p1,p0=r21,r19 // compare tags -(p1) br.cond.sptk.few 3f // if not, read next in chain + cmp.ne p15,p0=r21,r19 // compare tags +(p15) br.cond.sptk.few 3f // if not, read next in chain ;; ld8 r21=[r20],8 // read pte ;; @@ -666,8 +684,8 @@ ;; ld8 r21=[r21] // check VHPT tag ;; - cmp.ne p1,p0=r21,r19 -(p1) br.dpnt.few 1f + cmp.ne p15,p0=r21,r19 +(p15) br.dpnt.few 1f ;; ld8 r21=[r18] // read pte mov pr=r17,0x1ffff @@ -681,15 +699,15 @@ ;; srlz.d // serialize ;; -2: cmp.eq p1,p0=r0,r20 // done? -(p1) br.cond.spnt.few 9f // bail if done +2: cmp.eq p15,p0=r0,r20 // done? +(p15) br.cond.spnt.few 9f // bail if done ;; add r21=16,r20 // tag location ;; ld8 r21=[r21] // read tag ;; - cmp.ne p1,p0=r21,r19 // compare tags -(p1) br.cond.sptk.few 3f // if not, read next in chain + cmp.ne p15,p0=r21,r19 // compare tags +(p15) br.cond.sptk.few 3f // if not, read next in chain ;; ld8 r21=[r20],8 // read pte ;; @@ -737,12 +755,12 @@ ;; extr.u r17=r16,61,3 // get region number ;; - cmp.ge p3,p0=5,r17 // RR0-RR5? - cmp.eq p1,p2=7,r17 // RR7->p1, RR6->p2 -(p3) br.spnt 9f + cmp.ge p13,p0=5,r17 // RR0-RR5? + cmp.eq p15,p14=7,r17 // RR7->p15, RR6->p14 +(p13) br.spnt 9f ;; -(p1) movl r17=PTE_P+PTE_MA_WB+PTE_A+PTE_D+PTE_PL_KERN+PTE_AR_RX -(p2) movl r17=PTE_P+PTE_MA_UC+PTE_A+PTE_D+PTE_PL_KERN+PTE_AR_RX +(p15) movl r17=PTE_P+PTE_MA_WB+PTE_A+PTE_D+PTE_PL_KERN+PTE_AR_RX +(p14) movl r17=PTE_P+PTE_MA_UC+PTE_A+PTE_D+PTE_PL_KERN+PTE_AR_RX ;; dep r16=0,r16,50,14 // clear bits above PPN ;; @@ -762,12 +780,12 @@ ;; extr.u r17=r16,61,3 // get region number ;; - cmp.ge p3,p0=5,r17 // RR0-RR5? - cmp.eq p1,p2=7,r17 // RR7->p1, RR6->p2 -(p3) br.spnt 9f + cmp.ge p13,p0=5,r17 // RR0-RR5? + cmp.eq p15,p14=7,r17 // RR7->p15, RR6->p14 +(p13) br.spnt 9f ;; -(p1) movl r17=PTE_P+PTE_MA_WB+PTE_A+PTE_D+PTE_PL_KERN+PTE_AR_RW -(p2) movl r17=PTE_P+PTE_MA_UC+PTE_A+PTE_D+PTE_PL_KERN+PTE_AR_RW +(p15) movl r17=PTE_P+PTE_MA_WB+PTE_A+PTE_D+PTE_PL_KERN+PTE_AR_RW +(p14) movl r17=PTE_P+PTE_MA_UC+PTE_A+PTE_D+PTE_PL_KERN+PTE_AR_RW ;; dep r16=0,r16,50,14 // clear bits above PPN ;; @@ -811,15 +829,15 @@ ;; srlz.d // serialize ;; -1: cmp.eq p1,p0=r0,r20 // done? -(p1) br.cond.spnt.few 9f // bail if done +1: cmp.eq p15,p0=r0,r20 // done? +(p15) br.cond.spnt.few 9f // bail if done ;; add r21=16,r20 // tag location ;; ld8 r21=[r21] // read tag ;; - cmp.ne p1,p0=r21,r19 // compare tags -(p1) br.cond.sptk.few 2f // if not, read next in chain + cmp.ne p15,p0=r21,r19 // compare tags +(p15) br.cond.sptk.few 2f // if not, read next in chain ;; ld8 r21=[r20] // read pte mov r22=PTE_D|PTE_A @@ -880,15 +898,15 @@ ;; srlz.d // serialize ;; -1: cmp.eq p1,p0=r0,r20 // done? -(p1) br.cond.spnt.few 9f // bail if done +1: cmp.eq p15,p0=r0,r20 // done? +(p15) br.cond.spnt.few 9f // bail if done ;; add r21=16,r20 // tag location ;; ld8 r21=[r21] // read tag ;; - cmp.ne p1,p0=r21,r19 // compare tags -(p1) br.cond.sptk.few 2f // if not, read next in chain + cmp.ne p15,p0=r21,r19 // compare tags +(p15) br.cond.sptk.few 2f // if not, read next in chain ;; ld8 r21=[r20] // read pte mov r22=PTE_A @@ -949,15 +967,15 @@ ;; srlz.d // serialize ;; -1: cmp.eq p1,p0=r0,r20 // done? -(p1) br.cond.spnt.few 9f // bail if done +1: cmp.eq p15,p0=r0,r20 // done? +(p15) br.cond.spnt.few 9f // bail if done ;; add r21=16,r20 // tag location ;; ld8 r21=[r21] // read tag ;; - cmp.ne p1,p0=r21,r19 // compare tags -(p1) br.cond.sptk.few 2f // if not, read next in chain + cmp.ne p15,p0=r21,r19 // compare tags +(p15) br.cond.sptk.few 2f // if not, read next in chain ;; ld8 r21=[r20] // read pte mov r22=PTE_A @@ -1019,8 +1037,8 @@ 3: mov out0=cr.ivr // find interrupt vector ;; - cmp.eq p6,p0=15,out0 // check for spurious vector number -(p6) br.dpnt.few exception_restore // if spurious, we are done + cmp.eq p15,p0=15,out0 // check for spurious vector number +(p15) br.dpnt.few exception_restore // if spurious, we are done ;; ssm psr.i // re-enable interrupts ;; // now that we are in-progress ==== //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#8 (text+ko) ==== @@ -144,7 +144,80 @@ } // If we get back here, it means we're a user space process that's // the immediate result of fork(2). - break 0 + .global enter_userland + .type enter_userland, @function +enter_userland: +{ .mmi + alloc r16=ar.pfs,0,0,0,0 + mov ar.rsc=0 + add r14=32,sp + ;; +} +{ .mmi + loadrs + ld8 r31=[r14],32 // sp + add r15=48,sp + ;; +} +{ .mmi + ld8 r16=[r15],24 // rp + mov r30=ar.bspstore + add r29=16,sp + ;; +} +{ .mmi + ld8 r17=[r14],40 // pfs + ld8 r18=[r15],40 // bspstore + mov rp=r16 + ;; +} +{ .mlx + mov ar.bspstore=r18 + movl r16=0x180000 + ;; +} +{ .mmi + ld8 r28=[r29] + mov ar.rsc=r16 + mov sp=r31 + ;; +} +{ .mmi + loadrs + ld8 r16=[r14],16 // rsc + add r29=r28,r29 + ;; +} +{ .mmi + mov ar.rsc=r16 + ld8 r18=[r15] // fpsr + mov ar.pfs=r17 + ;; +} +{ .mmb + ld8 r16=[r14] // psr + mov ar.fpsr=r18 + nop 0 + ;; +} +{ .mmi + mov psr.l=r16 + mov ar.k7=r29 + nop 0 + ;; +} +{ .mmi + srlz.d + mov ar.k6=r30 + nop 0 + ;; +} +{ .mmb + mov ar.k4=r13 + nop 0 + br.ret.sptk rp + ;; +} END(fork_trampoline) #ifdef SMP ==== //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#10 (text+ko) ==== @@ -1071,28 +1071,28 @@ frame = td->td_frame; bzero(frame, sizeof(*frame)); - - frame->tf_special.iip = entry; + frame->tf_length = sizeof(*frame); + frame->tf_flags = FRAME_SYSCALL; + frame->tf_special.sp = (stack & ~15) - 16; + frame->tf_special.rp = entry; + frame->tf_special.pfs = (3UL<<62) | (3UL<<7) | 3UL; + frame->tf_special.bspstore = td->td_md.md_bspstore + 24; + frame->tf_special.rsc = 0xf; + frame->tf_special.fpsr = IA64_FPSR_DEFAULT; frame->tf_special.psr = IA64_PSR_IC | IA64_PSR_I | IA64_PSR_IT | IA64_PSR_DT | IA64_PSR_RT | IA64_PSR_DFH | IA64_PSR_BN | IA64_PSR_CPL_USER; - frame->tf_special.sp = (stack & ~15) - 16; - /* * Write values for out0, out1 and out2 to the user's backing * store and arrange for them to be restored into the user's * initial register frame. Assumes that (bspstore & 0x1f8) < * 0x1e0. */ - frame->tf_special.bspstore = td->td_md.md_bspstore + 24; suword((caddr_t)frame->tf_special.bspstore - 24, stack); suword((caddr_t)frame->tf_special.bspstore - 16, ps_strings); suword((caddr_t)frame->tf_special.bspstore - 8, 0); - frame->tf_special.rsc = 0xf; - frame->tf_special.fpsr = IA64_FPSR_DEFAULT; - td->td_md.md_flags &= ~MDP_FPUSED; ia64_fpstate_drop(td); } From owner-p4-projects@FreeBSD.ORG Sun Apr 13 11:48:56 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A21037B404; Sun, 13 Apr 2003 11:48:55 -0700 (PDT) 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 136E537B401 for ; Sun, 13 Apr 2003 11:48:55 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A44C043FA3 for ; Sun, 13 Apr 2003 11:48:54 -0700 (PDT) (envelope-from marcel@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 h3DIms0U099435 for ; Sun, 13 Apr 2003 11:48:54 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DImsor099432 for perforce@freebsd.org; Sun, 13 Apr 2003 11:48:54 -0700 (PDT) Date: Sun, 13 Apr 2003 11:48:54 -0700 (PDT) Message-Id: <200304131848.h3DImsor099432@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28876 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 18:48:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=28876 Change 28876 by marcel@marcel_nfs on 2003/04/13 11:48:15 Steer clear from namespace specific types. This fixes building an EPC based world. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/include/_regset.h#6 edit .. //depot/projects/ia64_epc/sys/ia64/include/signal.h#4 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/include/_regset.h#6 (text+ko) ==== @@ -44,33 +44,33 @@ /* A single FP register. */ struct _ia64_fpreg { - uint64_t fpr_bits[2]; + unsigned char fpr_bits[16]; } __aligned(16); /* * Special registers. */ struct _special { - uint64_t sp; - uint64_t unat; /* NaT before spilling */ - uint64_t rp; - uint64_t pr; - uint64_t pfs; - uint64_t bspstore; - uint64_t rnat; - uint64_t __spare; + unsigned long sp; + unsigned long unat; /* NaT before spilling */ + unsigned long rp; + unsigned long pr; + unsigned long pfs; + unsigned long bspstore; + unsigned long rnat; + unsigned long __spare; /* Userland context and syscalls */ - uint64_t tp; - uint64_t rsc; - uint64_t fpsr; - uint64_t psr; + unsigned long tp; + unsigned long rsc; + unsigned long fpsr; + unsigned long psr; /* ASYNC: Interrupt specific */ - uint64_t gp; - uint64_t ndirty; - uint64_t cfm; - uint64_t iip; - uint64_t ifa; - uint64_t isr; + unsigned long gp; + unsigned long ndirty; + unsigned long cfm; + unsigned long iip; + unsigned long ifa; + unsigned long isr; }; struct _high_fp { @@ -82,18 +82,18 @@ * Preserved registers. */ struct _callee_saved { - uint64_t unat; /* NaT after spilling. */ - uint64_t gr4; - uint64_t gr5; - uint64_t gr6; - uint64_t gr7; - uint64_t br1; - uint64_t br2; - uint64_t br3; - uint64_t br4; - uint64_t br5; - uint64_t lc; - uint64_t __spare; + unsigned long unat; /* NaT after spilling. */ + unsigned long gr4; + unsigned long gr5; + unsigned long gr6; + unsigned long gr7; + unsigned long br1; + unsigned long br2; + unsigned long br3; + unsigned long br4; + unsigned long br5; + unsigned long lc; + unsigned long __spare; }; struct _callee_saved_fp { @@ -123,36 +123,36 @@ * Scratch registers. */ struct _caller_saved { - uint64_t unat; /* NaT after spilling. */ - uint64_t gr2; - uint64_t gr3; - uint64_t gr8; - uint64_t gr9; - uint64_t gr10; - uint64_t gr11; - uint64_t gr14; - uint64_t gr15; - uint64_t gr16; - uint64_t gr17; - uint64_t gr18; - uint64_t gr19; - uint64_t gr20; - uint64_t gr21; - uint64_t gr22; - uint64_t gr23; - uint64_t gr24; - uint64_t gr25; - uint64_t gr26; - uint64_t gr27; - uint64_t gr28; - uint64_t gr29; - uint64_t gr30; - uint64_t gr31; - uint64_t br6; - uint64_t br7; - uint64_t ccv; - uint64_t csd; - uint64_t ssd; + unsigned long unat; /* NaT after spilling. */ + unsigned long gr2; + unsigned long gr3; + unsigned long gr8; + unsigned long gr9; + unsigned long gr10; + unsigned long gr11; + unsigned long gr14; + unsigned long gr15; + unsigned long gr16; + unsigned long gr17; + unsigned long gr18; + unsigned long gr19; + unsigned long gr20; + unsigned long gr21; + unsigned long gr22; + unsigned long gr23; + unsigned long gr24; + unsigned long gr25; + unsigned long gr26; + unsigned long gr27; + unsigned long gr28; + unsigned long gr29; + unsigned long gr30; + unsigned long gr31; + unsigned long br6; + unsigned long br7; + unsigned long ccv; + unsigned long csd; + unsigned long ssd; }; struct _caller_saved_fp { ==== //depot/projects/ia64_epc/sys/ia64/include/signal.h#4 (text+ko) ==== @@ -72,8 +72,8 @@ */ struct sigcontext { struct __sigset sc_mask; /* signal mask to restore */ - uint64_t sc_onstack; - uint64_t sc_flags; + unsigned long sc_onstack; + unsigned long sc_flags; struct _special sc_special; struct _callee_saved sc_preserved; struct _callee_saved_fp sc_preserved_fp; From owner-p4-projects@FreeBSD.ORG Sun Apr 13 11:55:04 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 998B337B404; Sun, 13 Apr 2003 11:55:03 -0700 (PDT) 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 3432037B401 for ; Sun, 13 Apr 2003 11:55:03 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D32BD43F3F for ; Sun, 13 Apr 2003 11:55:02 -0700 (PDT) (envelope-from marcel@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 h3DIt20U000155 for ; Sun, 13 Apr 2003 11:55:02 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DIt2oK000152 for perforce@freebsd.org; Sun, 13 Apr 2003 11:55:02 -0700 (PDT) Date: Sun, 13 Apr 2003 11:55:02 -0700 (PDT) Message-Id: <200304131855.h3DIt2oK000152@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28877 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 18:55:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=28877 Change 28877 by marcel@marcel_nfs on 2003/04/13 11:54:12 Add pcb_fpcpu used for lazy FP context saving. The meaning of this field being that a NULL pointer indicates that the authoritative values of the high FP registers are in the PCB, otherwise it points to the pcpu structure of the CPU that has the authoritative values. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/include/pcb.h#7 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/include/pcb.h#7 (text+ko) ==== @@ -41,7 +41,7 @@ struct _callee_saved pcb_preserved; struct _callee_saved_fp pcb_preserved_fp; struct _high_fp pcb_high_fp; - + struct pcpu *pcb_fpcpu; struct pmap *pcb_current_pmap; uint64_t pcb_onfault; /* for copy faults */ From owner-p4-projects@FreeBSD.ORG Sun Apr 13 14:26:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5626937B404; Sun, 13 Apr 2003 14:26:11 -0700 (PDT) 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 521DF37B401 for ; Sun, 13 Apr 2003 14:26:10 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC41643F85 for ; Sun, 13 Apr 2003 14:26:09 -0700 (PDT) (envelope-from marcel@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 h3DLQ90U019953 for ; Sun, 13 Apr 2003 14:26:09 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DLQ9HL019950 for perforce@freebsd.org; Sun, 13 Apr 2003 14:26:09 -0700 (PDT) Date: Sun, 13 Apr 2003 14:26:09 -0700 (PDT) Message-Id: <200304132126.h3DLQ9HL019950@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28884 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 21:26:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=28884 Change 28884 by marcel@marcel_nfs on 2003/04/13 14:25:12 Fix a dependency violation I strangely enough missed. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#8 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#8 (text+ko) ==== @@ -514,6 +514,7 @@ mov ar.rsc=r30 // setup for loadrs ;; loadrs // load user regs + ;; mov r31=ar.bspstore ;; mov ar.bspstore=r20 From owner-p4-projects@FreeBSD.ORG Sun Apr 13 15:22:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 55E9B37B404; Sun, 13 Apr 2003 15:22:25 -0700 (PDT) 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 E9AEF37B401 for ; Sun, 13 Apr 2003 15:22:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9226A43FAF for ; Sun, 13 Apr 2003 15:22:24 -0700 (PDT) (envelope-from marcel@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 h3DMMO0U025867 for ; Sun, 13 Apr 2003 15:22:24 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DMMOmg025864 for perforce@freebsd.org; Sun, 13 Apr 2003 15:22:24 -0700 (PDT) Date: Sun, 13 Apr 2003 15:22:24 -0700 (PDT) Message-Id: <200304132222.h3DMMOmg025864@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28891 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 22:22:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=28891 Change 28891 by marcel@marcel_nfs on 2003/04/13 15:22:23 Disable the high FP registers by default. While here, add some explicit bundling. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#9 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#9 (text+ko) ==== @@ -51,22 +51,33 @@ * register r8. */ ENTRY(__start, 1) +{ .mlx mov ar.rsc=0 movl r16=ia64_vector_table // set up IVT early ;; +} +{ .mlx mov cr.iva=r16 movl r16=kstack ;; +} +{ .mmi srlz.i ;; + ssm IA64_PSR_DFH mov r17=KSTACK_PAGES*PAGE_SIZE-SIZEOF_PCB-SIZEOF_TRAPFRAME-16 ;; +} +{ .mlx add sp=r16,r17 // proc0's stack movl gp=__gp // find kernel globals ;; +} +{ .mlx mov ar.bspstore=r16 // switch backing store movl r16=pa_bootinfo ;; +} st8 [r16]=r8 // save the PA of the bootinfo block loadrs // invalidate regs ;; @@ -107,7 +118,7 @@ .prologue .save rp,r0 .body - + br.call.sptk.many rp=mi_startup // Should never happen @@ -277,7 +288,7 @@ ;; 1: mov r16 = ip add r17 = 2f-1b, r17 - movl r18 = (IA64_PSR_AC|IA64_PSR_DT|IA64_PSR_RT|IA64_PSR_IT|IA64_PSR_BN) + movl r18 = (IA64_PSR_AC|IA64_PSR_BN|IA64_PSR_DFH|IA64_PSR_DT|IA64_PSR_IT|IA64_PSR_RT) ;; add r17 = r17, r16 mov cr.ipsr = r18 From owner-p4-projects@FreeBSD.ORG Sun Apr 13 15:48:59 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEEE837B404; Sun, 13 Apr 2003 15:48:58 -0700 (PDT) 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 6560D37B401 for ; Sun, 13 Apr 2003 15:48:58 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D5DF43FAF for ; Sun, 13 Apr 2003 15:48:58 -0700 (PDT) (envelope-from marcel@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 h3DMmv0U027781 for ; Sun, 13 Apr 2003 15:48:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DMmvkP027778 for perforce@freebsd.org; Sun, 13 Apr 2003 15:48:57 -0700 (PDT) Date: Sun, 13 Apr 2003 15:48:57 -0700 (PDT) Message-Id: <200304132248.h3DMmvkP027778@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28893 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 22:48:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=28893 Change 28893 by marcel@marcel_nfs on 2003/04/13 15:47:57 Get truss(1) in sync. This needs to be double-checked when the EPC syscall code stabilizes. For now, it compiles. Affected files ... .. //depot/projects/ia64_epc/usr.bin/truss/ia64-fbsd.c#3 edit Differences ... ==== //depot/projects/ia64_epc/usr.bin/truss/ia64-fbsd.c#3 (text+ko) ==== @@ -136,14 +136,14 @@ fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); return; } - parm_offset = regs.r_gr[12] + 16; + parm_offset = regs.r_special.sp + 16; /* * FreeBSD has two special kinds of system call redirctions -- * SYS_syscall, and SYS___syscall. The former is the old syscall() * routine, basicly; the latter is for quad-aligned arguments. */ - syscall_num = regs.r_gr[15]; + syscall_num = regs.r_scratch.gr15; /* XXX double-check. */ switch (syscall_num) { case SYS_syscall: lseek(Procfd, parm_offset, SEEK_SET); @@ -293,8 +293,8 @@ fprintf(trussinfo->outfile, "-- CANNOT READ REGISTERS --\n"); return (-1); } - retval = regs.r_gr[8]; - errorp = (regs.r_gr[10] != 0) ? 1 : 0; + retval = regs.r_scratch.gr8; + errorp = (regs.r_scratch.gr10 != 0) ? 1 : 0; /* * This code, while simpler than the initial versions I used, could From owner-p4-projects@FreeBSD.ORG Sun Apr 13 15:57:10 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9DF237B401; Sun, 13 Apr 2003 15:57:09 -0700 (PDT) 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 67AE037B407 for ; Sun, 13 Apr 2003 15:57:09 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C8F643FA3 for ; Sun, 13 Apr 2003 15:57:09 -0700 (PDT) (envelope-from marcel@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 h3DMv80U028616 for ; Sun, 13 Apr 2003 15:57:08 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DMv88p028613 for perforce@freebsd.org; Sun, 13 Apr 2003 15:57:08 -0700 (PDT) Date: Sun, 13 Apr 2003 15:57:08 -0700 (PDT) Message-Id: <200304132257.h3DMv88p028613@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28895 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 22:57:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=28895 Change 28895 by marcel@marcel_nfs on 2003/04/13 15:56:20 There's no point creating an initial register state based on the current context, because as soon as we return to the caller, the context will be invalid. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/unwind.c#3 edit .. //depot/projects/ia64_epc/sys/ia64/include/unwind.h#3 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/unwind.c#3 (text+ko) ==== @@ -103,23 +103,6 @@ return (NULL); } -int -unw_state_create(struct unw_regstate *rs) -{ - struct pcb pcb; - - savectx(&pcb); - /* Cache the values. */ - rs->rs_val.special = pcb.pcb_special; - rs->rs_val.preserved = pcb.pcb_preserved; - rs->rs_val.preserved_fp = pcb.pcb_preserved_fp; - /* Set the location to 'self' (ie in the register itself). */ - memset(&rs->rs_loc.special, 0, sizeof(rs->rs_loc.special)); - memset(&rs->rs_loc.preserved, 0, sizeof(rs->rs_loc.preserved)); - memset(&rs->rs_loc.preserved_fp, 0, sizeof(rs->rs_loc.preserved_fp)); - return (0); -} - static __inline void unw_set_loc(void *rs, void *pcb, int sz) { @@ -131,9 +114,13 @@ } int -unw_state_create_from_pcb(struct unw_regstate *rs, struct pcb *pcb) +unw_state_create(struct unw_regstate *rs, struct pcb *pcb) { + uint64_t *fp; + /* Set the current IP to the code address of savectx. */ + fp = (void*)savectx; + rs->rs_val.special.iip = *fp; /* Cache the values. */ rs->rs_val.special = pcb->pcb_special; rs->rs_val.preserved = pcb->pcb_preserved; ==== //depot/projects/ia64_epc/sys/ia64/include/unwind.h#3 (text+ko) ==== @@ -53,8 +53,7 @@ struct _unw_regs rs_loc; }; -int unw_state_create(struct unw_regstate *); -int unw_state_create_from_pcb(struct unw_regstate *, struct pcb *); +int unw_state_create(struct unw_regstate *, struct pcb *); int unw_table_add(uint64_t, uint64_t, uint64_t); void unw_table_remove(uint64_t); From owner-p4-projects@FreeBSD.ORG Sun Apr 13 15:59:13 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 01EDE37B404; Sun, 13 Apr 2003 15:59:12 -0700 (PDT) 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 958CF37B401 for ; Sun, 13 Apr 2003 15:59:12 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C8DE43F85 for ; Sun, 13 Apr 2003 15:59:12 -0700 (PDT) (envelope-from marcel@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 h3DMxC0U028724 for ; Sun, 13 Apr 2003 15:59:12 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DMxBWE028721 for perforce@freebsd.org; Sun, 13 Apr 2003 15:59:11 -0700 (PDT) Date: Sun, 13 Apr 2003 15:59:11 -0700 (PDT) Message-Id: <200304132259.h3DMxBWE028721@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28896 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 22:59:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=28896 Change 28896 by marcel@marcel_nfs on 2003/04/13 15:58:23 Use a small "device" for now. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/conf/SKI#5 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/conf/SKI#5 (text+ko) ==== @@ -49,6 +49,7 @@ options SCSI_DELAY=500 #Delay (in ms) before probing SCSI options SKI options SOFTUPDATES #Enable FFS soft updates support +options SSC_NSECT=16384 options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options SYSVSHM #SYSV-style shared memory From owner-p4-projects@FreeBSD.ORG Sun Apr 13 16:02:17 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1A6E937B405; Sun, 13 Apr 2003 16:02:17 -0700 (PDT) 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 DB24F37B404 for ; Sun, 13 Apr 2003 16:02:16 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86BBD43F3F for ; Sun, 13 Apr 2003 16:02:16 -0700 (PDT) (envelope-from marcel@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 h3DN2G0U029291 for ; Sun, 13 Apr 2003 16:02:16 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DN2GJ1029288 for perforce@freebsd.org; Sun, 13 Apr 2003 16:02:16 -0700 (PDT) Date: Sun, 13 Apr 2003 16:02:16 -0700 (PDT) Message-Id: <200304132302.h3DN2GJ1029288@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28897 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 23:02:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=28897 Change 28897 by marcel@marcel_nfs on 2003/04/13 16:01:32 Add IPI_HIGH_FP to interrupt a processor so that it saves the high FP registers it currently holds. While here, keep the IPIs sorted (we don't have to worry about ABI breakages now). Affected files ... .. //depot/projects/ia64_epc/sys/ia64/include/smp.h#2 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/include/smp.h#2 (text+ko) ==== @@ -14,15 +14,16 @@ */ /* Architecture specific IPIs. */ #define IPI_AP_WAKEUP 0 -#define IPI_MCA_RENDEZ 1 +#define IPI_HIGH_FP 1 #define IPI_MCA_CMCV 2 -#define IPI_TEST 3 +#define IPI_MCA_RENDEZ 3 +#define IPI_TEST 4 /* Machine independent IPIs. */ -#define IPI_AST 4 -#define IPI_RENDEZVOUS 5 -#define IPI_STOP 6 +#define IPI_AST 5 +#define IPI_RENDEZVOUS 6 +#define IPI_STOP 7 -#define IPI_COUNT 7 +#define IPI_COUNT 8 #ifndef LOCORE From owner-p4-projects@FreeBSD.ORG Sun Apr 13 16:10:29 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E18B137B404; Sun, 13 Apr 2003 16:10:28 -0700 (PDT) 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 7FB8C37B401 for ; Sun, 13 Apr 2003 16:10:28 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D35A43F3F for ; Sun, 13 Apr 2003 16:10:28 -0700 (PDT) (envelope-from marcel@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 h3DNAR0U030605 for ; Sun, 13 Apr 2003 16:10:27 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3DNARR0030599 for perforce@freebsd.org; Sun, 13 Apr 2003 16:10:27 -0700 (PDT) Date: Sun, 13 Apr 2003 16:10:27 -0700 (PDT) Message-Id: <200304132310.h3DNARR0030599@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28899 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2003 23:10:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=28899 Change 28899 by marcel@marcel_nfs on 2003/04/13 16:09:26 Rename _{g|s}et_high_fp and remove prototypes for the other _{g|s}et_* functions. I don't think I'm going to use the regset oriented functions after all (or at least in all cases). I keep them around until I'm all done... Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/context.s#11 edit .. //depot/projects/ia64_epc/sys/ia64/include/_regset.h#7 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/context.s#11 (text+ko) ==== @@ -924,8 +924,8 @@ * _set_callee_saved_fp - Restore preserved FP registers. * _get_caller_saved_fp - Save scratch FP registers. * _set_caller_saved_fp - Restore scratch FP registers. - * _get_high_fp - Save high FP registers (scratch). - * _set_high_fp - Restore high FP registers (scratch). + * save_high_fp - Save high FP registers (scratch). + * restore_high_fp - Restore high FP registers (scratch). */ /* @@ -1055,9 +1055,9 @@ END(_set_caller_saved_fp) /* - * _get_high_fp + * save_high_fp */ -ENTRY(_get_high_fp, 1) +ENTRY(save_high_fp, 1) add r31=16,r32 stf.spill [r32]=f32,32 ;; @@ -1205,12 +1205,12 @@ stf.spill [r31]=f127 br.ret.sptk rp ;; -END(_get_high_fp) +END(save_high_fp) /* - * _set_high_fp + * restore_high_fp */ -ENTRY(_set_high_fp, 1) +ENTRY(restore_high_fp, 1) add r31=16,r32 ldf.fill f32=[r32],32 ;; @@ -1358,4 +1358,4 @@ ldf.fill f127=[r31] br.ret.sptk rp ;; -END(_set_high_fp) +END(restore_high_fp) ==== //depot/projects/ia64_epc/sys/ia64/include/_regset.h#7 (text+ko) ==== @@ -169,17 +169,8 @@ }; #ifdef _KERNEL -void _get_callee_saved(struct _callee_saved *); -void _get_callee_saved_fp(struct _callee_saved_fp *); -void _get_caller_saved(struct _caller_saved *); -void _get_caller_saved_fp(struct _caller_saved_fp *); -void _get_high_fp(struct _high_fp *); - -void _set_callee_saved(struct _callee_saved *); -void _set_callee_saved_fp(struct _callee_saved_fp *); -void _set_caller_saved(struct _caller_saved *); -void _set_caller_saved_fp(struct _caller_saved_fp *); -void _set_high_fp(struct _high_fp *); +void restore_high_fp(struct _high_fp *); +void save_high_fp(struct _high_fp *); #endif #endif /* _MACHINE_REGSET_H_ */ From owner-p4-projects@FreeBSD.ORG Sun Apr 13 19:57:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DEEAE37B404; Sun, 13 Apr 2003 19:57:05 -0700 (PDT) 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 8774337B401 for ; Sun, 13 Apr 2003 19:57:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 495EE43FCB for ; Sun, 13 Apr 2003 19:57:04 -0700 (PDT) (envelope-from marcel@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 h3E2v40U057439 for ; Sun, 13 Apr 2003 19:57:04 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3E2v3v7057436 for perforce@freebsd.org; Sun, 13 Apr 2003 19:57:03 -0700 (PDT) Date: Sun, 13 Apr 2003 19:57:03 -0700 (PDT) Message-Id: <200304140257.h3E2v3v7057436@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28905 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 02:57:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=28905 Change 28905 by marcel@marcel_nfs on 2003/04/13 19:56:37 Implement lazy context switching for the high FP registers. This does not use any synchronization and/or locking yet. Also, we currently disable the high FP registers whenever we enter and leave the kernel. We may want to leave the high FP registers enabled if we leave the kernel and the CPU holds the high FP registers of the process we're returning to. For now we just let it trap. I expect to have to revisit this... Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#9 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/interrupt.c#2 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#11 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#4 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/trap.c#8 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/vm_machdep.c#7 edit .. //depot/projects/ia64_epc/sys/ia64/include/cpu.h#5 edit .. //depot/projects/ia64_epc/sys/ia64/include/smp.h#3 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#9 (text+ko) ==== @@ -327,7 +327,7 @@ ;; } { .mlx - ssm psr.ic + ssm psr.ic|psr.dfh movl gp=__gp ;; } @@ -506,15 +506,20 @@ (p14) br.cond.sptk 1f ;; } - +{ .mii // Switch register stack alloc r31=ar.pfs,0,0,0,0 // discard current frame shl r30=r25,16 // value for ar.rsc + dep r24=-1,r24,19,1 // XXX disable high FP. ;; +} +{ .mmi mov ar.rsc=r30 // setup for loadrs ;; loadrs // load user regs + nop 0 ;; +} mov r31=ar.bspstore ;; mov ar.bspstore=r20 ==== //depot/projects/ia64_epc/sys/ia64/ia64/interrupt.c#2 (text+ko) ==== @@ -152,6 +152,9 @@ } else if (vector == ipi_vector[IPI_AST]) { asts[PCPU_GET(cpuid)]++; CTR1(KTR_SMP, "IPI_AST, cpuid=%d", PCPU_GET(cpuid)); + } else if (vector == ipi_vector[IPI_HIGH_FP]) { + if (PCPU_GET(fpcurthread) != NULL) + ia64_highfp_save(PCPU_GET(fpcurthread)); } else if (vector == ipi_vector[IPI_RENDEZVOUS]) { rdvs[PCPU_GET(cpuid)]++; CTR1(KTR_SMP, "IPI_RENDEZVOUS, cpuid=%d", PCPU_GET(cpuid)); ==== //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#11 (text+ko) ==== @@ -74,6 +74,9 @@ #include #include #include +#ifdef SMP +#include +#endif #include #include #include @@ -723,9 +726,6 @@ ia64_set_cflg((CR0_PE | CR0_PG) | ((long)(CR4_XMM | CR4_FXSR) << 32)); - /* We pretend to own FP state so that ia64_fpstate_check() works */ - PCPU_SET(fpcurthread, &thread0); - /* * Initialize the rest of proc 0's PCB. * @@ -974,6 +974,9 @@ printf("sigreturn: pid %d, scp %p\n", p->p_pid, uap->sigcntxp); #endif + /* Throw away the high FP registers. */ + ia64_highfp_drop(td); + /* * Fetch the entire context structure at once for speed. * We don't use a normal argument to simplify RSE handling. @@ -990,6 +993,7 @@ frame->tf_scratch = mc->mc_scratch; frame->tf_scratch_fp = mc->mc_scratch_fp; } + /* * XXX preserved registers. * XXX High FP. @@ -1008,9 +1012,6 @@ signotify(td); PROC_UNLOCK(p); - /* XXX ksc.sc_ownedfp ? */ - ia64_fpstate_drop(td); - #ifdef DEBUG if (sigdebug & SDB_FOLLOW) printf("sigreturn(%d): returns\n", p->p_pid); @@ -1092,9 +1093,6 @@ suword((caddr_t)frame->tf_special.bspstore - 24, stack); suword((caddr_t)frame->tf_special.bspstore - 16, ps_strings); suword((caddr_t)frame->tf_special.bspstore - 8, 0); - - td->td_md.md_flags &= ~MDP_FPUSED; - ia64_fpstate_drop(td); } int @@ -1181,10 +1179,11 @@ struct trapframe *frame = td->td_frame; struct pcb *pcb = td->td_pcb; + /* Save the high FP registers. */ + ia64_highfp_save(td); + fpregs->fpr_scratch = frame->tf_scratch_fp; - /* XXX preserved */ - - ia64_fpstate_save(td, 0); + /* XXX preserved_fp */ fpregs->fpr_high = pcb->pcb_high_fp; return (0); } @@ -1195,14 +1194,87 @@ struct trapframe *frame = td->td_frame; struct pcb *pcb = td->td_pcb; + /* Throw away the high FP registers (should be redundant). */ + ia64_highfp_drop(td); + frame->tf_scratch_fp = fpregs->fpr_scratch; - /* XXX preserved */ - - ia64_fpstate_drop(td); + /* XXX preserved_fp */ pcb->pcb_high_fp = fpregs->fpr_high; return (0); } +/* + * High FP register functions. + * XXX no synchronization yet. + */ + +int +ia64_highfp_drop(struct thread *td) +{ + struct pcb *pcb; + struct pcpu *cpu; + struct thread *thr; + + pcb = td->td_pcb; + cpu = pcb->pcb_fpcpu; + if (cpu == NULL) + return (0); + pcb->pcb_fpcpu = NULL; + thr = cpu->pc_fpcurthread; + cpu->pc_fpcurthread = NULL; + + /* Post-mortem sanity checking. */ + KASSERT(thr == td, ("Inconsistent high FP state")); + return (1); +} + +int +ia64_highfp_load(struct thread *td) +{ + struct pcb *pcb; + + pcb = td->td_pcb; + KASSERT(pcb->pcb_fpcpu == NULL, ("FP race on thread")); + KASSERT(PCPU_GET(fpcurthread) == NULL, ("FP race on pcpu")); + restore_high_fp(&pcb->pcb_high_fp); + PCPU_SET(fpcurthread, td); + pcb->pcb_fpcpu = pcpup; + return (1); +} + +int +ia64_highfp_save(struct thread *td) +{ + struct pcb *pcb; + struct pcpu *cpu; + struct thread *thr; + + /* Don't save if the high FP registers weren't modified. */ + if ((td->td_frame->tf_special.psr & IA64_PSR_MFH) == 0) + return (ia64_highfp_drop(td)); + + pcb = td->td_pcb; + cpu = pcb->pcb_fpcpu; + if (cpu == NULL) + return (0); +#ifdef SMP + if (cpu != pcpup) { + ipi_send(cpu->pc_lid, IPI_HIGH_FP); + while (pcb->pcb_fpcpu != cpu) + DELAY(100); + return (1); + } +#endif + save_high_fp(&pcb->pcb_high_fp); + pcb->pcb_fpcpu = NULL; + thr = cpu->pc_fpcurthread; + cpu->pc_fpcurthread = NULL; + + /* Post-mortem sanity cxhecking. */ + KASSERT(thr == td, ("Inconsistent high FP state")); + return (1); +} + #ifndef DDB void Debugger(const char *msg) @@ -1231,72 +1303,6 @@ SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, CTLFLAG_RW, &wall_cmos_clock, 0, ""); -void -ia64_fpstate_check(struct thread *td) -{ - if ((td->td_frame->tf_special.psr & IA64_PSR_DFH) == 0) - if (td != PCPU_GET(fpcurthread)) - panic("ia64_fpstate_check: bogus"); -} - -/* - * Save the high floating point state in the pcb. Use this to get - * read-only access to the floating point state. If write is true, the - * current fp process is cleared so that fp state can safely be - * modified. The process will automatically reload the changed state - * by generating a disabled fp trap. - */ -void -ia64_fpstate_save(struct thread *td, int write) -{ - if (td == PCPU_GET(fpcurthread)) { - _get_high_fp(&td->td_pcb->pcb_high_fp); - - if (write) { - td->td_frame->tf_special.psr |= IA64_PSR_DFH; - PCPU_SET(fpcurthread, NULL); - } - } -} - -/* - * Relinquish ownership of the FP state. This is called instead of - * ia64_save_fpstate() if the entire FP state is being changed - * (e.g. on sigreturn). - */ -void -ia64_fpstate_drop(struct thread *td) -{ - if (td == PCPU_GET(fpcurthread)) { - td->td_frame->tf_special.psr |= IA64_PSR_DFH; - PCPU_SET(fpcurthread, NULL); - } -} - -/* - * Switch the current owner of the fp state to p, reloading the state - * from the pcb. - */ -void -ia64_fpstate_switch(struct thread *td) -{ - struct thread *fptd; - - fptd = PCPU_GET(fpcurthread); - if (fptd != NULL) { - /* Dump the old fp state if its valid. */ - _get_high_fp(&fptd->td_pcb->pcb_high_fp); - fptd->td_frame->tf_special.psr |= IA64_PSR_DFH; - } - - /* Remember the new FP owner and reload its state. */ - PCPU_SET(fpcurthread, td); - _set_high_fp(&td->td_pcb->pcb_high_fp); - td->td_frame->tf_special.psr &= ~IA64_PSR_DFH; - - td->td_md.md_flags |= MDP_FPUSED; -} - /* * Utility functions for manipulating instruction bundles. */ ==== //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#4 (text+ko) ==== @@ -75,7 +75,6 @@ volatile int ap_awake; volatile int ap_spin; -static void ipi_send(u_int64_t, int); static void cpu_mp_unleash(void *); void @@ -346,7 +345,7 @@ * cr.lid (CR64) contents of the target processor. Only the id and eid * fields are used here. */ -static void +void ipi_send(u_int64_t lid, int ipi) { volatile u_int64_t *pipi; ==== //depot/projects/ia64_epc/sys/ia64/ia64/trap.c#8 (text+ko) ==== @@ -62,6 +62,9 @@ #include #include #include +#ifdef SMP +#include +#endif #ifdef KTRACE #include @@ -513,19 +516,81 @@ } } - case IA64_VEC_DISABLED_FP: + case IA64_VEC_DISABLED_FP: { /* High FP registers are disabled. */ + struct pcpu *pcpu; + struct pcb *pcb; + struct thread *thr; + + pcb = td->td_pcb; + pcpu = pcb->pcb_fpcpu; + + /* + * The pcpu variable holds the address of the per-CPU + * structure of the CPU currently holding this threads + * high FP registers (or NULL if no CPU holds these + * registers). We have to interrupt that CPU and wait + * for it to have saved the registers. + */ + if (pcpu != NULL) { + thr = pcpu->pc_fpcurthread; + KASSERT(thr == td, ("High FP state out of sync")); + + if (pcpu == pcpup) { + /* + * Short-circuit handling the trap when this + * CPU already holds the high FP registers for + * this thread. We really shouldn't get the + * trap in the first place, but since it's + * only a performance issue and not a + * correctness issue, we emit a message for + * now, enable the high FP registers and + * return. + */ + printf("XXX: bogusly disabled high FP regs\n"); + framep->tf_special.psr &= ~IA64_PSR_DFH; + goto out; + } +#ifdef SMP + /* + * Interrupt the other CPU so that it saves the high + * FP registers of this thread. Note that this can + * only happen for the SMP case. + */ + ipi_send(pcpu->pc_lid, IPI_HIGH_FP); +#endif +#ifdef DIAGNOSTICS + } else { + KASSERT(PCPU_GET(fpcurthread) != td, + ("High FP state out of sync")); +#endif + } + + thr = PCPU_GET(fpcurthread); + /* - * on exit from the kernel, if thread == fpcurthread, - * FP is enabled. + * The thr variable holds the thread that owns the high FP + * registers currently on this CPU. Free this CPU so that + * we can load the current threads high FP registers. */ - if (PCPU_GET(fpcurthread) == td) { - printf("trap: fp disabled for fpcurthread == %p", td); - goto dopanic; + if (thr != NULL) { + KASSERT(thr != td, ("High FP state out of sync")); + pcb = thr->td_pcb; + KASSERT(pcb->pcb_fpcpu == pcpup, + ("High FP state out of sync")); + ia64_highfp_save(thr); } - - ia64_fpstate_switch(td); + + /* + * Wait for the other CPU to have saved out high FP + * registers (if applicable). + */ + while (pcpu && pcpu->pc_fpcurthread == td); + + ia64_highfp_load(td); + framep->tf_special.psr &= ~IA64_PSR_DFH; goto out; break; + } case IA64_VEC_PAGE_NOT_PRESENT: case IA64_VEC_INST_ACCESS_RIGHTS: ==== //depot/projects/ia64_epc/sys/ia64/ia64/vm_machdep.c#7 (text+ko) ==== @@ -148,43 +148,18 @@ (td2->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; td2->td_md.md_flags = td1->td_md.md_flags & (MDP_FPUSED | MDP_UAC_MASK); - /* - * Copy floating point state from the FP chip to the PCB - * if this process has state stored there. - */ - ia64_fpstate_save(td1, 0); + /* Save the high FP registers so that we can copy them. */ + ia64_highfp_save(td1); /* * Copy pcb and stack from proc p1 to p2. We do this as * cheaply as possible, copying only the active part of the - * stack. The stack and pcb need to agree. Make sure that the + * stack. The stack and pcb need to agree. Make sure that the * new process has FEN disabled. */ bcopy(td1->td_pcb, td2->td_pcb, sizeof(struct pcb)); /* - * Set the floating point state. - */ -#if 0 - if ((td2->td_pcb->pcb_fp_control & IEEE_INHERIT) == 0) { - td2->td_pcb->pcb_fp_control = 0; - td2->td_pcb->pcb_fp.fpr_cr = (FPCR_DYN_NORMAL - | FPCR_INVD | FPCR_DZED - | FPCR_OVFD | FPCR_INED - | FPCR_UNFD); - } -#endif - - /* - * Arrange for a non-local goto when the new process - * is started, to resume here, returning nonzero from setjmp. - */ -#ifdef DIAGNOSTIC - if (td1 == curthread) - ia64_fpstate_check(td1); -#endif - - /* * create the child's kernel stack, from scratch. * * Pick a stack pointer, leaving room for a trapframe; @@ -316,11 +291,11 @@ * When the proc is reaped, cpu_wait() will gc the VM state. */ void -cpu_exit(td) - register struct thread *td; +cpu_exit(struct thread *td) { - ia64_fpstate_drop(td); + /* Throw away the high FP registers. */ + ia64_highfp_drop(td); } void ==== //depot/projects/ia64_epc/sys/ia64/include/cpu.h#5 (text+ko) ==== @@ -112,12 +112,11 @@ void exception_restore(void); /* MAGIC */ void frametoreg(struct trapframe *, struct reg *); long fswintrberr(void); /* MAGIC */ +int ia64_highfp_drop(struct thread *); +int ia64_highfp_load(struct thread *); +int ia64_highfp_save(struct thread *); +void ia64_init(u_int64_t, u_int64_t); int ia64_pa_access(u_long); -void ia64_init(u_int64_t, u_int64_t); -void ia64_fpstate_check(struct thread *p); -void ia64_fpstate_save(struct thread *p, int write); -void ia64_fpstate_drop(struct thread *p); -void ia64_fpstate_switch(struct thread *p); void init_prom_interface(struct rpb*); void interrupt(u_int64_t, struct trapframe *); void machine_check ==== //depot/projects/ia64_epc/sys/ia64/include/smp.h#3 (text+ko) ==== @@ -33,6 +33,7 @@ void ipi_all_but_self(int ipi); void ipi_selected(u_int64_t cpus, int ipi); void ipi_self(int ipi); +void ipi_send(u_int64_t lid, int ipi); #endif /* !LOCORE */ #endif /* _KERNEL */ From owner-p4-projects@FreeBSD.ORG Mon Apr 14 00:21:30 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8154137B404; Mon, 14 Apr 2003 00:21:30 -0700 (PDT) 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 1BF0837B401 for ; Mon, 14 Apr 2003 00:21:29 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5146C43FD7 for ; Mon, 14 Apr 2003 00:21:29 -0700 (PDT) (envelope-from marcel@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 h3E7LT0U087342 for ; Mon, 14 Apr 2003 00:21:29 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3E7LSQp087339 for perforce@freebsd.org; Mon, 14 Apr 2003 00:21:28 -0700 (PDT) Date: Mon, 14 Apr 2003 00:21:28 -0700 (PDT) Message-Id: <200304140721.h3E7LSQp087339@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 28909 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 07:21:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=28909 Change 28909 by marcel@marcel_nfs on 2003/04/14 00:20:51 Quick and dirty implementation of swithing to kernel space. There are a couple of gothas: o We need to make sure PSR has been sanitized before we start creating the trapframe. The process may be using big-endian memory accesses. o It takes us a couple of instructionis to switch to kernel mode, so we have a grey area in which we're not actually in kernel space and not actually in process space. We need to make sure exceptions in that grey area don't mess things up. More later this week... Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#5 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#5 (text+ko) ==== @@ -30,59 +30,46 @@ #include /* - * TEMPORARY NOTICE (ie remove when code matures or is replaced) - * This implementation is a quick and very likely dirty way to create a - * syscall path based on the epc instruction. The immediate reasons for - * the implementation are: - * 1. First release around the corner and changing the syscall interface - * would cause an ABI breakage. This can better be done before release - * than afterwards. - * 2. Implement {set|get|swap}context syscalls when the infrastructure - * to reliably unwind is not yet in place. By switching the syscall - * interface, we created the opportunity to implement the syscalls - * in a way that wouldn't need the unwind infrastructure. + * A process performs a syscall by calling epc_syscall through the EPC + * gateway page. The address of the gateway page is passed to the process + * in ar.k3. * - * A process performs a syscall by calling epc_syscall. This function - * will reside in a special page that has all the necessary attributes - * required for epc to increase privileges and will be mapped into the - * process' address space at a fixed location. The epc_syscall function - * will perform an epc and setup the necessary stack-frame on the kernel - * stack required or at least expected when entering the kernel. - * - * Lightweight syscalls can be implemented by accessing kernel structures - * or calling kernel functions without this setup. - * * Syscalls don't follow the calling convention completely. The reason * for this is that it would create unnecessary overhead. Arguments to * syscalls are: * r8 - syscall number - * r9 - ar.pfs + * r9 - copy of ar.pfs * in0-in7 - syscall arguments * b6 - return address * * Syscalls return: * r8+r9 - syscall return value(s) * r10 - syscall error flag + * + * The EPC gateway code prefetches the following: + * r14 - prefetched ar.k7 + * r15 - prefetched ar.k6 + * p15 - true for fork(2) */ .section .text.gateway, "ax" .align PAGE_SIZE .global ia64_gateway_page ia64_gateway_page: -{ .mfb - nop.m 0 - nop.f 0 +{ .mmb + mov r14=ar.k7 // Memory stack + mov r15=ar.k6 // Register stack epc ;; } { .mlx - nop.m 0 - movl r16=epc_syscall + add r30=-1,r0 // XXX + movl r31=epc_syscall ;; } { .mib - nop.m 0 - mov b7=r16 + cmp.eq p15,p0=r30,r8 + mov b7=r31 br b7 ;; } @@ -94,174 +81,116 @@ .proc epc_syscall .regstk 8,0,0,0 epc_syscall: - mov r16=psr // psr substitute +{ .mmi mov r17=ar.rsc - mov r18=sp + mov r18=ar.unat + add r30=-SIZEOF_TRAPFRAME,r14 ;; - mov sp=ar.k6 // Kernel SP - mov r19=r0 // cr.isr substitute +} +{ .mmi mov ar.rsc=0 + mov r19=ar.fpsr + dep r30=0,r30,0,10 ;; - mov r20=ar.bspstore - mov r21=ar.k5 // Kernel BSP +} +{ .mmi + mov r21=ar.bspstore mov r22=ar.rnat - mov r23=ar.unat - mov r24=b6 // cr.iip substitute - mov r25=r9 // ar.pfs substitute - add sp=-SIZEOF_TRAPFRAME,sp + mov r23=r13 ;; - addl r27=FRAME_SYSCALL,r0 - mov r26=pr - add r30=0,sp - add r31=8,sp +} +{ .mmi + mov ar.bspstore=r15 + add r31=8,r30 + mov r20=sp ;; - st8 [r30]=r27,16 // tf_flags - st8 [r31]=r24,16 // tf_cr_iip - mov r28=b0 +} +{ .mmi + mov ar.rsc=3 + add sp=-16,r30 + sub r29=r14,r30 ;; - st8 [r30]=r16,24 // tf_cr_ipsr - st8 [r31]=r19,24 // tf_cr_isr - mov r24=b1 +} +{ .mmi + st8 [r30]=r29,16 // tf_length + mov r24=ar.bsp + add r29=FRAME_SYSCALL,r0 ;; - st8 [r30]=r26,16 // tf_pr - st8 [r31]=r17,24 // tf_ar_rsc - mov r27=b2 +} +{ .mmi + st8 [r31]=r29,16 // tf_flags + mov r27=psr + mov r25=b6 ;; - st8 [r30]=r25,24 // tf_ar_pfs - mov r16=b3 - mov r17=b4 +} +{ .mmi + st8 [r30]=r20,16 // sp + st8 [r31]=r18,16 // unat + mov r26=pr ;; - st8 [r31]=r20,24 // tf_ar_bspstore - mov ar.bspstore=r21 // Switch to kernel BSP - mov r29=b5 +} +{ .mmi + st8 [r30]=r25,16 // rp + st8 [r31]=r26,16 // pr + sub r24=r24,r15 ;; - mov r20=ar.ccv - mov r21=ar.fpsr +} +{ .mmi + st8 [r30]=r9,16 // pfs + st8 [r31]=r21,16 // bspstore + nop 0 ;; - st8 [r30]=r22,24 // tf_ar_rnat - st8 [r31]=r23,16 // tf_ar_unat +} +{ .mmi + st8 [r30]=r22,16 // rnat + st8 [r31]=r24,16 // __spare (=ndirty) + nop 0 ;; - st8 [r30]=r20,32 // tf_ar_ccv - st8 [r31]=r21,32 // tf_ar_fpsr +} +{ .mmi + st8 [r30]=r23,16 // tp + st8 [r31]=r17,16 // rsc + nop 0 ;; - st8 [r30]=r28,16 // tf_b[0] - st8 [r31]=r24,16 // tf_b[1] +} +{ .mmi + st8 [r30]=r19,128 // fpsr + st8 [r31]=r27,128 // psr + nop 0 ;; - st8 [r30]=r27,16 // tf_b[2] - st8 [r31]=r16,16 // tf_b[3] +} + st8 [r30]=r8,16 // syscall number (=r15) + st8 [r31]=r32,16 // arg0 (=r16) ;; - st8 [r30]=r17,-64 // tf_b[4] - st8 [r31]=r29,-64 // tf_b[5] + st8 [r30]=r33,16 // arg1 (=r17) + st8 [r31]=r34,16 // arg2 (=r18) ;; - st8 [r30]=r1,-64 // tf_r[0] (=r1=gp) - .mem.offset 8,0 - st8.spill [r31]=r4,16 // tf_r[3] (=r4) + st8 [r30]=r35,16 // arg3 (=r19) + st8 [r31]=r36,16 // arg4 (=r20) ;; - .mem.offset 0,0 - st8.spill [r30]=r5,16 // tf_r[4] (=r5) - .mem.offset 8,0 - st8.spill [r31]=r6,-64 // tf_r[5] (=r6) + st8 [r30]=r37,16 // arg5 (=r21) + st8 [r31]=r38,16 // arg6 (=r22) ;; - .mem.offset 0,0 - st8.spill [r30]=r7,-64 // tf_r[6] (=r7) - st8 [r31]=r18 // tf_r[11] (=r12=sp) + st8 [r30]=r39,8 // arg7 (=r23) + mov r13=ar.k4 ;; - st8 [r30]=r8 // tf_r[14] (syscall number) - add sp=-(8*8),sp + +{ .mlx + alloc r14=ar.pfs,0,0,3,0 + movl gp=__gp ;; - add r31=0,sp - add r30=8,sp +} +{ .mii + mov out0=r8 + add out1=-(8*8),r31 + add out2=16,sp ;; - st8 [r31]=in0,16 - st8 [r30]=in1,16 - ;; - st8 [r31]=in2,16 - st8 [r30]=in3,16 - ;; - st8 [r31]=in4,16 - st8 [r30]=in5,16 - ;; - st8 [r31]=in6 - st8 [r30]=in7 - ;; - mov r13=ar.k4 // PCPU - mov r16=sp - mov r17=ar.k5 - cover - ;; - mov r18=ar.pfs // cr.ifs substitute - mov r19=ar.bsp - add sp=-16,sp - ;; - add r20=TF_SPECIAL_PFS+(8*8),r16 - add r21=TF_SPECIAL_NDIRTY+(8*8),r16 - ;; - st8 [r20]=r18 // tf_cr_ifs - st8 [r21]=r19 // tf_as_bsp - ;; - alloc r14=ar.pfs,0,1,3,0 - add loc0=(8*8),r16 - ;; - mov out0=r8 // syscall number - movl gp=__gp - mov out1=r16 // arguments - add out2=(8*8),r16 // trapframe pointer +} +{ .mfb + ssm psr.dfh + nop 0 br.call.sptk rp=syscall ;; - add r15=0,loc0 - add r16=SIZEOF_TRAPFRAME,loc0 - ;; - add r30=0,r15 // R10 - add r31=0,r15 // SP - ;; - alloc r14=ar.pfs,0,0,0,0 - mov ar.k6=r16 - ld8 sp=[r31],-64 // tf_r[11] (r12=sp) - ;; - ld8 r10=[r30],-16 // tf_r[9] (=r10) - ld8 r9=[r31],-64 // tf_r[8] (=r9) - ;; - ld8 r8=[r30],-64 // tf_r[7] (=r8) - ld8 r1=[r31],-64 // tf_r[0] (=r1=gp) - ;; - ld8 r16=[r30],-32 // tf_b[0] - ld8 r17=[r31],-16 // tf_ar_fpsr - ;; - ld8 r18=[r30],-16 // restore ar.ccv, skip to ndirty - ld8 r19=[r31],-16 // restore ar.unat, skip to ar.rnat - mov b0=r16 - ;; - ld8 r20=[r30],-16 // restore ndirty, skip to ar.bspstore - ld8 r21=[r31],-16 // restore ar.rnat, skip to cr.ifs - ;; - ld8 r16=[r30],-16 // restore ar.bspstore, skip to ar.pfs - mov ar.fpsr=r17 - shl r20=r20,16 // value for ar.rsc - ;; - ld8 r22=[r31],-16 // restore cr.ifs, skip to ar.rsc - mov ar.ccv=r18 - ;; - ld8 r17=[r30],-16 // restore ar.pfs, skip to pr - mov ar.unat=r19 - ;; - ld8 r18=[r31],-32 // restore ar.rsc, skip to cr.ipsr - mov ar.rsc=r20 // setup for loadrs - ;; - loadrs // restore user stacked registers - ;; - mov ar.bspstore=r16 // back to user backing store - mov ar.pfs=r17 - ;; - mov ar.rnat=r21 - mov ar.rsc=r18 - ;; - ld8 r16=[r30],-32 // restore pr, skip to cr.iip - ld8 r17=[r31] // restore cr.ipsr - ;; - ld8 r18=[r30] // restore cr.iip - mov pr=r16,0x1ffff - ;; - mov b6=r18 - br.ret.sptk b6 - ;; +} + break 0 .endp epc_syscall From owner-p4-projects@FreeBSD.ORG Mon Apr 14 08:28:33 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 24EC637B404; Mon, 14 Apr 2003 08:28:33 -0700 (PDT) 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 AEBCB37B401 for ; Mon, 14 Apr 2003 08:28:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85FF443F3F for ; Mon, 14 Apr 2003 08:28:31 -0700 (PDT) (envelope-from jhb@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 h3EFSV0U041719 for ; Mon, 14 Apr 2003 08:28:31 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3EFSUYj041716 for perforce@freebsd.org; Mon, 14 Apr 2003 08:28:30 -0700 (PDT) Date: Mon, 14 Apr 2003 08:28:30 -0700 (PDT) Message-Id: <200304141528.h3EFSUYj041716@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 28928 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 15:28:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=28928 Change 28928 by jhb@jhb_laptop on 2003/04/14 08:28:28 IFC @28927. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/busdma_machdep.c#14 integrate .. //depot/projects/smpng/sys/alpha/alpha/pmap.c#44 integrate .. //depot/projects/smpng/sys/alpha/include/bus.h#8 integrate .. //depot/projects/smpng/sys/alpha/include/pmap.h#15 integrate .. //depot/projects/smpng/sys/alpha/isa/isa.c#8 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_da.c#36 integrate .. //depot/projects/smpng/sys/conf/NOTES#41 integrate .. //depot/projects/smpng/sys/conf/files#71 integrate .. //depot/projects/smpng/sys/conf/files.i386#38 integrate .. //depot/projects/smpng/sys/conf/files.ia64#25 integrate .. //depot/projects/smpng/sys/conf/options#50 integrate .. //depot/projects/smpng/sys/conf/options.i386#26 integrate .. //depot/projects/smpng/sys/conf/options.ia64#13 integrate .. //depot/projects/smpng/sys/conf/options.pc98#27 integrate .. //depot/projects/smpng/sys/conf/options.powerpc#7 integrate .. //depot/projects/smpng/sys/conf/options.x86_64#5 integrate .. //depot/projects/smpng/sys/ddb/db_ps.c#18 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi.c#41 integrate .. //depot/projects/smpng/sys/dev/adlink/adlink.c#2 integrate .. //depot/projects/smpng/sys/dev/advansys/advansys.c#4 integrate .. //depot/projects/smpng/sys/dev/advansys/adwcam.c#4 integrate .. //depot/projects/smpng/sys/dev/aha/aha.c#7 integrate .. //depot/projects/smpng/sys/dev/ahb/ahb.c#5 integrate .. //depot/projects/smpng/sys/dev/aic/aic_pccard.c#5 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic79xx_osm.c#7 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aic7xxx_osm.c#7 integrate .. //depot/projects/smpng/sys/dev/amd/amd.c#2 integrate .. //depot/projects/smpng/sys/dev/an/if_an.c#29 integrate .. //depot/projects/smpng/sys/dev/an/if_an_isa.c#7 integrate .. //depot/projects/smpng/sys/dev/an/if_an_pccard.c#8 integrate .. //depot/projects/smpng/sys/dev/an/if_an_pci.c#11 integrate .. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#8 integrate .. //depot/projects/smpng/sys/dev/ata/ata-pci.h#5 integrate .. //depot/projects/smpng/sys/dev/awi/if_awi_pccard.c#6 integrate .. //depot/projects/smpng/sys/dev/buslogic/bt.c#7 integrate .. //depot/projects/smpng/sys/dev/ccd/ccd.c#24 integrate .. //depot/projects/smpng/sys/dev/cs/if_cs_pccard.c#4 integrate .. //depot/projects/smpng/sys/dev/dpt/dpt_scsi.c#5 integrate .. //depot/projects/smpng/sys/dev/ed/if_ed_pccard.c#14 integrate .. //depot/projects/smpng/sys/dev/ep/if_ep_pccard.c#7 integrate .. //depot/projects/smpng/sys/dev/fe/if_fe_pccard.c#6 integrate .. //depot/projects/smpng/sys/dev/firewire/sbp.c#12 integrate .. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#29 integrate .. //depot/projects/smpng/sys/dev/ida/ida.c#9 integrate .. //depot/projects/smpng/sys/dev/iir/iir.c#5 integrate .. //depot/projects/smpng/sys/dev/md/md.c#34 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_freebsd.c#5 integrate .. //depot/projects/smpng/sys/dev/ncv/ncr53c500_pccard.c#9 integrate .. //depot/projects/smpng/sys/dev/pccard/pccard.c#20 integrate .. //depot/projects/smpng/sys/dev/pccard/pccarddevs#22 integrate .. //depot/projects/smpng/sys/dev/pccard/pccarddevs.h#22 integrate .. //depot/projects/smpng/sys/dev/pccard/pccardvar.h#12 integrate .. //depot/projects/smpng/sys/dev/sbsh/if_sbsh.c#1 branch .. //depot/projects/smpng/sys/dev/sbsh/if_sbshreg.h#1 branch .. //depot/projects/smpng/sys/dev/sn/if_sn_pccard.c#6 integrate .. //depot/projects/smpng/sys/dev/stg/tmc18c30_pccard.c#9 integrate .. //depot/projects/smpng/sys/dev/sym/sym_hipd.c#11 integrate .. //depot/projects/smpng/sys/dev/trm/trm.c#5 integrate .. //depot/projects/smpng/sys/dev/usb/FILES#4 integrate .. //depot/projects/smpng/sys/dev/usb/ehci.c#1 branch .. //depot/projects/smpng/sys/dev/usb/ehci_pci.c#1 branch .. //depot/projects/smpng/sys/dev/usb/ehcireg.h#1 branch .. //depot/projects/smpng/sys/dev/usb/ehcivar.h#1 branch .. //depot/projects/smpng/sys/dev/usb/uhid.c#12 integrate .. //depot/projects/smpng/sys/dev/usb/umass.c#22 integrate .. //depot/projects/smpng/sys/dev/usb/usb.c#19 integrate .. //depot/projects/smpng/sys/dev/usb/usb_quirks.c#5 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#28 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs.h#29 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs_data.h#29 integrate .. //depot/projects/smpng/sys/dev/wi/if_wi.c#49 integrate .. //depot/projects/smpng/sys/dev/wi/if_wi_pccard.c#14 integrate .. //depot/projects/smpng/sys/dev/xe/if_xe_pccard.c#6 integrate .. //depot/projects/smpng/sys/fs/msdosfs/msdosfs_denode.c#11 integrate .. //depot/projects/smpng/sys/geom/geom.h#24 integrate .. //depot/projects/smpng/sys/geom/geom_aes.c#9 integrate .. //depot/projects/smpng/sys/geom/geom_apple.c#4 integrate .. //depot/projects/smpng/sys/geom/geom_bsd.c#25 integrate .. //depot/projects/smpng/sys/geom/geom_dump.c#17 integrate .. //depot/projects/smpng/sys/geom/geom_event.c#15 integrate .. //depot/projects/smpng/sys/geom/geom_gpt.c#10 integrate .. //depot/projects/smpng/sys/geom/geom_io.c#18 integrate .. //depot/projects/smpng/sys/geom/geom_mbr.c#18 integrate .. //depot/projects/smpng/sys/geom/geom_mbr_enc.c#1 branch .. //depot/projects/smpng/sys/geom/geom_mirror.c#3 integrate .. //depot/projects/smpng/sys/geom/geom_pc98.c#16 integrate .. //depot/projects/smpng/sys/geom/geom_slice.c#17 integrate .. //depot/projects/smpng/sys/geom/geom_slice.h#10 integrate .. //depot/projects/smpng/sys/geom/geom_subr.c#23 integrate .. //depot/projects/smpng/sys/geom/geom_sunlabel.c#17 integrate .. //depot/projects/smpng/sys/geom/geom_vol_ffs.c#3 integrate .. //depot/projects/smpng/sys/i386/conf/NOTES#55 integrate .. //depot/projects/smpng/sys/i386/conf/PAE#2 integrate .. //depot/projects/smpng/sys/i386/i386/busdma_machdep.c#15 integrate .. //depot/projects/smpng/sys/i386/i386/genassym.c#21 integrate .. //depot/projects/smpng/sys/i386/i386/identcpu.c#19 integrate .. //depot/projects/smpng/sys/i386/i386/sys_machdep.c#26 integrate .. //depot/projects/smpng/sys/i386/i386/tsc.c#4 integrate .. //depot/projects/smpng/sys/i386/i386/vm_machdep.c#33 integrate .. //depot/projects/smpng/sys/i386/include/bus_dma.h#4 integrate .. //depot/projects/smpng/sys/ia64/ia32/syscalls.master#9 integrate .. //depot/projects/smpng/sys/ia64/ia64/busdma_machdep.c#14 integrate .. //depot/projects/smpng/sys/ia64/include/bus.h#7 integrate .. //depot/projects/smpng/sys/kern/init_main.c#32 integrate .. //depot/projects/smpng/sys/kern/init_sysent.c#28 integrate .. //depot/projects/smpng/sys/kern/kern_clock.c#25 integrate .. //depot/projects/smpng/sys/kern/kern_conf.c#19 integrate .. //depot/projects/smpng/sys/kern/kern_event.c#18 integrate .. //depot/projects/smpng/sys/kern/kern_exit.c#60 integrate .. //depot/projects/smpng/sys/kern/kern_fork.c#55 integrate .. //depot/projects/smpng/sys/kern/kern_jail.c#25 integrate .. //depot/projects/smpng/sys/kern/kern_mutex.c#67 integrate .. //depot/projects/smpng/sys/kern/kern_proc.c#48 integrate .. //depot/projects/smpng/sys/kern/kern_resource.c#33 integrate .. //depot/projects/smpng/sys/kern/kern_sig.c#57 integrate .. //depot/projects/smpng/sys/kern/kern_thr.c#4 integrate .. //depot/projects/smpng/sys/kern/kern_thread.c#24 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#7 integrate .. //depot/projects/smpng/sys/kern/sched_ule.c#5 integrate .. //depot/projects/smpng/sys/kern/subr_smp.c#18 integrate .. //depot/projects/smpng/sys/kern/subr_witness.c#97 integrate .. //depot/projects/smpng/sys/kern/syscalls.c#28 integrate .. //depot/projects/smpng/sys/kern/syscalls.master#27 integrate .. //depot/projects/smpng/sys/kern/sysv_shm.c#15 integrate .. //depot/projects/smpng/sys/kern/uipc_cow.c#11 integrate .. //depot/projects/smpng/sys/kern/uipc_socket.c#35 integrate .. //depot/projects/smpng/sys/kern/vfs_bio.c#42 integrate .. //depot/projects/smpng/sys/kern/vfs_subr.c#47 integrate .. //depot/projects/smpng/sys/kern/vfs_syscalls.c#53 integrate .. //depot/projects/smpng/sys/modules/Makefile#48 integrate .. //depot/projects/smpng/sys/modules/sbsh/Makefile#1 branch .. //depot/projects/smpng/sys/modules/usb/Makefile#3 integrate .. //depot/projects/smpng/sys/net/route.c#11 integrate .. //depot/projects/smpng/sys/netinet/ip_output.c#36 integrate .. //depot/projects/smpng/sys/netinet/tcp_subr.c#30 integrate .. //depot/projects/smpng/sys/pci/if_vr.c#13 integrate .. //depot/projects/smpng/sys/pci/if_xl.c#23 integrate .. //depot/projects/smpng/sys/powerpc/include/bus.h#8 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/busdma_machdep.c#9 integrate .. //depot/projects/smpng/sys/sparc64/conf/GENERIC#27 integrate .. //depot/projects/smpng/sys/sparc64/include/bus.h#13 integrate .. //depot/projects/smpng/sys/sparc64/include/iommuvar.h#9 integrate .. //depot/projects/smpng/sys/sparc64/include/pmap.h#23 integrate .. //depot/projects/smpng/sys/sparc64/include/tlb.h#16 integrate .. //depot/projects/smpng/sys/sparc64/pci/psycho.c#19 integrate .. //depot/projects/smpng/sys/sparc64/sbus/sbus.c#8 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/bus_machdep.c#15 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/cache.c#11 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/cheetah.c#3 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/iommu.c#14 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/machdep.c#47 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/pmap.c#37 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/spitfire.c#3 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/swtch.S#5 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/tlb.c#7 integrate .. //depot/projects/smpng/sys/sys/bio.h#15 integrate .. //depot/projects/smpng/sys/sys/diskmbr.h#5 integrate .. //depot/projects/smpng/sys/sys/jail.h#7 integrate .. //depot/projects/smpng/sys/sys/mbuf.h#21 integrate .. //depot/projects/smpng/sys/sys/mdioctl.h#6 integrate .. //depot/projects/smpng/sys/sys/param.h#37 integrate .. //depot/projects/smpng/sys/sys/proc.h#77 integrate .. //depot/projects/smpng/sys/sys/sched.h#3 integrate .. //depot/projects/smpng/sys/sys/syscall.h#28 integrate .. //depot/projects/smpng/sys/sys/syscall.mk#28 integrate .. //depot/projects/smpng/sys/sys/sysproto.h#30 integrate .. //depot/projects/smpng/sys/sys/timetc.h#11 integrate .. //depot/projects/smpng/sys/sys/vnode.h#31 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_snapshot.c#26 integrate .. //depot/projects/smpng/sys/vm/pmap.h#17 integrate .. //depot/projects/smpng/sys/vm/vm_contig.c#12 integrate .. //depot/projects/smpng/sys/vm/vm_kern.c#11 integrate .. //depot/projects/smpng/sys/vm/vm_map.c#32 integrate .. //depot/projects/smpng/sys/vm/vm_meter.c#14 integrate .. //depot/projects/smpng/sys/vm/vm_object.c#29 integrate .. //depot/projects/smpng/sys/vm/vm_object.h#15 integrate .. //depot/projects/smpng/sys/vm/vm_page.c#34 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/busdma_machdep.c#14 (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/busdma_machdep.c,v 1.34 2003/04/08 14:25:44 des Exp $ + * $FreeBSD: src/sys/alpha/alpha/busdma_machdep.c,v 1.35 2003/04/10 23:03:32 mux Exp $ */ #include @@ -787,7 +787,7 @@ } void -_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op) +_bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int op) { struct bounce_page *bpage; @@ -798,28 +798,22 @@ * want to add support for invalidating * the caches on broken hardware */ - switch (op) { - case BUS_DMASYNC_PREWRITE: + if (op & BUS_DMASYNC_PREWRITE) { while (bpage != NULL) { bcopy((void *)bpage->datavaddr, (void *)bpage->vaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } - break; + } - case BUS_DMASYNC_POSTREAD: + if (op & BUS_DMASYNC_POSTREAD) { while (bpage != NULL) { bcopy((void *)bpage->vaddr, (void *)bpage->datavaddr, bpage->datacount); bpage = STAILQ_NEXT(bpage, links); } - break; - case BUS_DMASYNC_PREREAD: - case BUS_DMASYNC_POSTWRITE: - /* No-ops */ - break; } } } ==== //depot/projects/smpng/sys/alpha/alpha/pmap.c#44 (text+ko) ==== @@ -43,7 +43,7 @@ * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 * from: i386 Id: pmap.c,v 1.193 1998/04/19 15:22:48 bde Exp * with some ideas from NetBSD's alpha pmap - * $FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.121 2003/02/25 03:21:18 mux Exp $ + * $FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.122 2003/04/10 18:42:06 jhb Exp $ */ /* ==== //depot/projects/smpng/sys/alpha/include/bus.h#8 (text+ko) ==== @@ -67,7 +67,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/bus.h,v 1.17 2003/02/26 02:16:05 mux Exp $ */ +/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.18 2003/04/10 23:03:32 mux Exp $ */ #ifndef _ALPHA_BUS_H_ #define _ALPHA_BUS_H_ @@ -480,16 +480,12 @@ struct uio; /* - * bus_dmasync_op_t - * * Operations performed by bus_dmamap_sync(). */ -typedef enum { - BUS_DMASYNC_PREREAD, - BUS_DMASYNC_POSTREAD, - BUS_DMASYNC_PREWRITE, - BUS_DMASYNC_POSTWRITE -} bus_dmasync_op_t; +#define BUS_DMASYNC_PREREAD 1 +#define BUS_DMASYNC_POSTREAD 2 +#define BUS_DMASYNC_PREWRITE 4 +#define BUS_DMASYNC_POSTWRITE 8 /* * bus_dma_tag_t @@ -625,7 +621,7 @@ /* * Perform a syncronization operation on the given map. */ -void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t); +void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, int); #define bus_dmamap_sync(dmat, dmamap, op) \ if ((dmamap) != NULL) \ _bus_dmamap_sync(dmat, dmamap, op) ==== //depot/projects/smpng/sys/alpha/include/pmap.h#15 (text+ko) ==== @@ -43,7 +43,7 @@ * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * from: i386 pmap.h,v 1.54 1997/11/20 19:30:35 bde Exp - * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.22 2003/03/29 18:22:29 gallatin Exp $ + * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.23 2003/04/10 18:42:06 jhb Exp $ */ #ifndef _MACHINE_PMAP_H_ ==== //depot/projects/smpng/sys/alpha/isa/isa.c#8 (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/isa/isa.c,v 1.29 2002/02/08 18:30:36 jhb Exp $ + * $FreeBSD: src/sys/alpha/isa/isa.c,v 1.31 2003/04/11 13:30:32 gallatin Exp $ */ #include @@ -389,17 +389,31 @@ struct resource *irq, void *cookie) { struct isa_intr *ii = cookie; + struct intrhand *ih, *handler = (struct intrhand *)ii->ih; + struct ithd *ithread = handler->ih_ithread; + int num_handlers = 0; + + mtx_lock(&ithread->it_lock); + TAILQ_FOREACH(ih, &ithread->it_handlers, ih_next) + num_handlers++; + mtx_unlock(&ithread->it_lock); + + /* + * Only disable the interrupt in hardware if there are no + * other handlers sharing it. + */ - mtx_lock_spin(&icu_lock); - isa_intr_disable(irq->r_start); - mtx_unlock_spin(&icu_lock); + if (num_handlers == 1) { + mtx_lock_spin(&icu_lock); + isa_intr_disable(irq->r_start); + mtx_unlock_spin(&icu_lock); + if (platform.isa_teardown_intr) { + platform.isa_teardown_intr(dev, child, irq, + cookie); + return 0; + } - if (platform.isa_teardown_intr) { - platform.isa_teardown_intr(dev, child, irq, cookie); - return 0; } - alpha_teardown_intr(ii->ih); - return 0; } ==== //depot/projects/smpng/sys/cam/scsi/scsi_da.c#36 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.136 2003/04/01 15:06:21 phk Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.137 2003/04/12 08:44:54 phk Exp $ */ #ifdef _KERNEL @@ -763,37 +763,6 @@ return; } -/* For 2.2-stable support */ -#ifndef ENOIOCTL -#define ENOIOCTL -1 -#endif - -static int -daioctl(struct disk *dp, u_long cmd, void *addr, int flag, struct thread *td) -{ - struct cam_periph *periph; - struct da_softc *softc; - int error; - - periph = (struct cam_periph *)dp->d_drv1; - if (periph == NULL) - return (ENXIO); - - softc = (struct da_softc *)periph->softc; - - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("daioctl\n")); - - if ((error = cam_periph_lock(periph, PRIBIO|PCATCH)) != 0) { - return (error); /* error code from tsleep */ - } - - error = cam_periph_ioctl(periph, cmd, addr, daerror); - - cam_periph_unlock(periph); - - return (error); -} - static int dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length) { @@ -1205,7 +1174,6 @@ softc->disk.d_open = daopen; softc->disk.d_close = daclose; softc->disk.d_strategy = dastrategy; - softc->disk.d_ioctl = daioctl; softc->disk.d_dump = dadump; softc->disk.d_name = "da"; softc->disk.d_drv1 = periph; ==== //depot/projects/smpng/sys/conf/NOTES#41 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1142 2003/03/29 05:46:34 silby Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1146 2003/04/14 14:04:07 ticso Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -568,12 +568,11 @@ options PFIL_HOOKS options TCPDEBUG -# MBUF_FRAG_TEST option allows you to tell the IP stack to -# fragment all outgoing packets into mbuf fragments of size -# net.inet.ip.mbuf_frag_size (bytes). It is used for testing -# if network drivers can properly handle long chains of mbufs. -# The sysctl is '0' (no fragmentation) by default. -options MBUF_FRAG_TEST +# The MBUF_STRESS_TEST option enables options which create +# various random failures / extreme cases related to mbuf +# functions. See the mbuf(9) manpage for a list of available +# test cases. +options MBUF_STRESS_TEST # RANDOM_IP_ID causes the ID field in IP packets to be randomized # instead of incremented by 1 with each packet generated. This @@ -1541,6 +1540,7 @@ # card which is 32-bit. # sis: Support for NICs based on the Silicon Integrated Systems SiS 900, # SiS 7016 and NS DP83815 PCI fast ethernet controller chips. +# sbsh: Support for Granch SBNI16 SHDSL modem PCI adapters # sk: Support for the SysKonnect SK-984x series PCI gigabit ethernet NICs. # This includes the SK-9841 and SK-9842 single port cards (single mode # and multimode fiber) and the SK-9843 and SK-9844 dual port cards @@ -1617,6 +1617,7 @@ device rl # RealTek 8129/8139 device pcn # AMD Am79C97x PCI 10/100 NICs device sf # Adaptec AIC-6915 (``Starfire'') +device sbsh # Granch SBNI16 SHDSL modem device sis # Silicon Integrated Systems SiS 900/SiS 7016 device ste # Sundance ST201 (D-Link DFE-550TX) device tl # Texas Instruments ThunderLAN @@ -2039,8 +2040,9 @@ options HW_WDOG # -# Disable swapping. This option removes all code which actually performs -# swapping, so it's not possible to turn it back on at run-time. +# Disable swapping of upages and stack pages. This option removes all +# code which actually performs swapping, so it's not possible to turn +# it back on at run-time. # # This is sometimes usable for systems which don't have any swap space # (see also sysctls "vm.defer_swapspace_pageouts" and @@ -2072,6 +2074,8 @@ device uhci # OHCI controller device ohci +# EHCI controller +device ehci # General USB code (mandatory for USB) device usb # ==== //depot/projects/smpng/sys/conf/files#71 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.778 2003/04/07 10:13:25 mdodd Exp $ +# $FreeBSD: src/sys/conf/files,v 1.781 2003/04/14 14:04:07 ticso Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -636,6 +636,7 @@ dev/rp/rp_isa.c optional rp isa dev/rp/rp_pci.c optional rp pci dev/sab/sab.c optional sab ebus +dev/sbsh/if_sbsh.c optional sbsh dev/scd/scd.c optional scd isa dev/scd/scd_isa.c optional scd isa dev/si/si.c optional si @@ -754,6 +755,8 @@ dev/usb/if_aue.c optional aue dev/usb/if_cue.c optional cue dev/usb/if_kue.c optional kue +dev/usb/ehci.c optional ehci +dev/usb/ehci_pci.c optional ehci dev/usb/ohci.c optional ohci dev/usb/ohci_pci.c optional ohci dev/usb/ubsa.c optional ubsa ucom @@ -897,6 +900,7 @@ geom/geom_io.c standard geom/geom_kern.c standard geom/geom_mbr.c optional geom_mbr +geom/geom_mbr_enc.c optional geom_mbr geom/geom_mirror.c optional geom_mirror geom/geom_pc98.c optional geom_pc98 geom/geom_slice.c standard ==== //depot/projects/smpng/sys/conf/files.i386#38 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.441 2003/03/24 19:40:54 mdodd Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.442 2003/04/12 08:34:40 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -148,6 +148,7 @@ dev/syscons/sysmouse.c optional sc geom/geom_bsd.c standard geom/geom_mbr.c standard +geom/geom_mbr_enc.c standard gnu/i386/fpemul/div_small.s optional gpl_math_emulate \ warning "kernel contains GPL contaminated math emulator" gnu/i386/fpemul/errors.c optional gpl_math_emulate ==== //depot/projects/smpng/sys/conf/files.ia64#25 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.ia64,v 1.48 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.49 2003/04/12 08:34:40 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -95,6 +95,7 @@ geom/geom_bsd.c standard geom/geom_gpt.c standard geom/geom_mbr.c standard +geom/geom_mbr_enc.c standard isa/atkbd_isa.c optional atkbd isa/atkbdc_isa.c optional atkbdc isa/fd.c optional fdc ==== //depot/projects/smpng/sys/conf/options#50 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.385 2003/03/26 23:40:41 tegge Exp $ +# $FreeBSD: src/sys/conf/options,v 1.387 2003/04/12 09:40:37 des Exp $ # # On the handling of kernel options # @@ -72,7 +72,7 @@ # mapped I/O # Miscellaneous options. -ALQ opt_alq.h +ALQ ADAPTIVE_MUTEXES COMPAT_43 opt_compat.h COMPAT_FREEBSD4 opt_compat.h @@ -153,7 +153,7 @@ # SECURITY POLICY PARAMETERS # Support for Mandatory Access Control (MAC) -MAC opt_mac.h +MAC MAC_BIBA opt_dontuse.h MAC_BSDEXTENDED opt_dontuse.h MAC_DEBUG opt_mac.h @@ -349,10 +349,10 @@ IPV6FIREWALL_VERBOSE_LIMIT opt_ip6fw.h IPV6FIREWALL_DEFAULT_TO_ACCEPT opt_ip6fw.h IPSTEALTH -IPX opt_ipx.h +IPX IPXIP opt_ipx.h LIBMCHAIN -NCP opt_ncp.h +NCP NETATALK opt_atalk.h PPP_BSDCOMP opt_ppp.h PPP_DEFLATE opt_ppp.h @@ -362,7 +362,7 @@ TCPDEBUG TCP_DROP_SYNFIN opt_tcp_input.h XBONEHACK -MBUF_FRAG_TEST opt_mbuf_frag_test.h +MBUF_STRESS_TEST opt_mbuf_stress_test.h # Netgraph(4). Use option NETGRAPH to enable the base netgraph code. # Each netgraph node type can be either be compiled into the kernel @@ -417,7 +417,7 @@ # XXX Conflict: # of devices vs network protocol (Native ATM). # This makes "atm.h" unusable. -NATM opt_natm.h +NATM DPT_ALLOW_MEMIO opt_dpt.h # Allow PCI devices to use memory # mapped I/O ==== //depot/projects/smpng/sys/conf/options.i386#26 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.i386,v 1.189 2003/04/04 23:54:46 tegge Exp $ +# $FreeBSD: src/sys/conf/options.i386,v 1.191 2003/04/12 09:40:37 des Exp $ # Options specific to the i386 platform kernels MATH_EMULATE opt_math_emulate.h @@ -41,7 +41,6 @@ CLK_CALIBRATION_LOOP opt_clock.h CLK_USE_I8254_CALIBRATION opt_clock.h CLK_USE_TSC_CALIBRATION opt_clock.h -SMP_TSC opt_clock.h TIMER_FREQ opt_clock.h NO_F00F_HACK opt_cpu.h @@ -110,7 +109,7 @@ VGA_SLOW_IOACCESS opt_vga.h VGA_WIDTH90 opt_vga.h -VESA opt_vesa.h +VESA VESA_DEBUG opt_vesa.h PSM_HOOKRESUME opt_psm.h ==== //depot/projects/smpng/sys/conf/options.ia64#13 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: src/sys/conf/options.ia64,v 1.16 2002/11/24 19:50:15 marcel Exp $ +# $FreeBSD: src/sys/conf/options.ia64,v 1.17 2003/04/12 09:40:37 des Exp $ # Options specific to the ia64 platform kernels ITANIUM opt_global.h ITANIUM2 opt_global.h -IA32 opt_ia32.h +IA32 PAGE_SIZE_4K opt_global.h PAGE_SIZE_8K opt_global.h ==== //depot/projects/smpng/sys/conf/options.pc98#27 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.pc98,v 1.161 2003/04/03 12:39:51 nyan Exp $ +# $FreeBSD: src/sys/conf/options.pc98,v 1.162 2003/04/12 09:40:37 des Exp $ # Options specific to the pc98 platform kernels MATH_EMULATE opt_math_emulate.h @@ -94,7 +94,7 @@ SC_TWOBUTTON_MOUSE opt_syscons.h SC_NO_SUSPEND_VTYSWITCH opt_syscons.h -GDC opt_gdc.h +GDC KBD_DISABLE_KEYMAP_LOAD opt_kbd.h KBD_INSTALL_CDEV opt_kbd.h ==== //depot/projects/smpng/sys/conf/options.powerpc#7 (text+ko) ==== @@ -1,8 +1,8 @@ -# $FreeBSD: src/sys/conf/options.powerpc,v 1.6 2003/02/05 11:37:58 benno Exp $ +# $FreeBSD: src/sys/conf/options.powerpc,v 1.7 2003/04/12 09:40:37 des Exp $ # Options specific to the powerpc platform kernels OEA opt_global.h -IPKDB opt_ipkdb.h +IPKDB POWERMAC opt_platform.h -PSIM opt_psim.h +PSIM ==== //depot/projects/smpng/sys/conf/options.x86_64#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.x86_64,v 1.4 2002/11/18 06:17:07 jmallett Exp $ +# $FreeBSD: src/sys/conf/options.x86_64,v 1.5 2003/04/12 09:40:37 des Exp $ # Options specific to the AMD x86-64 platform kernels MAXMEM @@ -40,7 +40,7 @@ VGA_SLOW_IOACCESS opt_vga.h VGA_WIDTH90 opt_vga.h -VESA opt_vesa.h +VESA VESA_DEBUG opt_vesa.h ATKBD_DFLT_KEYMAP opt_atkbd.h ==== //depot/projects/smpng/sys/ddb/db_ps.c#18 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ddb/db_ps.c,v 1.40 2003/02/27 02:05:16 julian Exp $ + * $FreeBSD: src/sys/ddb/db_ps.c,v 1.41 2003/04/10 17:35:43 julian Exp $ */ #include #include @@ -178,7 +178,7 @@ db_printf("[RUNQ]"); break; case TDS_RUNNING: - db_printf("[CPU %d]", td->td_kse->ke_oncpu); + db_printf("[CPU %d]", td->td_oncpu); break; default: panic("unknown thread state"); ==== //depot/projects/smpng/sys/dev/acpica/acpi.c#41 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.87 2003/03/06 14:40:15 takawata Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.88 2003/04/11 16:53:56 iwasaki Exp $ */ #include "opt_acpi.h" @@ -120,6 +120,7 @@ static void acpi_system_eventhandler_sleep(void *arg, int state); static void acpi_system_eventhandler_wakeup(void *arg, int state); +static int acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_pm_func(u_long cmd, void *arg, ...); @@ -398,6 +399,9 @@ SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, device_get_name(dev), CTLFLAG_RD, 0, ""); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), + OID_AUTO, "supported_sleep_state", CTLTYPE_STRING | CTLFLAG_RD, + 0, 0, acpi_supported_sleep_state_sysctl, "A", ""); + SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "power_button_state", CTLTYPE_STRING | CTLFLAG_RW, &sc->acpi_power_button_sx, 0, acpi_sleep_state_sysctl, "A", ""); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), @@ -1914,6 +1918,25 @@ } static int +acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) +{ + char sleep_state[4]; + char buf[16]; + int error; + UINT8 state, TypeA, TypeB; + + buf[0] = '\0'; + for (state = ACPI_STATE_S1; state < ACPI_S_STATES_MAX+1; state++) { + if (ACPI_SUCCESS(AcpiGetSleepTypeData(state, &TypeA, &TypeB))) { + sprintf(sleep_state, "S%d ", state); + strcat(buf, sleep_state); + } + } + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + return(error); +} + +static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) { char sleep_state[10]; ==== //depot/projects/smpng/sys/dev/adlink/adlink.c#2 (text+ko) ==== @@ -26,13 +26,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/adlink/adlink.c,v 1.1 2003/04/04 18:53:04 phk Exp $ + * $FreeBSD: src/sys/dev/adlink/adlink.c,v 1.2 2003/04/08 19:12:48 phk Exp $ */ +#ifdef _KERNEL #include #include #include #include +#include #include #include #include @@ -44,17 +46,54 @@ #include #include +#endif /* _KERNEL */ + +#include + +struct wave { + int index; + int period; + int offset; + int length; + int avg; + off_t mapvir; + int flags; + + int npages; + void **virtual; +}; + +#define ADLINK_SETWAVE _IOWR('A', 232, struct wave) +#define ADLINK_GETWAVE _IOWR('A', 233, struct wave) + +#ifdef _KERNEL + +#define INTPERPAGE (PAGE_SIZE / sizeof(int)) +#define I16PERPAGE (PAGE_SIZE / sizeof(int16_t)) + /* - * We sample one channel (= 16 bits) at 1 msps giving 2Mbyte/sec, - * 50 pages will give us about 1/10 second buffering. + * Sample rate + */ +#define SPS 1250000 + +/* + * We sample one channel (= 16 bits) at 1.25 msps giving 2.5Mbyte/sec, + * 100 pages will give us about 1/6 second buffering. */ -#define NRING 50 +#define NRING 100 -#define IN4(sc, offset) bus_space_read_4(sc->t_io, sc->h_io, offset) +/* + * How many waves are we willing to entertain + */ +#define NWAVE 25 struct info { int nring; off_t o_ring; + + int ngri; + int ppgri; + off_t o_gri; }; struct softc { @@ -64,21 +103,145 @@ bus_space_tag_t t0, t1; bus_space_handle_t h0, h1; dev_t dev; + off_t mapvir; + struct proc *procp; + struct info *info; + struct wave *wave[NWAVE]; + int idx; void *ring[NRING]; - vm_paddr_t phys[NRING]; + vm_paddr_t pring[NRING]; int stat[NRING]; + + uint64_t cnt; + + u_char flags[I16PERPAGE]; }; +static void +adlink_wave(struct softc *sc, struct wave *wp, int16_t *sp) +{ + int f, i, k, m, *ip; + + f = 0; + for (i = 0; i < I16PERPAGE; ) { + k = (sc->cnt - wp->offset + i) % wp->period; + if (k >= wp->length) { + i += wp->period - k; + sp += wp->period - k; + continue; + } + m = k % INTPERPAGE; + ip = (int *)(wp->virtual[k / INTPERPAGE]) + m; + while (m < INTPERPAGE && i < I16PERPAGE && k < wp->length) { + if (sc->flags[i] >= wp->index) + *ip += (*sp * 8 - *ip) >> wp->avg; + if (wp->flags & 1) + sc->flags[i] = wp->index; + sp++; + ip++; + m++; + i++; + k++; + } + } +} + +static void +adlink_tickle(struct softc *sc) +{ + + wakeup(sc); + tsleep(&sc->ring, PUSER | PCATCH, "tickle", 1); +} + static int +adlink_new_wave(struct softc *sc, int index, int period, int offset, int length, int avg, int flags) +{ + struct wave *wp; + int l, i; + void **oldvir, **newvir; + + if (index < 0 || index >= NWAVE) + return (EINVAL); + wp = sc->wave[index]; + if (wp == NULL) { + adlink_tickle(sc); + wp = malloc(sizeof *wp, M_DEVBUF, M_WAITOK | M_ZERO); + } + l = howmany(length, INTPERPAGE); + /* Setting a high average here to neuter the realtime bits */ + wp->avg = 31; + if (wp->npages < l) { + oldvir = wp->virtual; + adlink_tickle(sc); + newvir = malloc(sizeof(void *) * l, M_DEVBUF, M_WAITOK | M_ZERO); + if (wp->npages > 0) { + adlink_tickle(sc); + bcopy(oldvir, newvir, wp->npages * sizeof(void *)); + } + for (i = wp->npages; i < l; i++) { + adlink_tickle(sc); + newvir[i] = malloc(PAGE_SIZE, M_DEVBUF, M_WAITOK); + } + wp->virtual = newvir; + wp->npages = l; + wp->mapvir = sc->mapvir; + sc->mapvir += l * PAGE_SIZE; + } else { + oldvir = NULL; + } + wp->index = index; + wp->period = period; + wp->offset = offset; + wp->length = length; + wp->flags = flags; + + for (i = 0; i < l; i++) { + adlink_tickle(sc); + bzero(wp->virtual[i], PAGE_SIZE); + } + wp->avg = avg; + sc->wave[index] = wp; + printf("Wave[%d] {period %d, offset %d, length %d, avg %d, flags %x}\n", + wp->index, wp->period, wp->offset, wp->length, wp->avg, wp->flags); + free(oldvir, M_DEVBUF); + return (0); +} + +static void +adlink_loran(void *arg) +{ + struct softc *sc; + int idx, i; + + sc = arg; + idx = 0; + for (;;) { + while (sc->stat[idx] == 0) + msleep(sc, NULL, PRIBIO, "loran", 1); + memset(sc->flags, NWAVE, sizeof sc->flags); + for (i = 0; i < NWAVE; i++) { + if (sc->wave[i] != NULL) + adlink_wave(sc, sc->wave[i], sc->ring[idx]); + } + sc->cnt += I16PERPAGE; + sc->stat[idx] = 0; + idx++; + idx %= NRING; + } + kthread_exit(0); +} + +static int adlink_open(dev_t dev, int oflags, int devtype, struct thread *td) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Apr 14 08:41:52 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7851937B417; Mon, 14 Apr 2003 08:41:51 -0700 (PDT) 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 174DE37B425 for ; Mon, 14 Apr 2003 08:41:49 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3E7443FDF for ; Mon, 14 Apr 2003 08:41:48 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3EFfm0U043147 for ; Mon, 14 Apr 2003 08:41:48 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3EFfmwc043144 for perforce@freebsd.org; Mon, 14 Apr 2003 08:41:48 -0700 (PDT) Date: Mon, 14 Apr 2003 08:41:48 -0700 (PDT) Message-Id: <200304141541.h3EFfmwc043144@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 28930 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 15:41:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=28930 Change 28930 by rwatson@rwatson_tislabs on 2003/04/14 08:41:17 When initializing mbuf label storage, don't store the error value: we'll never do anything with it, and it makes for additional diffs and ifdefs. Pointed out by: sam Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#32 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#32 (text+ko) ==== @@ -1301,16 +1301,12 @@ m_gethdr(int how, short type) { struct mbuf *mb; -#ifdef MAC - int error; -#endif mb = (struct mbuf *)mb_alloc(&mb_list_mbuf, how, type, 0, NULL); if (mb != NULL) { _mbhdr_setup(mb, type); #ifdef MAC - error = mac_init_mbuf(mb, MBTOM(how)); - if (error) { + if (mac_init_mbuf(mb, MBTOM(how)) != 0) { m_free(mb); return (NULL); } @@ -1354,16 +1350,12 @@ m_gethdr_clrd(int how, short type) { struct mbuf *mb; -#ifdef MAC - int error; -#endif mb = (struct mbuf *)mb_alloc(&mb_list_mbuf, how, type, 0, NULL); if (mb != NULL) { _mbhdr_setup(mb, type); #ifdef MAC - error = mac_init_mbuf(mb, MBTOM(how)); - if (error) { + if (mac_init_mbuf(mb, MBTOM(how)) != 0) { m_free(mb); return (NULL); } @@ -1474,9 +1466,6 @@ m_getcl(int how, short type, int flags) { struct mbuf *mb; -#ifdef MAC - int error; -#endif int cchnum; mb = (struct mbuf *)mb_alloc(&mb_list_mbuf, how, type, @@ -1504,8 +1493,7 @@ } #ifdef MAC if (flags & M_PKTHDR) { - error = mac_init_mbuf(mb, MBTOM(how)); - if (error) { + if (mac_init_mbuf(mb, MBTOM(how)) != 0) { m_free(mb); return (NULL); } From owner-p4-projects@FreeBSD.ORG Mon Apr 14 10:45:26 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5BA9937B404; Mon, 14 Apr 2003 10:45:26 -0700 (PDT) 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 0EB3C37B401 for ; Mon, 14 Apr 2003 10:45:26 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C4EB43F75 for ; Mon, 14 Apr 2003 10:45:25 -0700 (PDT) (envelope-from jhb@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 h3EHjP0U059189 for ; Mon, 14 Apr 2003 10:45:25 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3EHjPlD059186 for perforce@freebsd.org; Mon, 14 Apr 2003 10:45:25 -0700 (PDT) Date: Mon, 14 Apr 2003 10:45:25 -0700 (PDT) Message-Id: <200304141745.h3EHjPlD059186@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 28937 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 17:45:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=28937 Change 28937 by jhb@jhb_laptop on 2003/04/14 10:44:31 IFC @28936. Affected files ... .. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#30 integrate .. //depot/projects/smpng/sys/kern/subr_mbuf.c#27 integrate .. //depot/projects/smpng/sys/kern/uipc_mbuf.c#17 integrate Differences ... ==== //depot/projects/smpng/sys/dev/fxp/if_fxp.c#30 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.169 2003/04/14 09:45:25 sobomax Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.170 2003/04/14 15:50:04 sobomax Exp $"); #include #include @@ -388,9 +388,9 @@ * Enable bus mastering. Enable memory/port space too, in case * BIOS/Prom forgot about it. */ - val = pci_read_config(dev, PCIR_COMMAND, 2); - val |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); - pci_write_config(dev, PCIR_COMMAND, val, 2); + pci_enable_busmaster(dev); + pci_enable_io(dev, SYS_RES_IOPORT); + pci_enable_io(dev, SYS_RES_MEMORY); val = pci_read_config(dev, PCIR_COMMAND, 2); fxp_powerstate_d0(dev); ==== //depot/projects/smpng/sys/kern/subr_mbuf.c#27 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/subr_mbuf.c,v 1.43 2003/03/10 20:24:54 phk Exp $ + * $FreeBSD: src/sys/kern/subr_mbuf.c,v 1.44 2003/04/14 16:04:10 rwatson Exp $ */ #include "opt_mac.h" @@ -566,13 +566,12 @@ return (NULL); bucket = malloc(sizeof(struct mb_bucket) + - mb_list->ml_objbucks * sizeof(void *), M_MBUF, - how == M_TRYWAIT ? M_WAITOK : M_NOWAIT); + mb_list->ml_objbucks * sizeof(void *), M_MBUF, MBTOM(how)); if (bucket == NULL) return (NULL); p = (caddr_t)kmem_malloc(mb_list->ml_map, mb_list->ml_objsize * - mb_list->ml_objbucks, how == M_TRYWAIT ? M_WAITOK : M_NOWAIT); + mb_list->ml_objbucks, MBTOM(how)); if (p == NULL) { free(bucket, M_MBUF); if (how == M_TRYWAIT) ==== //depot/projects/smpng/sys/kern/uipc_mbuf.c#17 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 - * $FreeBSD: src/sys/kern/uipc_mbuf.c,v 1.113 2003/04/08 14:25:45 des Exp $ + * $FreeBSD: src/sys/kern/uipc_mbuf.c,v 1.114 2003/04/14 16:04:10 rwatson Exp $ */ #include "opt_mac.h" @@ -140,8 +140,7 @@ mac_create_mbuf_from_mbuf(from, to); #endif SLIST_INIT(&to->m_pkthdr.tags); - return (m_tag_copy_chain(to, from, (how & M_TRYWAIT) ? M_WAITOK : - M_NOWAIT)); + return (m_tag_copy_chain(to, from, MBTOM(how))); } /* From owner-p4-projects@FreeBSD.ORG Mon Apr 14 11:37:33 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 43FE537B404; Mon, 14 Apr 2003 11:37:33 -0700 (PDT) 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 D0EA037B401 for ; Mon, 14 Apr 2003 11:37:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7546E43F93 for ; Mon, 14 Apr 2003 11:37:32 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3EIbW0U064068 for ; Mon, 14 Apr 2003 11:37:32 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3EIbVFX064065 for perforce@freebsd.org; Mon, 14 Apr 2003 11:37:31 -0700 (PDT) Date: Mon, 14 Apr 2003 11:37:31 -0700 (PDT) Message-Id: <200304141837.h3EIbVFX064065@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 28941 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 18:37:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=28941 Change 28941 by rwatson@rwatson_tislabs on 2003/04/14 11:36:34 Use MBTOM(), sync whitespace. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#33 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#33 (text+ko) ==== @@ -566,13 +566,12 @@ return (NULL); bucket = malloc(sizeof(struct mb_bucket) + - mb_list->ml_objbucks * sizeof(void *), M_MBUF, - how == M_TRYWAIT ? M_WAITOK : M_NOWAIT); + mb_list->ml_objbucks * sizeof(void *), M_MBUF, MBTOM(how)); if (bucket == NULL) return (NULL); p = (caddr_t)kmem_malloc(mb_list->ml_map, mb_list->ml_objsize * - mb_list->ml_objbucks, how == M_TRYWAIT ? M_WAITOK : M_NOWAIT); + mb_list->ml_objbucks, MBTOM(how)); if (p == NULL) { free(bucket, M_MBUF); if (how == M_TRYWAIT) @@ -1347,7 +1346,7 @@ * - type: the type of the mbuf being allocated. */ struct mbuf * -m_gethdr_clrd(int how, short type) +m_gethdr_clrd(int how, short type) { struct mbuf *mb; From owner-p4-projects@FreeBSD.ORG Mon Apr 14 15:17:07 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3AB7737B404; Mon, 14 Apr 2003 15:17:07 -0700 (PDT) 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 CA3B437B401 for ; Mon, 14 Apr 2003 15:17:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75F5143F93 for ; Mon, 14 Apr 2003 15:17:06 -0700 (PDT) (envelope-from robert@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 h3EMH60U089986 for ; Mon, 14 Apr 2003 15:17:06 -0700 (PDT) (envelope-from robert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3EMH6n0089983 for perforce@freebsd.org; Mon, 14 Apr 2003 15:17:06 -0700 (PDT) Date: Mon, 14 Apr 2003 15:17:06 -0700 (PDT) Message-Id: <200304142217.h3EMH6n0089983@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to robert@freebsd.org using -f From: Robert Drehmel To: Perforce Change Reviews Subject: PERFORCE change 28956 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 22:17:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=28956 Change 28956 by robert@robert_spes on 2003/04/14 15:16:19 If `sgimips' is defined, use u_int64_t as the type for the count variable to force an eight byte alignment on the stack. A pointer to it is passed to the ARC BIOS' read and write functions. This makes both arc_getchar() and arc_putchar() work. Affected files ... .. //depot/projects/mips/sys/boot/arc/lib/arcconsole.c#2 edit Differences ... ==== //depot/projects/mips/sys/boot/arc/lib/arcconsole.c#2 (text+ko) ==== @@ -68,7 +68,11 @@ arc_putchar(int c) { char cbuf = c; +#ifdef sgimips + u_int64_t count; +#else u_int32_t count; +#endif Write(StandardOut, &cbuf, 1, &count); } @@ -79,7 +83,11 @@ arc_getchar() { char cbuf; +#ifdef sgimips + u_int64_t count; +#else u_int32_t count; +#endif arc_putchar('_'); arc_putchar('\b'); From owner-p4-projects@FreeBSD.ORG Mon Apr 14 22:38:34 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7179C37B404; Mon, 14 Apr 2003 22:38:33 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 0DC3D37B401; Mon, 14 Apr 2003 22:38:33 -0700 (PDT) Date: Tue, 15 Apr 2003 00:38:33 -0500 From: Juli Mallett To: Robert Drehmel Message-ID: <20030415003832.A20789@FreeBSD.org> References: <200304121604.h3CG4rng022133@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200304121604.h3CG4rng022133@repoman.freebsd.org>; from robert@FreeBSD.org on Sat, Apr 12, 2003 at 09:04:53AM -0700 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-Negacore: Yes X-Title: Code Maven X-Authentication-Warning: localhost: juli pwned teh intarweb cc: Perforce Change Reviews Subject: Re: PERFORCE change 28825 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 05:38:34 -0000 * De: Robert Drehmel [ Data: 2003-04-12 ] [ Subjecte: PERFORCE change 28825 for review ] > http://perforce.freebsd.org/chv.cgi?CH=28825 > > Change 28825 by robert@robert_spes on 2003/04/12 09:04:38 > - If the MACHINE_ARCH is "mips", define a preprocessor macro with > the same name as the value of the PLATFORM variable. > - If PLATFORM is defined, add a symbolic link from its source directory > to `platform' in the current directory (like the `machine' link). $PLATFORM is best spelled $MACHINE or $TARGET_MACHINE depending on the context (in this one it's $MACHINE), wouldn't you say? -- juli mallett. email: jmallett@freebsd.org; aim: bsdflata; efnet: juli; From owner-p4-projects@FreeBSD.ORG Mon Apr 14 22:40:18 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3689837B404; Mon, 14 Apr 2003 22:40:18 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id DDC8537B401; Mon, 14 Apr 2003 22:40:17 -0700 (PDT) Date: Tue, 15 Apr 2003 00:40:17 -0500 From: Juli Mallett To: Robert Drehmel Message-ID: <20030415004017.B20789@FreeBSD.org> References: <200304121611.h3CGB25D022729@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200304121611.h3CGB25D022729@repoman.freebsd.org>; from robert@FreeBSD.org on Sat, Apr 12, 2003 at 09:11:02AM -0700 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , , X-Towel: Yes X-Negacore: Yes X-Title: Code Maven X-Authentication-Warning: localhost: juli pwned teh intarweb cc: Perforce Change Reviews Subject: Re: PERFORCE change 28827 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 05:40:19 -0000 * De: Robert Drehmel [ Data: 2003-04-12 ] [ Subjecte: PERFORCE change 28827 for review ] > http://perforce.freebsd.org/chv.cgi?CH=28827 > > Change 28827 by robert@robert_spes on 2003/04/12 09:11:01 > > Define the SPBlock macro - if `sgimips' is defined - to the value > of the ARC BIOS SPB location on an SGI Octane. > Add a comment which contains information on an issue which is still > unresolved. Unfortunately, 'sgimips' is not fine-grained enough here. Need to have a tunable to build it for other SGI machines, where that location may not be right at all. Do you have any particular stylistic feelings on how to do that? -- juli mallett. email: jmallett@freebsd.org; aim: bsdflata; efnet: juli; From owner-p4-projects@FreeBSD.ORG Tue Apr 15 02:19:55 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 683E237B404; Tue, 15 Apr 2003 02:19:55 -0700 (PDT) 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 EAD5A37B401 for ; Tue, 15 Apr 2003 02:19:54 -0700 (PDT) Received: from sleet.ispgateway.de (sleet.ispgateway.de [62.67.200.125]) by mx1.FreeBSD.org (Postfix) with SMTP id CF9C543FBF for ; Tue, 15 Apr 2003 02:19:52 -0700 (PDT) (envelope-from robert@zoot.drehmel.com) Received: (qmail 32220 invoked from network); 15 Apr 2003 09:19:51 -0000 Received: from unknown (HELO bsd.develop.ferrari.local) (948464@[62.159.79.193]) (envelope-sender ) by sleet.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 15 Apr 2003 09:19:51 -0000 Received: (from robert@localhost) by bsd.develop.ferrari.local (8.12.6/8.11.5) id h3F9ELFN039944; Tue, 15 Apr 2003 11:14:21 +0200 (CEST) (envelope-from robert) Date: Tue, 15 Apr 2003 11:14:20 +0200 From: Robert Drehmel To: jmallett@FreeBSD.org Message-ID: <20030415091420.GB39845@bsd.develop.ferrari.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i cc: perforce@FreeBSD.org cc: mips@FreeBSD.org Subject: Re: PERFORCE change 28827 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 09:19:56 -0000 [Moving to mips@FreeBSD] Hello Juli, > $PLATFORM is best spelled $MACHINE or $TARGET_MACHINE depending on > the context (in this one it's $MACHINE), wouldn't you say? I just took the next best name grep revealed to me (from sys/conf/Makefile.mips); you are right, I will change the name of the variable to MACHINE. At this stage, I just want to get it working. I think the two ARC libraries (in sys/dev and sys/boot) we currently have should be merged later, at least the ARC data structure definitions which currently reside in dev/arcbios/arcbios.h and boot/arc/include/arc(types|funcs).h. (They need to be changed anyway - some of the structures have a wrong layout for the SGI Octane I am testing on, and that requires tedious trail-and-error sequences. I did not find any documentation about the specialties of the SGI ARC.) My plan was to start using (and modifying) the structures and constants imported from NetBSD, in new ARC code, mainly to enable code-sharing. This is ugly as long as the `other' headers (the original boot/arc/include files) are used in the same library, but should turn out to be cleaner after every piece of ARC code uses dev/arcbios/arcbios.h. Of couse, this is only theoretical and I need to ask the alpha people for their opinion first. What do you think? Let me reply to your other mail because of the knotted topics: > Unfortunately, 'sgimips' is not fine-grained enough here. Need to > have a tunable to build it for other SGI machines, where that > location may not be right at all. Do you have any particular > stylistic feelings on how to do that? I guess we should stay compatible with NetBSD. If they are not distinguishing SGI machines on that level, we could use 'sgimips' and e.g. 'sgimips_ip32' for more granularity (or just 'ip32'?). ciao, -robert From owner-p4-projects@FreeBSD.ORG Tue Apr 15 03:42:24 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EC11937B404; Tue, 15 Apr 2003 03:42:23 -0700 (PDT) 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 A2DF937B401 for ; Tue, 15 Apr 2003 03:42:23 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EEE943F93 for ; Tue, 15 Apr 2003 03:42:23 -0700 (PDT) (envelope-from robert@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 h3FAgN0U072121 for ; Tue, 15 Apr 2003 03:42:23 -0700 (PDT) (envelope-from robert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3FAgMK5072118 for perforce@freebsd.org; Tue, 15 Apr 2003 03:42:22 -0700 (PDT) Date: Tue, 15 Apr 2003 03:42:22 -0700 (PDT) Message-Id: <200304151042.h3FAgMK5072118@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to robert@freebsd.org using -f From: Robert Drehmel To: Perforce Change Reviews Subject: PERFORCE change 28974 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 10:42:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=28974 Change 28974 by robert@robert_cursys on 2003/04/15 03:42:17 Use the MACHINE variable to determine a ${MACHINE_ARCH}'s variant. Affected files ... .. //depot/projects/mips/sys/boot/arc/lib/Makefile#3 edit Differences ... ==== //depot/projects/mips/sys/boot/arc/lib/Makefile#3 (text+ko) ==== @@ -27,15 +27,15 @@ SRCS+= rpb.c .endif .if ${MACHINE_ARCH} == "mips" -CFLAGS+= -D${PLATFORM} +CFLAGS+= -D${MACHINE} .endif CLEANFILES+= machine -.ifdef PLATFORM +.ifdef MACHINE CLEANFILES+= platform platform: - ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/${PLATFORM} platform + ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/${MACHINE} platform machine: platform .else machine: From owner-p4-projects@FreeBSD.ORG Tue Apr 15 12:32:23 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1457E37B404; Tue, 15 Apr 2003 12:32:23 -0700 (PDT) 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 A392C37B401 for ; Tue, 15 Apr 2003 12:32:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 926F643F93 for ; Tue, 15 Apr 2003 12:32:21 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3FJWL0U030171 for ; Tue, 15 Apr 2003 12:32:21 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3FJWLBV030168 for perforce@freebsd.org; Tue, 15 Apr 2003 12:32:21 -0700 (PDT) Date: Tue, 15 Apr 2003 12:32:21 -0700 (PDT) Message-Id: <200304151932.h3FJWLBV030168@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 29006 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 19:32:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=29006 Change 29006 by rwatson@rwatson_tislabs on 2003/04/15 12:32:01 mac_init_mbuf_tag() accepts malloc flags, not mbuf allocator flags, so no need to map them. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#380 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#380 (text+ko) ==== @@ -783,13 +783,12 @@ mac_init_mbuf_tag(struct m_tag *tag, int flag) { struct label *label; - int error, trflag; + int error; label = (struct label *) (tag + 1); mac_init_label(label); - trflag = (flag == M_DONTWAIT ? M_NOWAIT : M_WAITOK); - MAC_CHECK(init_mbuf_label, label, trflag); + MAC_CHECK(init_mbuf_label, label, flag); if (error) { MAC_PERFORM(destroy_mbuf_label, label); mac_destroy_label(label); From owner-p4-projects@FreeBSD.ORG Tue Apr 15 13:45:00 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C141737B404; Tue, 15 Apr 2003 13:44:59 -0700 (PDT) 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 8A02D37B401 for ; Tue, 15 Apr 2003 13:44:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 070C343FAF for ; Tue, 15 Apr 2003 13:44:59 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3FKiw0U042054 for ; Tue, 15 Apr 2003 13:44:58 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3FKiwLG042051 for perforce@freebsd.org; Tue, 15 Apr 2003 13:44:58 -0700 (PDT) Date: Tue, 15 Apr 2003 13:44:58 -0700 (PDT) Message-Id: <200304152044.h3FKiwLG042051@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 29015 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 20:45:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=29015 Change 29015 by rwatson@rwatson_tislabs on 2003/04/15 13:43:57 Modify mac_test policy to invoke WITNESS_WARN() when a potentially blocking allocation could occur as a result of a label initialization. This will simulate the behavior of allocated label policies such as MLS and Biba when running mac_test from the perspective of WITNESS lock and sleep warnings. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#99 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#99 (text+ko) ==== @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -246,6 +247,11 @@ mac_test_init_ipq_label(struct label *label, int flag) { + if (flag & M_WAITOK) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "mac_test_init_ipq_label() at %s:%d", __FILE__, + __LINE__); + SLOT(label) = IPQMAGIC; atomic_add_int(&init_count_ipq, 1); return (0); @@ -255,6 +261,11 @@ mac_test_init_mbuf_label(struct label *label, int flag) { + if (flag & M_WAITOK) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "mac_test_init_mbuf_label() at %s:%d", __FILE__, + __LINE__); + SLOT(label) = MBUFMAGIC; atomic_add_int(&init_count_mbuf, 1); return (0); @@ -280,6 +291,11 @@ mac_test_init_socket_label(struct label *label, int flag) { + if (flag & M_WAITOK) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "mac_test_init_socket_label() at %s:%d", __FILE__, + __LINE__); + SLOT(label) = SOCKETMAGIC; atomic_add_int(&init_count_socket, 1); return (0); @@ -289,6 +305,11 @@ mac_test_init_socket_peer_label(struct label *label, int flag) { + if (flag & M_WAITOK) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "mac_test_init_socket_peer_label() at %s:%d", __FILE__, + __LINE__); + SLOT(label) = SOCKETMAGIC; atomic_add_int(&init_count_socket_peerlabel, 1); return (0); From owner-p4-projects@FreeBSD.ORG Tue Apr 15 13:45:02 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7BBC037B407; Tue, 15 Apr 2003 13:45:01 -0700 (PDT) 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 2877F37B401 for ; Tue, 15 Apr 2003 13:45:01 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00E2C43FAF for ; Tue, 15 Apr 2003 13:45:00 -0700 (PDT) (envelope-from jhb@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 h3FKix0U042061 for ; Tue, 15 Apr 2003 13:44:59 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3FKixHi042057 for perforce@freebsd.org; Tue, 15 Apr 2003 13:44:59 -0700 (PDT) Date: Tue, 15 Apr 2003 13:44:59 -0700 (PDT) Message-Id: <200304152044.h3FKixHi042057@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29016 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 20:45:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=29016 Change 29016 by jhb@jhb_laptop on 2003/04/15 13:44:35 IFC @29014. Affected files ... .. //depot/projects/smpng/sys/alpha/conf/NOTES#5 integrate .. //depot/projects/smpng/sys/conf/files#72 integrate .. //depot/projects/smpng/sys/conf/options#51 integrate .. //depot/projects/smpng/sys/dev/an/if_an_isa.c#8 integrate .. //depot/projects/smpng/sys/dev/an/if_an_pccard.c#9 integrate .. //depot/projects/smpng/sys/dev/an/if_an_pci.c#12 integrate .. //depot/projects/smpng/sys/dev/ar/if_ar_isa.c#3 integrate .. //depot/projects/smpng/sys/dev/ar/if_ar_pci.c#2 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#22 integrate .. //depot/projects/smpng/sys/dev/cm/if_cm_isa.c#3 integrate .. //depot/projects/smpng/sys/dev/cnw/if_cnw.c#12 integrate .. //depot/projects/smpng/sys/dev/cs/if_cs_isa.c#2 integrate .. //depot/projects/smpng/sys/dev/cs/if_cs_pccard.c#5 integrate .. //depot/projects/smpng/sys/dev/ed/if_ed_cbus.c#6 integrate .. //depot/projects/smpng/sys/dev/ed/if_ed_isa.c#4 integrate .. //depot/projects/smpng/sys/dev/ed/if_ed_pccard.c#15 integrate .. //depot/projects/smpng/sys/dev/ed/if_ed_pci.c#3 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#18 integrate .. //depot/projects/smpng/sys/dev/firewire/if_fwe.c#9 integrate .. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#31 integrate .. //depot/projects/smpng/sys/dev/gem/if_gem_pci.c#7 integrate .. //depot/projects/smpng/sys/dev/gx/if_gx.c#10 integrate .. //depot/projects/smpng/sys/dev/hme/if_hme_pci.c#5 integrate .. //depot/projects/smpng/sys/dev/hme/if_hme_sbus.c#4 integrate .. //depot/projects/smpng/sys/dev/lge/if_lge.c#12 integrate .. //depot/projects/smpng/sys/dev/lnc/if_lnc_cbus.c#3 integrate .. //depot/projects/smpng/sys/dev/lnc/if_lnc_isa.c#3 integrate .. //depot/projects/smpng/sys/dev/lnc/if_lnc_pci.c#3 integrate .. //depot/projects/smpng/sys/dev/my/if_my.c#10 integrate .. //depot/projects/smpng/sys/dev/nge/if_nge.c#22 integrate .. //depot/projects/smpng/sys/dev/pci/pci.c#22 integrate .. //depot/projects/smpng/sys/dev/pdq/if_fea.c#5 integrate .. //depot/projects/smpng/sys/dev/pdq/if_fpa.c#4 integrate .. //depot/projects/smpng/sys/dev/sbni/if_sbni_isa.c#6 integrate .. //depot/projects/smpng/sys/dev/sbni/if_sbni_pci.c#5 integrate .. //depot/projects/smpng/sys/dev/sbsh/if_sbsh.c#2 integrate .. //depot/projects/smpng/sys/dev/sn/if_sn_isa.c#2 integrate .. //depot/projects/smpng/sys/dev/sn/if_sn_pccard.c#7 integrate .. //depot/projects/smpng/sys/dev/snc/if_snc_cbus.c#3 integrate .. //depot/projects/smpng/sys/dev/snc/if_snc_pccard.c#2 integrate .. //depot/projects/smpng/sys/dev/sr/if_sr_isa.c#2 integrate .. //depot/projects/smpng/sys/dev/sr/if_sr_pci.c#2 integrate .. //depot/projects/smpng/sys/dev/tx/if_tx.c#8 integrate .. //depot/projects/smpng/sys/dev/txp/if_txp.c#13 integrate .. //depot/projects/smpng/sys/dev/usb/if_aue.c#21 integrate .. //depot/projects/smpng/sys/dev/usb/if_cue.c#12 integrate .. //depot/projects/smpng/sys/dev/usb/if_kue.c#13 integrate .. //depot/projects/smpng/sys/dev/vx/if_vx_pci.c#2 integrate .. //depot/projects/smpng/sys/dev/wi/if_wi_pccard.c#15 integrate .. //depot/projects/smpng/sys/dev/wi/if_wi_pci.c#11 integrate .. //depot/projects/smpng/sys/i386/i386/busdma_machdep.c#16 integrate .. //depot/projects/smpng/sys/i386/linux/linux_ptrace.c#6 integrate .. //depot/projects/smpng/sys/isa/isa_common.c#9 integrate .. //depot/projects/smpng/sys/kern/kern_mac.c#21 integrate .. //depot/projects/smpng/sys/kern/subr_mbuf.c#28 integrate .. //depot/projects/smpng/sys/kern/uipc_mbuf.c#18 integrate .. //depot/projects/smpng/sys/kern/uipc_mbuf2.c#9 integrate .. //depot/projects/smpng/sys/net/if_loop.c#17 integrate .. //depot/projects/smpng/sys/pci/agp_ali.c#4 integrate .. //depot/projects/smpng/sys/pci/agp_amd.c#8 integrate .. //depot/projects/smpng/sys/pci/agp_i810.c#8 integrate .. //depot/projects/smpng/sys/pci/agp_intel.c#9 integrate .. //depot/projects/smpng/sys/pci/agp_sis.c#5 integrate .. //depot/projects/smpng/sys/pci/agp_via.c#5 integrate .. //depot/projects/smpng/sys/pci/alpm.c#4 integrate .. //depot/projects/smpng/sys/pci/amdpm.c#6 integrate .. //depot/projects/smpng/sys/pci/cy_pci.c#5 integrate .. //depot/projects/smpng/sys/pci/if_dc.c#30 integrate .. //depot/projects/smpng/sys/pci/if_de.c#9 integrate .. //depot/projects/smpng/sys/pci/if_en_pci.c#3 integrate .. //depot/projects/smpng/sys/pci/if_pcn.c#13 integrate .. //depot/projects/smpng/sys/pci/if_rl.c#25 integrate .. //depot/projects/smpng/sys/pci/if_sf.c#15 integrate .. //depot/projects/smpng/sys/pci/if_sis.c#21 integrate .. //depot/projects/smpng/sys/pci/if_sk.c#14 integrate .. //depot/projects/smpng/sys/pci/if_ste.c#17 integrate .. //depot/projects/smpng/sys/pci/if_ti.c#23 integrate .. //depot/projects/smpng/sys/pci/if_tl.c#12 integrate .. //depot/projects/smpng/sys/pci/if_vr.c#14 integrate .. //depot/projects/smpng/sys/pci/if_wb.c#13 integrate .. //depot/projects/smpng/sys/pci/if_xl.c#24 integrate .. //depot/projects/smpng/sys/pci/ncr.c#7 integrate .. //depot/projects/smpng/sys/pci/viapm.c#3 integrate .. //depot/projects/smpng/sys/pci/xrpu.c#7 integrate .. //depot/projects/smpng/sys/sys/mac.h#15 integrate .. //depot/projects/smpng/sys/sys/mac_policy.h#13 integrate .. //depot/projects/smpng/sys/sys/mbuf.h#22 integrate .. //depot/projects/smpng/sys/vm/vm_kern.c#12 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/conf/NOTES#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.150 2003/02/25 20:59:22 obrien Exp $ +# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.151 2003/04/15 20:21:56 jhb Exp $ # # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. @@ -65,4 +65,14 @@ ##################################################################### -# SIMULATOR OPTIONS +# ABI Emulation + +# Enable OSF/1 ABI emulation +options COMPAT_OSF1 + +# Enable Linux ABI emulation (requires COMPAT_OSF1) +options COMPAT_LINUX + +# Enable the linux-like proc filesystem support (requires COMPAT_LINUX +# and PSEUDOFS) +options LINPROCFS ==== //depot/projects/smpng/sys/conf/files#72 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.781 2003/04/14 14:04:07 ticso Exp $ +# $FreeBSD: src/sys/conf/files,v 1.782 2003/04/15 04:08:01 mdodd Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -288,7 +288,7 @@ dev/amr/amr_cam.c optional amr dev/amr/amr.c optional amr dev/amr/amr_disk.c optional amr -dev/amr/amr_pci.c optional amr +dev/amr/amr_pci.c optional amr pci dev/an/if_an.c optional an dev/an/if_an_isa.c optional an isa dev/an/if_an_pccard.c optional an card @@ -343,8 +343,8 @@ dev/cs/if_cs_pccard.c optional cs card dev/cs/if_cs_pccard.c optional cs pccard dev/digi/digi.c optional digi -dev/digi/digi_isa.c optional digi -dev/digi/digi_pci.c optional digi +dev/digi/digi_isa.c optional digi isa +dev/digi/digi_pci.c optional digi pci dev/digi/CX.c optional digi_CX dev/digi/CX_PCI.c optional digi_CX_PCI dev/digi/EPCX.c optional digi_EPCX @@ -506,12 +506,12 @@ dev/mk48txx/mk48txx.c optional mk48txx dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx -dev/mlx/mlx_pci.c optional mlx +dev/mlx/mlx_pci.c optional mlx pci dev/mly/mly.c optional mly dev/mpt/mpt.c optional mpt dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_freebsd.c optional mpt -dev/mpt/mpt_pci.c optional mpt +dev/mpt/mpt_pci.c optional mpt pci dev/my/if_my.c optional my dev/musycc/musycc.c optional musycc dev/nge/if_nge.c optional nge @@ -756,9 +756,9 @@ dev/usb/if_cue.c optional cue dev/usb/if_kue.c optional kue dev/usb/ehci.c optional ehci -dev/usb/ehci_pci.c optional ehci +dev/usb/ehci_pci.c optional ehci pci dev/usb/ohci.c optional ohci -dev/usb/ohci_pci.c optional ohci +dev/usb/ohci_pci.c optional ohci pci dev/usb/ubsa.c optional ubsa ucom dev/usb/ucom.c optional ucom dev/usb/udbp.c optional udbp @@ -766,7 +766,7 @@ dev/usb/uftdi.c optional uftdi ucom dev/usb/ugen.c optional ugen dev/usb/uhci.c optional uhci -dev/usb/uhci_pci.c optional uhci +dev/usb/uhci_pci.c optional uhci pci dev/usb/uhid.c optional uhid dev/usb/uhub.c optional usb dev/usb/ukbd.c optional ukbd @@ -1482,31 +1482,31 @@ pccard/pcic.c optional pcic card pccard/pcic_isa.c optional pcic card isa pccard/pcic_pci.c optional pcic card pci -pci/agp.c optional agp -pci/agp_if.m optional agp -pci/alpm.c optional alpm -pci/amdpm.c optional amdpm -pci/amdpm.c optional nfpm -pci/if_dc.c optional dc -pci/if_de.c optional de +pci/agp.c optional agp pci +pci/agp_if.m optional agp pci +pci/alpm.c optional alpm pci +pci/amdpm.c optional amdpm pci +pci/amdpm.c optional nfpm pci +pci/if_dc.c optional dc pci +pci/if_de.c optional de pci pci/if_en_pci.c optional en pci -pci/if_mn.c optional mn -pci/if_pcn.c optional pcn -pci/if_rl.c optional rl -pci/if_sf.c optional sf -pci/if_sis.c optional sis -pci/if_sk.c optional sk -pci/if_ste.c optional ste -pci/if_ti.c optional ti -pci/if_tl.c optional tl -pci/if_vr.c optional vr -pci/if_wb.c optional wb -pci/if_xl.c optional xl -pci/intpm.c optional intpm +pci/if_mn.c optional mn pci +pci/if_pcn.c optional pcn pci +pci/if_rl.c optional rl pci +pci/if_sf.c optional sf pci +pci/if_sis.c optional sis pci +pci/if_sk.c optional sk pci +pci/if_ste.c optional ste pci +pci/if_ti.c optional ti pci +pci/if_tl.c optional tl pci +pci/if_vr.c optional vr pci +pci/if_wb.c optional wb pci +pci/if_xl.c optional xl pci +pci/intpm.c optional intpm pci pci/meteor.c count meteor pci nowerror -pci/ncr.c optional ncr -pci/viapm.c optional viapm -pci/xrpu.c optional xrpu +pci/ncr.c optional ncr pci +pci/viapm.c optional viapm pci +pci/xrpu.c optional xrpu pci posix4/ksched.c optional _kposix_priority_scheduling posix4/p1003_1b.c standard posix4/posix4_mib.c standard ==== //depot/projects/smpng/sys/conf/options#51 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.387 2003/04/12 09:40:37 des Exp $ +# $FreeBSD: src/sys/conf/options,v 1.389 2003/04/15 19:43:52 rwatson Exp $ # # On the handling of kernel options # @@ -72,15 +72,14 @@ # mapped I/O # Miscellaneous options. +ADAPTIVE_MUTEXES ALQ -ADAPTIVE_MUTEXES COMPAT_43 opt_compat.h COMPAT_FREEBSD4 opt_compat.h COMPAT_SUNOS opt_compat.h -NO_COMPAT_FREEBSD4 opt_compat.h COMPILING_LINT opt_global.h +CONSPEED opt_comconsole.h CY_PCI_FASTINTR -CONSPEED opt_comconsole.h DDB DDB_NOKLDSYM opt_ddb.h DDB_TRACE @@ -103,12 +102,26 @@ KTRACE KTRACE_REQUEST_POOL opt_ktrace.h LIBICONV +MAC +MAC_ALWAYS_LABEL_MBUF opt_mac.h +MAC_BIBA opt_dontuse.h +MAC_BSDEXTENDED opt_dontuse.h +MAC_DEBUG opt_mac.h +MAC_IFOFF opt_dontuse.h +MAC_LOMAC opt_dontuse.h +MAC_MLS opt_dontuse.h +MAC_NONE opt_dontuse.h +MAC_PARTITION opt_dontuse.h +MAC_PORTACL opt_dontuse.h +MAC_SEEOTHERUIDS opt_dontuse.h +MAC_TEST opt_dontuse.h MD_ROOT opt_md.h MD_ROOT_SIZE opt_md.h NDGBPORTS opt_dgb.h -NTIMECOUNTER opt_ntp.h +NO_COMPAT_FREEBSD4 opt_compat.h NSWAPDEV opt_swap.h NSWBUF_MIN opt_swap.h +NTIMECOUNTER opt_ntp.h PANIC_REBOOT_WAIT_TIME opt_panic.h PPS_SYNC opt_ntp.h PUC_FASTINTR opt_puc.h @@ -149,23 +162,6 @@ _KPOSIX_PRIORITY_SCHEDULING opt_posix.h P1003_1B_SEMAPHORES opt_posix.h -##################################################################### -# SECURITY POLICY PARAMETERS - -# Support for Mandatory Access Control (MAC) -MAC -MAC_BIBA opt_dontuse.h -MAC_BSDEXTENDED opt_dontuse.h -MAC_DEBUG opt_mac.h -MAC_IFOFF opt_dontuse.h -MAC_LOMAC opt_dontuse.h -MAC_MLS opt_dontuse.h -MAC_NONE opt_dontuse.h -MAC_PARTITION opt_dontuse.h -MAC_PORTACL opt_dontuse.h -MAC_SEEOTHERUIDS opt_dontuse.h -MAC_TEST opt_dontuse.h - # Do we want the config file compiled into the kernel? INCLUDE_CONFIG_FILE opt_config.h @@ -177,24 +173,24 @@ CODA opt_dontuse.h EXT2FS opt_dontuse.h FDESCFS opt_dontuse.h +HPFS opt_dontuse.h LINPROCFS opt_dontuse.h MSDOSFS opt_dontuse.h +NTFS opt_dontuse.h NULLFS opt_dontuse.h NWFS opt_dontuse.h PORTALFS opt_dontuse.h PROCFS opt_dontuse.h PSEUDOFS opt_dontuse.h +SMBFS opt_dontuse.h +UDF opt_dontuse.h UMAPFS opt_dontuse.h -NTFS opt_dontuse.h -HPFS opt_dontuse.h -SMBFS opt_dontuse.h UNIONFS opt_dontuse.h -UDF opt_dontuse.h # Broken - ffs_snapshot() dependency from ufs_lookup() :-( FFS opt_ffs_broken_fixme.h -# These static filesystems has one slightly bogus static dependency in +# These static filesystems have one slightly bogus static dependency in # sys/i386/i386/autoconf.c. If any of these filesystems are # statically compiled into the kernel, code for mounting them as root # filesystems will be enabled - but look below. @@ -221,7 +217,8 @@ # Enable fast hash lookups for large directories on UFS-based filesystems. UFS_DIRHASH opt_ufs.h -# The above static dependencies are planned removed, with a +# The below sentence is not in English, and neither is this one. +# We plan to remove the static dependences above, with a # _ROOT option to control if it usable as root. This list # allows these options to be present in config files already (though # they won't make any difference yet). @@ -257,8 +254,6 @@ SCSI_NO_SENSE_STRINGS opt_scsi.h SCSI_NO_OP_STRINGS opt_scsi.h - - # Options used only in cam/scsi/scsi_cd.c CHANGER_MIN_BUSY_SECONDS opt_cd.h CHANGER_MAX_BUSY_SECONDS opt_cd.h @@ -300,6 +295,10 @@ ISP_FW_CRASH_DUMP opt_isp.h # Options used in the 'ata' ATA/ATAPI driver +ACD_DEBUG opt_ata.h +AST_DEBUG opt_ata.h +ATAPI_DEBUG opt_ata.h +ATA_DEBUG opt_ata.h ATA_STATIC_ID opt_ata.h ATA_NOPCI opt_ata.h DEV_ATADISK opt_ata.h @@ -307,10 +306,6 @@ DEV_ATAPIST opt_ata.h DEV_ATAPIFD opt_ata.h DEV_ATAPICAM opt_ata.h -ATA_DEBUG opt_ata.h -ATAPI_DEBUG opt_ata.h -ACD_DEBUG opt_ata.h -AST_DEBUG opt_ata.h # Net stuff. ACCEPT_FILTER_DATA @@ -382,8 +377,8 @@ NETGRAPH_IFACE opt_netgraph.h NETGRAPH_IP_INPUT opt_netgraph.h NETGRAPH_KSOCKET opt_netgraph.h +NETGRAPH_L2TP opt_netgraph.h NETGRAPH_LMI opt_netgraph.h -NETGRAPH_L2TP opt_netgraph.h # MPPC compression requires proprietary files (not included) NETGRAPH_MPPC_COMPRESSION opt_netgraph.h NETGRAPH_MPPC_ENCRYPTION opt_netgraph.h @@ -403,7 +398,6 @@ DRM_LINUX opt_drm.h DRM_DEBUG opt_drm.h - ZERO_COPY_SOCKETS opt_zero.h TI_PRIVATE_JUMBOS opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h @@ -460,10 +454,10 @@ DEBUG opt_global.h DEBUG_LOCKS opt_global.h DEBUG_VFS_LOCKS opt_global.h -LOOKUP_SHARED opt_global.h DIAGNOSTIC opt_global.h INVARIANT_SUPPORT opt_global.h INVARIANTS opt_global.h +LOOKUP_SHARED opt_global.h MCLSHIFT opt_global.h MSIZE opt_global.h REGRESSION opt_global.h @@ -562,11 +556,11 @@ FDC_DEBUG opt_fdc.h PCFCLOCK_VERBOSE opt_pcfclock.h PCFCLOCK_MAX_RETRIES opt_pcfclock.h +TDFX_LINUX opt_tdfx.h # RAIDframe options RAID_AUTOCONFIG opt_raid.h RAID_DEBUG opt_raid.h -TDFX_LINUX opt_tdfx.h KTR opt_global.h KTR_ALQ opt_ktr.h @@ -575,7 +569,6 @@ KTR_COMPILE opt_global.h KTR_ENTRIES opt_global.h KTR_VERBOSE opt_ktr.h -MUTEX_DEBUG opt_global.h WITNESS opt_global.h WITNESS_DDB opt_witness.h WITNESS_SKIPSPIN opt_witness.h @@ -600,12 +593,8 @@ # wi driver WI_SYMBOL_FIRMWARE opt_wi.h -# Polling device handling +# XXX bogusly global. DEVICE_POLLING opt_global.h - -# Mutex profiling -MUTEX_PROFILING opt_global.h - # options for ubsec driver UBSEC_DEBUG opt_ubsec.h UBSEC_RNDTEST opt_ubsec.h ==== //depot/projects/smpng/sys/dev/an/if_an_isa.c#8 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an_isa.c,v 1.11 2003/04/10 05:12:45 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an_isa.c,v 1.12 2003/04/15 06:37:19 mdodd Exp $"); #include "opt_inet.h" @@ -166,5 +166,6 @@ static devclass_t an_isa_devclass; -DRIVER_MODULE(if_an, isa, an_isa_driver, an_isa_devclass, 0, 0); -MODULE_DEPEND(if_an, wlan, 1, 1, 1); +DRIVER_MODULE(an, isa, an_isa_driver, an_isa_devclass, 0, 0); +MODULE_DEPEND(an, isa, 1, 1, 1); +MODULE_DEPEND(an, wlan, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/an/if_an_pccard.c#9 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pccard.c,v 1.19 2003/04/10 05:12:45 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pccard.c,v 1.20 2003/04/15 06:37:19 mdodd Exp $"); #include "opt_inet.h" @@ -105,8 +105,9 @@ static devclass_t an_pccard_devclass; -DRIVER_MODULE(if_an, pccard, an_pccard_driver, an_pccard_devclass, 0, 0); -MODULE_DEPEND(if_an, wlan, 1, 1, 1); +DRIVER_MODULE(an, pccard, an_pccard_driver, an_pccard_devclass, 0, 0); +MODULE_DEPEND(an, wlan, 1, 1, 1); +MODULE_DEPEND(an, pccard, 1, 1, 1); static const struct pccard_product an_pccard_products[] = { PCMCIA_CARD(AIRONET, PC4800, 0), ==== //depot/projects/smpng/sys/dev/an/if_an_pci.c#12 (text+ko) ==== @@ -51,7 +51,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pci.c,v 1.19 2003/04/10 05:12:45 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pci.c,v 1.20 2003/04/15 06:37:19 mdodd Exp $"); #include "opt_inet.h" @@ -297,5 +297,6 @@ static devclass_t an_devclass; -DRIVER_MODULE(if_an, pci, an_pci_driver, an_devclass, 0, 0); -MODULE_DEPEND(if_an, wlan, 1, 1, 1); +DRIVER_MODULE(an, pci, an_pci_driver, an_devclass, 0, 0); +MODULE_DEPEND(an, pci, 1, 1, 1); +MODULE_DEPEND(an, wlan, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/ar/if_ar_isa.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ar/if_ar_isa.c,v 1.50 2003/02/23 13:20:42 nyan Exp $ + * $FreeBSD: src/sys/dev/ar/if_ar_isa.c,v 1.51 2003/04/15 06:37:20 mdodd Exp $ */ /* @@ -90,7 +90,8 @@ sizeof (struct ar_hardc) }; -DRIVER_MODULE(if_ar, isa, ar_isa_driver, ar_devclass, 0, 0); +DRIVER_MODULE(ar, isa, ar_isa_driver, ar_devclass, 0, 0); +MODULE_DEPEND(ar, isa, 1, 1, 1); /* * Probe to see if it is there. ==== //depot/projects/smpng/sys/dev/ar/if_ar_pci.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ar/if_ar_pci.c,v 1.6 2001/01/30 10:01:15 jhay Exp $ + * $FreeBSD: src/sys/dev/ar/if_ar_pci.c,v 1.7 2003/04/15 06:37:20 mdodd Exp $ */ #include @@ -71,7 +71,8 @@ sizeof(struct ar_hardc), }; -DRIVER_MODULE(if_ar, pci, ar_pci_driver, ar_devclass, 0, 0); +DRIVER_MODULE(ar, pci, ar_pci_driver, ar_devclass, 0, 0); +MODULE_DEPEND(ar, pci, 1, 1, 1); static int ar_pci_probe(device_t device) ==== //depot/projects/smpng/sys/dev/bge/if_bge.c#22 (text+ko) ==== @@ -64,7 +64,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.32 2003/04/03 21:36:30 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.33 2003/04/15 06:37:21 mdodd Exp $"); #include #include @@ -111,6 +111,8 @@ #define BGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) +MODULE_DEPEND(bge, pci, 1, 1, 1); +MODULE_DEPEND(bge, ether, 1, 1, 1); MODULE_DEPEND(bge, miibus, 1, 1, 1); /* "controller miibus0" required. See GENERIC if you get errors here. */ @@ -241,7 +243,7 @@ static devclass_t bge_devclass; -DRIVER_MODULE(if_bge, pci, bge_driver, bge_devclass, 0, 0); +DRIVER_MODULE(bge, pci, bge_driver, bge_devclass, 0, 0); DRIVER_MODULE(miibus, bge, miibus_driver, miibus_devclass, 0, 0); static u_int32_t ==== //depot/projects/smpng/sys/dev/cm/if_cm_isa.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: if_bah_zbus.c,v 1.6 2000/01/23 21:06:12 aymeric Exp $ */ -/* $FreeBSD: src/sys/dev/cm/if_cm_isa.c,v 1.2 2002/03/20 02:04:09 alfred Exp $ */ +/* $FreeBSD: src/sys/dev/cm/if_cm_isa.c,v 1.3 2003/04/15 06:37:21 mdodd Exp $ */ /*- * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc. @@ -132,4 +132,5 @@ sizeof(struct cm_softc) }; -DRIVER_MODULE(if_cm, isa, cm_isa_driver, cm_devclass, 0, 0); +DRIVER_MODULE(cm, isa, cm_isa_driver, cm_devclass, 0, 0); +MODULE_DEPEND(cm, isa, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/cnw/if_cnw.c#12 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: if_cnw.c,v 1.15 2000/10/16 10:26:41 itojun Exp $ */ -/* $FreeBSD: src/sys/dev/cnw/if_cnw.c,v 1.10 2003/02/23 13:24:26 nyan Exp $ */ +/* $FreeBSD: src/sys/dev/cnw/if_cnw.c,v 1.11 2003/04/15 06:37:21 mdodd Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -337,7 +337,8 @@ static devclass_t cnw_pccard_devclass; -DRIVER_MODULE(if_cnw, pccard, cnw_pccard_driver, cnw_pccard_devclass, 0, 0); +DRIVER_MODULE(cnw, pccard, cnw_pccard_driver, cnw_pccard_devclass, 0, 0); +MODULE_DEPEND(cnw, ether, 1, 1, 1); #endif /* !defined(__FreeBSD__) */ ==== //depot/projects/smpng/sys/dev/cs/if_cs_isa.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/cs/if_cs_isa.c,v 1.2 2001/02/23 08:08:21 imp Exp $ + * $FreeBSD: src/sys/dev/cs/if_cs_isa.c,v 1.3 2003/04/15 06:37:22 mdodd Exp $ */ #include @@ -126,4 +126,6 @@ extern devclass_t cs_devclass; -DRIVER_MODULE(if_cs, isa, cs_isa_driver, cs_devclass, 0, 0); +DRIVER_MODULE(cs, isa, cs_isa_driver, cs_devclass, 0, 0); +MODULE_DEPEND(cs, isa, 1, 1, 1); +MODULE_DEPEND(cs, ether, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/cs/if_cs_pccard.c#5 (text+ko) ==== @@ -22,7 +22,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/dev/cs/if_cs_pccard.c,v 1.5 2003/04/10 04:36:01 imp Exp $ + * $FreeBSD: src/sys/dev/cs/if_cs_pccard.c,v 1.6 2003/04/15 06:37:22 mdodd Exp $ */ #include @@ -123,5 +123,6 @@ extern devclass_t cs_devclass; -DRIVER_MODULE(if_cs, pccard, cs_pccard_driver, cs_devclass, 0, 0); -MODULE_DEPEND(if_cs, pccard, 1, 1, 1); +DRIVER_MODULE(cs, pccard, cs_pccard_driver, cs_devclass, 0, 0); +MODULE_DEPEND(cs, pccard, 1, 1, 1); +MODULE_DEPEND(cs, ether, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/ed/if_ed_cbus.c#6 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ed/if_ed_cbus.c,v 1.8 2003/03/25 00:07:00 jake Exp $ + * $FreeBSD: src/sys/dev/ed/if_ed_cbus.c,v 1.9 2003/04/15 06:37:22 mdodd Exp $ */ #include @@ -1753,4 +1753,6 @@ sizeof(struct ed_softc) }; -DRIVER_MODULE(if_ed, isa, ed_isa_driver, ed_devclass, 0, 0); +DRIVER_MODULE(ed, isa, ed_isa_driver, ed_devclass, 0, 0); +MODULE_DEPEND(ed, isa, 1, 1, 1); +MODULE_DEPEND(ed, ether, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/ed/if_ed_isa.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ed/if_ed_isa.c,v 1.11 2002/07/26 17:33:58 takawata Exp $ + * $FreeBSD: src/sys/dev/ed/if_ed_isa.c,v 1.12 2003/04/15 06:37:22 mdodd Exp $ */ #include @@ -152,4 +152,6 @@ sizeof(struct ed_softc) }; -DRIVER_MODULE(if_ed, isa, ed_isa_driver, ed_devclass, 0, 0); +DRIVER_MODULE(ed, isa, ed_isa_driver, ed_devclass, 0, 0); +MODULE_DEPEND(ed, isa, 1, 1, 1); +MODULE_DEPEND(ed, ether, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/ed/if_ed_pccard.c#15 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ed/if_ed_pccard.c,v 1.47 2003/04/10 07:35:19 imp Exp $ + * $FreeBSD: src/sys/dev/ed/if_ed_pccard.c,v 1.48 2003/04/15 06:37:23 mdodd Exp $ */ #include "opt_ed.h" @@ -64,6 +64,8 @@ MODULE_DEPEND(ed, miibus, 1, 1, 1); #endif +MODULE_DEPEND(ed, ether, 1, 1, 1); +MODULE_DEPEND(ed, pccard, 1, 1, 1); /* * PC-Card (PCMCIA) specific code. @@ -525,7 +527,7 @@ sizeof(struct ed_softc) }; -DRIVER_MODULE(if_ed, pccard, ed_pccard_driver, ed_devclass, 0, 0); +DRIVER_MODULE(ed, pccard, ed_pccard_driver, ed_devclass, 0, 0); #ifndef ED_NO_MIIBUS DRIVER_MODULE(miibus, ed, miibus_driver, miibus_devclass, 0, 0); #endif ==== //depot/projects/smpng/sys/dev/ed/if_ed_pci.c#3 (text+ko) ==== @@ -17,7 +17,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.29 2002/03/20 02:07:18 alfred Exp $ + * $FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.30 2003/04/15 06:37:23 mdodd Exp $ */ #include @@ -120,4 +120,6 @@ sizeof(struct ed_softc), }; -DRIVER_MODULE(if_ed, pci, ed_pci_driver, ed_devclass, 0, 0); +DRIVER_MODULE(ed, pci, ed_pci_driver, ed_devclass, 0, 0); +MODULE_DEPEND(ed, pci, 1, 1, 1); +MODULE_DEPEND(ed, ether, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/em/if_em.c#18 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.20 2003/03/21 21:47:30 pdeuskar Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.21 2003/04/15 06:37:23 mdodd Exp $*/ #include @@ -174,7 +174,9 @@ }; static devclass_t em_devclass; -DRIVER_MODULE(if_em, pci, em_driver, em_devclass, 0, 0); +DRIVER_MODULE(em, pci, em_driver, em_devclass, 0, 0); +MODULE_DEPEND(em, pci, 1, 1, 1); +MODULE_DEPEND(em, ether, 1, 1, 1); /********************************************************************* * Device identification routine ==== //depot/projects/smpng/sys/dev/firewire/if_fwe.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.12 2003/03/19 07:04:11 simokawa Exp $ + * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.13 2003/04/15 06:37:23 mdodd Exp $ */ #include "opt_inet.h" @@ -684,6 +684,6 @@ }; -DRIVER_MODULE(if_fwe, firewire, fwe_driver, fwe_devclass, 0, 0); -MODULE_VERSION(if_fwe, 1); -MODULE_DEPEND(if_fwe, firewire, 1, 1, 1); +DRIVER_MODULE(fwe, firewire, fwe_driver, fwe_devclass, 0, 0); +MODULE_VERSION(fwe, 1); +MODULE_DEPEND(fwe, firewire, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/fxp/if_fxp.c#31 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.170 2003/04/14 15:50:04 sobomax Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.171 2003/04/15 06:37:24 mdodd Exp $"); #include #include @@ -79,6 +79,8 @@ #include #include +MODULE_DEPEND(fxp, pci, 1, 1, 1); +MODULE_DEPEND(fxp, ether, 1, 1, 1); MODULE_DEPEND(fxp, miibus, 1, 1, 1); #include "miibus_if.h" @@ -251,8 +253,8 @@ static devclass_t fxp_devclass; -DRIVER_MODULE(if_fxp, pci, fxp_driver, fxp_devclass, 0, 0); -DRIVER_MODULE(if_fxp, cardbus, fxp_driver, fxp_devclass, 0, 0); +DRIVER_MODULE(fxp, pci, fxp_driver, fxp_devclass, 0, 0); +DRIVER_MODULE(fxp, cardbus, fxp_driver, fxp_devclass, 0, 0); DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, 0, 0); static int fxp_rnr; ==== //depot/projects/smpng/sys/dev/gem/if_gem_pci.c#7 (text+ko) ==== @@ -26,7 +26,7 @@ * * from: NetBSD: if_gem_pci.c,v 1.7 2001/10/18 15:09:15 thorpej Exp * - * $FreeBSD: src/sys/dev/gem/if_gem_pci.c,v 1.7 2003/01/21 17:28:36 tmm Exp $ + * $FreeBSD: src/sys/dev/gem/if_gem_pci.c,v 1.8 2003/04/15 06:37:24 mdodd Exp $ */ /* @@ -110,7 +110,9 @@ }; -DRIVER_MODULE(if_gem, pci, gem_pci_driver, gem_devclass, 0, 0); +DRIVER_MODULE(gem, pci, gem_pci_driver, gem_devclass, 0, 0); +MODULE_DEPEND(gem, pci, 1, 1, 1); +MODULE_DEPEND(gem, ether, 1, 1, 1); struct gem_pci_dev { u_int32_t gpd_devid; ==== //depot/projects/smpng/sys/dev/gx/if_gx.c#10 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/gx/if_gx.c,v 1.9 2003/02/19 05:47:05 imp Exp $ + * $FreeBSD: src/sys/dev/gx/if_gx.c,v 1.10 2003/04/15 06:37:24 mdodd Exp $ */ #include @@ -72,6 +72,8 @@ #include #include +MODULE_DEPEND(gx, pci, 1, 1, 1); +MODULE_DEPEND(gx, ether, 1, 1, 1); MODULE_DEPEND(gx, miibus, 1, 1, 1); #include "miibus_if.h" @@ -196,7 +198,7 @@ static devclass_t gx_devclass; -DRIVER_MODULE(if_gx, pci, gx_driver, gx_devclass, 0, 0); +DRIVER_MODULE(gx, pci, gx_driver, gx_devclass, 0, 0); DRIVER_MODULE(miibus, gx, miibus_driver, miibus_devclass, 0, 0); static struct gx_device * ==== //depot/projects/smpng/sys/dev/hme/if_hme_pci.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ * * from: NetBSD: if_hme_pci.c,v 1.4 2001/08/27 22:18:49 augustss Exp * - * $FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.4 2003/01/09 00:45:10 tmm Exp $ + * $FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.5 2003/04/15 06:37:24 mdodd Exp $ */ /* @@ -109,7 +109,9 @@ sizeof(struct hme_pci_softc) }; -DRIVER_MODULE(if_hme, pci, hme_pci_driver, hme_devclass, 0, 0); +DRIVER_MODULE(hme, pci, hme_pci_driver, hme_devclass, 0, 0); +MODULE_DEPEND(hme, pci, 1, 1, 1); +MODULE_DEPEND(hme, ether, 1, 1, 1); int hme_pci_probe(device_t dev) ==== //depot/projects/smpng/sys/dev/hme/if_hme_sbus.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ * * from: NetBSD: if_hme_sbus.c,v 1.9 2001/11/13 06:58:17 lukem Exp * - * $FreeBSD: src/sys/dev/hme/if_hme_sbus.c,v 1.3 2003/01/09 00:45:10 tmm Exp $ + * $FreeBSD: src/sys/dev/hme/if_hme_sbus.c,v 1.4 2003/04/15 06:37:24 mdodd Exp $ */ /* @@ -124,7 +124,8 @@ sizeof(struct hme_sbus_softc) }; -DRIVER_MODULE(if_hme, sbus, hme_sbus_driver, hme_devclass, 0, 0); +DRIVER_MODULE(hme, sbus, hme_sbus_driver, hme_devclass, 0, 0); +MODULE_DEPEND(hme, ether, 1, 1, 1); static int hme_sbus_probe(device_t dev) ==== //depot/projects/smpng/sys/dev/lge/if_lge.c#12 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/lge/if_lge.c,v 1.18 2003/04/03 21:36:30 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/lge/if_lge.c,v 1.19 2003/04/15 06:37:24 mdodd Exp $"); #include #include @@ -189,8 +189,11 @@ static devclass_t lge_devclass; -DRIVER_MODULE(if_lge, pci, lge_driver, lge_devclass, 0, 0); +DRIVER_MODULE(lge, pci, lge_driver, lge_devclass, 0, 0); DRIVER_MODULE(miibus, lge, miibus_driver, miibus_devclass, 0, 0); +MODULE_DEPEND(lge, pci, 1, 1, 1); +MODULE_DEPEND(lge, ether, 1, 1, 1); +MODULE_DEPEND(lge, miibus, 1, 1, 1); #define LGE_SETBIT(sc, reg, x) \ CSR_WRITE_4(sc, reg, \ ==== //depot/projects/smpng/sys/dev/lnc/if_lnc_cbus.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/lnc/if_lnc_cbus.c,v 1.2 2002/11/14 23:54:53 sam Exp $ + * $FreeBSD: src/sys/dev/lnc/if_lnc_cbus.c,v 1.3 2003/04/15 06:37:25 mdodd Exp $ */ #include @@ -312,4 +312,6 @@ sizeof(struct lnc_softc), }; -DRIVER_MODULE(if_lnc, isa, lnc_isa_driver, lnc_devclass, 0, 0); +DRIVER_MODULE(lnc, isa, lnc_isa_driver, lnc_devclass, 0, 0); +MODULE_DEPEND(lnc, isa, 1, 1, 1); +MODULE_DEPEND(lnc, ether, 1, 1, 1); ==== //depot/projects/smpng/sys/dev/lnc/if_lnc_isa.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/lnc/if_lnc_isa.c,v 1.13 2002/11/14 23:54:53 sam Exp $ + * $FreeBSD: src/sys/dev/lnc/if_lnc_isa.c,v 1.14 2003/04/15 06:37:25 mdodd Exp $ */ #include @@ -283,4 +283,6 @@ sizeof(struct lnc_softc), }; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Apr 15 14:08:39 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C815237B401; Tue, 15 Apr 2003 14:08:38 -0700 (PDT) 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 4D72737B405 for ; Tue, 15 Apr 2003 14:08:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 427EE43FBF for ; Tue, 15 Apr 2003 14:08:37 -0700 (PDT) (envelope-from jhb@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 h3FL8a0U045006 for ; Tue, 15 Apr 2003 14:08:36 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3FL8a4T045002 for perforce@freebsd.org; Tue, 15 Apr 2003 14:08:36 -0700 (PDT) Date: Tue, 15 Apr 2003 14:08:36 -0700 (PDT) Message-Id: <200304152108.h3FL8a4T045002@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29024 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2003 21:08:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=29024 Change 29024 by jhb@jhb_laptop on 2003/04/15 14:07:43 IFC @29023 so that LINT works again. Affected files ... .. //depot/projects/smpng/sys/conf/options#52 integrate .. //depot/projects/smpng/sys/security/mac_biba/mac_biba.c#14 integrate .. //depot/projects/smpng/sys/security/mac_lomac/mac_lomac.c#7 integrate .. //depot/projects/smpng/sys/security/mac_mls/mac_mls.c#14 integrate .. //depot/projects/smpng/sys/security/mac_test/mac_test.c#10 integrate Differences ... ==== //depot/projects/smpng/sys/conf/options#52 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.389 2003/04/15 19:43:52 rwatson Exp $ +# $FreeBSD: src/sys/conf/options,v 1.391 2003/04/15 20:59:43 jhb Exp $ # # On the handling of kernel options # @@ -118,7 +118,6 @@ MD_ROOT opt_md.h MD_ROOT_SIZE opt_md.h NDGBPORTS opt_dgb.h -NO_COMPAT_FREEBSD4 opt_compat.h NSWAPDEV opt_swap.h NSWBUF_MIN opt_swap.h NTIMECOUNTER opt_ntp.h @@ -434,6 +433,8 @@ LPT_DEBUG opt_lpt.h PLIP_DEBUG opt_plip.h LOCKF_DEBUG opt_debug_lockf.h +MUTEX_DEBUG opt_global.h +MUTEX_PROFILING opt_global.h NPX_DEBUG opt_debug_npx.h NETATALKDEBUG opt_atalk.h SI_DEBUG opt_debug_si.h ==== //depot/projects/smpng/sys/security/mac_biba/mac_biba.c#14 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/security/mac_biba/mac_biba.c,v 1.57 2003/03/27 19:26:38 rwatson Exp $ + * $FreeBSD: src/sys/security/mac_biba/mac_biba.c,v 1.58 2003/04/15 20:51:17 rwatson Exp $ */ /* @@ -2751,4 +2751,4 @@ }; MAC_POLICY_SET(&mac_biba_ops, mac_biba, "TrustedBSD MAC/Biba", - MPC_LOADTIME_FLAG_NOTLATE, &mac_biba_slot); + MPC_LOADTIME_FLAG_NOTLATE | MPC_LOADTIME_FLAG_LABELMBUFS, &mac_biba_slot); ==== //depot/projects/smpng/sys/security/mac_lomac/mac_lomac.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/security/mac_lomac/mac_lomac.c,v 1.11 2003/03/26 15:12:02 rwatson Exp $ + * $FreeBSD: src/sys/security/mac_lomac/mac_lomac.c,v 1.12 2003/04/15 20:51:17 rwatson Exp $ */ /* @@ -2734,4 +2734,4 @@ }; MAC_POLICY_SET(&mac_lomac_ops, mac_lomac, "TrustedBSD MAC/LOMAC", - MPC_LOADTIME_FLAG_NOTLATE, &mac_lomac_slot); + MPC_LOADTIME_FLAG_NOTLATE | MPC_LOADTIME_FLAG_LABELMBUFS, &mac_lomac_slot); ==== //depot/projects/smpng/sys/security/mac_mls/mac_mls.c#14 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/security/mac_mls/mac_mls.c,v 1.44 2003/03/27 19:26:38 rwatson Exp $ + * $FreeBSD: src/sys/security/mac_mls/mac_mls.c,v 1.45 2003/04/15 20:51:18 rwatson Exp $ */ /* @@ -2507,4 +2507,4 @@ }; MAC_POLICY_SET(&mac_mls_ops, mac_mls, "TrustedBSD MAC/MLS", - MPC_LOADTIME_FLAG_NOTLATE, &mac_mls_slot); + MPC_LOADTIME_FLAG_NOTLATE | MPC_LOADTIME_FLAG_LABELMBUFS, &mac_mls_slot); ==== //depot/projects/smpng/sys/security/mac_test/mac_test.c#10 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/security/mac_test/mac_test.c,v 1.25 2003/03/27 19:26:39 rwatson Exp $ + * $FreeBSD: src/sys/security/mac_test/mac_test.c,v 1.26 2003/04/15 20:51:18 rwatson Exp $ */ /* @@ -1496,4 +1496,4 @@ }; MAC_POLICY_SET(&mac_test_ops, mac_test, "TrustedBSD MAC/Test", - MPC_LOADTIME_FLAG_UNLOADOK, &test_slot); + MPC_LOADTIME_FLAG_UNLOADOK | MPC_LOADTIME_FLAG_LABELMBUFS, &test_slot); From owner-p4-projects@FreeBSD.ORG Tue Apr 15 17:37:58 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7B9FC37B404; Tue, 15 Apr 2003 17:37:57 -0700 (PDT) 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 1020A37B401 for ; Tue, 15 Apr 2003 17:37:57 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FF0D43F85 for ; Tue, 15 Apr 2003 17:37:55 -0700 (PDT) (envelope-from marcel@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 h3G0bt0U068473 for ; Tue, 15 Apr 2003 17:37:55 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3G0brwa068451 for perforce@freebsd.org; Tue, 15 Apr 2003 17:37:53 -0700 (PDT) Date: Tue, 15 Apr 2003 17:37:53 -0700 (PDT) Message-Id: <200304160037.h3G0brwa068451@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29031 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 00:37:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=29031 Change 29031 by marcel@marcel_pluto1 on 2003/04/15 17:37:16 IFC @29030 Affected files ... .. //depot/projects/ia64/Makefile.inc1#55 integrate .. //depot/projects/ia64/bin/cp/cp.c#12 integrate .. //depot/projects/ia64/bin/ps/keyword.c#12 integrate .. //depot/projects/ia64/bin/ps/print.c#12 integrate .. //depot/projects/ia64/bin/ps/ps.h#6 integrate .. //depot/projects/ia64/contrib/gcc/config/i386/freebsd.h#14 integrate .. //depot/projects/ia64/contrib/smbfs/lib/smb/ctx.c#6 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/addr2line/Makefile#5 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/ar/Makefile#4 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/as/Makefile.inc0#9 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/ld/Makefile#8 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/nm/Makefile#6 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/objcopy/Makefile#5 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/objdump/Makefile#6 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/ranlib/Makefile#4 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/readelf/Makefile#5 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/size/Makefile#5 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/strings/Makefile#5 integrate .. //depot/projects/ia64/gnu/usr.bin/binutils/strip/Makefile#6 integrate .. //depot/projects/ia64/lib/libc/stdio/vfprintf.c#16 integrate .. //depot/projects/ia64/lib/libc/stdio/vfwprintf.c#6 integrate .. //depot/projects/ia64/lib/libc/sys/Makefile.inc#13 integrate .. //depot/projects/ia64/lib/libc/sys/ntp_adjtime.2#1 branch .. //depot/projects/ia64/lib/libstand/zalloc_defs.h#4 integrate .. //depot/projects/ia64/release/Makefile#44 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#41 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#78 integrate .. //depot/projects/ia64/release/scripts/doFS.sh#12 integrate .. //depot/projects/ia64/sbin/fdisk/Makefile#4 integrate .. //depot/projects/ia64/sbin/fdisk/fdisk.c#16 integrate .. //depot/projects/ia64/sbin/fdisk/runtest.sh#1 branch .. //depot/projects/ia64/sbin/gbde/gbde.c#9 integrate .. //depot/projects/ia64/sbin/ifconfig/ifconfig.c#14 integrate .. //depot/projects/ia64/sbin/ping/ping.c#21 integrate .. //depot/projects/ia64/secure/lib/libcrypto/Makefile#18 integrate .. //depot/projects/ia64/share/man/man4/Makefile#40 integrate .. //depot/projects/ia64/share/man/man4/fxp.4#6 integrate .. //depot/projects/ia64/share/man/man4/man4.i386/Makefile#9 integrate .. //depot/projects/ia64/share/man/man4/man4.i386/sbni.4#1 branch .. //depot/projects/ia64/share/man/man4/sbsh.4#1 branch .. //depot/projects/ia64/share/man/man4/xl.4#3 integrate .. //depot/projects/ia64/share/man/man5/rc.conf.5#31 integrate .. //depot/projects/ia64/share/man/man7/environ.7#3 integrate .. //depot/projects/ia64/share/man/man9/mbuf.9#8 integrate .. //depot/projects/ia64/share/mk/bsd.cpu.mk#13 integrate .. //depot/projects/ia64/sys/alpha/conf/NOTES#4 integrate .. //depot/projects/ia64/sys/cam/scsi/scsi_da.c#39 integrate .. //depot/projects/ia64/sys/conf/Makefile.alpha#9 integrate .. //depot/projects/ia64/sys/conf/Makefile.i386#9 integrate .. //depot/projects/ia64/sys/conf/Makefile.ia64#17 integrate .. //depot/projects/ia64/sys/conf/Makefile.pc98#9 integrate .. //depot/projects/ia64/sys/conf/Makefile.powerpc#13 integrate .. //depot/projects/ia64/sys/conf/Makefile.sparc64#16 integrate .. //depot/projects/ia64/sys/conf/Makefile.x86_64#4 integrate .. //depot/projects/ia64/sys/conf/NOTES#47 integrate .. //depot/projects/ia64/sys/conf/files#72 integrate .. //depot/projects/ia64/sys/conf/files.i386#34 integrate .. //depot/projects/ia64/sys/conf/files.ia64#35 integrate .. //depot/projects/ia64/sys/conf/options#50 integrate .. //depot/projects/ia64/sys/conf/options.i386#16 integrate .. //depot/projects/ia64/sys/conf/options.ia64#12 integrate .. //depot/projects/ia64/sys/conf/options.pc98#16 integrate .. //depot/projects/ia64/sys/conf/options.powerpc#6 integrate .. //depot/projects/ia64/sys/conf/options.x86_64#5 integrate .. //depot/projects/ia64/sys/dev/an/if_an_isa.c#7 integrate .. //depot/projects/ia64/sys/dev/an/if_an_pccard.c#8 integrate .. //depot/projects/ia64/sys/dev/an/if_an_pci.c#9 integrate .. //depot/projects/ia64/sys/dev/ar/if_ar_isa.c#3 integrate .. //depot/projects/ia64/sys/dev/ar/if_ar_pci.c#2 integrate .. //depot/projects/ia64/sys/dev/bge/if_bge.c#24 integrate .. //depot/projects/ia64/sys/dev/ccd/ccd.c#22 integrate .. //depot/projects/ia64/sys/dev/cm/if_cm_isa.c#3 integrate .. //depot/projects/ia64/sys/dev/cnw/if_cnw.c#9 integrate .. //depot/projects/ia64/sys/dev/cs/if_cs_isa.c#2 integrate .. //depot/projects/ia64/sys/dev/cs/if_cs_pccard.c#5 integrate .. //depot/projects/ia64/sys/dev/ed/if_ed_cbus.c#6 integrate .. //depot/projects/ia64/sys/dev/ed/if_ed_isa.c#4 integrate .. //depot/projects/ia64/sys/dev/ed/if_ed_pccard.c#13 integrate .. //depot/projects/ia64/sys/dev/ed/if_ed_pci.c#3 integrate .. //depot/projects/ia64/sys/dev/em/if_em.c#19 integrate .. //depot/projects/ia64/sys/dev/firewire/if_fwe.c#12 integrate .. //depot/projects/ia64/sys/dev/firewire/sbp.c#23 integrate .. //depot/projects/ia64/sys/dev/fxp/if_fxp.c#26 integrate .. //depot/projects/ia64/sys/dev/gem/if_gem_pci.c#8 integrate .. //depot/projects/ia64/sys/dev/gx/if_gx.c#9 integrate .. //depot/projects/ia64/sys/dev/hme/if_hme_pci.c#5 integrate .. //depot/projects/ia64/sys/dev/hme/if_hme_sbus.c#4 integrate .. //depot/projects/ia64/sys/dev/lge/if_lge.c#11 integrate .. //depot/projects/ia64/sys/dev/lnc/if_lnc_cbus.c#3 integrate .. //depot/projects/ia64/sys/dev/lnc/if_lnc_isa.c#3 integrate .. //depot/projects/ia64/sys/dev/lnc/if_lnc_pci.c#3 integrate .. //depot/projects/ia64/sys/dev/my/if_my.c#12 integrate .. //depot/projects/ia64/sys/dev/nge/if_nge.c#19 integrate .. //depot/projects/ia64/sys/dev/pci/pci.c#18 integrate .. //depot/projects/ia64/sys/dev/pdq/if_fea.c#5 integrate .. //depot/projects/ia64/sys/dev/pdq/if_fpa.c#4 integrate .. //depot/projects/ia64/sys/dev/sbni/if_sbni_isa.c#6 integrate .. //depot/projects/ia64/sys/dev/sbni/if_sbni_pci.c#5 integrate .. //depot/projects/ia64/sys/dev/sbsh/if_sbsh.c#1 branch .. //depot/projects/ia64/sys/dev/sbsh/if_sbshreg.h#1 branch .. //depot/projects/ia64/sys/dev/sn/if_sn_isa.c#2 integrate .. //depot/projects/ia64/sys/dev/sn/if_sn_pccard.c#7 integrate .. //depot/projects/ia64/sys/dev/snc/if_snc_cbus.c#3 integrate .. //depot/projects/ia64/sys/dev/snc/if_snc_pccard.c#2 integrate .. //depot/projects/ia64/sys/dev/sr/if_sr_isa.c#2 integrate .. //depot/projects/ia64/sys/dev/sr/if_sr_pci.c#2 integrate .. //depot/projects/ia64/sys/dev/tx/if_tx.c#9 integrate .. //depot/projects/ia64/sys/dev/txp/if_txp.c#10 integrate .. //depot/projects/ia64/sys/dev/usb/FILES#3 integrate .. //depot/projects/ia64/sys/dev/usb/ehci.c#1 branch .. //depot/projects/ia64/sys/dev/usb/ehci_pci.c#1 branch .. //depot/projects/ia64/sys/dev/usb/ehcireg.h#1 branch .. //depot/projects/ia64/sys/dev/usb/ehcivar.h#1 branch .. //depot/projects/ia64/sys/dev/usb/if_aue.c#19 integrate .. //depot/projects/ia64/sys/dev/usb/if_cue.c#12 integrate .. //depot/projects/ia64/sys/dev/usb/if_kue.c#13 integrate .. //depot/projects/ia64/sys/dev/usb/umass.c#24 integrate .. //depot/projects/ia64/sys/dev/usb/usb.c#13 integrate .. //depot/projects/ia64/sys/dev/vx/if_vx_pci.c#2 integrate .. //depot/projects/ia64/sys/dev/wi/if_wi_pccard.c#18 integrate .. //depot/projects/ia64/sys/dev/wi/if_wi_pci.c#10 integrate .. //depot/projects/ia64/sys/geom/geom.h#25 integrate .. //depot/projects/ia64/sys/geom/geom_aes.c#11 integrate .. //depot/projects/ia64/sys/geom/geom_apple.c#5 integrate .. //depot/projects/ia64/sys/geom/geom_bsd.c#28 integrate .. //depot/projects/ia64/sys/geom/geom_dump.c#18 integrate .. //depot/projects/ia64/sys/geom/geom_event.c#16 integrate .. //depot/projects/ia64/sys/geom/geom_gpt.c#17 integrate .. //depot/projects/ia64/sys/geom/geom_io.c#23 integrate .. //depot/projects/ia64/sys/geom/geom_mbr.c#26 integrate .. //depot/projects/ia64/sys/geom/geom_mbr_enc.c#1 branch .. //depot/projects/ia64/sys/geom/geom_mirror.c#5 integrate .. //depot/projects/ia64/sys/geom/geom_pc98.c#20 integrate .. //depot/projects/ia64/sys/geom/geom_slice.c#24 integrate .. //depot/projects/ia64/sys/geom/geom_slice.h#10 integrate .. //depot/projects/ia64/sys/geom/geom_subr.c#24 integrate .. //depot/projects/ia64/sys/geom/geom_sunlabel.c#17 integrate .. //depot/projects/ia64/sys/geom/geom_vol_ffs.c#4 integrate .. //depot/projects/ia64/sys/i386/i386/busdma_machdep.c#16 integrate .. //depot/projects/ia64/sys/i386/linux/linux_ptrace.c#7 integrate .. //depot/projects/ia64/sys/isa/isa_common.c#6 integrate .. //depot/projects/ia64/sys/kern/init_main.c#30 integrate .. //depot/projects/ia64/sys/kern/kern_conf.c#20 integrate .. //depot/projects/ia64/sys/kern/kern_mac.c#22 integrate .. //depot/projects/ia64/sys/kern/sched_ule.c#11 integrate .. //depot/projects/ia64/sys/kern/subr_mbuf.c#22 integrate .. //depot/projects/ia64/sys/kern/sysv_shm.c#10 integrate .. //depot/projects/ia64/sys/kern/uipc_mbuf.c#17 integrate .. //depot/projects/ia64/sys/kern/uipc_mbuf2.c#10 integrate .. //depot/projects/ia64/sys/kern/uipc_socket.c#29 integrate .. //depot/projects/ia64/sys/kern/vfs_bio.c#47 integrate .. //depot/projects/ia64/sys/kern/vfs_subr.c#39 integrate .. //depot/projects/ia64/sys/modules/Makefile#44 integrate .. //depot/projects/ia64/sys/modules/sbsh/Makefile#1 branch .. //depot/projects/ia64/sys/modules/usb/Makefile#3 integrate .. //depot/projects/ia64/sys/net/if_loop.c#16 integrate .. //depot/projects/ia64/sys/net/route.c#12 integrate .. //depot/projects/ia64/sys/netinet/ip_output.c#25 integrate .. //depot/projects/ia64/sys/pci/agp_ali.c#4 integrate .. //depot/projects/ia64/sys/pci/agp_amd.c#8 integrate .. //depot/projects/ia64/sys/pci/agp_i810.c#13 integrate .. //depot/projects/ia64/sys/pci/agp_intel.c#9 integrate .. //depot/projects/ia64/sys/pci/agp_sis.c#5 integrate .. //depot/projects/ia64/sys/pci/agp_via.c#4 integrate .. //depot/projects/ia64/sys/pci/alpm.c#4 integrate .. //depot/projects/ia64/sys/pci/amdpm.c#6 integrate .. //depot/projects/ia64/sys/pci/cy_pci.c#5 integrate .. //depot/projects/ia64/sys/pci/if_dc.c#30 integrate .. //depot/projects/ia64/sys/pci/if_de.c#10 integrate .. //depot/projects/ia64/sys/pci/if_en_pci.c#3 integrate .. //depot/projects/ia64/sys/pci/if_pcn.c#13 integrate .. //depot/projects/ia64/sys/pci/if_rl.c#28 integrate .. //depot/projects/ia64/sys/pci/if_sf.c#12 integrate .. //depot/projects/ia64/sys/pci/if_sis.c#18 integrate .. //depot/projects/ia64/sys/pci/if_sk.c#12 integrate .. //depot/projects/ia64/sys/pci/if_ste.c#16 integrate .. //depot/projects/ia64/sys/pci/if_ti.c#20 integrate .. //depot/projects/ia64/sys/pci/if_tl.c#11 integrate .. //depot/projects/ia64/sys/pci/if_vr.c#18 integrate .. //depot/projects/ia64/sys/pci/if_wb.c#13 integrate .. //depot/projects/ia64/sys/pci/if_xl.c#29 integrate .. //depot/projects/ia64/sys/pci/ncr.c#7 integrate .. //depot/projects/ia64/sys/pci/viapm.c#3 integrate .. //depot/projects/ia64/sys/pci/xrpu.c#8 integrate .. //depot/projects/ia64/sys/security/mac_biba/mac_biba.c#15 integrate .. //depot/projects/ia64/sys/security/mac_lomac/mac_lomac.c#9 integrate .. //depot/projects/ia64/sys/security/mac_mls/mac_mls.c#14 integrate .. //depot/projects/ia64/sys/security/mac_test/mac_test.c#9 integrate .. //depot/projects/ia64/sys/sparc64/include/pmap.h#18 integrate .. //depot/projects/ia64/sys/sparc64/include/tlb.h#11 integrate .. //depot/projects/ia64/sys/sparc64/sbus/sbus.c#11 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/cache.c#11 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/cheetah.c#3 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/machdep.c#35 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/pmap.c#36 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/spitfire.c#3 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/swtch.S#5 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/tlb.c#7 integrate .. //depot/projects/ia64/sys/sys/bio.h#17 integrate .. //depot/projects/ia64/sys/sys/diskmbr.h#5 integrate .. //depot/projects/ia64/sys/sys/mac.h#15 integrate .. //depot/projects/ia64/sys/sys/mac_policy.h#13 integrate .. //depot/projects/ia64/sys/sys/mbuf.h#21 integrate .. //depot/projects/ia64/sys/sys/proc.h#55 integrate .. //depot/projects/ia64/sys/vm/vm_contig.c#11 integrate .. //depot/projects/ia64/sys/vm/vm_kern.c#21 integrate .. //depot/projects/ia64/sys/vm/vm_map.c#47 integrate .. //depot/projects/ia64/sys/vm/vm_meter.c#11 integrate .. //depot/projects/ia64/sys/vm/vm_object.c#42 integrate .. //depot/projects/ia64/sys/vm/vm_object.h#16 integrate .. //depot/projects/ia64/tools/build/Makefile#3 integrate .. //depot/projects/ia64/tools/build/Makefile.boot#2 delete .. //depot/projects/ia64/tools/build/mk/Makefile.boot#1 branch .. //depot/projects/ia64/tools/build/mk/bsd.lib.mk#1 branch .. //depot/projects/ia64/tools/build/mk/bsd.prog.mk#1 branch .. //depot/projects/ia64/tools/regression/geom/GLib/Makefile#9 delete .. //depot/projects/ia64/tools/regression/geom/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/RunTest.sh#2 integrate .. //depot/projects/ia64/tools/regression/geom/Test/Makefile#7 delete .. //depot/projects/ia64/tools/regression/geom/Test/Makefile.inc#7 delete .. //depot/projects/ia64/tools/regression/geom/Test/T000/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T000/ref.conf#6 delete .. //depot/projects/ia64/tools/regression/geom/Test/T000/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T001/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T001/ref.conf#11 delete .. //depot/projects/ia64/tools/regression/geom/Test/T001/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T002/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T002/ref.conf#9 delete .. //depot/projects/ia64/tools/regression/geom/Test/T002/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T003/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T003/ref.conf#9 delete .. //depot/projects/ia64/tools/regression/geom/Test/T003/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T004/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T004/ref.conf#11 delete .. //depot/projects/ia64/tools/regression/geom/Test/T004/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T005/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T005/ref.conf#10 delete .. //depot/projects/ia64/tools/regression/geom/Test/T005/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T006/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T006/ref.conf#6 delete .. //depot/projects/ia64/tools/regression/geom/Test/T006/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T007/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T007/ref.conf#6 delete .. //depot/projects/ia64/tools/regression/geom/Test/T007/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T008/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T008/ref.conf#6 delete .. //depot/projects/ia64/tools/regression/geom/Test/T008/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T009/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T009/ref.conf#6 delete .. //depot/projects/ia64/tools/regression/geom/Test/T009/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T010/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T010/ref.conf#6 delete .. //depot/projects/ia64/tools/regression/geom/Test/T010/testprg.c#4 delete .. //depot/projects/ia64/tools/regression/geom/Test/T011/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T011/ref.conf#6 delete .. //depot/projects/ia64/tools/regression/geom/Test/T011/testprg.c#4 delete .. //depot/projects/ia64/tools/regression/geom/Test/T012/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T012/ref.conf#8 delete .. //depot/projects/ia64/tools/regression/geom/Test/T012/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T013/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T013/ref.conf#11 delete .. //depot/projects/ia64/tools/regression/geom/Test/T013/testprg.c#5 delete .. //depot/projects/ia64/tools/regression/geom/Test/T014/Makefile#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T014/ref.conf#10 delete .. //depot/projects/ia64/tools/regression/geom/Test/T014/testprg.c#3 delete .. //depot/projects/ia64/tools/regression/geom/Test/T015/Makefile#2 delete .. //depot/projects/ia64/tools/regression/geom/Test/T015/ref.conf#2 delete .. //depot/projects/ia64/tools/regression/geom/Test/T015/testprg.c#2 delete .. //depot/projects/ia64/tools/regression/geom/geom.c#6 delete .. //depot/projects/ia64/tools/regression/geom/geom_kernsim.c#6 delete .. //depot/projects/ia64/tools/regression/geom/geom_sim.c#2 delete .. //depot/projects/ia64/tools/regression/geom/geom_sim.h#11 delete .. //depot/projects/ia64/tools/regression/geom/geom_simdev.c#6 delete .. //depot/projects/ia64/tools/regression/geom/geom_simdisk.c#10 delete .. //depot/projects/ia64/tools/regression/geom/geom_simdisk.h#5 delete .. //depot/projects/ia64/tools/regression/geom/geom_simdisk_xml.c#8 delete .. //depot/projects/ia64/tools/regression/lib/libc/stdio/test-printfloat.c#2 integrate .. //depot/projects/ia64/usr.bin/make/main.c#18 integrate .. //depot/projects/ia64/usr.bin/truss/syscalls.c#9 integrate .. //depot/projects/ia64/usr.bin/vmstat/vmstat.8#4 integrate .. //depot/projects/ia64/usr.bin/vmstat/vmstat.c#14 integrate .. //depot/projects/ia64/usr.bin/window/wwprintf.c#2 integrate .. //depot/projects/ia64/usr.sbin/acpi/acpidump/acpi.c#9 integrate .. //depot/projects/ia64/usr.sbin/boot0cfg/boot0cfg.8#6 integrate .. //depot/projects/ia64/usr.sbin/config/configvers.h#5 integrate .. //depot/projects/ia64/usr.sbin/config/mkmakefile.c#5 integrate .. //depot/projects/ia64/usr.sbin/i4b/isdntest/Makefile#2 integrate Differences ... ==== //depot/projects/ia64/Makefile.inc1#55 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.340 2003/04/11 17:58:17 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.348 2003/04/14 14:46:13 ru Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -151,7 +151,9 @@ .endif WORLDTMP= ${OBJTREE}${.CURDIR}/${MACHINE_ARCH} # /usr/games added for fortune which depend on strfile -STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games +XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} INSTALLTMP!= /usr/bin/mktemp -d -u -t install @@ -181,21 +183,23 @@ # This stage installs a previously built world. # +BOOTSTRAPPING?= 0 + # Common environment for world related stages CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ CPUTYPE=${TARGET_CPUTYPE} \ - GROFF_BIN_PATH=${WORLDTMP}/usr/bin \ - GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \ - GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac + GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \ + GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \ + GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac # bootstrap-tools stage BMAKEENV= DESTDIR= \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ - __MAKE_CONF=${.CURDIR}/tools/build/Makefile.boot \ - OLD_MAKE_CONF=${__MAKE_CONF} \ - WORLDTMP=${WORLDTMP} + PATH=${BPATH}:${PATH} \ + WORLDTMP=${WORLDTMP} \ + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ BOOTSTRAPPING=${OSRELDATE} \ @@ -225,28 +229,6 @@ # kernel stage KMAKEENV= ${WMAKEENV} -USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \ - usr/libexec usr/sbin usr/share/misc \ - usr/share/dict \ - usr/share/groff_font/devX100 \ - usr/share/groff_font/devX100-12 \ - usr/share/groff_font/devX75 \ - usr/share/groff_font/devX75-12 \ - usr/share/groff_font/devascii \ - usr/share/groff_font/devcp1047 \ - usr/share/groff_font/devdvi \ - usr/share/groff_font/devhtml \ - usr/share/groff_font/devkoi8-r \ - usr/share/groff_font/devlatin1 \ - usr/share/groff_font/devlbp \ - usr/share/groff_font/devlj4 \ - usr/share/groff_font/devps \ - usr/share/groff_font/devutf8 \ - usr/share/tmac/mdoc usr/share/tmac/mm - -INCDIRS= arpa dev fs g++/backward g++/bits g++/ext isc isofs libmilter \ - objc openssl protocols readline rpc rpcsvc security ufs - # # buildworld # @@ -274,16 +256,36 @@ rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif -.for _dir in ${USRDIRS} +.for _dir in \ + usr/bin usr/games usr/include/sys usr/lib \ + usr/libexec usr/sbin usr/share/dict \ + usr/share/groff_font/devX100 \ + usr/share/groff_font/devX100-12 \ + usr/share/groff_font/devX75 \ + usr/share/groff_font/devX75-12 \ + usr/share/groff_font/devascii \ + usr/share/groff_font/devcp1047 \ + usr/share/groff_font/devdvi \ + usr/share/groff_font/devhtml \ + usr/share/groff_font/devkoi8-r \ + usr/share/groff_font/devlatin1 \ + usr/share/groff_font/devlbp \ + usr/share/groff_font/devlj4 \ + usr/share/groff_font/devps \ + usr/share/groff_font/devutf8 \ + usr/share/tmac/mdoc usr/share/tmac/mm + mkdir -p ${WORLDTMP}/legacy/${_dir} +.endfor +.for _dir in \ + usr/bin usr/lib/compat/aout usr/libdata/ldscripts usr/libexec usr/share/misc mkdir -p ${WORLDTMP}/${_dir} .endfor -.for _dir in ${INCDIRS} +.for _dir in \ + arpa dev fs g++/backward g++/bits g++/ext isc isofs libmilter \ + objc openssl protocols readline rpc rpcsvc security ufs mkdir -p ${WORLDTMP}/usr/include/${_dir} .endfor ln -sf ${.CURDIR}/sys ${WORLDTMP} -.for _dir in lib include/sys - mkdir -p ${WORLDTMP}/legacy/usr/${_dir} -.endfor _legacy: @echo @echo "--------------------------------------------------------------" @@ -638,18 +640,37 @@ _strfile= games/fortune/strfile .endif +.if ( ${BOOTSTRAPPING} < 450005 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 )) +_uudecode= usr.bin/uudecode +.endif + +.if ( ${BOOTSTRAPPING} < 430002 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500019 )) +_xargs= usr.bin/xargs +.endif + +.if ( ${BOOTSTRAPPING} < 430002 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500018 )) +_yacc= usr.bin/yacc +.endif + +.if ${BOOTSTRAPPING} < 500019 +_kbdcontrol= usr.sbin/kbdcontrol +.endif + bootstrap-tools: -.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef \ - usr.bin/makewhatis usr.bin/rpcgen usr.bin/uudecode \ - usr.bin/xargs usr.bin/xinstall \ - usr.sbin/config usr.sbin/kbdcontrol \ +.for _tool in ${_strfile} usr.bin/colldef \ + usr.bin/makewhatis usr.bin/rpcgen ${_uudecode} \ + ${_xargs} usr.bin/xinstall ${_yacc} \ + usr.sbin/config ${_kbdcontrol} \ gnu/usr.bin/gperf gnu/usr.bin/groff gnu/usr.bin/texinfo @${ECHODIR} "===> ${_tool}"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all; \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor # @@ -697,7 +718,8 @@ .endif .endif -.if ${TARGET_ARCH} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} +.if ${TARGET_ARCH} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \ + ${BOOTSTRAPPING} < 500037 _elf2aout= usr.bin/elf2aout .endif ==== //depot/projects/ia64/bin/cp/cp.c#12 (text+ko) ==== @@ -46,7 +46,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.45 2003/04/07 12:09:17 mdodd Exp $"); +__FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.47 2003/04/13 08:47:30 bde Exp $"); /* * Cp copies source files to target files. @@ -63,13 +63,14 @@ * in "to") to form the final target path. */ -#include +#include #include #include #include #include #include +#include #include #include #include @@ -88,14 +89,13 @@ int fflag, iflag, nflag, pflag, vflag; static int Rflag, rflag; - volatile sig_atomic_t info; -static void siginfo (int notused __unused); enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; static int copy(char *[], enum op, int); static int mastercmp(const FTSENT * const *, const FTSENT * const *); +static void siginfo(int __unused); int main(int argc, char *argv[]) @@ -507,7 +507,7 @@ } static void -siginfo (int notused __unused) +siginfo(int sig __unused) { info = 1; ==== //depot/projects/ia64/bin/ps/keyword.c#12 (text+ko) ==== @@ -37,7 +37,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/keyword.c,v 1.62 2003/02/05 19:22:39 sobomax Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/keyword.c,v 1.63 2003/04/12 10:39:56 tjr Exp $"); #include #include @@ -143,7 +143,7 @@ {"ppid", "PPID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_ppid), UINT, PIDFMT, 0}, {"pri", "PRI", NULL, 0, pri, NULL, 3, 0, CHAR, NULL, 0}, - {"re", "RE", NULL, 0, kvar, NULL, 3, KOFF(ki_swtime), UINT, "d", + {"re", "RE", NULL, INF127, kvar, NULL, 3, KOFF(ki_swtime), UINT, "d", 0}, {"rgid", "RGID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_rgid), UINT, UIDFMT, 0}, @@ -166,7 +166,7 @@ UINT, "x", 0}, {"sigmask", "BLOCKED", NULL, 0, kvar, NULL, 8, KOFF(ki_sigmask), UINT, "x", 0}, - {"sl", "SL", NULL, 0, kvar, NULL, 3, KOFF(ki_slptime), UINT, "d", + {"sl", "SL", NULL, INF127, kvar, NULL, 3, KOFF(ki_slptime), UINT, "d", 0}, {"start", "STARTED", NULL, LJUST|USER, started, NULL, 7, 0, CHAR, NULL, 0}, ==== //depot/projects/ia64/bin/ps/print.c#12 (text+ko) ==== @@ -38,7 +38,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.79 2003/02/05 13:18:17 charnier Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.82 2003/04/15 18:49:20 charnier Exp $"); #include #include @@ -106,11 +106,9 @@ char *cp, *vis_args; v = ve->var; - if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) errx(1, "malloc failed"); strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); - if (ve->next == NULL) { /* last field */ if (termwidth == UNLIMITED) { @@ -136,7 +134,6 @@ char *cp, *vis_env, *vis_args; v = ve->var; - if (cflag) { if (ve->next == NULL) /* last field, don't pad */ (void)printf("%s", k->ki_p->ki_comm); @@ -144,7 +141,6 @@ (void)printf("%-*s", v->width, k->ki_p->ki_comm); return; } - if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) errx(1, "malloc failed"); strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); @@ -294,7 +290,7 @@ int s_uname(KINFO *k) { - return (strlen(user_from_uid(k->ki_p->ki_uid, 0))); + return (strlen(user_from_uid(k->ki_p->ki_uid, 0))); } void @@ -324,7 +320,7 @@ int s_runame(KINFO *k) { - return (strlen(user_from_uid(k->ki_p->ki_ruid, 0))); + return (strlen(user_from_uid(k->ki_p->ki_ruid, 0))); } @@ -356,13 +352,13 @@ v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - (void)printf("%*s ", v->width-1, "??"); + (void)printf("%*s ", v->width - 1, "??"); else { if (strncmp(ttname, "tty", 3) == 0 || strncmp(ttname, "cua", 3) == 0) ttname += 3; - (void)printf("%*.*s%c", v->width-1, v->width-1, ttname, - k->ki_p->ki_kiflag & KI_CTTY ? ' ' : '-'); + (void)printf("%*.*s%c", v->width - 1, v->width - 1, ttname, + k->ki_p->ki_kiflag & KI_CTTY ? ' ' : '-'); } } @@ -387,28 +383,26 @@ VAR *v; time_t then; struct tm *tp; + static int use_ampm = -1; char buf[100]; - static int use_ampm = -1; v = ve->var; if (!k->ki_valid) { (void)printf("%-*s", v->width, "-"); return; } - if (use_ampm < 0) use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); - then = k->ki_p->ki_start.tv_sec; tp = localtime(&then); if (now - k->ki_p->ki_start.tv_sec < 24 * 3600) { - (void)strftime(buf, sizeof(buf) - 1, - use_ampm ? "%l:%M%p" : "%k:%M ", tp); + (void)strftime(buf, sizeof(buf), + use_ampm ? "%l:%M%p" : "%k:%M ", tp); } else if (now - k->ki_p->ki_start.tv_sec < 7 * 86400) { - (void)strftime(buf, sizeof(buf) - 1, - use_ampm ? "%a%I%p" : "%a%H ", tp); + (void)strftime(buf, sizeof(buf), + use_ampm ? "%a%I%p" : "%a%H ", tp); } else - (void)strftime(buf, sizeof(buf) - 1, "%e%b%y", tp); + (void)strftime(buf, sizeof(buf), "%e%b%y", tp); (void)printf("%-*s", v->width, buf); } @@ -425,7 +419,7 @@ return; } then = k->ki_p->ki_start.tv_sec; - (void)strftime(buf, sizeof(buf) -1, "%c", localtime(&then)); + (void)strftime(buf, sizeof(buf), "%c", localtime(&then)); (void)printf("%-*s", v->width, buf); } @@ -438,7 +432,7 @@ if (k->ki_p->ki_kiflag & KI_LOCKBLOCK) { if (k->ki_p->ki_lockname[0] != 0) (void)printf("%-*.*s", v->width, v->width, - k->ki_p->ki_lockname); + k->ki_p->ki_lockname); else (void)printf("%-*s", v->width, "???"); } else @@ -454,13 +448,12 @@ if (k->ki_p->ki_wchan) { if (k->ki_p->ki_wmesg[0] != 0) (void)printf("%-*.*s", v->width, v->width, - k->ki_p->ki_wmesg); + k->ki_p->ki_wmesg); else (void)printf("%-*lx", v->width, (long)k->ki_p->ki_wchan); - } else { + } else (void)printf("%-*s", v->width, "-"); - } } void @@ -472,7 +465,7 @@ if (k->ki_p->ki_wchan) { if (k->ki_p->ki_wmesg[0] != 0) (void)printf("%-*.*s", v->width, v->width, - k->ki_p->ki_wmesg); + k->ki_p->ki_wmesg); else (void)printf("%-*lx", v->width, (long)k->ki_p->ki_wchan); @@ -480,12 +473,10 @@ if (k->ki_p->ki_lockname[0]) { (void)printf("%-*.*s", v->width, v->width, k->ki_p->ki_lockname); - } else { + } else (void)printf("%-*s", v->width, "???"); - } - } else { + } else (void)printf("%-*s", v->width, "-"); - } } void @@ -504,9 +495,9 @@ long secs; long psecs; /* "parts" of a second. first micro, then centi */ char obuff[128]; - static char decimal_point = 0; + static char decimal_point; - if (!decimal_point) + if (decimal_point == '\0') decimal_point = localeconv()->decimal_point[0]; v = ve->var; if (k->ki_p->ki_stat == SZOMB || !k->ki_valid) { @@ -531,8 +522,8 @@ secs += psecs / 100; psecs = psecs % 100; } - (void)snprintf(obuff, sizeof(obuff), - "%3ld:%02ld%c%02ld", secs/60, secs%60, decimal_point, psecs); + (void)snprintf(obuff, sizeof(obuff), "%3ld:%02ld%c%02ld", + secs / 60, secs % 60, decimal_point, psecs); (void)printf("%*s", v->width, obuff); } @@ -540,30 +531,26 @@ elapsed(KINFO *k, VARENT *ve) { VAR *v; - time_t days, hours, mins, secs; + time_t val; + int days, hours, mins, secs; char obuff[128]; v = ve->var; - - secs = now - k->ki_p->ki_start.tv_sec; - days = secs/(24*60*60); - secs %= (24*60*60); - hours = secs/(60*60); - secs %= (60*60); - mins = secs/60; - secs %= 60; - if (days != 0) { - (void)snprintf(obuff, sizeof(obuff), "%3ld-%02ld:%02ld:%02ld", - (long)days, (long)hours, (long)mins, (long)secs); - } - else if (hours != 0) { - (void)snprintf(obuff, sizeof(obuff), "%02ld:%02ld:%02ld", - (long)hours, (long)mins, (long)secs); - } - else { - (void)snprintf(obuff, sizeof(obuff), "%02ld:%02ld", - (long)mins, (long)secs); - } + val = now - k->ki_p->ki_start.tv_sec; + days = val / (24 * 60 * 60); + val %= 24 * 60 * 60; + hours = val / (60 * 60); + val %= 60 * 60; + mins = val / 60; + secs = val % 60; + if (days != 0) + (void)snprintf(obuff, sizeof(obuff), "%3d-%02d:%02d:%02d", + days, hours, mins, secs); + else if (hours != 0) + (void)snprintf(obuff, sizeof(obuff), "%02d:%02d:%02d", + hours, mins, secs); + else + (void)snprintf(obuff, sizeof(obuff), "%02d:%02d", mins, secs); (void)printf("%*s", v->width, obuff); } @@ -612,7 +599,7 @@ return (0.0); /* XXX want pmap ptpages, segtab, etc. (per architecture) */ /* XXX don't have info about shared */ - fracmem = ((float)k->ki_p->ki_rssize)/mempages; + fracmem = ((float)k->ki_p->ki_rssize) / mempages; return (100.0 * fracmem); } @@ -694,6 +681,8 @@ *cp++ = '*'; while ((*cp++ = *fcp++)); +#define CHKINF127(n) (((n) > 127) && (v->flag & INF127) ? 127 : (n)) + switch (v->type) { case CHAR: (void)printf(ofmt, v->width, *(char *)bp); @@ -711,7 +700,7 @@ (void)printf(ofmt, v->width, *(int *)bp); break; case UINT: - (void)printf(ofmt, v->width, *(u_int *)bp); + (void)printf(ofmt, v->width, CHKINF127(*(u_int *)bp)); break; case LONG: (void)printf(ofmt, v->width, *(long *)bp); @@ -755,25 +744,22 @@ label(KINFO *k, VARENT *ve) { char *string; + VAR *v; mac_t proclabel; int error; - VAR *v; v = ve->var; string = NULL; - if (mac_prepare_process_label(&proclabel) == -1) { perror("mac_prepare_process_label"); goto out; } - error = mac_get_pid(k->ki_p->ki_pid, proclabel); if (error == 0) { if (mac_to_text(proclabel, &string) == -1) string = NULL; } mac_free(proclabel); - out: if (string != NULL) { (void)printf("%-*s", v->width, string); ==== //depot/projects/ia64/bin/ps/ps.h#6 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ps.h 8.1 (Berkeley) 5/31/93 - * $FreeBSD: src/bin/ps/ps.h,v 1.15 2003/01/19 00:31:16 jmallett Exp $ + * $FreeBSD: src/bin/ps/ps.h,v 1.16 2003/04/12 10:39:56 tjr Exp $ */ #define UNLIMITED 0 /* unlimited terminal width */ @@ -59,6 +59,7 @@ #define LJUST 0x02 /* left adjust on output (trailing blanks) */ #define USER 0x04 /* needs user structure */ #define DSIZ 0x08 /* field size is dynamic*/ +#define INF127 0x10 /* values >127 displayed as 127 */ u_int flag; /* output routine */ void (*oproc)(struct kinfo *, struct varent *); ==== //depot/projects/ia64/contrib/gcc/config/i386/freebsd.h#14 (text+ko) ==== @@ -22,7 +22,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.59 2002/11/26 18:25:20 obrien Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.60 2003/04/13 01:04:01 kan Exp $ */ #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu) %{profile:-p} \ @@ -215,6 +215,27 @@ } while (0) #endif +/* If defined, a C expression whose value is a string containing the + assembler operation to identify the following data as + uninitialized global data. If not defined, and neither + `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined, + uninitialized global data will be output in the data section if + `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be + used. */ +#undef BSS_SECTION_ASM_OP +#define BSS_SECTION_ASM_OP "\t.section\t.bss" + +/* Like `ASM_OUTPUT_BSS' except takes the required alignment as a + separate, explicit argument. If you define this macro, it is used + in place of `ASM_OUTPUT_BSS', and gives you more flexibility in + handling the required alignment of the variable. The alignment is + specified as the number of bits. + + Try to use function `asm_output_aligned_bss' defined in file + `varasm.c' when defining this macro. */ +#undef ASM_OUTPUT_ALIGNED_BSS +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) /************************[ Debugger stuff ]*********************************/ ==== //depot/projects/ia64/contrib/smbfs/lib/smb/ctx.c#6 (text+ko) ==== @@ -30,6 +30,7 @@ * SUCH DAMAGE. * * $Id: ctx.c,v 1.24 2002/04/13 14:35:28 bp Exp $ + * $FreeBSD: src/contrib/smbfs/lib/smb/ctx.c,v 1.2 2003/04/12 12:11:14 tjr Exp $ */ #include #include @@ -408,7 +409,7 @@ &ctx->ct_sh.ioc_group); } if (*p && error == 0) { - error = smb_parse_owner(cp, &ctx->ct_ssn.ioc_owner, + error = smb_parse_owner(p, &ctx->ct_ssn.ioc_owner, &ctx->ct_ssn.ioc_group); } free(p); ==== //depot/projects/ia64/gnu/usr.bin/binutils/addr2line/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/addr2line/Makefile,v 1.8 2003/04/11 18:02:09 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/addr2line/Makefile,v 1.9 2003/04/12 14:44:48 ru Exp $ .include "../Makefile.inc0" @@ -9,10 +9,9 @@ WARNS= 2 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils CFLAGS+= -I${SRCDIR}/binutils -DPADD:= ${RELTOP}/libbinutils/libbinutils.a \ - ${RELTOP}/libbfd/libbfd.a \ - ${RELTOP}/libiberty/libiberty.a \ - ${DPADD} +DPADD= ${RELTOP}/libbinutils/libbinutils.a +DPADD+= ${RELTOP}/libbfd/libbfd.a +DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} .include ==== //depot/projects/ia64/gnu/usr.bin/binutils/ar/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.10 2003/04/11 18:02:09 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.11 2003/04/12 14:44:48 ru Exp $ .include "../Makefile.inc0" @@ -10,10 +10,9 @@ CFLAGS+= -I${SRCDIR}/binutils CFLAGS+= -I${SRCDIR}/bfd NOSHARED?= yes -DPADD:= ${RELTOP}/libbinutils/libbinutils.a \ - ${RELTOP}/libbfd/libbfd.a \ - ${RELTOP}/libiberty/libiberty.a \ - ${DPADD} +DPADD= ${RELTOP}/libbinutils/libbinutils.a +DPADD+= ${RELTOP}/libbfd/libbfd.a +DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} .include ==== //depot/projects/ia64/gnu/usr.bin/binutils/as/Makefile.inc0#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/as/Makefile.inc0,v 1.22 2003/04/11 18:02:09 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/as/Makefile.inc0,v 1.23 2003/04/12 14:44:48 ru Exp $ .include "${.CURDIR}/../../Makefile.inc0" @@ -20,10 +20,9 @@ CFLAGS+= -DVERSION=\"${VERSION:C/[ ]?${VERSION_DATE}[ ]?//g}\" CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\" NOSHARED?= yes -DPADD:= ${RELTOP}/libbfd/libbfd.a \ - ${RELTOP}/libiberty/libiberty.a \ - ${RELTOP}/libopcodes/libopcodes.a \ - ${DPADD} +DPADD= ${RELTOP}/libbfd/libbfd.a +DPADD+= ${RELTOP}/libiberty/libiberty.a +DPADD+= ${RELTOP}/libopcodes/libopcodes.a LDADD= ${DPADD} # If set, BINUTILSDISTDIR is the path to a directory containing the full GNU ==== //depot/projects/ia64/gnu/usr.bin/binutils/ld/Makefile#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile,v 1.25 2003/04/11 18:02:09 ru Exp $ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Apr 15 17:42:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 17F0A37B404; Tue, 15 Apr 2003 17:42:05 -0700 (PDT) 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 A59C237B401 for ; Tue, 15 Apr 2003 17:42:04 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A71843FAF for ; Tue, 15 Apr 2003 17:42:03 -0700 (PDT) (envelope-from marcel@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 h3G0g30U071645 for ; Tue, 15 Apr 2003 17:42:03 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3G0g1WE071642 for perforce@freebsd.org; Tue, 15 Apr 2003 17:42:01 -0700 (PDT) Date: Tue, 15 Apr 2003 17:42:01 -0700 (PDT) Message-Id: <200304160042.h3G0g1WE071642@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29033 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 00:42:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=29033 Change 29033 by marcel@marcel_pluto1 on 2003/04/15 17:41:19 IFia64 Affected files ... .. //depot/projects/ia64_epc/Makefile.inc1#9 integrate .. //depot/projects/ia64_epc/bin/cp/cp.c#3 integrate .. //depot/projects/ia64_epc/bin/ps/keyword.c#2 integrate .. //depot/projects/ia64_epc/bin/ps/print.c#2 integrate .. //depot/projects/ia64_epc/bin/ps/ps.h#2 integrate .. //depot/projects/ia64_epc/contrib/gcc/config/i386/freebsd.h#2 integrate .. //depot/projects/ia64_epc/contrib/smbfs/lib/smb/ctx.c#2 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/addr2line/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/ar/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/as/Makefile.inc0#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/ld/Makefile#4 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/nm/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/objcopy/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/objdump/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/ranlib/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/readelf/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/size/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/strings/Makefile#3 integrate .. //depot/projects/ia64_epc/gnu/usr.bin/binutils/strip/Makefile#3 integrate .. //depot/projects/ia64_epc/lib/libc/stdio/vfprintf.c#4 integrate .. //depot/projects/ia64_epc/lib/libc/stdio/vfwprintf.c#5 integrate .. //depot/projects/ia64_epc/lib/libc/sys/Makefile.inc#3 integrate .. //depot/projects/ia64_epc/lib/libc/sys/ntp_adjtime.2#1 branch .. //depot/projects/ia64_epc/lib/libstand/zalloc_defs.h#2 integrate .. //depot/projects/ia64_epc/release/Makefile#6 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#5 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#9 integrate .. //depot/projects/ia64_epc/release/scripts/doFS.sh#5 integrate .. //depot/projects/ia64_epc/sbin/fdisk/Makefile#2 integrate .. //depot/projects/ia64_epc/sbin/fdisk/fdisk.c#3 integrate .. //depot/projects/ia64_epc/sbin/fdisk/runtest.sh#1 branch .. //depot/projects/ia64_epc/sbin/gbde/gbde.c#4 integrate .. //depot/projects/ia64_epc/sbin/ifconfig/ifconfig.c#3 integrate .. //depot/projects/ia64_epc/sbin/ping/ping.c#7 integrate .. //depot/projects/ia64_epc/secure/lib/libcrypto/Makefile#4 integrate .. //depot/projects/ia64_epc/share/man/man4/Makefile#6 integrate .. //depot/projects/ia64_epc/share/man/man4/fxp.4#3 integrate .. //depot/projects/ia64_epc/share/man/man4/man4.i386/Makefile#5 integrate .. //depot/projects/ia64_epc/share/man/man4/man4.i386/sbni.4#1 branch .. //depot/projects/ia64_epc/share/man/man4/sbsh.4#1 branch .. //depot/projects/ia64_epc/share/man/man4/xl.4#3 integrate .. //depot/projects/ia64_epc/share/man/man5/rc.conf.5#7 integrate .. //depot/projects/ia64_epc/share/man/man7/environ.7#2 integrate .. //depot/projects/ia64_epc/share/man/man9/mbuf.9#3 integrate .. //depot/projects/ia64_epc/share/mk/bsd.cpu.mk#4 integrate .. //depot/projects/ia64_epc/sys/alpha/conf/NOTES#3 integrate .. //depot/projects/ia64_epc/sys/cam/scsi/scsi_da.c#6 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.alpha#3 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.i386#3 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.ia64#3 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.pc98#3 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.powerpc#3 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.sparc64#4 integrate .. //depot/projects/ia64_epc/sys/conf/Makefile.x86_64#3 integrate .. //depot/projects/ia64_epc/sys/conf/NOTES#9 integrate .. //depot/projects/ia64_epc/sys/conf/files#9 integrate .. //depot/projects/ia64_epc/sys/conf/files.i386#6 integrate .. //depot/projects/ia64_epc/sys/conf/files.ia64#7 integrate .. //depot/projects/ia64_epc/sys/conf/options#7 integrate .. //depot/projects/ia64_epc/sys/conf/options.i386#6 integrate .. //depot/projects/ia64_epc/sys/conf/options.ia64#2 integrate .. //depot/projects/ia64_epc/sys/conf/options.pc98#4 integrate .. //depot/projects/ia64_epc/sys/conf/options.powerpc#2 integrate .. //depot/projects/ia64_epc/sys/conf/options.x86_64#2 integrate .. //depot/projects/ia64_epc/sys/dev/an/if_an_isa.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/an/if_an_pccard.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/an/if_an_pci.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/ar/if_ar_isa.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/ar/if_ar_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/bge/if_bge.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/ccd/ccd.c#7 integrate .. //depot/projects/ia64_epc/sys/dev/cm/if_cm_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/cnw/if_cnw.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/cs/if_cs_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/cs/if_cs_pccard.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/ed/if_ed_cbus.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/ed/if_ed_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/ed/if_ed_pccard.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/ed/if_ed_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/em/if_em.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/if_fwe.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/sbp.c#7 integrate .. //depot/projects/ia64_epc/sys/dev/fxp/if_fxp.c#9 integrate .. //depot/projects/ia64_epc/sys/dev/gem/if_gem_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/gx/if_gx.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/hme/if_hme_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/hme/if_hme_sbus.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/lge/if_lge.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/lnc/if_lnc_cbus.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/lnc/if_lnc_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/lnc/if_lnc_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/my/if_my.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/nge/if_nge.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/pci/pci.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/pdq/if_fea.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/pdq/if_fpa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/sbni/if_sbni_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/sbni/if_sbni_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/sbsh/if_sbsh.c#1 branch .. //depot/projects/ia64_epc/sys/dev/sbsh/if_sbshreg.h#1 branch .. //depot/projects/ia64_epc/sys/dev/sn/if_sn_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/sn/if_sn_pccard.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/snc/if_snc_cbus.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/snc/if_snc_pccard.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/sr/if_sr_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/sr/if_sr_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/tx/if_tx.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/txp/if_txp.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/usb/FILES#2 integrate .. //depot/projects/ia64_epc/sys/dev/usb/ehci.c#1 branch .. //depot/projects/ia64_epc/sys/dev/usb/ehci_pci.c#1 branch .. //depot/projects/ia64_epc/sys/dev/usb/ehcireg.h#1 branch .. //depot/projects/ia64_epc/sys/dev/usb/ehcivar.h#1 branch .. //depot/projects/ia64_epc/sys/dev/usb/if_aue.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/usb/if_cue.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/usb/if_kue.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/usb/umass.c#6 integrate .. //depot/projects/ia64_epc/sys/dev/usb/usb.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/vx/if_vx_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/wi/if_wi_pccard.c#7 integrate .. //depot/projects/ia64_epc/sys/dev/wi/if_wi_pci.c#3 integrate .. //depot/projects/ia64_epc/sys/geom/geom.h#5 integrate .. //depot/projects/ia64_epc/sys/geom/geom_aes.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_apple.c#5 integrate .. //depot/projects/ia64_epc/sys/geom/geom_bsd.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_dump.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_event.c#6 integrate .. //depot/projects/ia64_epc/sys/geom/geom_gpt.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_io.c#6 integrate .. //depot/projects/ia64_epc/sys/geom/geom_mbr.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_mbr_enc.c#1 branch .. //depot/projects/ia64_epc/sys/geom/geom_mirror.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_pc98.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_slice.c#5 integrate .. //depot/projects/ia64_epc/sys/geom/geom_slice.h#2 integrate .. //depot/projects/ia64_epc/sys/geom/geom_subr.c#6 integrate .. //depot/projects/ia64_epc/sys/geom/geom_sunlabel.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_vol_ffs.c#3 integrate .. //depot/projects/ia64_epc/sys/i386/i386/busdma_machdep.c#7 integrate .. //depot/projects/ia64_epc/sys/i386/linux/linux_ptrace.c#3 integrate .. //depot/projects/ia64_epc/sys/isa/isa_common.c#2 integrate .. //depot/projects/ia64_epc/sys/kern/init_main.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/kern_conf.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/kern_mac.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/sched_ule.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/subr_mbuf.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/sysv_shm.c#3 integrate .. //depot/projects/ia64_epc/sys/kern/uipc_mbuf.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/uipc_mbuf2.c#3 integrate .. //depot/projects/ia64_epc/sys/kern/uipc_socket.c#4 integrate .. //depot/projects/ia64_epc/sys/kern/vfs_bio.c#7 integrate .. //depot/projects/ia64_epc/sys/kern/vfs_subr.c#6 integrate .. //depot/projects/ia64_epc/sys/modules/Makefile#8 integrate .. //depot/projects/ia64_epc/sys/modules/sbsh/Makefile#1 branch .. //depot/projects/ia64_epc/sys/modules/usb/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/net/if_loop.c#5 integrate .. //depot/projects/ia64_epc/sys/net/route.c#4 integrate .. //depot/projects/ia64_epc/sys/netinet/ip_output.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/agp_ali.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/agp_amd.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/agp_i810.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/agp_intel.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/agp_sis.c#3 integrate .. //depot/projects/ia64_epc/sys/pci/agp_via.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/alpm.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/amdpm.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/cy_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/if_dc.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_de.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/if_en_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/if_pcn.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/if_rl.c#6 integrate .. //depot/projects/ia64_epc/sys/pci/if_sf.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/if_sis.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/if_sk.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/if_ste.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/if_ti.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_tl.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/if_vr.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_wb.c#4 integrate .. //depot/projects/ia64_epc/sys/pci/if_xl.c#9 integrate .. //depot/projects/ia64_epc/sys/pci/ncr.c#3 integrate .. //depot/projects/ia64_epc/sys/pci/viapm.c#2 integrate .. //depot/projects/ia64_epc/sys/pci/xrpu.c#5 integrate .. //depot/projects/ia64_epc/sys/security/mac_biba/mac_biba.c#4 integrate .. //depot/projects/ia64_epc/sys/security/mac_lomac/mac_lomac.c#4 integrate .. //depot/projects/ia64_epc/sys/security/mac_mls/mac_mls.c#4 integrate .. //depot/projects/ia64_epc/sys/security/mac_test/mac_test.c#3 integrate .. //depot/projects/ia64_epc/sys/sparc64/include/pmap.h#5 integrate .. //depot/projects/ia64_epc/sys/sparc64/include/tlb.h#2 integrate .. //depot/projects/ia64_epc/sys/sparc64/sbus/sbus.c#4 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/cache.c#3 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/cheetah.c#3 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/machdep.c#7 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/pmap.c#7 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/spitfire.c#3 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/swtch.S#3 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/tlb.c#2 integrate .. //depot/projects/ia64_epc/sys/sys/bio.h#3 integrate .. //depot/projects/ia64_epc/sys/sys/diskmbr.h#3 integrate .. //depot/projects/ia64_epc/sys/sys/mac.h#4 integrate .. //depot/projects/ia64_epc/sys/sys/mac_policy.h#4 integrate .. //depot/projects/ia64_epc/sys/sys/mbuf.h#7 integrate .. //depot/projects/ia64_epc/sys/sys/proc.h#7 integrate .. //depot/projects/ia64_epc/sys/vm/vm_contig.c#3 integrate .. //depot/projects/ia64_epc/sys/vm/vm_kern.c#2 integrate .. //depot/projects/ia64_epc/sys/vm/vm_map.c#5 integrate .. //depot/projects/ia64_epc/sys/vm/vm_meter.c#2 integrate .. //depot/projects/ia64_epc/sys/vm/vm_object.c#6 integrate .. //depot/projects/ia64_epc/sys/vm/vm_object.h#4 integrate .. //depot/projects/ia64_epc/tools/build/Makefile#3 integrate .. //depot/projects/ia64_epc/tools/build/Makefile.boot#2 delete .. //depot/projects/ia64_epc/tools/build/mk/Makefile.boot#1 branch .. //depot/projects/ia64_epc/tools/build/mk/bsd.lib.mk#1 branch .. //depot/projects/ia64_epc/tools/build/mk/bsd.prog.mk#1 branch .. //depot/projects/ia64_epc/tools/regression/geom/GLib/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/RunTest.sh#2 integrate .. //depot/projects/ia64_epc/tools/regression/geom/Test/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/Makefile.inc#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T000/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T000/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T000/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T001/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T001/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T001/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T002/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T002/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T002/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T003/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T003/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T003/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T004/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T004/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T004/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T005/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T005/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T005/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T006/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T006/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T006/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T007/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T007/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T007/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T008/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T008/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T008/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T009/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T009/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T009/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T010/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T010/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T010/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T011/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T011/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T011/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T012/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T012/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T012/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T013/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T013/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T013/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T014/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T014/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T014/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T015/Makefile#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T015/ref.conf#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/Test/T015/testprg.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/geom.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/geom_kernsim.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/geom_sim.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/geom_sim.h#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/geom_simdev.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/geom_simdisk.c#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/geom_simdisk.h#2 delete .. //depot/projects/ia64_epc/tools/regression/geom/geom_simdisk_xml.c#2 delete .. //depot/projects/ia64_epc/tools/regression/lib/libc/stdio/test-printfloat.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/make/main.c#3 integrate .. //depot/projects/ia64_epc/usr.bin/truss/syscalls.c#2 integrate .. //depot/projects/ia64_epc/usr.bin/vmstat/vmstat.8#2 integrate .. //depot/projects/ia64_epc/usr.bin/vmstat/vmstat.c#5 integrate .. //depot/projects/ia64_epc/usr.bin/window/wwprintf.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/acpi/acpidump/acpi.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/boot0cfg/boot0cfg.8#2 integrate .. //depot/projects/ia64_epc/usr.sbin/config/configvers.h#2 integrate .. //depot/projects/ia64_epc/usr.sbin/config/mkmakefile.c#3 integrate .. //depot/projects/ia64_epc/usr.sbin/i4b/isdntest/Makefile#2 integrate Differences ... ==== //depot/projects/ia64_epc/Makefile.inc1#9 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.340 2003/04/11 17:58:17 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.348 2003/04/14 14:46:13 ru Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -151,7 +151,9 @@ .endif WORLDTMP= ${OBJTREE}${.CURDIR}/${MACHINE_ARCH} # /usr/games added for fortune which depend on strfile -STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games +XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games +STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} INSTALLTMP!= /usr/bin/mktemp -d -u -t install @@ -181,21 +183,23 @@ # This stage installs a previously built world. # +BOOTSTRAPPING?= 0 + # Common environment for world related stages CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ CPUTYPE=${TARGET_CPUTYPE} \ - GROFF_BIN_PATH=${WORLDTMP}/usr/bin \ - GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \ - GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac + GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \ + GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \ + GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac # bootstrap-tools stage BMAKEENV= DESTDIR= \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ - __MAKE_CONF=${.CURDIR}/tools/build/Makefile.boot \ - OLD_MAKE_CONF=${__MAKE_CONF} \ - WORLDTMP=${WORLDTMP} + PATH=${BPATH}:${PATH} \ + WORLDTMP=${WORLDTMP} \ + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ BOOTSTRAPPING=${OSRELDATE} \ @@ -225,28 +229,6 @@ # kernel stage KMAKEENV= ${WMAKEENV} -USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \ - usr/libexec usr/sbin usr/share/misc \ - usr/share/dict \ - usr/share/groff_font/devX100 \ - usr/share/groff_font/devX100-12 \ - usr/share/groff_font/devX75 \ - usr/share/groff_font/devX75-12 \ - usr/share/groff_font/devascii \ - usr/share/groff_font/devcp1047 \ - usr/share/groff_font/devdvi \ - usr/share/groff_font/devhtml \ - usr/share/groff_font/devkoi8-r \ - usr/share/groff_font/devlatin1 \ - usr/share/groff_font/devlbp \ - usr/share/groff_font/devlj4 \ - usr/share/groff_font/devps \ - usr/share/groff_font/devutf8 \ - usr/share/tmac/mdoc usr/share/tmac/mm - -INCDIRS= arpa dev fs g++/backward g++/bits g++/ext isc isofs libmilter \ - objc openssl protocols readline rpc rpcsvc security ufs - # # buildworld # @@ -274,16 +256,36 @@ rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif -.for _dir in ${USRDIRS} +.for _dir in \ + usr/bin usr/games usr/include/sys usr/lib \ + usr/libexec usr/sbin usr/share/dict \ + usr/share/groff_font/devX100 \ + usr/share/groff_font/devX100-12 \ + usr/share/groff_font/devX75 \ + usr/share/groff_font/devX75-12 \ + usr/share/groff_font/devascii \ + usr/share/groff_font/devcp1047 \ + usr/share/groff_font/devdvi \ + usr/share/groff_font/devhtml \ + usr/share/groff_font/devkoi8-r \ + usr/share/groff_font/devlatin1 \ + usr/share/groff_font/devlbp \ + usr/share/groff_font/devlj4 \ + usr/share/groff_font/devps \ + usr/share/groff_font/devutf8 \ + usr/share/tmac/mdoc usr/share/tmac/mm + mkdir -p ${WORLDTMP}/legacy/${_dir} +.endfor +.for _dir in \ + usr/bin usr/lib/compat/aout usr/libdata/ldscripts usr/libexec usr/share/misc mkdir -p ${WORLDTMP}/${_dir} .endfor -.for _dir in ${INCDIRS} +.for _dir in \ + arpa dev fs g++/backward g++/bits g++/ext isc isofs libmilter \ + objc openssl protocols readline rpc rpcsvc security ufs mkdir -p ${WORLDTMP}/usr/include/${_dir} .endfor ln -sf ${.CURDIR}/sys ${WORLDTMP} -.for _dir in lib include/sys - mkdir -p ${WORLDTMP}/legacy/usr/${_dir} -.endfor _legacy: @echo @echo "--------------------------------------------------------------" @@ -638,18 +640,37 @@ _strfile= games/fortune/strfile .endif +.if ( ${BOOTSTRAPPING} < 450005 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 )) +_uudecode= usr.bin/uudecode +.endif + +.if ( ${BOOTSTRAPPING} < 430002 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500019 )) +_xargs= usr.bin/xargs +.endif + +.if ( ${BOOTSTRAPPING} < 430002 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500018 )) +_yacc= usr.bin/yacc +.endif + +.if ${BOOTSTRAPPING} < 500019 +_kbdcontrol= usr.sbin/kbdcontrol +.endif + bootstrap-tools: -.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef \ - usr.bin/makewhatis usr.bin/rpcgen usr.bin/uudecode \ - usr.bin/xargs usr.bin/xinstall \ - usr.sbin/config usr.sbin/kbdcontrol \ +.for _tool in ${_strfile} usr.bin/colldef \ + usr.bin/makewhatis usr.bin/rpcgen ${_uudecode} \ + ${_xargs} usr.bin/xinstall ${_yacc} \ + usr.sbin/config ${_kbdcontrol} \ gnu/usr.bin/gperf gnu/usr.bin/groff gnu/usr.bin/texinfo @${ECHODIR} "===> ${_tool}"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all; \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor # @@ -697,7 +718,8 @@ .endif .endif -.if ${TARGET_ARCH} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} +.if ${TARGET_ARCH} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \ + ${BOOTSTRAPPING} < 500037 _elf2aout= usr.bin/elf2aout .endif ==== //depot/projects/ia64_epc/bin/cp/cp.c#3 (text+ko) ==== @@ -46,7 +46,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.45 2003/04/07 12:09:17 mdodd Exp $"); +__FBSDID("$FreeBSD: src/bin/cp/cp.c,v 1.47 2003/04/13 08:47:30 bde Exp $"); /* * Cp copies source files to target files. @@ -63,13 +63,14 @@ * in "to") to form the final target path. */ -#include +#include #include #include #include #include #include +#include #include #include #include @@ -88,14 +89,13 @@ int fflag, iflag, nflag, pflag, vflag; static int Rflag, rflag; - volatile sig_atomic_t info; -static void siginfo (int notused __unused); enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; static int copy(char *[], enum op, int); static int mastercmp(const FTSENT * const *, const FTSENT * const *); +static void siginfo(int __unused); int main(int argc, char *argv[]) @@ -507,7 +507,7 @@ } static void -siginfo (int notused __unused) +siginfo(int sig __unused) { info = 1; ==== //depot/projects/ia64_epc/bin/ps/keyword.c#2 (text+ko) ==== @@ -37,7 +37,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/keyword.c,v 1.62 2003/02/05 19:22:39 sobomax Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/keyword.c,v 1.63 2003/04/12 10:39:56 tjr Exp $"); #include #include @@ -143,7 +143,7 @@ {"ppid", "PPID", NULL, 0, kvar, NULL, PIDLEN, KOFF(ki_ppid), UINT, PIDFMT, 0}, {"pri", "PRI", NULL, 0, pri, NULL, 3, 0, CHAR, NULL, 0}, - {"re", "RE", NULL, 0, kvar, NULL, 3, KOFF(ki_swtime), UINT, "d", + {"re", "RE", NULL, INF127, kvar, NULL, 3, KOFF(ki_swtime), UINT, "d", 0}, {"rgid", "RGID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_rgid), UINT, UIDFMT, 0}, @@ -166,7 +166,7 @@ UINT, "x", 0}, {"sigmask", "BLOCKED", NULL, 0, kvar, NULL, 8, KOFF(ki_sigmask), UINT, "x", 0}, - {"sl", "SL", NULL, 0, kvar, NULL, 3, KOFF(ki_slptime), UINT, "d", + {"sl", "SL", NULL, INF127, kvar, NULL, 3, KOFF(ki_slptime), UINT, "d", 0}, {"start", "STARTED", NULL, LJUST|USER, started, NULL, 7, 0, CHAR, NULL, 0}, ==== //depot/projects/ia64_epc/bin/ps/print.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.79 2003/02/05 13:18:17 charnier Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/print.c,v 1.82 2003/04/15 18:49:20 charnier Exp $"); #include #include @@ -106,11 +106,9 @@ char *cp, *vis_args; v = ve->var; - if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) errx(1, "malloc failed"); strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); - if (ve->next == NULL) { /* last field */ if (termwidth == UNLIMITED) { @@ -136,7 +134,6 @@ char *cp, *vis_env, *vis_args; v = ve->var; - if (cflag) { if (ve->next == NULL) /* last field, don't pad */ (void)printf("%s", k->ki_p->ki_comm); @@ -144,7 +141,6 @@ (void)printf("%-*s", v->width, k->ki_p->ki_comm); return; } - if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) errx(1, "malloc failed"); strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); @@ -294,7 +290,7 @@ int s_uname(KINFO *k) { - return (strlen(user_from_uid(k->ki_p->ki_uid, 0))); + return (strlen(user_from_uid(k->ki_p->ki_uid, 0))); } void @@ -324,7 +320,7 @@ int s_runame(KINFO *k) { - return (strlen(user_from_uid(k->ki_p->ki_ruid, 0))); + return (strlen(user_from_uid(k->ki_p->ki_ruid, 0))); } @@ -356,13 +352,13 @@ v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - (void)printf("%*s ", v->width-1, "??"); + (void)printf("%*s ", v->width - 1, "??"); else { if (strncmp(ttname, "tty", 3) == 0 || strncmp(ttname, "cua", 3) == 0) ttname += 3; - (void)printf("%*.*s%c", v->width-1, v->width-1, ttname, - k->ki_p->ki_kiflag & KI_CTTY ? ' ' : '-'); + (void)printf("%*.*s%c", v->width - 1, v->width - 1, ttname, + k->ki_p->ki_kiflag & KI_CTTY ? ' ' : '-'); } } @@ -387,28 +383,26 @@ VAR *v; time_t then; struct tm *tp; + static int use_ampm = -1; char buf[100]; - static int use_ampm = -1; v = ve->var; if (!k->ki_valid) { (void)printf("%-*s", v->width, "-"); return; } - if (use_ampm < 0) use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); - then = k->ki_p->ki_start.tv_sec; tp = localtime(&then); if (now - k->ki_p->ki_start.tv_sec < 24 * 3600) { - (void)strftime(buf, sizeof(buf) - 1, - use_ampm ? "%l:%M%p" : "%k:%M ", tp); + (void)strftime(buf, sizeof(buf), + use_ampm ? "%l:%M%p" : "%k:%M ", tp); } else if (now - k->ki_p->ki_start.tv_sec < 7 * 86400) { - (void)strftime(buf, sizeof(buf) - 1, - use_ampm ? "%a%I%p" : "%a%H ", tp); + (void)strftime(buf, sizeof(buf), + use_ampm ? "%a%I%p" : "%a%H ", tp); } else - (void)strftime(buf, sizeof(buf) - 1, "%e%b%y", tp); + (void)strftime(buf, sizeof(buf), "%e%b%y", tp); (void)printf("%-*s", v->width, buf); } @@ -425,7 +419,7 @@ return; } then = k->ki_p->ki_start.tv_sec; - (void)strftime(buf, sizeof(buf) -1, "%c", localtime(&then)); + (void)strftime(buf, sizeof(buf), "%c", localtime(&then)); (void)printf("%-*s", v->width, buf); } @@ -438,7 +432,7 @@ if (k->ki_p->ki_kiflag & KI_LOCKBLOCK) { if (k->ki_p->ki_lockname[0] != 0) (void)printf("%-*.*s", v->width, v->width, - k->ki_p->ki_lockname); + k->ki_p->ki_lockname); else (void)printf("%-*s", v->width, "???"); } else @@ -454,13 +448,12 @@ if (k->ki_p->ki_wchan) { if (k->ki_p->ki_wmesg[0] != 0) (void)printf("%-*.*s", v->width, v->width, - k->ki_p->ki_wmesg); + k->ki_p->ki_wmesg); else (void)printf("%-*lx", v->width, (long)k->ki_p->ki_wchan); - } else { + } else (void)printf("%-*s", v->width, "-"); - } } void @@ -472,7 +465,7 @@ if (k->ki_p->ki_wchan) { if (k->ki_p->ki_wmesg[0] != 0) (void)printf("%-*.*s", v->width, v->width, - k->ki_p->ki_wmesg); + k->ki_p->ki_wmesg); else (void)printf("%-*lx", v->width, (long)k->ki_p->ki_wchan); @@ -480,12 +473,10 @@ if (k->ki_p->ki_lockname[0]) { (void)printf("%-*.*s", v->width, v->width, k->ki_p->ki_lockname); - } else { + } else (void)printf("%-*s", v->width, "???"); - } - } else { + } else (void)printf("%-*s", v->width, "-"); - } } void @@ -504,9 +495,9 @@ long secs; long psecs; /* "parts" of a second. first micro, then centi */ char obuff[128]; - static char decimal_point = 0; + static char decimal_point; - if (!decimal_point) + if (decimal_point == '\0') decimal_point = localeconv()->decimal_point[0]; v = ve->var; if (k->ki_p->ki_stat == SZOMB || !k->ki_valid) { @@ -531,8 +522,8 @@ secs += psecs / 100; psecs = psecs % 100; } - (void)snprintf(obuff, sizeof(obuff), - "%3ld:%02ld%c%02ld", secs/60, secs%60, decimal_point, psecs); + (void)snprintf(obuff, sizeof(obuff), "%3ld:%02ld%c%02ld", + secs / 60, secs % 60, decimal_point, psecs); (void)printf("%*s", v->width, obuff); } @@ -540,30 +531,26 @@ elapsed(KINFO *k, VARENT *ve) { VAR *v; - time_t days, hours, mins, secs; + time_t val; + int days, hours, mins, secs; char obuff[128]; v = ve->var; - - secs = now - k->ki_p->ki_start.tv_sec; - days = secs/(24*60*60); - secs %= (24*60*60); - hours = secs/(60*60); - secs %= (60*60); - mins = secs/60; - secs %= 60; - if (days != 0) { - (void)snprintf(obuff, sizeof(obuff), "%3ld-%02ld:%02ld:%02ld", - (long)days, (long)hours, (long)mins, (long)secs); - } - else if (hours != 0) { - (void)snprintf(obuff, sizeof(obuff), "%02ld:%02ld:%02ld", - (long)hours, (long)mins, (long)secs); - } - else { - (void)snprintf(obuff, sizeof(obuff), "%02ld:%02ld", - (long)mins, (long)secs); - } + val = now - k->ki_p->ki_start.tv_sec; + days = val / (24 * 60 * 60); + val %= 24 * 60 * 60; + hours = val / (60 * 60); + val %= 60 * 60; + mins = val / 60; + secs = val % 60; + if (days != 0) + (void)snprintf(obuff, sizeof(obuff), "%3d-%02d:%02d:%02d", + days, hours, mins, secs); + else if (hours != 0) + (void)snprintf(obuff, sizeof(obuff), "%02d:%02d:%02d", + hours, mins, secs); + else + (void)snprintf(obuff, sizeof(obuff), "%02d:%02d", mins, secs); (void)printf("%*s", v->width, obuff); } @@ -612,7 +599,7 @@ return (0.0); /* XXX want pmap ptpages, segtab, etc. (per architecture) */ /* XXX don't have info about shared */ - fracmem = ((float)k->ki_p->ki_rssize)/mempages; + fracmem = ((float)k->ki_p->ki_rssize) / mempages; return (100.0 * fracmem); } @@ -694,6 +681,8 @@ *cp++ = '*'; while ((*cp++ = *fcp++)); +#define CHKINF127(n) (((n) > 127) && (v->flag & INF127) ? 127 : (n)) + switch (v->type) { case CHAR: (void)printf(ofmt, v->width, *(char *)bp); @@ -711,7 +700,7 @@ (void)printf(ofmt, v->width, *(int *)bp); break; case UINT: - (void)printf(ofmt, v->width, *(u_int *)bp); + (void)printf(ofmt, v->width, CHKINF127(*(u_int *)bp)); break; case LONG: (void)printf(ofmt, v->width, *(long *)bp); @@ -755,25 +744,22 @@ label(KINFO *k, VARENT *ve) { char *string; + VAR *v; mac_t proclabel; int error; - VAR *v; v = ve->var; string = NULL; - if (mac_prepare_process_label(&proclabel) == -1) { perror("mac_prepare_process_label"); goto out; } - error = mac_get_pid(k->ki_p->ki_pid, proclabel); if (error == 0) { if (mac_to_text(proclabel, &string) == -1) string = NULL; } mac_free(proclabel); - out: if (string != NULL) { (void)printf("%-*s", v->width, string); ==== //depot/projects/ia64_epc/bin/ps/ps.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ps.h 8.1 (Berkeley) 5/31/93 - * $FreeBSD: src/bin/ps/ps.h,v 1.15 2003/01/19 00:31:16 jmallett Exp $ + * $FreeBSD: src/bin/ps/ps.h,v 1.16 2003/04/12 10:39:56 tjr Exp $ */ #define UNLIMITED 0 /* unlimited terminal width */ @@ -59,6 +59,7 @@ #define LJUST 0x02 /* left adjust on output (trailing blanks) */ #define USER 0x04 /* needs user structure */ #define DSIZ 0x08 /* field size is dynamic*/ +#define INF127 0x10 /* values >127 displayed as 127 */ u_int flag; /* output routine */ void (*oproc)(struct kinfo *, struct varent *); ==== //depot/projects/ia64_epc/contrib/gcc/config/i386/freebsd.h#2 (text+ko) ==== @@ -22,7 +22,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.59 2002/11/26 18:25:20 obrien Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/i386/freebsd.h,v 1.60 2003/04/13 01:04:01 kan Exp $ */ #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu) %{profile:-p} \ @@ -215,6 +215,27 @@ } while (0) #endif +/* If defined, a C expression whose value is a string containing the + assembler operation to identify the following data as + uninitialized global data. If not defined, and neither + `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined, + uninitialized global data will be output in the data section if + `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be + used. */ +#undef BSS_SECTION_ASM_OP +#define BSS_SECTION_ASM_OP "\t.section\t.bss" + +/* Like `ASM_OUTPUT_BSS' except takes the required alignment as a + separate, explicit argument. If you define this macro, it is used + in place of `ASM_OUTPUT_BSS', and gives you more flexibility in + handling the required alignment of the variable. The alignment is + specified as the number of bits. + + Try to use function `asm_output_aligned_bss' defined in file + `varasm.c' when defining this macro. */ +#undef ASM_OUTPUT_ALIGNED_BSS +#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) /************************[ Debugger stuff ]*********************************/ ==== //depot/projects/ia64_epc/contrib/smbfs/lib/smb/ctx.c#2 (text+ko) ==== @@ -30,6 +30,7 @@ * SUCH DAMAGE. * * $Id: ctx.c,v 1.24 2002/04/13 14:35:28 bp Exp $ + * $FreeBSD: src/contrib/smbfs/lib/smb/ctx.c,v 1.2 2003/04/12 12:11:14 tjr Exp $ */ #include #include @@ -408,7 +409,7 @@ &ctx->ct_sh.ioc_group); } if (*p && error == 0) { - error = smb_parse_owner(cp, &ctx->ct_ssn.ioc_owner, + error = smb_parse_owner(p, &ctx->ct_ssn.ioc_owner, &ctx->ct_ssn.ioc_group); } free(p); ==== //depot/projects/ia64_epc/gnu/usr.bin/binutils/addr2line/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/addr2line/Makefile,v 1.8 2003/04/11 18:02:09 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/addr2line/Makefile,v 1.9 2003/04/12 14:44:48 ru Exp $ .include "../Makefile.inc0" @@ -9,10 +9,9 @@ WARNS= 2 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils CFLAGS+= -I${SRCDIR}/binutils -DPADD:= ${RELTOP}/libbinutils/libbinutils.a \ - ${RELTOP}/libbfd/libbfd.a \ - ${RELTOP}/libiberty/libiberty.a \ - ${DPADD} +DPADD= ${RELTOP}/libbinutils/libbinutils.a +DPADD+= ${RELTOP}/libbfd/libbfd.a +DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} .include ==== //depot/projects/ia64_epc/gnu/usr.bin/binutils/ar/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.10 2003/04/11 18:02:09 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.11 2003/04/12 14:44:48 ru Exp $ .include "../Makefile.inc0" @@ -10,10 +10,9 @@ CFLAGS+= -I${SRCDIR}/binutils CFLAGS+= -I${SRCDIR}/bfd NOSHARED?= yes -DPADD:= ${RELTOP}/libbinutils/libbinutils.a \ - ${RELTOP}/libbfd/libbfd.a \ - ${RELTOP}/libiberty/libiberty.a \ - ${DPADD} +DPADD= ${RELTOP}/libbinutils/libbinutils.a +DPADD+= ${RELTOP}/libbfd/libbfd.a +DPADD+= ${RELTOP}/libiberty/libiberty.a LDADD= ${DPADD} .include ==== //depot/projects/ia64_epc/gnu/usr.bin/binutils/as/Makefile.inc0#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/as/Makefile.inc0,v 1.22 2003/04/11 18:02:09 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/as/Makefile.inc0,v 1.23 2003/04/12 14:44:48 ru Exp $ .include "${.CURDIR}/../../Makefile.inc0" @@ -20,10 +20,9 @@ CFLAGS+= -DVERSION=\"${VERSION:C/[ ]?${VERSION_DATE}[ ]?//g}\" CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\" NOSHARED?= yes -DPADD:= ${RELTOP}/libbfd/libbfd.a \ - ${RELTOP}/libiberty/libiberty.a \ - ${RELTOP}/libopcodes/libopcodes.a \ - ${DPADD} +DPADD= ${RELTOP}/libbfd/libbfd.a +DPADD+= ${RELTOP}/libiberty/libiberty.a +DPADD+= ${RELTOP}/libopcodes/libopcodes.a LDADD= ${DPADD} # If set, BINUTILSDISTDIR is the path to a directory containing the full GNU ==== //depot/projects/ia64_epc/gnu/usr.bin/binutils/ld/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile,v 1.25 2003/04/11 18:02:09 ru Exp $ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Apr 15 19:20:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3ED6737B404; Tue, 15 Apr 2003 19:20:06 -0700 (PDT) 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 D27BC37B401 for ; Tue, 15 Apr 2003 19:20:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 661C743FBF for ; Tue, 15 Apr 2003 19:20:05 -0700 (PDT) (envelope-from marcel@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 h3G2K50U080503 for ; Tue, 15 Apr 2003 19:20:05 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3G2K4xk080500 for perforce@freebsd.org; Tue, 15 Apr 2003 19:20:04 -0700 (PDT) Date: Tue, 15 Apr 2003 19:20:04 -0700 (PDT) Message-Id: <200304160220.h3G2K4xk080500@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29038 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 02:20:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=29038 Change 29038 by marcel@marcel_nfs on 2003/04/15 19:19:30 Stop using contigmalloc() for allocating thread stacks. Use malloc() instead. Cursory testing didn't cause nested TLB faults yet, so it isn't immediately breaking anything. Once we have the syscall path worked out more, we should be able to cause a nested TLB fault. This will be used to write the exception handling code and see if we can make it work at all... Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#5 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#4 edit .. //depot/projects/ia64_epc/sys/ia64/include/proc.h#2 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#5 (text+ko) ==== @@ -214,22 +214,8 @@ pc->pc_current_pmap = kernel_pmap; pc->pc_other_cpus = all_cpus & ~pc->pc_cpumask; if (pc->pc_cpuid > 0) { - void *ks; - - /* - * Use contigmalloc for stack so that we can - * use a region 7 address for it which makes - * it impossible to accidentally lose when - * recording a trapframe. - */ - ks = contigmalloc(KSTACK_PAGES * PAGE_SIZE, M_TEMP, - M_WAITOK, - 0ul, - 256*1024*1024 - 1, - PAGE_SIZE, - 256*1024*1024); - - ap_stack = IA64_PHYS_TO_RR7(ia64_tpa((u_int64_t)ks)); + ap_stack = malloc(KSTACK_PAGES * PAGE_SIZE, M_PMAP, + M_WAITOK); ap_pcpu = pc; ap_delay = 2000; ap_awake = 0; ==== //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#4 (text+ko) ==== @@ -127,6 +127,10 @@ MALLOC_DEFINE(M_PMAP, "PMAP", "PMAP Structures"); +#ifndef KSTACK_MAX_PAGES +#define KSTACK_MAX_PAGES 32 +#endif + #ifndef PMAP_SHPGPERPROC #define PMAP_SHPGPERPROC 200 #endif @@ -727,10 +731,6 @@ return 0; } -#ifndef KSTACK_MAX_PAGES -#define KSTACK_MAX_PAGES 32 -#endif - /* * Create the KSTACK for a new thread. * This routine directly affects the fork perf for a process/thread. @@ -738,27 +738,14 @@ void pmap_new_thread(struct thread *td, int pages) { - vm_offset_t *ks; /* Bounds check */ if (pages <= 1) pages = KSTACK_PAGES; else if (pages > KSTACK_MAX_PAGES) pages = KSTACK_MAX_PAGES; - - /* - * Use contigmalloc for user area so that we can use a region - * 7 address for it which makes it impossible to accidentally - * lose when recording a trapframe. - */ - ks = contigmalloc(pages * PAGE_SIZE, M_PMAP, M_WAITOK, 0ul, - 256*1024*1024 - 1, PAGE_SIZE, 256*1024*1024); - if (ks == NULL) - panic("pmap_new_thread: could not contigmalloc %d pages\n", - pages); - - td->td_md.md_kstackvirt = ks; - td->td_kstack = IA64_PHYS_TO_RR7(ia64_tpa((u_int64_t)ks)); + td->td_kstack = (vm_offset_t)malloc(pages * PAGE_SIZE, M_PMAP, + M_WAITOK); td->td_kstack_pages = pages; } @@ -769,12 +756,10 @@ void pmap_dispose_thread(struct thread *td) { - int pages; - pages = td->td_kstack_pages; - contigfree(td->td_md.md_kstackvirt, pages * PAGE_SIZE, M_PMAP); - td->td_md.md_kstackvirt = NULL; + free((void*)td->td_kstack, M_PMAP); td->td_kstack = 0; + td->td_kstack_pages = 0; } /* @@ -784,16 +769,9 @@ pmap_new_altkstack(struct thread *td, int pages) { - /* - * Shuffle the original stack. Save the virtual kstack address - * instead of the physical address because 1) we can derive the - * physical address from the virtual address and 2) we need the - * virtual address in pmap_dispose_thread. - */ + td->td_altkstack = td->td_kstack; td->td_altkstack_obj = td->td_kstack_obj; - td->td_altkstack = (vm_offset_t)td->td_md.md_kstackvirt; td->td_altkstack_pages = td->td_kstack_pages; - pmap_new_thread(td, pages); } @@ -802,13 +780,7 @@ { pmap_dispose_thread(td); - - /* - * Restore the original kstack. Note that td_altkstack holds the - * virtual kstack address of the previous kstack. - */ - td->td_md.md_kstackvirt = (void*)td->td_altkstack; - td->td_kstack = IA64_PHYS_TO_RR7(ia64_tpa(td->td_altkstack)); + td->td_kstack = td->td_altkstack; td->td_kstack_obj = td->td_altkstack_obj; td->td_kstack_pages = td->td_altkstack_pages; td->td_altkstack = 0; ==== //depot/projects/ia64_epc/sys/ia64/include/proc.h#2 (text+ko) ==== @@ -37,7 +37,6 @@ struct mdthread { u_long md_flags; - void *md_kstackvirt; /* virtual address of td_kstack */ vm_offset_t md_bspstore; /* initial ar.bspstore */ register_t md_savecrit; }; @@ -50,7 +49,7 @@ #define MDP_UAC_MASK (MDP_UAC_NOPRINT | MDP_UAC_NOFIX | MDP_UAC_SIGBUS) struct mdproc { - struct user *md_uservirt; /* virtual address of p_addr */ + int __dummy; /* Avoid having an empty struct. */ }; #endif /* !_MACHINE_PROC_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Apr 16 09:28:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EBE7037B404; Wed, 16 Apr 2003 09:28:30 -0700 (PDT) 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 2459C37B401 for ; Wed, 16 Apr 2003 09:28:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 076B443FD7 for ; Wed, 16 Apr 2003 09:28:29 -0700 (PDT) (envelope-from jhb@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 h3GGSS0U078234 for ; Wed, 16 Apr 2003 09:28:28 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3GGSSlg078231 for perforce@freebsd.org; Wed, 16 Apr 2003 09:28:28 -0700 (PDT) Date: Wed, 16 Apr 2003 09:28:28 -0700 (PDT) Message-Id: <200304161628.h3GGSSlg078231@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29064 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 16:28:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=29064 Change 29064 by jhb@jhb_laptop on 2003/04/16 09:27:41 IFC @29063. Affected files ... .. //depot/projects/smpng/sys/conf/Makefile.alpha#17 integrate .. //depot/projects/smpng/sys/conf/Makefile.i386#17 integrate .. //depot/projects/smpng/sys/conf/Makefile.ia64#23 integrate .. //depot/projects/smpng/sys/conf/Makefile.pc98#16 integrate .. //depot/projects/smpng/sys/conf/Makefile.powerpc#20 integrate .. //depot/projects/smpng/sys/conf/Makefile.sparc64#20 integrate .. //depot/projects/smpng/sys/conf/Makefile.x86_64#4 integrate .. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#9 integrate .. //depot/projects/smpng/sys/dev/ata/ata-pci.c#30 integrate .. //depot/projects/smpng/sys/dev/bge/if_bge.c#23 integrate .. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#32 integrate .. //depot/projects/smpng/sys/dev/gem/if_gem_pci.c#8 integrate .. //depot/projects/smpng/sys/dev/hea/hea_pci.c#4 integrate .. //depot/projects/smpng/sys/dev/hfa/hfa_pci.c#3 integrate .. //depot/projects/smpng/sys/dev/hme/if_hme_pci.c#6 integrate .. //depot/projects/smpng/sys/dev/lge/if_lge.c#13 integrate .. //depot/projects/smpng/sys/dev/nge/if_nge.c#23 integrate .. //depot/projects/smpng/sys/dev/pci/pci.c#23 integrate .. //depot/projects/smpng/sys/dev/pci/pci_if.m#2 integrate .. //depot/projects/smpng/sys/dev/pci/pci_private.h#6 integrate .. //depot/projects/smpng/sys/dev/pci/pcivar.h#9 integrate .. //depot/projects/smpng/sys/dev/pdq/if_fpa.c#5 integrate .. //depot/projects/smpng/sys/dev/sound/pci/ds1.c#8 integrate .. //depot/projects/smpng/sys/dev/sound/pci/ich.c#19 integrate .. //depot/projects/smpng/sys/dev/sound/pci/via8233.c#5 integrate .. //depot/projects/smpng/sys/dev/txp/if_txp.c#14 integrate .. //depot/projects/smpng/sys/dev/wl/if_wl.c#11 integrate .. //depot/projects/smpng/sys/i386/isa/if_le.c#10 integrate .. //depot/projects/smpng/sys/ia64/conf/GENERIC#31 integrate .. //depot/projects/smpng/sys/pci/if_dc.c#31 integrate .. //depot/projects/smpng/sys/pci/if_pcn.c#14 integrate .. //depot/projects/smpng/sys/pci/if_rl.c#26 integrate .. //depot/projects/smpng/sys/pci/if_sf.c#16 integrate .. //depot/projects/smpng/sys/pci/if_sis.c#22 integrate .. //depot/projects/smpng/sys/pci/if_sk.c#15 integrate .. //depot/projects/smpng/sys/pci/if_ste.c#18 integrate .. //depot/projects/smpng/sys/pci/if_ti.c#24 integrate .. //depot/projects/smpng/sys/pci/if_tl.c#13 integrate .. //depot/projects/smpng/sys/pci/if_vr.c#15 integrate .. //depot/projects/smpng/sys/pci/if_wb.c#14 integrate .. //depot/projects/smpng/sys/pci/if_xl.c#25 integrate .. //depot/projects/smpng/sys/security/mac_test/mac_test.c#11 integrate Differences ... ==== //depot/projects/smpng/sys/conf/Makefile.alpha#17 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.alpha -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.alpha 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.126 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.127 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 .if !defined(S) .if exists(./@/.) ==== //depot/projects/smpng/sys/conf/Makefile.i386#17 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.i386,v 1.258 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.i386,v 1.259 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 STD8X16FONT?= iso ==== //depot/projects/smpng/sys/conf/Makefile.ia64#23 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.ia64 -- with config changes. # Copyright 1990 W. Jolitz # from: src/sys/conf/Makefile.alpha,v 1.76 -# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.54 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.55 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ GCC3= you bet # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 STD8X16FONT?= iso ==== //depot/projects/smpng/sys/conf/Makefile.pc98#16 (text+ko) ==== @@ -3,7 +3,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.159 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.160 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 .if !defined(S) .if exists(./@/.) ==== //depot/projects/smpng/sys/conf/Makefile.powerpc#20 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.powerpc -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.266 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.267 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/smpng/sys/conf/Makefile.sparc64#20 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.sparc64 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.26 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.27 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 STD8X16FONT?= iso ==== //depot/projects/smpng/sys/conf/Makefile.x86_64#4 (text+ko) ==== @@ -2,7 +2,7 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49 -# $FreeBSD: src/sys/conf/Makefile.x86_64,v 1.4 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.x86_64,v 1.5 2003/04/15 21:29:11 phk Exp $ # # Makefile for FreeBSD # @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500011 +%VERSREQ= 500012 STD8X16FONT?= iso ==== //depot/projects/smpng/sys/dev/ata/ata-chipset.c#9 (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/dev/ata/ata-chipset.c,v 1.19 2003/04/10 12:56:33 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.20 2003/04/16 08:30:40 sos Exp $ */ #include "opt_ata.h" #include @@ -1512,12 +1512,12 @@ { ATA_SIS651, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 651" }, /* ext south */ { ATA_SIS650, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 650" }, /* ext south */ { ATA_SIS648, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 648" }, /* ext south */ - { ATA_SIS646, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 645DX" },/* ext south */ + { ATA_SIS646, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 645DX"},/* ext south */ { ATA_SIS645, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 645" }, /* ext south */ { ATA_SIS640, 0x00, SIS_SOUTH, 0, ATA_UDMA4, "SiS 640" }, /* ext south */ { ATA_SIS635, 0x00, SIS100NEW, 0, ATA_UDMA5, "SiS 635" }, /* 1chip */ { ATA_SIS633, 0x00, SIS100NEW, 0, ATA_UDMA5, "SiS 633" }, /* unknown */ - { ATA_SIS630, 0x30, SIS100OLD, 0, ATA_UDMA5, "SiS 630S" }, /* 1chip */ + { ATA_SIS630, 0x30, SIS100OLD, 0, ATA_UDMA5, "SiS 630S"}, /* 1chip */ { ATA_SIS630, 0x00, SIS66, 0, ATA_UDMA4, "SiS 630" }, /* 1chip */ { ATA_SIS620, 0x00, SIS66, 0, ATA_UDMA4, "SiS 620" }, /* 1chip */ ==== //depot/projects/smpng/sys/dev/ata/ata-pci.c#30 (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/dev/ata/ata-pci.c,v 1.59 2003/04/07 14:12:12 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.60 2003/04/16 08:30:10 sos Exp $ */ #include "opt_ata.h" @@ -509,10 +509,11 @@ if ((error = ctlr->allocate(dev, ch))) return error; + if (ctlr->chip) + ch->chiptype = ctlr->chip->chipid; ch->device[MASTER].setmode = ctlr->setmode; ch->device[SLAVE].setmode = ctlr->setmode; ch->locking = ctlr->locking; - ch->chiptype = ctlr->chip->chipid; return ata_probe(dev); } ==== //depot/projects/smpng/sys/dev/bge/if_bge.c#23 (text+ko) ==== @@ -64,7 +64,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.33 2003/04/15 06:37:21 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.34 2003/04/16 03:16:53 mdodd Exp $"); #include #include @@ -1448,7 +1448,6 @@ device_t dev; { int s; - u_int32_t command; struct ifnet *ifp; struct bge_softc *sc; u_int32_t hwcfg = 0; @@ -1466,14 +1465,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - - if (!(command & PCIM_CMD_MEMEN)) { - printf("bge%d: failed to enable memory mapping!\n", unit); - error = ENXIO; - goto fail; - } rid = BGE_PCI_BAR0; sc->bge_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, ==== //depot/projects/smpng/sys/dev/fxp/if_fxp.c#32 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.171 2003/04/15 06:37:24 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.173 2003/04/16 09:16:55 sobomax Exp $"); #include #include @@ -387,12 +387,9 @@ s = splimp(); /* - * Enable bus mastering. Enable memory/port space too, in case - * BIOS/Prom forgot about it. + * Enable bus mastering. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); val = pci_read_config(dev, PCIR_COMMAND, 2); fxp_powerstate_d0(dev); @@ -411,14 +408,11 @@ m2 = PCIM_CMD_MEMEN; } - if (val & m1) { - sc->rtp = - (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; - sc->rgd = (m1 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; - sc->mem = bus_alloc_resource(dev, sc->rtp, &sc->rgd, + sc->rtp = (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; + sc->rgd = (m1 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; + sc->mem = bus_alloc_resource(dev, sc->rtp, &sc->rgd, 0, ~0, 1, RF_ACTIVE); - } - if (sc->mem == NULL && (val & m2)) { + if (sc->mem == NULL) { sc->rtp = (m2 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; sc->rgd = (m2 == PCIM_CMD_MEMEN)? FXP_PCI_MMBA : FXP_PCI_IOBA; @@ -427,7 +421,6 @@ } if (!sc->mem) { - device_printf(dev, "could not map device registers\n"); error = ENXIO; goto fail; } ==== //depot/projects/smpng/sys/dev/gem/if_gem_pci.c#8 (text+ko) ==== @@ -26,7 +26,7 @@ * * from: NetBSD: if_gem_pci.c,v 1.7 2001/10/18 15:09:15 thorpej Exp * - * $FreeBSD: src/sys/dev/gem/if_gem_pci.c,v 1.8 2003/04/15 06:37:24 mdodd Exp $ + * $FreeBSD: src/sys/dev/gem/if_gem_pci.c,v 1.9 2003/04/16 03:16:54 mdodd Exp $ */ /* @@ -163,7 +163,6 @@ * cases not do this for us on sparc64 machines. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); sc->sc_dev = dev; sc->sc_pci = 1; /* XXX */ ==== //depot/projects/smpng/sys/dev/hea/hea_pci.c#4 (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/dev/hea/hea_pci.c,v 1.4 2002/10/02 04:42:24 mdodd Exp $ + * $FreeBSD: src/sys/dev/hea/hea_pci.c,v 1.5 2003/04/16 03:16:54 mdodd Exp $ */ /* @@ -154,19 +154,6 @@ error = 0; pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); - - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_BUSMASTEREN) == 0) { - device_printf(dev, "Unable to enable PCI busmastering.\n"); - error = ENXIO; - goto fail; - } - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "Unable to enable PCI memory resources.\n"); - error = ENXIO; - goto fail; - } sc->mem_rid = PCIR_MAPS; sc->mem_type = SYS_RES_MEMORY; ==== //depot/projects/smpng/sys/dev/hfa/hfa_pci.c#3 (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/dev/hfa/hfa_pci.c,v 1.2 2002/06/07 01:55:42 mdodd Exp $ + * $FreeBSD: src/sys/dev/hfa/hfa_pci.c,v 1.3 2003/04/16 03:16:54 mdodd Exp $ */ /* @@ -129,19 +129,6 @@ error = 0; pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); - - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_BUSMASTEREN) == 0) { - device_printf(dev, "Unable to enable PCI busmastering.\n"); - error = ENXIO; - goto fail; - } - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "Unable to enable PCI memory resources.\n"); - error = ENXIO; - goto fail; - } sc->mem_rid = PCA200E_PCI_MEMBASE; sc->mem_type = SYS_RES_MEMORY; ==== //depot/projects/smpng/sys/dev/hme/if_hme_pci.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ * * from: NetBSD: if_hme_pci.c,v 1.4 2001/08/27 22:18:49 augustss Exp * - * $FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.5 2003/04/15 06:37:24 mdodd Exp $ + * $FreeBSD: src/sys/dev/hme/if_hme_pci.c,v 1.6 2003/04/16 03:16:54 mdodd Exp $ */ /* @@ -137,7 +137,6 @@ * gross; but the hme comes up with neither enabled. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_MEMORY); sc->sc_pci = 1; /* XXXXX should all be done in bus_dma. */ sc->sc_dev = dev; ==== //depot/projects/smpng/sys/dev/lge/if_lge.c#13 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/lge/if_lge.c,v 1.19 2003/04/15 06:37:24 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/lge/if_lge.c,v 1.20 2003/04/16 03:16:55 mdodd Exp $"); #include #include @@ -492,7 +492,6 @@ { int s; u_char eaddr[ETHER_ADDR_LEN]; - u_int32_t command; struct lge_softc *sc; struct ifnet *ifp; int unit, error = 0, rid; @@ -530,23 +529,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - -#ifdef LGE_USEIOSPACE - if (!(command & PCIM_CMD_PORTEN)) { - printf("lge%d: failed to enable I/O ports!\n", unit); - error = ENXIO;; - goto fail; - } -#else - if (!(command & PCIM_CMD_MEMEN)) { - printf("lge%d: failed to enable memory mapping!\n", unit); - error = ENXIO;; - goto fail; - } -#endif rid = LGE_RID; sc->lge_res = bus_alloc_resource(dev, LGE_RES, &rid, ==== //depot/projects/smpng/sys/dev/nge/if_nge.c#23 (text+ko) ==== @@ -86,7 +86,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.44 2003/04/15 06:37:25 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/nge/if_nge.c,v 1.45 2003/04/16 03:16:55 mdodd Exp $"); #include #include @@ -822,7 +822,6 @@ { int s; u_char eaddr[ETHER_ADDR_LEN]; - u_int32_t command; struct nge_softc *sc; struct ifnet *ifp; int unit, error = 0, rid; @@ -864,23 +863,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - -#ifdef NGE_USEIOSPACE - if (!(command & PCIM_CMD_PORTEN)) { - printf("nge%d: failed to enable I/O ports!\n", unit); - error = ENXIO;; - goto fail; - } -#else - if (!(command & PCIM_CMD_MEMEN)) { - printf("nge%d: failed to enable memory mapping!\n", unit); - error = ENXIO;; - goto fail; - } -#endif rid = NGE_RID; sc->nge_res = bus_alloc_resource(dev, NGE_RES, &rid, ==== //depot/projects/smpng/sys/dev/pci/pci.c#23 (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/dev/pci/pci.c,v 1.213 2003/04/15 19:38:18 imp Exp $ + * $FreeBSD: src/sys/dev/pci/pci.c,v 1.214 2003/04/16 03:15:08 mdodd Exp $ * */ @@ -568,42 +568,81 @@ PCI_WRITE_CONFIG(dev, child, PCIR_COMMAND, command, 2); } -void +int pci_enable_busmaster_method(device_t dev, device_t child) { pci_set_command_bit(dev, child, PCIM_CMD_BUSMASTEREN); + return (0); } -void +int pci_disable_busmaster_method(device_t dev, device_t child) { pci_clear_command_bit(dev, child, PCIM_CMD_BUSMASTEREN); + return (0); } -void +int pci_enable_io_method(device_t dev, device_t child, int space) { + u_int16_t command; + u_int16_t bit; + char *error; + + bit = 0; + error = NULL; + switch(space) { case SYS_RES_IOPORT: - pci_set_command_bit(dev, child, PCIM_CMD_PORTEN); + bit = PCIM_CMD_PORTEN; + error = "port"; break; case SYS_RES_MEMORY: - pci_set_command_bit(dev, child, PCIM_CMD_MEMEN); + bit = PCIM_CMD_MEMEN; + error = "memory"; + break; + default: + return (EINVAL); break; } + pci_set_command_bit(dev, child, bit); + command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2); + if (command & bit) + return (0); + device_printf(child, "failed to enable %s mapping!\n", error); + return (ENXIO); } -void +int pci_disable_io_method(device_t dev, device_t child, int space) { + u_int16_t command; + u_int16_t bit; + char *error; + + bit = 0; + error = NULL; + switch(space) { case SYS_RES_IOPORT: - pci_clear_command_bit(dev, child, PCIM_CMD_PORTEN); + bit = PCIM_CMD_PORTEN; + error = "port"; break; case SYS_RES_MEMORY: - pci_clear_command_bit(dev, child, PCIM_CMD_MEMEN); + bit = PCIM_CMD_MEMEN; + error = "memory"; + break; + default: + return (EINVAL); break; } + pci_clear_command_bit(dev, child, bit); + command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2); + if (command & bit) { + device_printf(child, "failed to disable %s mapping!\n", error); + return (ENXIO); + } + return (0); } /* @@ -1326,7 +1365,8 @@ * Enable the I/O mode. We should also be allocating * resources too. XXX */ - PCI_ENABLE_IO(dev, child, type); + if (PCI_ENABLE_IO(dev, child, type)) + return (NULL); break; } } ==== //depot/projects/smpng/sys/dev/pci/pci_if.m#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/dev/pci/pci_if.m,v 1.4 2001/02/27 23:13:20 peter Exp $ +# $FreeBSD: src/sys/dev/pci/pci_if.m,v 1.5 2003/04/16 03:15:08 mdodd Exp $ # #include @@ -56,23 +56,23 @@ int state; }; -METHOD void enable_busmaster { +METHOD int enable_busmaster { device_t dev; device_t child; }; -METHOD void disable_busmaster { +METHOD int disable_busmaster { device_t dev; device_t child; }; -METHOD void enable_io { +METHOD int enable_io { device_t dev; device_t child; int space; }; -METHOD void disable_io { +METHOD int disable_io { device_t dev; device_t child; int space; ==== //depot/projects/smpng/sys/dev/pci/pci_private.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/dev/pci/pci_private.h,v 1.7 2003/02/17 21:20:35 imp Exp $ + * $FreeBSD: src/sys/dev/pci/pci_private.h,v 1.8 2003/04/16 03:15:08 mdodd Exp $ * */ @@ -54,10 +54,10 @@ int reg, int width); void pci_write_config_method(device_t dev, device_t child, int reg, u_int32_t val, int width); -void pci_enable_busmaster_method(device_t dev, device_t child); -void pci_disable_busmaster_method(device_t dev, device_t child); -void pci_enable_io_method(device_t dev, device_t child, int space); -void pci_disable_io_method(device_t dev, device_t child, int space); +int pci_enable_busmaster_method(device_t dev, device_t child); +int pci_disable_busmaster_method(device_t dev, device_t child); +int pci_enable_io_method(device_t dev, device_t child, int space); +int pci_disable_io_method(device_t dev, device_t child, int space); struct resource *pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); ==== //depot/projects/smpng/sys/dev/pci/pcivar.h#9 (text+ko) ==== @@ -23,7 +23,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/dev/pci/pcivar.h,v 1.60 2002/11/27 06:41:28 imp Exp $ + * $FreeBSD: src/sys/dev/pci/pcivar.h,v 1.61 2003/04/16 03:15:08 mdodd Exp $ * */ @@ -249,28 +249,28 @@ * These should be used in preference to manually manipulating * configuration space. */ -static __inline void +static __inline int pci_enable_busmaster(device_t dev) { - PCI_ENABLE_BUSMASTER(device_get_parent(dev), dev); + return(PCI_ENABLE_BUSMASTER(device_get_parent(dev), dev)); } -static __inline void +static __inline int pci_disable_busmaster(device_t dev) { - PCI_DISABLE_BUSMASTER(device_get_parent(dev), dev); + return(PCI_DISABLE_BUSMASTER(device_get_parent(dev), dev)); } -static __inline void +static __inline int pci_enable_io(device_t dev, int space) { - PCI_ENABLE_IO(device_get_parent(dev), dev, space); + return(PCI_ENABLE_IO(device_get_parent(dev), dev, space)); } -static __inline void +static __inline int pci_disable_io(device_t dev, int space) { - PCI_DISABLE_IO(device_get_parent(dev), dev, space); + return(PCI_DISABLE_IO(device_get_parent(dev), dev, space)); } /* ==== //depot/projects/smpng/sys/dev/pdq/if_fpa.c#5 (text+ko) ==== @@ -21,7 +21,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/dev/pdq/if_fpa.c,v 1.18 2003/04/15 06:37:25 mdodd Exp $ + * $FreeBSD: src/sys/dev/pdq/if_fpa.c,v 1.19 2003/04/16 03:16:55 mdodd Exp $ * */ @@ -119,21 +119,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - - if (!(command & PCIM_CMD_PORTEN)) { - device_printf(dev, "Failed to enable PCI I/O ports.\n"); - error = ENXIO; - goto bad; - } - - if (!(command & PCIM_CMD_MEMEN)) { - device_printf(dev, "Failed to enable PCI memory mapping.\n"); - error = ENXIO; - goto bad; - } command = pci_read_config(dev, PCIR_LATTIMER, 1); if (command < DEFPA_LATENCY) { ==== //depot/projects/smpng/sys/dev/sound/pci/ds1.c#8 (text+ko) ==== @@ -33,7 +33,7 @@ #include #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.31 2003/02/20 17:31:11 cognet Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.32 2003/04/16 05:03:35 simokawa Exp $"); /* -------------------------------------------------------------------- */ @@ -828,7 +828,7 @@ if (sc->regbase == NULL) { if (bus_dma_tag_create(NULL, 2, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, - NULL, NULL, memsz, 1, 1, 0, &sc->control_dmat)) + NULL, NULL, memsz, 1, memsz, 0, &sc->control_dmat)) return -1; if (bus_dmamem_alloc(sc->control_dmat, &buf, BUS_DMA_NOWAIT, &sc->map)) return -1; ==== //depot/projects/smpng/sys/dev/sound/pci/ich.c#19 (text+ko) ==== @@ -32,7 +32,7 @@ #include #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.27 2003/04/04 07:15:19 orion Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.28 2003/04/16 03:16:55 mdodd Exp $"); /* -------------------------------------------------------------------- */ @@ -685,7 +685,6 @@ pci_write_config(dev, PCIR_ICH_LEGACY, ICH_LEGACY_ENABLE, 1); } - pci_enable_io(dev, SYS_RES_IOPORT); /* * Enable bus master. On ich4 this may prevent the detection of * the primary codec becoming ready in ich_init(). ==== //depot/projects/smpng/sys/dev/sound/pci/via8233.c#5 (text+ko) ==== @@ -44,7 +44,7 @@ #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/via8233.c,v 1.8 2003/03/26 05:51:13 orion Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/via8233.c,v 1.9 2003/04/16 03:16:55 mdodd Exp $"); #define VIA8233_PCI_ID 0x30591106 @@ -739,7 +739,6 @@ return ENXIO; } - pci_enable_io(dev, SYS_RES_IOPORT); pci_set_powerstate(dev, PCI_POWERSTATE_D0); pci_enable_busmaster(dev); ==== //depot/projects/smpng/sys/dev/txp/if_txp.c#14 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/txp/if_txp.c,v 1.16 2003/04/15 06:37:27 mdodd Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/txp/if_txp.c,v 1.17 2003/04/16 03:16:55 mdodd Exp $"); #include #include @@ -90,7 +90,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sys/dev/txp/if_txp.c,v 1.16 2003/04/15 06:37:27 mdodd Exp $"; + "$FreeBSD: src/sys/dev/txp/if_txp.c,v 1.17 2003/04/16 03:16:55 mdodd Exp $"; #endif /* @@ -212,7 +212,6 @@ { struct txp_softc *sc; struct ifnet *ifp; - u_int32_t command; u_int16_t p1; u_int32_t p2; int unit, error = 0, rid; @@ -251,23 +250,6 @@ * Map control/status registers. */ pci_enable_busmaster(dev); - pci_enable_io(dev, SYS_RES_IOPORT); - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 4); - -#ifdef TXP_USEIOSPACE - if (!(command & PCIM_CMD_PORTEN)) { - device_printf(dev, "failed to enable I/O ports!\n"); - error = ENXIO; - goto fail; - } -#else - if (!(command & PCIM_CMD_MEMEN)) { - device_printf(dev, "failed to enable memory mapping!\n"); - error = ENXIO; - goto fail; - } -#endif rid = TXP_RID; sc->sc_res = bus_alloc_resource(dev, TXP_RES, &rid, ==== //depot/projects/smpng/sys/dev/wl/if_wl.c#11 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/wl/if_wl.c,v 1.47 2003/02/19 05:47:17 imp Exp $ */ +/* $FreeBSD: src/sys/dev/wl/if_wl.c,v 1.48 2003/04/16 15:52:20 jhay Exp $ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -363,7 +363,7 @@ wlprobe(struct isa_device *id) { struct wl_softc *sc = &wl_softc[id->id_unit]; - register short base = id->id_iobase; + short base = id->id_iobase; char *str = "wl%d: board out of range [0..%d]\n"; u_char inbuf[100]; unsigned long oldpri; @@ -434,10 +434,10 @@ wlattach(struct isa_device *id) { struct wl_softc *sc = (struct wl_softc *) &wl_softc[id->id_unit]; - register short base = id->id_iobase; + short base = id->id_iobase; int i,j; u_char unit = id->id_unit; - register struct ifnet *ifp = &sc->wl_if; + struct ifnet *ifp = &sc->wl_if; #ifdef WLDEBUG printf("wlattach: base %x, unit %d\n", base, unit); @@ -526,7 +526,7 @@ static void wldump(int unit) { - register struct wl_softc *sp = WLSOFTC(unit); + struct wl_softc *sp = WLSOFTC(unit); int base = sp->base; int i; @@ -555,7 +555,7 @@ static void wlinitmmc(int unit) { - register struct wl_softc *sp = WLSOFTC(unit); + struct wl_softc *sp = WLSOFTC(unit); int base = sp->base; int configured; int mode = sp->mode; @@ -664,7 +664,7 @@ static void wlinit(void *xsc) { - register struct wl_softc *sc = xsc; + struct wl_softc *sc = xsc; struct ifnet *ifp = &sc->wl_if; int stat; u_long oldpri; @@ -708,7 +708,7 @@ static int wlhwrst(int unit) { - register struct wl_softc *sc = WLSOFTC(unit); + struct wl_softc *sc = WLSOFTC(unit); #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) @@ -754,14 +754,14 @@ static void wlbldcu(int unit) { - register struct wl_softc *sc = WLSOFTC(unit); + struct wl_softc *sc = WLSOFTC(unit); short base = sc->base; scp_t scp; iscp_t iscp; scb_t scb; ac_t cb; tbd_t tbd; - int i; + int i; bzero(&scp, sizeof(scp)); scp.scp_sysbus = 0; @@ -831,11 +831,11 @@ static void wlstart(struct ifnet *ifp) { - int unit = ifp->if_unit; - struct mbuf *m; - register struct wl_softc *sc = WLSOFTC(unit); - short base = sc->base; - int scb_status, cu_status, scb_command; + int unit = ifp->if_unit; + struct mbuf *m; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Apr 16 13:11:15 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 376BC37B404; Wed, 16 Apr 2003 13:11:15 -0700 (PDT) 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 C1ADC37B401 for ; Wed, 16 Apr 2003 13:11:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 489EF43F85 for ; Wed, 16 Apr 2003 13:11:13 -0700 (PDT) (envelope-from jhb@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 h3GKBD0U004199 for ; Wed, 16 Apr 2003 13:11:13 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3GKBC9R004192 for perforce@freebsd.org; Wed, 16 Apr 2003 13:11:12 -0700 (PDT) Date: Wed, 16 Apr 2003 13:11:12 -0700 (PDT) Message-Id: <200304162011.h3GKBC9R004192@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29083 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 20:11:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=29083 Change 29083 by jhb@jhb_laptop on 2003/04/16 13:10:20 IFC @29082 so alpha LINT builds. Affected files ... .. //depot/projects/smpng/sys/alpha/linux/linux.h#7 integrate .. //depot/projects/smpng/sys/alpha/linux/linux_machdep.c#12 integrate .. //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#25 integrate .. //depot/projects/smpng/sys/compat/linux/linux_misc.c#35 integrate .. //depot/projects/smpng/sys/dev/wl/if_wl.c#12 integrate .. //depot/projects/smpng/sys/dev/wl/if_wl.h#3 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/linux/linux.h#7 (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/linux/linux.h,v 1.57 2003/02/03 17:43:20 ume Exp $ + * $FreeBSD: src/sys/alpha/linux/linux.h,v 1.58 2003/04/16 20:04:47 jhb Exp $ */ #ifndef _ALPHA_LINUX_LINUX_H_ @@ -38,8 +38,8 @@ */ extern u_char linux_debug_map[]; #define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name) -#define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)p->p_pid -#define LMSG(fmt) "linux(%ld): "fmt"\n", (long)p->p_pid +#define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)td->td_proc->p_pid +#define LMSG(fmt) "linux(%ld): "fmt"\n", (long)td->td_proc->p_pid #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_LINUX); ==== //depot/projects/smpng/sys/alpha/linux/linux_machdep.c#12 (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/linux/linux_machdep.c,v 1.26 2003/03/03 09:17:12 des Exp $ + * $FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.28 2003/04/16 20:05:42 jhb Exp $ */ #include @@ -133,8 +133,8 @@ #ifdef DEBUG if (ldebug(clone)) { - printf(ARGS(clone, "flags %x, stack %x"), - (unsigned int)args->flags, (unsigned int)args->stack); + printf(ARGS(clone, "flags %x, stack %p"), + (unsigned int)args->flags, args->stack); if (args->flags & CLONE_PID) printf(LMSG("CLONE_PID not yet supported")); } @@ -208,7 +208,7 @@ #ifdef DEBUG if (ldebug(mmap)) - printf(ARGS(mmap, "%p, 0x%lx, 0x%x, 0x%x, 0x%x, 0x%lx"), + printf(ARGS(mmap, "%p, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx"), (void *)linux_args->addr, linux_args->len, linux_args->prot, linux_args->flags, linux_args->fd, linux_args->pos); @@ -281,7 +281,7 @@ bsd_args.pad = 0; #ifdef DEBUG if (ldebug(mmap)) - printf(ARGS(mmap, "%p, 0x%lx, 0x%x, 0x%x, 0x%x, 0x%lx)", + printf(ARGS(mmap, "%p, 0x%lx, 0x%x, 0x%x, 0x%x, 0x%lx"), (void *)bsd_args.addr, bsd_args.len, bsd_args.prot, @@ -294,7 +294,7 @@ error = mmap(td, &bsd_args); #ifdef DEBUG if (ldebug(mmap)) - printf(LMSG("mmap returns %d, 0x%lx", error, td->td_retval[0]); + printf(LMSG("mmap returns %d, 0x%lx"), error, td->td_retval[0]); #endif return (error); } @@ -314,7 +314,7 @@ #ifdef DEBUG if (ldebug(rt_sigsuspend)) - printf(ARGS(rt_sigsuspend, "%p, %d"), + printf(ARGS(rt_sigsuspend, "%p, %zd"), (void *)uap->newset, uap->sigsetsize); #endif if (uap->sigsetsize != sizeof(l_sigset_t)) @@ -338,7 +338,7 @@ #ifdef DEBUG if (ldebug(mprotect)) - printf(ARGS(mprotect, "%p, 0x%lx, 0x%x)", + printf(ARGS(mprotect, "%p, 0x%zx, 0x%lx"), (void *)uap->addr, uap->len, uap->prot); #endif return (mprotect(td, (void *)uap)); @@ -352,7 +352,7 @@ #ifdef DEBUG if (ldebug(munmap)) - printf(ARGS(munmap, "%p, 0x%lx", + printf(ARGS(munmap, "%p, 0x%lx"), (void *)uap->addr, uap->len); #endif return (munmap(td, (void *)uap)); ==== //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#25 (text+ko) ==== @@ -38,7 +38,7 @@ * * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94 * - * $FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.62 2003/03/13 22:45:43 jhb Exp $ + * $FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.63 2003/04/16 19:46:26 jhb Exp $ */ #include @@ -116,9 +116,9 @@ unsigned long memfree; /* free memory in bytes */ unsigned long memshared; /* shared memory ??? */ unsigned long buffers, cached; /* buffer / cache memory ??? */ - u_quad_t swaptotal; /* total swap space in bytes */ - u_quad_t swapused; /* used swap space in bytes */ - u_quad_t swapfree; /* free swap space in bytes */ + unsigned long long swaptotal; /* total swap space in bytes */ + unsigned long long swapused; /* used swap space in bytes */ + unsigned long long swapfree; /* free swap space in bytes */ vm_object_t object; memtotal = physmem * PAGE_SIZE; @@ -209,20 +209,20 @@ "cpu\t\t\t: Alpha\n" "cpu model\t\t: %s\n" "cpu variation\t\t: %ld\n" - "cpu revision\t\t: %ld\n" + "cpu revision\t\t: %d\n" "cpu serial number\t: %s\n" "system type\t\t: %s\n" "system variation\t: %s\n" - "system revision\t\t: %ld\n" + "system revision\t\t: %d\n" "system serial number\t: %s\n" "cycle frequency [Hz]\t: %lu\n" - "timer frequency [Hz]\t: %lu\n" + "timer frequency [Hz]\t: %u\n" "page size [bytes]\t: %ld\n" "phys. address bits\t: %ld\n" "max. addr. space #\t: %ld\n" - "BogoMIPS\t\t: %lu.%02lu\n" - "kernel unaligned acc\t: %ld (pc=%lx,va=%lx)\n" - "user unaligned acc\t: %ld (pc=%lx,va=%lx)\n" + "BogoMIPS\t\t: %u.%02u\n" + "kernel unaligned acc\t: %d (pc=%x,va=%x)\n" + "user unaligned acc\t: %d (pc=%x,va=%x)\n" "platform string\t\t: %s\n" "cpus detected\t\t: %d\n" , @@ -421,7 +421,7 @@ cnt.v_swappgsout, cnt.v_intr, cnt.v_swtch, - (quad_t)boottime.tv_sec); + (long long)boottime.tv_sec); return (0); } @@ -435,7 +435,7 @@ getmicrouptime(&tv); sbuf_printf(sb, "%lld.%02ld %ld.%02ld\n", - (quad_t)tv.tv_sec, tv.tv_usec / 10000, + (long long)tv.tv_sec, tv.tv_usec / 10000, T2S(cp_time[CP_IDLE]), T2J(cp_time[CP_IDLE]) % 100); return (0); } @@ -514,8 +514,8 @@ PS_ADD("timeout", "%u", 0); /* XXX */ PS_ADD("itrealvalue", "%u", 0); /* XXX */ PS_ADD("starttime", "%d", 0); /* XXX */ - PS_ADD("vsize", "%u", kp.ki_size); - PS_ADD("rss", "%u", P2K(kp.ki_rssize)); + PS_ADD("vsize", "%ju", (uintmax_t)kp.ki_size); + PS_ADD("rss", "%ju", P2K((uintmax_t)kp.ki_rssize)); PS_ADD("rlim", "%u", 0); /* XXX */ PS_ADD("startcode", "%u", (unsigned)0); PS_ADD("endcode", "%u", 0); /* XXX */ @@ -625,15 +625,15 @@ * could also compute VmLck, but I don't really care enough to * implement it. Submissions are welcome. */ - sbuf_printf(sb, "VmSize:\t%8u kB\n", B2K(kp.ki_size)); + sbuf_printf(sb, "VmSize:\t%8ju kB\n", B2K((uintmax_t)kp.ki_size)); sbuf_printf(sb, "VmLck:\t%8u kB\n", P2K(0)); /* XXX */ - sbuf_printf(sb, "VmRss:\t%8u kB\n", P2K(kp.ki_rssize)); - sbuf_printf(sb, "VmData:\t%8u kB\n", P2K(kp.ki_dsize)); - sbuf_printf(sb, "VmStk:\t%8u kB\n", P2K(kp.ki_ssize)); - sbuf_printf(sb, "VmExe:\t%8u kB\n", P2K(kp.ki_tsize)); + sbuf_printf(sb, "VmRss:\t%8ju kB\n", P2K((uintmax_t)kp.ki_rssize)); + sbuf_printf(sb, "VmData:\t%8ju kB\n", P2K((uintmax_t)kp.ki_dsize)); + sbuf_printf(sb, "VmStk:\t%8ju kB\n", P2K((uintmax_t)kp.ki_ssize)); + sbuf_printf(sb, "VmExe:\t%8ju kB\n", P2K((uintmax_t)kp.ki_tsize)); lsize = B2P(kp.ki_size) - kp.ki_dsize - kp.ki_ssize - kp.ki_tsize - 1; - sbuf_printf(sb, "VmLib:\t%8u kB\n", P2K(lsize)); + sbuf_printf(sb, "VmLib:\t%8ju kB\n", P2K((uintmax_t)lsize)); /* * Signal masks ==== //depot/projects/smpng/sys/compat/linux/linux_misc.c#35 (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/compat/linux/linux_misc.c,v 1.139 2003/03/13 22:45:43 jhb Exp $ + * $FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.140 2003/04/16 20:07:48 jhb Exp $ */ #include "opt_mac.h" @@ -878,7 +878,7 @@ { #ifdef DEBUG if (ldebug(personality)) - printf(ARGS(personality, "%d"), args->per); + printf(ARGS(personality, "%ld"), args->per); #endif #ifndef __alpha__ if (args->per != 0) ==== //depot/projects/smpng/sys/dev/wl/if_wl.c#12 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/wl/if_wl.c,v 1.48 2003/04/16 15:52:20 jhay Exp $ */ +/* $FreeBSD: src/sys/dev/wl/if_wl.c,v 1.50 2003/04/16 17:42:38 jhay Exp $ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -188,7 +188,6 @@ * transmit buffer available in sram space. */ -#define NWL 4 #include "opt_wavelan.h" #include "opt_inet.h" @@ -199,12 +198,16 @@ #include #include #include +#include +#include #include +#include #include #include #include +#include #include #ifdef INET @@ -215,7 +218,7 @@ #endif #include -#include +#include #include /* Definitions for the Intel chip */ /* was 1000 in original, fed to DELAY(x) */ @@ -223,10 +226,6 @@ #include #include -#ifndef COMPAT_OLDISA -#error "The wl device requires the old isa compatibility shims" -#endif - static char t_packet[ETHERMTU + sizeof(struct ether_header) + sizeof(long)]; struct wl_softc{ @@ -246,7 +245,15 @@ short mode; u_char chan24; /* 2.4 Gz: channel number/EEPROM Area # */ u_short freq24; /* 2.4 Gz: resulting frequency */ - struct callout_handle watchdog_ch; + int rid_ioport; + int rid_irq; + struct resource *res_ioport; + struct resource *res_irq; + void *intr_cookie; + bus_space_tag_t bt; + bus_space_handle_t bh; + struct mtx wl_mtx; + struct callout_handle watchdog_ch; #ifdef WLCACHE int w_sigitems; /* number of cached entries */ /* array of cache entries */ @@ -255,21 +262,35 @@ int w_wrapindex; /* next "free" cache entry */ #endif }; -static struct wl_softc wl_softc[NWL]; + +#define WL_LOCK(_sc) mtx_lock(&(_sc)->wl_mtx) +#define WL_UNLOCK(_sc) mtx_unlock(&(_sc)->wl_mtx) -#define WLSOFTC(unit) ((struct wl_softc *)(&wl_softc[unit])) +static int wlprobe(device_t); +static int wlattach(device_t); +static int wldetach(device_t); -static int wlprobe(struct isa_device *); -static int wlattach(struct isa_device *); +static device_method_t wl_methods[] = { + DEVMETHOD(device_probe, wlprobe), + DEVMETHOD(device_attach, wlattach), + DEVMETHOD(device_detach, wldetach), + { 0, 0} +}; -struct isa_driver wldriver = { - INTR_TYPE_NET, - wlprobe, - wlattach, +static driver_t wl_driver = { "wl", - 0 + wl_methods, + sizeof (struct wl_softc) +}; + +devclass_t wl_devclass; +DRIVER_MODULE(wl, isa, wl_driver, wl_devclass, 0, 0); +MODULE_DEPEND(wl, isa, 1, 1, 1); +MODULE_DEPEND(wl, ether, 1, 1, 1); + +static struct isa_pnp_id wl_ids[] = { + {0, NULL} }; -COMPAT_ISA_DRIVER(wl, wldriver); /* * XXX The Wavelan appears to be prone to dropping stuff if you talk to @@ -301,39 +322,41 @@ static int gathersnr = 0; SYSCTL_INT(_machdep, OID_AUTO, wl_gather_snr, CTLFLAG_RW, &gathersnr, 0, ""); +static int wl_allocate_resources(device_t device); +static int wl_deallocate_resources(device_t device); static void wlstart(struct ifnet *ifp); static void wlinit(void *xsc); static int wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static timeout_t wlwatchdog; -static ointhand2_t wlintr; -static void wlxmt(int unt, struct mbuf *m); -static int wldiag(int unt); -static int wlconfig(int unit); -static int wlcmd(int unit, char *str); -static void wlmmcstat(int unit); -static u_short wlbldru(int unit); +static void wlintr(void *arg); +static void wlxmt(struct wl_softc *sc, struct mbuf *m); +static int wldiag(struct wl_softc *sc); +static int wlconfig(struct wl_softc *sc); +static int wlcmd(struct wl_softc *sc, char *str); +static void wlmmcstat(struct wl_softc *sc); +static u_short wlbldru(struct wl_softc *sc); static u_short wlmmcread(u_int base, u_short reg); -static void wlinitmmc(int unit); -static int wlhwrst(int unit); -static void wlrustrt(int unit); -static void wlbldcu(int unit); -static int wlack(int unit); -static int wlread(int unit, u_short fd_p); -static void getsnr(int unit); -static void wlrcv(int unit); -static int wlrequeue(int unit, u_short fd_p); -static void wlsftwsleaze(u_short *countp, u_char **mb_pp, struct mbuf **tm_pp, int unit); -static void wlhdwsleaze(u_short *countp, u_char **mb_pp, struct mbuf **tm_pp, int unit); +static void wlinitmmc(struct wl_softc *sc); +static int wlhwrst(struct wl_softc *sc); +static void wlrustrt(struct wl_softc *sc); +static void wlbldcu(struct wl_softc *sc); +static int wlack(struct wl_softc *sc); +static int wlread(struct wl_softc *sc, u_short fd_p); +static void getsnr(struct wl_softc *sc); +static void wlrcv(struct wl_softc *sc); +static int wlrequeue(struct wl_softc *sc, u_short fd_p); +static void wlsftwsleaze(u_short *countp, u_char **mb_pp, struct mbuf **tm_pp, struct wl_softc *sc); +static void wlhdwsleaze(u_short *countp, u_char **mb_pp, struct mbuf **tm_pp, struct wl_softc *sc); #ifdef WLDEBUG -static void wltbd(int unit); +static void wltbd(struct wl_softc *sc); #endif static void wlgetpsa(int base, u_char *buf); -static void wlsetpsa(int unit); +static void wlsetpsa(struct wl_softc *sc); static u_short wlpsacrc(u_char *buf); -static void wldump(int unit); +static void wldump(struct wl_softc *sc); #ifdef WLCACHE -static void wl_cache_store(int, int, struct ether_header *, struct mbuf *); -static void wl_cache_zero(int unit); +static void wl_cache_store(struct wl_softc *, int, struct ether_header *, struct mbuf *); +static void wl_cache_zero(struct wl_softc *sc); #endif /* array for maping irq numbers to values for the irq parameter register */ @@ -360,26 +383,35 @@ * */ static int -wlprobe(struct isa_device *id) +wlprobe(device_t device) { - struct wl_softc *sc = &wl_softc[id->id_unit]; - short base = id->id_iobase; + struct wl_softc *sc; + short base; char *str = "wl%d: board out of range [0..%d]\n"; u_char inbuf[100]; - unsigned long oldpri; - int irq; + unsigned long junk, sirq; + int error, irq; + + error = ISA_PNP_PROBE(device_get_parent(device), device, wl_ids); + if (error == ENXIO || error == 0) + return (error); + + sc = device_get_softc(device); + error = wl_allocate_resources(device); + if (error) + goto errexit; + + base = rman_get_start(sc->res_ioport); /* TBD. not true. * regular CMD() will not work, since no softc yet */ #define PCMD(base, hacr) outw((base), (hacr)) - oldpri = splimp(); PCMD(base, HACR_RESET); /* reset the board */ DELAY(DELAYCONST); /* >> 4 clocks at 6MHz */ PCMD(base, HACR_RESET); /* reset the board */ DELAY(DELAYCONST); /* >> 4 clocks at 6MHz */ - splx(oldpri); /* clear reset command and set PIO#1 in autoincrement mode */ PCMD(base, HACR_DEFAULT); @@ -390,8 +422,10 @@ outw(PIOR1(base), 0); /* rewind */ insw(PIOP1(base), inbuf, strlen(str)/2+1); /* read result */ - if (bcmp(str, inbuf, strlen(str))) - return(0); + if (bcmp(str, inbuf, strlen(str))) { + error = ENXIO; + goto errexit; + } sc->chan24 = 0; /* 2.4 Gz: config channel */ sc->freq24 = 0; /* 2.4 Gz: frequency */ @@ -404,17 +438,26 @@ if (irqvals[irq] == inbuf[WLPSA_IRQNO]) break; if ((irq == 0) || (irqvals[irq] == 0)){ - printf("wl%d: PSA corrupt (invalid IRQ value)\n", id->id_unit); - id->id_irq = 0; /* no interrupt */ + printf("wl%d: PSA corrupt (invalid IRQ value)\n", + device_get_unit(device)); } else { /* * If the IRQ requested by the PSA is already claimed by another * device, the board won't work, but the user can still access the * driver to change the IRQ. */ - id->id_irq = (1<id_unit]; - short base = id->id_iobase; - int i,j; - u_char unit = id->id_unit; - struct ifnet *ifp = &sc->wl_if; + struct wl_softc *sc; + short base; + int error, i, j; + int unit; + struct ifnet *ifp; + + sc = device_get_softc(device); + ifp = &sc->wl_if; + + mtx_init(&sc->wl_mtx, device_get_nameunit(device), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); + + error = wl_allocate_resources(device); + if (error) { + wl_deallocate_resources(device); + return (ENXIO); + } + + base = rman_get_start(sc->res_ioport); + unit = device_get_unit(device); #ifdef WLDEBUG printf("wlattach: base %x, unit %d\n", base, unit); #endif - id->id_ointr = wlintr; + sc->base = base; sc->unit = unit; sc->flags = 0; sc->mode = 0; sc->hacr = HACR_RESET; callout_handle_init(&sc->watchdog_ch); - CMD(unit); /* reset the board */ + CMD(sc); /* reset the board */ DELAY(DELAYCONST); /* >> 4 clocks at 6MHz */ /* clear reset command and set PIO#2 in parameter access mode */ sc->hacr = (HACR_DEFAULT & ~HACR_16BITS); - CMD(unit); + CMD(sc); /* Read the PSA from the board for our later reference */ wlgetpsa(base, sc->psa); @@ -473,9 +531,9 @@ /* enter normal 16 bit mode operation */ sc->hacr = HACR_DEFAULT; - CMD(unit); + CMD(sc); - wlinitmmc(unit); + wlinitmmc(sc); outw(PIOR1(base), OFFSET_SCB + 8); /* address of scb_crcerrs */ outw(PIOP1(base), 0); /* clear scb_crcerrs */ outw(PIOP1(base), 0); /* clear scb_alnerrs */ @@ -484,7 +542,6 @@ bzero(ifp, sizeof(ifp)); ifp->if_softc = sc; - ifp->if_unit = id->id_unit; ifp->if_mtu = WAVELAN_MTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX; #ifdef WLDEBUG @@ -500,6 +557,7 @@ ifp->if_start = wlstart; ifp->if_ioctl = wlioctl; ifp->if_timer = 0; /* paranoia */ + ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; /* no entries ifp->if_watchdog ifp->if_done @@ -514,20 +572,94 @@ printf(", Freq %d MHz",sc->freq24); /* 2.4 Gz */ printf("\n"); /* 2.4 Gz */ + bus_setup_intr(device, sc->res_irq, INTR_TYPE_NET, wlintr, sc, &sc->intr_cookie); if (bootverbose) - wldump(unit); - return(1); + wldump(sc); + return (0); +} + +static int +wldetach(device_t device) +{ + struct wl_softc *sc = device_get_softc(device); + device_t parent = device_get_parent(device); + struct ifnet *ifp; + + ifp = &sc->wl_if; + ether_ifdetach(ifp); + + WL_LOCK(sc); + + /* reset the board */ + sc->hacr = HACR_RESET; + CMD(sc); + sc->hacr = HACR_DEFAULT; + CMD(sc); + + if (sc->intr_cookie != NULL) { + BUS_TEARDOWN_INTR(parent, device, sc->res_irq, sc->intr_cookie); + sc->intr_cookie = NULL; + } + + bus_generic_detach(device); + wl_deallocate_resources(device); + WL_UNLOCK(sc); + mtx_destroy(&sc->wl_mtx); + return (0); +} + +static int +wl_allocate_resources(device_t device) +{ + struct wl_softc *sc = device_get_softc(device); + int ports = 16; /* Number of ports */ + + sc->res_ioport = bus_alloc_resource(device, SYS_RES_IOPORT, + &sc->rid_ioport, 0ul, ~0ul, ports, RF_ACTIVE); + if (sc->res_ioport == NULL) + goto errexit; + + sc->res_irq = bus_alloc_resource(device, SYS_RES_IRQ, + &sc->rid_irq, 0ul, ~0ul, 1, RF_SHAREABLE|RF_ACTIVE); + if (sc->res_irq == NULL) + goto errexit; + return (0); + +errexit: + wl_deallocate_resources(device); + return (ENXIO); +} + +static int +wl_deallocate_resources(device_t device) +{ + struct wl_softc *sc = device_get_softc(device); + + if (sc->res_irq != 0) { + bus_deactivate_resource(device, SYS_RES_IRQ, + sc->rid_irq, sc->res_irq); + bus_release_resource(device, SYS_RES_IRQ, + sc->rid_irq, sc->res_irq); + sc->res_irq = 0; + } + if (sc->res_ioport != 0) { + bus_deactivate_resource(device, SYS_RES_IOPORT, + sc->rid_ioport, sc->res_ioport); + bus_release_resource(device, SYS_RES_IOPORT, + sc->rid_ioport, sc->res_ioport); + sc->res_ioport = 0; + } + return (0); } /* * Print out interesting information about the 82596. */ static void -wldump(int unit) +wldump(struct wl_softc *sc) { - struct wl_softc *sp = WLSOFTC(unit); - int base = sp->base; + int base = sc->base; int i; printf("hasr %04x\n", inw(HASR(base))); @@ -553,19 +685,18 @@ /* Initialize the Modem Management Controller */ static void -wlinitmmc(int unit) +wlinitmmc(struct wl_softc *sc) { - struct wl_softc *sp = WLSOFTC(unit); - int base = sp->base; + int base = sc->base; int configured; - int mode = sp->mode; + int mode = sc->mode; int i; /* 2.4 Gz */ /* enter 8 bit operation */ - sp->hacr = (HACR_DEFAULT & ~HACR_16BITS); - CMD(unit); + sc->hacr = (HACR_DEFAULT & ~HACR_16BITS); + CMD(sc); - configured = sp->psa[WLPSA_CONFIGURED] & 1; + configured = sc->psa[WLPSA_CONFIGURED] & 1; /* * Set default modem control parameters. Taken from NCR document @@ -580,7 +711,7 @@ MMC_WRITE(MMC_DECAY_UPDAT_PRM, 0x00); if (!configured) { MMC_WRITE(MMC_LOOPT_SEL, 0x00); - if (sp->psa[WLPSA_COMPATNO] & 1) { + if (sc->psa[WLPSA_COMPATNO] & 1) { MMC_WRITE(MMC_THR_PRE_SET, 0x01); /* 0x04 for AT and 0x01 for MCA */ } else { MMC_WRITE(MMC_THR_PRE_SET, 0x04); /* 0x04 for AT and 0x01 for MCA */ @@ -588,7 +719,7 @@ MMC_WRITE(MMC_QUALITY_THR, 0x03); } else { /* use configuration defaults from parameter storage area */ - if (sp->psa[WLPSA_NWIDENABLE] & 1) { + if (sc->psa[WLPSA_NWIDENABLE] & 1) { if ((mode & (MOD_PROM | MOD_ENAL)) && wl_ignore_nwid) { MMC_WRITE(MMC_LOOPT_SEL, 0x40); } else { @@ -597,23 +728,23 @@ } else { MMC_WRITE(MMC_LOOPT_SEL, 0x40); /* disable network id check */ } - MMC_WRITE(MMC_THR_PRE_SET, sp->psa[WLPSA_THRESH]); - MMC_WRITE(MMC_QUALITY_THR, sp->psa[WLPSA_QUALTHRESH]); + MMC_WRITE(MMC_THR_PRE_SET, sc->psa[WLPSA_THRESH]); + MMC_WRITE(MMC_QUALITY_THR, sc->psa[WLPSA_QUALTHRESH]); } MMC_WRITE(MMC_FREEZE, 0x00); MMC_WRITE(MMC_ENCR_ENABLE, 0x00); - MMC_WRITE(MMC_NETW_ID_L,sp->nwid[1]); /* set NWID */ - MMC_WRITE(MMC_NETW_ID_H,sp->nwid[0]); + MMC_WRITE(MMC_NETW_ID_L,sc->nwid[1]); /* set NWID */ + MMC_WRITE(MMC_NETW_ID_H,sc->nwid[0]); /* enter normal 16 bit mode operation */ - sp->hacr = HACR_DEFAULT; - CMD(unit); - CMD(unit); /* virtualpc1 needs this! */ + sc->hacr = HACR_DEFAULT; + CMD(sc); + CMD(sc); /* virtualpc1 needs this! */ - if (sp->psa[WLPSA_COMPATNO]== /* 2.4 Gz: half-card ver */ + if (sc->psa[WLPSA_COMPATNO]== /* 2.4 Gz: half-card ver */ WLPSA_COMPATNO_WL24B) { /* 2.4 Gz */ - i=sp->chan24<<4; /* 2.4 Gz: position ch # */ + i=sc->chan24<<4; /* 2.4 Gz: position ch # */ MMC_WRITE(MMC_EEADDR,i+0x0f); /* 2.4 Gz: named ch, wc=16 */ MMC_WRITE(MMC_EECTRL,MMC_EECTRL_DWLD+ /* 2.4 Gz: Download Synths */ MMC_EECTRL_EEOP_READ); /* 2.4 Gz: Read EEPROM */ @@ -639,14 +770,14 @@ MMC_WRITE(MMC_ANALCTRL, /* 2.4 Gz: EXT ant+polarity */ MMC_ANALCTRL_ANTPOL + /* 2.4 Gz: */ MMC_ANALCTRL_EXTANT); /* 2.4 Gz: */ - i=sp->chan24<<4; /* 2.4 Gz: position ch # */ + i=sc->chan24<<4; /* 2.4 Gz: position ch # */ MMC_WRITE(MMC_EEADDR,i); /* 2.4 Gz: get frequency */ MMC_WRITE(MMC_EECTRL, /* 2.4 Gz: EEPROM read */ MMC_EECTRL_EEOP_READ); /* 2.4 Gz: */ DELAY(40); /* 2.4 Gz */ i = wlmmcread(base,MMC_EEDATALrv) /* 2.4 Gz: freq val */ + (wlmmcread(base,MMC_EEDATAHrv)<<8); /* 2.4 Gz */ - sp->freq24 = (i>>6)+2400; /* 2.4 Gz: save real freq */ + sc->freq24 = (i>>6)+2400; /* 2.4 Gz: save real freq */ } } @@ -667,7 +798,6 @@ struct wl_softc *sc = xsc; struct ifnet *ifp = &sc->wl_if; int stat; - u_long oldpri; #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) @@ -675,8 +805,7 @@ #endif if (TAILQ_FIRST(&ifp->if_addrhead) == (struct ifaddr *)0) return; - oldpri = splimp(); - if ((stat = wlhwrst(sc->unit)) == TRUE) { + if ((stat = wlhwrst(sc)) == TRUE) { sc->wl_if.if_flags |= IFF_RUNNING; /* same as DSF_RUNNING */ /* * OACTIVE is used by upper-level routines @@ -692,7 +821,6 @@ } else { printf("wl%d init(): trouble resetting board.\n", sc->unit); } - splx(oldpri); } /* @@ -706,40 +834,39 @@ * */ static int -wlhwrst(int unit) +wlhwrst(struct wl_softc *sc) { - struct wl_softc *sc = WLSOFTC(unit); #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) - printf("wl%d: entered wlhwrst()\n",unit); + printf("wl%d: entered wlhwrst()\n", sc->unit); #endif sc->hacr = HACR_RESET; - CMD(unit); /* reset the board */ + CMD(sc); /* reset the board */ /* clear reset command and set PIO#1 in autoincrement mode */ sc->hacr = HACR_DEFAULT; - CMD(unit); + CMD(sc); #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) - wlmmcstat(unit); /* Display MMC registers */ + wlmmcstat(sc); /* Display MMC registers */ #endif /* WLDEBUG */ - wlbldcu(unit); /* set up command unit structures */ + wlbldcu(sc); /* set up command unit structures */ - if (wldiag(unit) == 0) + if (wldiag(sc) == 0) return(0); - if (wlconfig(unit) == 0) + if (wlconfig(sc) == 0) return(0); /* * insert code for loopback test here */ - wlrustrt(unit); /* start receive unit */ + wlrustrt(sc); /* start receive unit */ /* enable interrupts */ sc->hacr = (HACR_DEFAULT | HACR_INTRON); - CMD(unit); + CMD(sc); return(1); } @@ -752,16 +879,15 @@ * */ static void -wlbldcu(int unit) +wlbldcu(struct wl_softc *sc) { - struct wl_softc *sc = WLSOFTC(unit); short base = sc->base; scp_t scp; iscp_t iscp; scb_t scb; ac_t cb; tbd_t tbd; - int i; + int i; bzero(&scp, sizeof(scp)); scp.scp_sysbus = 0; @@ -789,21 +915,21 @@ outw(PIOR1(base), OFFSET_SCB); outsw(PIOP1(base), &scb, sizeof(scb_t)/2); - SET_CHAN_ATTN(unit); + SET_CHAN_ATTN(sc); outw(PIOR0(base), OFFSET_ISCP + 0); /* address of iscp_busy */ for (i = 1000000; inw(PIOP0(base)) && (i-- > 0); ) continue; if (i <= 0) - printf("wl%d bldcu(): iscp_busy timeout.\n", unit); + printf("wl%d bldcu(): iscp_busy timeout.\n", sc->unit); outw(PIOR0(base), OFFSET_SCB + 0); /* address of scb_status */ for (i = STATUS_TRIES; i-- > 0; ) { if (inw(PIOP0(base)) == (SCB_SW_CX|SCB_SW_CNA)) break; } if (i <= 0) - printf("wl%d bldcu(): not ready after reset.\n", unit); - wlack(unit); + printf("wl%d bldcu(): not ready after reset.\n", sc->unit); + wlack(sc); cb.ac_status = 0; cb.ac_command = AC_CW_EL; /* NOP */ @@ -833,10 +959,11 @@ { int unit = ifp->if_unit; struct mbuf *m; - struct wl_softc *sc = WLSOFTC(unit); + struct wl_softc *sc = ifp->if_softc; short base = sc->base; int scb_status, cu_status, scb_command; + WL_LOCK(sc); #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) printf("wl%d: entered wlstart()\n",unit); @@ -869,6 +996,7 @@ #endif if (xmt_watch) printf("!!"); } else { + WL_UNLOCK(sc); return; /* genuinely still busy */ } } else if ((scb_status & 0x0700) == SCB_CUS_ACTV || @@ -878,6 +1006,7 @@ unit, scb_status, cu_status); #endif if (xmt_watch) printf("wl%d: busy?!",unit); + WL_UNLOCK(sc); return; /* hey, why are we busy? */ } @@ -895,10 +1024,11 @@ sc->watchdog_ch = timeout(wlwatchdog, sc, 10); sc->wl_ac.ac_if.if_flags |= IFF_OACTIVE; sc->wl_if.if_opackets++; - wlxmt(unit, m); + wlxmt(sc, m); } else { sc->wl_ac.ac_if.if_flags &= ~IFF_OACTIVE; } + WL_UNLOCK(sc); return; } @@ -921,9 +1051,8 @@ * */ static int -wlread(int unit, u_short fd_p) +wlread(struct wl_softc *sc, u_short fd_p) { - struct wl_softc *sc = WLSOFTC(unit); struct ifnet *ifp = &sc->wl_if; short base = sc->base; fd_t fd; @@ -937,12 +1066,12 @@ #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) - printf("wl%d: entered wlread()\n", unit); + printf("wl%d: entered wlread()\n", sc->unit); #endif if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { - printf("wl%d read(): board is not running.\n", unit); + printf("wl%d read(): board is not running.\n", sc->unit); sc->hacr &= ~HACR_INTRON; - CMD(unit); /* turn off interrupts */ + CMD(sc); /* turn off interrupts */ } /* @@ -951,10 +1080,10 @@ outw(PIOR1(base), fd_p); insw(PIOP1(base), &fd, sizeof(fd_t)/2); if (fd.rbd_offset == I82586NULL) { - if (wlhwrst(unit) != TRUE) { + if (wlhwrst(sc) != TRUE) { sc->hacr &= ~HACR_INTRON; - CMD(unit); /* turn off interrupts */ - printf("wl%d read(): hwrst trouble.\n", unit); + CMD(sc); /* turn off interrupts */ + printf("wl%d read(): hwrst trouble.\n", sc->unit); } return 0; } @@ -968,10 +1097,10 @@ */ m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); if (m == NULL) { - if (wlhwrst(unit) != TRUE) { + if (wlhwrst(sc) != TRUE) { sc->hacr &= ~HACR_INTRON; - CMD(unit); /* turn off interrupts */ - printf("wl%d read(): hwrst trouble.\n", unit); + CMD(sc); /* turn off interrupts */ + printf("wl%d read(): hwrst trouble.\n", sc->unit); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Apr 16 13:18:24 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 328F837B404; Wed, 16 Apr 2003 13:18:24 -0700 (PDT) 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 C19E237B401 for ; Wed, 16 Apr 2003 13:18:23 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64DEE43FE3 for ; Wed, 16 Apr 2003 13:18:23 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3GKIN0U004469 for ; Wed, 16 Apr 2003 13:18:23 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3GKIMZt004466 for perforce@freebsd.org; Wed, 16 Apr 2003 13:18:22 -0700 (PDT) Date: Wed, 16 Apr 2003 13:18:22 -0700 (PDT) Message-Id: <200304162018.h3GKIMZt004466@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 29085 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 20:18:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=29085 Change 29085 by rwatson@rwatson_tislabs on 2003/04/16 13:18:10 Since the introduction of TCP wait state reduction, tcp_twrespond() has pulled an mbuf from its hat without labeling it before sending, resulting in invariants violations in the MAC code. Add a commented out recommendation on how to address this, with some possible implementation (also commented out). Affected files ... .. //depot/projects/trustedbsd/mac/sys/netinet/tcp_subr.c#28 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/netinet/tcp_subr.c#28 (text+ko) ==== @@ -1683,6 +1683,18 @@ return (NULL); } +/* + * XXXMAC: Really, we need to pass in the mbuf we are responding to + * so that we have a label to assign to the outgoing packet here. + * Question: will one always be available? Should we pass in the + * socket in the twstart case? Perhaps: + * + * tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *m, + * int flags) + * + * Where one of the socket or mbuf must be non-NULL so as to provide + * a label. + */ int tcp_twrespond(struct tcptw *tw, int flags) { @@ -1703,6 +1715,15 @@ return (ENOBUFS); m->m_data += max_linkhdr; +#ifdef 0 +#ifdef MAC + if (so != NULL) + mac_create_mbuf_from_socket(so, m); + else + mac_create_mbuf_netlayer(msrc, m); +#endif +#endif + #ifdef INET6 if (isipv6) { hdrlen = sizeof(struct ip6_hdr) + sizeof(struct tcphdr); From owner-p4-projects@FreeBSD.ORG Wed Apr 16 13:29:39 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 99B0637B404; Wed, 16 Apr 2003 13:29:38 -0700 (PDT) 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 3796237B401 for ; Wed, 16 Apr 2003 13:29:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B45A43FAF for ; Wed, 16 Apr 2003 13:29:37 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3GKTb0U005223 for ; Wed, 16 Apr 2003 13:29:37 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3GKTbCP005220 for perforce@freebsd.org; Wed, 16 Apr 2003 13:29:37 -0700 (PDT) Date: Wed, 16 Apr 2003 13:29:37 -0700 (PDT) Message-Id: <200304162029.h3GKTbCP005220@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 29086 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 20:29:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=29086 Change 29086 by rwatson@rwatson_tislabs on 2003/04/16 13:29:17 Clean up locking for the MAC Framework: (1) Accept that we're now going to use mutexes, so don't attempt to avoid treating them as mutexes. This cleans up locking accessor function names some. (2) Rename variables to _mtx, _cv, _count, simplifying the naming. (3) Add a new form of the _busy() primitive that conditionally makes the list busy: if there are entries on the list, bump the busy count. If there are no entries, don't bump the busy count. Return a boolean indicating whether or not the busy count was bumped. (4) Break mac_policy_list into two lists: one with the same name holding dynamic policies, and a new list, mac_static_policy_list, which holds policies loaded before mac_late and without the unload flag set. The static list may be accessed without holding the busy count, since it can't change at run-time. (5) In general, prefer making the list busy conditionally, meaning we pay only one mutex lock per entry point if all modules are on the static list, rather than two (since we don't have to lower the busy count when we're done with the framework). For systems running just Biba or MLS, this will halve the mutex accesses in the network stack, and may offer a substantial performance benefits (as yet unmeasured). (6) Lay the groundwork for a dynamic-free kernel option which eliminates all locking associated with dynamically loaded or unloaded policies, for pre-configured systems requiring maximum performance but less run-time flexibility. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#381 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#381 (text+ko) ==== @@ -246,38 +246,29 @@ MALLOC_DEFINE(M_MACTEMP, "mactemp", "MAC temporary label storage"); /* - * mac_policy_list stores the list of active policies. A busy count is + * mac_static_policy_list holds a list of policy modules that are not + * loaded while the system is "live", and cannot be unloaded. These + * policies can be invoked without holding the busy count. + * + * mac_policy_list stores the list of dynamic policies. A busy count is * maintained for the list, stored in mac_policy_busy. The busy count - * is protected by mac_policy_list_lock; the list may be modified only + * is protected by mac_policy_mtx; the list may be modified only * while the busy count is 0, requiring that the lock be held to * prevent new references to the list from being acquired. For almost * all operations, incrementing the busy count is sufficient to * guarantee consistency, as the list cannot be modified while the * busy count is elevated. For a few special operations involving a - * change to the list of active policies, the lock itself must be held. - * A condition variable, mac_policy_list_not_busy, is used to signal - * potential exclusive consumers that they should try to acquire the - * lock if a first attempt at exclusive access fails. + * change to the list of active policies, the mtx itself must be held. + * A condition variable, mac_policy_cv, is used to signal potential + * exclusive consumers that they should try to acquire the lock if a + * first attempt at exclusive access fails. */ -static struct mtx mac_policy_list_lock; -static struct cv mac_policy_list_not_busy; +static struct mtx mac_policy_mtx; +static struct cv mac_policy_cv; +static int mac_policy_count; static LIST_HEAD(, mac_policy_conf) mac_policy_list; -static int mac_policy_list_busy; - -#define MAC_POLICY_LIST_LOCKINIT() do { \ - mtx_init(&mac_policy_list_lock, "mac_policy_list_lock", NULL, \ - MTX_DEF); \ - cv_init(&mac_policy_list_not_busy, "mac_policy_list_not_busy"); \ -} while (0) - -#define MAC_POLICY_LIST_LOCK() do { \ - mtx_lock(&mac_policy_list_lock); \ -} while (0) +static LIST_HEAD(, mac_policy_conf) mac_static_policy_list; -#define MAC_POLICY_LIST_UNLOCK() do { \ - mtx_unlock(&mac_policy_list_lock); \ -} while (0) - /* * We manually invoke WITNESS_WARN() to allow Witness to generate * warnings even if we don't end up ever triggering the wait at @@ -287,35 +278,67 @@ * framework to become quiescent so that a policy list change may * be made. */ -#define MAC_POLICY_LIST_EXCLUSIVE() do { \ - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, \ - "mac_policy_list_exclusive() at %s:%d", __FILE__, __LINE__);\ - mtx_lock(&mac_policy_list_lock); \ - while (mac_policy_list_busy != 0) \ - cv_wait(&mac_policy_list_not_busy, \ - &mac_policy_list_lock); \ -} while (0) +static __inline void +mac_policy_grab_exclusive(void) +{ + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "mac_policy_grab_exclusive() at %s:%d", __FILE__, __LINE__); + mtx_lock(&mac_policy_mtx); + while (mac_policy_count != 0) + cv_wait(&mac_policy_cv, &mac_policy_mtx); +} + +static __inline void +mac_policy_assert_exclusive(void) +{ + mtx_assert(&mac_policy_mtx, MA_OWNED); + KASSERT(mac_policy_count == 0, + ("mac_policy_assert_exclusive(): not exclusive")); +} + +static __inline void +mac_policy_release_exclusive(void) +{ + + KASSERT(mac_policy_count == 0, + ("mac_policy_release_exclusive(): not exclusive")); + mtx_unlock(&mac_policy_mtx); + cv_signal(&mac_policy_cv); +} + +static __inline void +mac_policy_list_busy(void) +{ + mtx_lock(&mac_policy_mtx); + mac_policy_count++; + mtx_unlock(&mac_policy_mtx); +} -#define MAC_POLICY_LIST_ASSERT_EXCLUSIVE() do { \ - mtx_assert(&mac_policy_list_lock, MA_OWNED); \ - KASSERT(mac_policy_list_busy == 0, \ - ("MAC_POLICY_LIST_ASSERT_EXCLUSIVE()")); \ -} while (0) +static __inline int +mac_policy_list_conditional_busy(void) +{ + int ret; -#define MAC_POLICY_LIST_BUSY() do { \ - MAC_POLICY_LIST_LOCK(); \ - mac_policy_list_busy++; \ - MAC_POLICY_LIST_UNLOCK(); \ -} while (0) + mtx_lock(&mac_policy_mtx); + if (!LIST_EMPTY(&mac_policy_list)) { + mac_policy_count++; + ret = 1; + } else + ret = 0; + mtx_unlock(&mac_policy_mtx); + return (ret); +} -#define MAC_POLICY_LIST_UNBUSY() do { \ - MAC_POLICY_LIST_LOCK(); \ - mac_policy_list_busy--; \ - KASSERT(mac_policy_list_busy >= 0, ("MAC_POLICY_LIST_LOCK")); \ - if (mac_policy_list_busy == 0) \ - cv_signal(&mac_policy_list_not_busy); \ - MAC_POLICY_LIST_UNLOCK(); \ -} while (0) +static __inline void +mac_policy_list_unbusy(void) +{ + mtx_lock(&mac_policy_mtx); + mac_policy_count--; + KASSERT(mac_policy_count >= 0, ("MAC_POLICY_LIST_LOCK")); + if (mac_policy_count == 0) + cv_signal(&mac_policy_cv); + mtx_unlock(&mac_policy_mtx); +} /* * MAC_CHECK performs the designated check by walking the policy @@ -325,16 +348,24 @@ */ #define MAC_CHECK(check, args...) do { \ struct mac_policy_conf *mpc; \ + int entrycount; \ \ error = 0; \ - MAC_POLICY_LIST_BUSY(); \ - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { \ + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { \ if (mpc->mpc_ops->mpo_ ## check != NULL) \ error = error_select( \ mpc->mpc_ops->mpo_ ## check (args), \ error); \ } \ - MAC_POLICY_LIST_UNBUSY(); \ + if ((entrycount = mac_policy_list_conditional_busy()) != 0) { \ + LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { \ + if (mpc->mpc_ops->mpo_ ## check != NULL) \ + error = error_select( \ + mpc->mpc_ops->mpo_ ## check (args), \ + error); \ + } \ + mac_policy_list_unbusy(); \ + } \ } while (0) /* @@ -347,14 +378,22 @@ */ #define MAC_BOOLEAN(operation, composition, args...) do { \ struct mac_policy_conf *mpc; \ + int entrycount; \ \ - MAC_POLICY_LIST_BUSY(); \ - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { \ + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { \ if (mpc->mpc_ops->mpo_ ## operation != NULL) \ result = result composition \ mpc->mpc_ops->mpo_ ## operation (args); \ } \ - MAC_POLICY_LIST_UNBUSY(); \ + if ((entrycount = mac_policy_list_conditional_busy()) != 0) { \ + LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { \ + if (mpc->mpc_ops->mpo_ ## operation != NULL) \ + result = result composition \ + mpc->mpc_ops->mpo_ ## operation \ + (args); \ + } \ + mac_policy_list_unbusy(); \ + } \ } while (0) #define MAC_EXTERNALIZE(type, label, elementlist, outbuf, \ @@ -452,13 +491,19 @@ */ #define MAC_PERFORM(operation, args...) do { \ struct mac_policy_conf *mpc; \ + int entrycount; \ \ - MAC_POLICY_LIST_BUSY(); \ - LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { \ + LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) { \ if (mpc->mpc_ops->mpo_ ## operation != NULL) \ mpc->mpc_ops->mpo_ ## operation (args); \ } \ - MAC_POLICY_LIST_UNBUSY(); \ + if ((entrycount = mac_policy_list_conditional_busy()) != 0) { \ + LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { \ + if (mpc->mpc_ops->mpo_ ## operation != NULL) \ + mpc->mpc_ops->mpo_ ## operation (args); \ + } \ + mac_policy_list_unbusy(); \ + } \ } while (0) /* @@ -468,8 +513,11 @@ mac_init(void) { + LIST_INIT(&mac_static_policy_list); LIST_INIT(&mac_policy_list); - MAC_POLICY_LIST_LOCKINIT(); + + mtx_init(&mac_policy_mtx, "mac_policy_mtx", NULL, MTX_DEF); + cv_init(&mac_policy_cv, "mac_policy_cv"); } /* @@ -496,11 +544,18 @@ int labelmbufs; #endif - MAC_POLICY_LIST_ASSERT_EXCLUSIVE(); + mac_policy_assert_exclusive(); #ifndef MAC_ALWAYS_LABEL_MBUF labelmbufs = 0; #endif + + LIST_FOREACH(tmpc, &mac_static_policy_list, mpc_list) { +#ifndef MAC_ALWAYS_LABEL_MBUF + if (tmpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_LABELMBUFS) + labelmbufs++; +#endif + } LIST_FOREACH(tmpc, &mac_policy_list, mpc_list) { #ifndef MAC_ALWAYS_LABEL_MBUF if (tmpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_LABELMBUFS) @@ -555,38 +610,75 @@ mac_policy_register(struct mac_policy_conf *mpc) { struct mac_policy_conf *tmpc; - int slot; + int error, slot, static_entry; + + error = 0; + + /* + * We don't technically need exclusive access while !mac_late, + * but hold it for assertion consistency. + */ + mac_policy_grab_exclusive(); + + /* + * If the module can potentially be unloaded, or we're loading + * late, we have to stick it in the non-static list and pay + * an extra performance overhead. Otherwise, we can pay a + * light locking cost and stick it in the static list. + */ + static_entry = (!mac_late && + !(mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK)); - MAC_POLICY_LIST_EXCLUSIVE(); - LIST_FOREACH(tmpc, &mac_policy_list, mpc_list) { - if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) { - MAC_POLICY_LIST_UNLOCK(); - return (EEXIST); + if (static_entry) { + LIST_FOREACH(tmpc, &mac_static_policy_list, mpc_list) { + if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) { + error = EEXIST; + goto out; + } + } + } else { + LIST_FOREACH(tmpc, &mac_policy_list, mpc_list) { + if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) { + error = EEXIST; + goto out; + } } } if (mpc->mpc_field_off != NULL) { slot = ffs(mac_policy_offsets_free); if (slot == 0) { - MAC_POLICY_LIST_UNLOCK(); - return (ENOMEM); + error = ENOMEM; + goto out; } slot--; mac_policy_offsets_free &= ~(1 << slot); *mpc->mpc_field_off = slot; } mpc->mpc_runtime_flags |= MPC_RUNTIME_FLAG_REGISTERED; - LIST_INSERT_HEAD(&mac_policy_list, mpc, mpc_list); + + /* + * If we're loading a MAC module after the framework has + * initialized, it has to go into the dynamic list. If + * we're loading it before we've finished initializing, + * it can go into the static list with weaker locker + * requirements. + */ + if (static_entry) + LIST_INSERT_HEAD(&mac_static_policy_list, mpc, mpc_list); + else + LIST_INSERT_HEAD(&mac_policy_list, mpc, mpc_list); /* Per-policy initialization. */ if (mpc->mpc_ops->mpo_init != NULL) (*(mpc->mpc_ops->mpo_init))(mpc); mac_policy_updateflags(); - MAC_POLICY_LIST_UNLOCK(); printf("Security policy loaded: %s (%s)\n", mpc->mpc_fullname, mpc->mpc_name); - return (0); +out: + mac_policy_release_exclusive(); + return (error); } static int @@ -598,9 +690,9 @@ * to see if we did the run-time registration, and if not, * silently succeed. */ - MAC_POLICY_LIST_EXCLUSIVE(); + mac_policy_grab_exclusive(); if ((mpc->mpc_runtime_flags & MPC_RUNTIME_FLAG_REGISTERED) == 0) { - MAC_POLICY_LIST_UNLOCK(); + mac_policy_release_exclusive(); return (0); } #if 0 @@ -617,7 +709,7 @@ * by its own definition. */ if ((mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK) == 0) { - MAC_POLICY_LIST_UNLOCK(); + mac_policy_release_exclusive(); return (EBUSY); } if (mpc->mpc_ops->mpo_destroy != NULL) @@ -626,7 +718,8 @@ LIST_REMOVE(mpc, mpc_list); mpc->mpc_runtime_flags &= ~MPC_RUNTIME_FLAG_REGISTERED; mac_policy_updateflags(); - MAC_POLICY_LIST_UNLOCK(); + + mac_policy_release_exclusive(); printf("Security policy unload: %s (%s)\n", mpc->mpc_fullname, mpc->mpc_name); @@ -3788,14 +3881,13 @@ { struct mac_policy_conf *mpc; char target[MAC_MAX_POLICY_NAME]; - int error; + int entrycount, error; error = copyinstr(uap->policy, target, sizeof(target), NULL); if (error) return (error); error = ENOSYS; - MAC_POLICY_LIST_BUSY(); LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { if (strcmp(mpc->mpc_name, target) == 0 && mpc->mpc_ops->mpo_syscall != NULL) { @@ -3805,8 +3897,18 @@ } } + if ((entrycount = mac_policy_list_conditional_busy()) != 0) { + LIST_FOREACH(mpc, &mac_policy_list, mpc_list) { + if (strcmp(mpc->mpc_name, target) == 0 && + mpc->mpc_ops->mpo_syscall != NULL) { + error = mpc->mpc_ops->mpo_syscall(td, + uap->call, uap->arg); + break; + } + } + mac_policy_list_unbusy(); + } out: - MAC_POLICY_LIST_UNBUSY(); return (error); } From owner-p4-projects@FreeBSD.ORG Wed Apr 16 15:06:43 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 46D5E37B404; Wed, 16 Apr 2003 15:06:43 -0700 (PDT) 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 D4CEC37B401 for ; Wed, 16 Apr 2003 15:06:42 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 645AC43FE0 for ; Wed, 16 Apr 2003 15:06:42 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3GM6g0U014819 for ; Wed, 16 Apr 2003 15:06:42 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3GM6fjU014816 for perforce@freebsd.org; Wed, 16 Apr 2003 15:06:41 -0700 (PDT) Date: Wed, 16 Apr 2003 15:06:41 -0700 (PDT) Message-Id: <200304162206.h3GM6fjU014816@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 29097 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 22:06:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=29097 Change 29097 by rwatson@rwatson_tislabs on 2003/04/16 15:06:12 Typo. Affected files ... .. //depot/projects/trustedbsd/mac/sys/netinet/tcp_subr.c#29 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/netinet/tcp_subr.c#29 (text+ko) ==== @@ -1715,7 +1715,7 @@ return (ENOBUFS); m->m_data += max_linkhdr; -#ifdef 0 +#if 0 #ifdef MAC if (so != NULL) mac_create_mbuf_from_socket(so, m); From owner-p4-projects@FreeBSD.ORG Wed Apr 16 15:25:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 72CFA37B404; Wed, 16 Apr 2003 15:25:06 -0700 (PDT) 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 1215F37B401 for ; Wed, 16 Apr 2003 15:25:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11AA543FAF for ; Wed, 16 Apr 2003 15:25:05 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3GMP40U016129 for ; Wed, 16 Apr 2003 15:25:04 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3GMP4r9016126 for perforce@freebsd.org; Wed, 16 Apr 2003 15:25:04 -0700 (PDT) Date: Wed, 16 Apr 2003 15:25:04 -0700 (PDT) Message-Id: <200304162225.h3GMP4r9016126@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 29098 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 22:25:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=29098 Change 29098 by rwatson@rwatson_tislabs on 2003/04/16 15:24:52 Add socket and mbuf arguments to tcp_twrespond(): this guarantees us a source of a label for use when generating a TCP packet. This prevent panics due to a lack of a useful label in the resulting mbuf. Affected files ... .. //depot/projects/trustedbsd/mac/sys/netinet/tcp_input.c#37 edit .. //depot/projects/trustedbsd/mac/sys/netinet/tcp_subr.c#30 edit .. //depot/projects/trustedbsd/mac/sys/netinet/tcp_var.h#11 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/netinet/tcp_input.c#37 (text+ko) ==== @@ -2931,7 +2931,7 @@ */ if (thflags != TH_ACK || tlen != 0 || th->th_seq != tw->rcv_nxt || th->th_ack != tw->snd_nxt) - tcp_twrespond(tw, TH_ACK); + tcp_twrespond(tw, NULL, m, TH_ACK); goto drop; reset: ==== //depot/projects/trustedbsd/mac/sys/netinet/tcp_subr.c#30 (text+ko) ==== @@ -1648,16 +1648,16 @@ } tcp_discardcb(tp); so = inp->inp_socket; - so->so_pcb = NULL; tw->tw_cred = crhold(so->so_cred); tw->tw_so_options = so->so_options; + if (acknow) + tcp_twrespond(tw, so, NULL, TH_ACK); + so->so_pcb = NULL; sotryfree(so); inp->inp_socket = NULL; inp->inp_ppcb = (caddr_t)tw; inp->inp_vflag |= INP_TIMEWAIT; tcp_timer_2msl_reset(tw, tw_time); - if (acknow) - tcp_twrespond(tw, TH_ACK); INP_UNLOCK(inp); } @@ -1684,19 +1684,12 @@ } /* - * XXXMAC: Really, we need to pass in the mbuf we are responding to - * so that we have a label to assign to the outgoing packet here. - * Question: will one always be available? Should we pass in the - * socket in the twstart case? Perhaps: - * - * tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *m, - * int flags) - * - * Where one of the socket or mbuf must be non-NULL so as to provide - * a label. + * One of so and msrc must be non-NULL for use by the MAC Framework to + * construct a label for ay resulting packet. */ int -tcp_twrespond(struct tcptw *tw, int flags) +tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *msrc, + int flags) { struct inpcb *inp = tw->tw_inpcb; struct tcphdr *th; @@ -1710,19 +1703,20 @@ int isipv6 = inp->inp_inc.inc_isipv6; #endif + KASSERT(so != NULL || msrc != NULL, + ("tcp_twrespond: so and msrc NULL")); + m = m_gethdr(M_DONTWAIT, MT_HEADER); if (m == NULL) return (ENOBUFS); m->m_data += max_linkhdr; -#if 0 #ifdef MAC if (so != NULL) mac_create_mbuf_from_socket(so, m); else mac_create_mbuf_netlayer(msrc, m); #endif -#endif #ifdef INET6 if (isipv6) { ==== //depot/projects/trustedbsd/mac/sys/netinet/tcp_var.h#11 (text+ko) ==== @@ -490,7 +490,7 @@ tcp_quench(struct inpcb *, int); void tcp_respond(struct tcpcb *, void *, struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, int); -int tcp_twrespond(struct tcptw *, int); +int tcp_twrespond(struct tcptw *, struct socket *, struct mbuf *, int); struct rtentry * tcp_rtlookup(struct in_conninfo *); void tcp_setpersist(struct tcpcb *); From owner-p4-projects@FreeBSD.ORG Thu Apr 17 00:09:44 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E6EDD37B404; Thu, 17 Apr 2003 00:09:43 -0700 (PDT) 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 9D39137B401 for ; Thu, 17 Apr 2003 00:09:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 484E243F75 for ; Thu, 17 Apr 2003 00:09:43 -0700 (PDT) (envelope-from marcel@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 h3H79h0U071863 for ; Thu, 17 Apr 2003 00:09:43 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3H79gel071860 for perforce@freebsd.org; Thu, 17 Apr 2003 00:09:42 -0700 (PDT) Date: Thu, 17 Apr 2003 00:09:42 -0700 (PDT) Message-Id: <200304170709.h3H79gel071860@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29105 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 07:09:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=29105 Change 29105 by marcel@marcel_nfs on 2003/04/17 00:08:55 o Document that we use ar.k5 to pass the EPC gateway page to userland. o Don't restore ar.k4. Both ar.k4 and ar.k5 are invariant. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#10 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#10 (text+ko) ==== @@ -33,6 +33,7 @@ /* * ar.k7 = kernel memory stack * ar.k6 = kernel register stack + * ar.k5 = EPC gateway page * ar.k4 = PCPU data */ @@ -521,12 +522,10 @@ ;; } mov r31=ar.bspstore + mov ar.bspstore=r20 ;; - mov ar.bspstore=r20 mov ar.k6=r31 - ;; mov ar.rnat=r21 - mov ar.k4=r13 mov r13=r29 ;; From owner-p4-projects@FreeBSD.ORG Thu Apr 17 00:14:51 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB93B37B405; Thu, 17 Apr 2003 00:14:50 -0700 (PDT) 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 729C337B401 for ; Thu, 17 Apr 2003 00:14:50 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1569443FBF for ; Thu, 17 Apr 2003 00:14:50 -0700 (PDT) (envelope-from marcel@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 h3H7En0U072452 for ; Thu, 17 Apr 2003 00:14:49 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3H7En1q072449 for perforce@freebsd.org; Thu, 17 Apr 2003 00:14:49 -0700 (PDT) Date: Thu, 17 Apr 2003 00:14:49 -0700 (PDT) Message-Id: <200304170714.h3H7En1q072449@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29106 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 07:14:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=29106 Change 29106 by marcel@marcel_nfs on 2003/04/17 00:14:14 Use ar.k5 and not ar.k3 to pass the EPC gateway page to userland. Using ar.k3 is slightly less optimal in that we have to make sure ar.k3 is defined is we jump into user space because it can be clobbered by PAL code on exception. By using ar.k5 we make it an invariant register, which means we don't have to worry about it. Of course, using ar.k5 takes up one of the preserved kernel regs, which means that we don't have any left. I tried to avoid that, but the reduced complexity is slightly more pleasing now... Oh: minor style change (initialize ar.k4 immediately after we define pcpup) and remove a space. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#12 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#12 (text+ko) ==== @@ -389,8 +389,8 @@ __asm __volatile("mov psr.l=%0" :: "r" (psr)); __asm __volatile("srlz.i"); - /* Expose the mapping to userland in ar.k3 */ - ia64_set_k3(VM_MAX_ADDRESS); + /* Expose the mapping to userland in ar.k5 */ + ia64_set_k5(VM_MAX_ADDRESS); } static void @@ -715,9 +715,9 @@ /* * Setup the global data for the bootstrap cpu. */ - pcpup = (struct pcpu *) pmap_steal_memory(PAGE_SIZE); + pcpup = (struct pcpu *)pmap_steal_memory(PAGE_SIZE); + ia64_set_k4((u_int64_t)pcpup); pcpu_init(pcpup, 0, PAGE_SIZE); - ia64_set_k4((u_int64_t) pcpup); PCPU_SET(curthread, &thread0); /* From owner-p4-projects@FreeBSD.ORG Thu Apr 17 00:20:59 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C83637B405; Thu, 17 Apr 2003 00:20:59 -0700 (PDT) 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 15A7837B401 for ; Thu, 17 Apr 2003 00:20:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26C8943FA3 for ; Thu, 17 Apr 2003 00:20:58 -0700 (PDT) (envelope-from marcel@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 h3H7Kv0U073022 for ; Thu, 17 Apr 2003 00:20:57 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3H7KvF2073016 for perforce@freebsd.org; Thu, 17 Apr 2003 00:20:57 -0700 (PDT) Date: Thu, 17 Apr 2003 00:20:57 -0700 (PDT) Message-Id: <200304170720.h3H7KvF2073016@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29107 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 07:21:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=29107 Change 29107 by marcel@marcel_nfs on 2003/04/17 00:20:18 Fix breakage I introduced by the previous commit to mp_machdep.c and move some code from locore.s to mp_machdep.c. The previous commit to mp_machdep.c was lacking the declaration of M_PMAP. We now initialize the pcpup pointer (and ar.k4) from C code. This makes it more visible than having it in locore.s. While here, remove the volatile modifiers from ap_stack and ap_pcpu. It's causing compile warnings without actually being required. While in locore.s, add explicit bundling and reschedule the instructions to get better packing. Also: don't define ar.k4 when we enter user space. It's an CPU invariant. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#10 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#6 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#10 (text+ko) ==== @@ -217,15 +217,9 @@ nop 0 ;; } -{ .mmi +{ .mmb srlz.d mov ar.k6=r30 - nop 0 - ;; -} -{ .mmb - mov ar.k4=r13 - nop 0 br.ret.sptk rp ;; } @@ -299,35 +293,50 @@ rfi .align 32 -2: movl r16 = ia64_vector_table // set up IVT early +2: +{ .mlx + mov ar.rsc = 0 + movl r16 = ia64_vector_table // set up IVT early ;; +} +{ .mlx mov cr.iva = r16 + movl r16 = ap_stack ;; +} +{ .mmi srlz.i ;; - movl r16 = ap_stack - movl r17 = ap_pcpu - mov ar.rsc = 0 - ;; ld8 r16 = [r16] - ld8 r17 = [r17] mov r18 = KSTACK_PAGES*PAGE_SIZE-SIZEOF_PCB-SIZEOF_TRAPFRAME-16 ;; - add sp = r18, r16 +} +{ .mlx mov ar.bspstore = r16 + movl gp = __gp ;; +} +{ .mmi loadrs - movl gp = __gp + ;; + alloc r17 = ar.pfs, 0, 0, 0, 0 + add sp = r18, r16 ;; - mov ar.k4 = r17 +} +{ .mfb mov ar.rsc = 3 - mov r13 = r17 /* gas doesn't know tp as an alias for r13 */ + nop 0 + br.call.sptk.few rp = ia64_ap_startup ;; - alloc r16 = ar.pfs, 0, 0, 0, 0 +} + /* NOT REACHED */ +9: +{ .mfb + nop 0 + nop 0 + br.sptk 9b ;; - br.call.sptk.few rp = ia64_ap_startup - /* NOT REACHED */ -9: br 9b +} END(os_boot_rendez) #endif /* !SMP */ ==== //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#6 (text+ko) ==== @@ -56,6 +56,8 @@ #include #include +MALLOC_DECLARE(M_PMAP); + void ia64_ap_startup(void); extern vm_offset_t vhpt_base, vhpt_size; @@ -69,8 +71,8 @@ int mp_ipi_test = 0; /* Variables used by os_boot_rendez */ -volatile vm_offset_t ap_stack; -volatile struct pcpu *ap_pcpu; +void *ap_stack; +struct pcpu *ap_pcpu; volatile int ap_delay; volatile int ap_awake; volatile int ap_spin; @@ -86,6 +88,9 @@ __asm __volatile("mov cr.pta=%0;; srlz.i;;" :: "r" (vhpt_base + (1<<8) + (vhpt_size<<2) + 1)); + pcpup = ap_pcpu; + ia64_set_k4((intptr_t)pcpup); + map_pal_code(); map_port_space(); map_gateway_page(); From owner-p4-projects@FreeBSD.ORG Thu Apr 17 00:32:14 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C30FC37B404; Thu, 17 Apr 2003 00:32:13 -0700 (PDT) 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 6FA9037B405 for ; Thu, 17 Apr 2003 00:32:13 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 840A243FBF for ; Thu, 17 Apr 2003 00:32:12 -0700 (PDT) (envelope-from marcel@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 h3H7WC0U073811 for ; Thu, 17 Apr 2003 00:32:12 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3H7WBoJ073808 for perforce@freebsd.org; Thu, 17 Apr 2003 00:32:11 -0700 (PDT) Date: Thu, 17 Apr 2003 00:32:11 -0700 (PDT) Message-Id: <200304170732.h3H7WBoJ073808@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29108 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 07:32:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=29108 Change 29108 by marcel@marcel_nfs on 2003/04/17 00:32:02 Finish the rudimenary EPC syscall code. Of course this is still missing the signal handling, but at least it gets us to the first fork(2). This is the point I needed to get to so that I can finish fork_trampoline (I now have a quick and dirty version that only works for the very first process (ie init). Change the syscall stub to use ar.k5 instead of ar.k3. Also: we didn't save the frame marker and return pointer of the function calling a syscall stub and thus got lost in the forest that is code on our way back. To keep the stubs small (but mostly generatable) we save the frame marker and return pointer of the function calling a syscall stub in registers and pass them on to the EPC syscall code. There we restore them for the process. Note that this is caused by the requirement to use a call to go to the EPC gateway page, because we need to lower the privilege level on our way back. This can only be done by a return. Otherwise I would have avoided the call so that we would not clobber the frame marker and return pointer. Oh, and we now use spills to store the syscall argument in memory. The reasoning is this: We don't know how many arguments a syscall has, but we know that 8 is the max. Hence, we may be reading garbage, including NaTs. If we don't spill, we could therefore get a NaT consumption fault. and since we're already in kernel mode, this is bad. By spilling we basicly ignore the NaT bits (if any). Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#6 edit .. //depot/projects/ia64_epc/sys/ia64/include/asm.h#3 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#6 (text+ko) ==== @@ -30,26 +30,32 @@ #include /* - * A process performs a syscall by calling epc_syscall through the EPC - * gateway page. The address of the gateway page is passed to the process - * in ar.k3. + * A process performs a syscall by performing an indirect call to the + * address stored in ar.k5. The contents ar.pfs and rp should be saved + * prior to the syscall in r9 and r10 respectively. The kernel will + * restore these values on return. The value of gp is preserved across + * the call. + * The address in ar.k5 is the start of the EPC gateway page. The code + * in the gateway page is primarily responsible for increasing the + * privilege level, but will also make sure we have a reliable psr. * - * Syscalls don't follow the calling convention completely. The reason - * for this is that it would create unnecessary overhead. Arguments to - * syscalls are: + * A process defines: * r8 - syscall number * r9 - copy of ar.pfs + * r10 - copy of rp * in0-in7 - syscall arguments - * b6 - return address * - * Syscalls return: + * A syscall returns: * r8+r9 - syscall return value(s) * r10 - syscall error flag + * ar.pfs - restored from r9 + * rp - restored from r10 + * gp - preserved * - * The EPC gateway code prefetches the following: - * r14 - prefetched ar.k7 - * r15 - prefetched ar.k6 - * p15 - true for fork(2) + * The EPC defines: + * r11 - copy of psr.l + * r14 - Kernel memory stack + * r15 - Kernel register stack */ .section .text.gateway, "ax" @@ -63,16 +69,29 @@ ;; } { .mlx - add r30=-1,r0 // XXX + mov r11=psr movl r31=epc_syscall ;; } { .mib - cmp.eq p15,p0=r30,r8 + rum psr.be mov b7=r31 br b7 ;; } +gw_ret: +{ .mmi + mov ar.rnat=r22 + mov ar.rsc=r24 + mov ar.pfs=r28 +} +{ .mib + mov ar.fpsr=r25 + mov b0=r29 + br.sptk b6 + ;; +} + .align PAGE_SIZE @@ -82,99 +101,139 @@ .regstk 8,0,0,0 epc_syscall: { .mmi - mov r17=ar.rsc - mov r18=ar.unat + mov r16=ar.rsc + mov ar.rsc=0 + mov r17=r13 + ;; +} +{ .mmi + mov r18=ar.bspstore + mov r19=ar.rnat add r30=-SIZEOF_TRAPFRAME,r14 ;; } { .mmi - mov ar.rsc=0 - mov r19=ar.fpsr + mov ar.bspstore=r15 + mov r13=ar.k4 dep r30=0,r30,0,10 ;; } -{ .mmi - mov r21=ar.bspstore - mov r22=ar.rnat - mov r23=r13 +{ .mii + mov r20=sp + add r31=8,r30 + add sp=-16,r30 ;; } { .mmi - mov ar.bspstore=r15 - add r31=8,r30 - mov r20=sp + mov r21=ar.unat + mov r22=ar.fpsr + sub r29=r14,r30 ;; } { .mmi + mov r23=ar.bsp mov ar.rsc=3 - add sp=-16,r30 - sub r29=r14,r30 + add r28=FRAME_SYSCALL,r0 ;; } { .mmi st8 [r30]=r29,16 // tf_length - mov r24=ar.bsp - add r29=FRAME_SYSCALL,r0 + st8 [r31]=r28,16 // tf_flags + mov r24=rp + ;; +} +{ .mmi + st8 [r30]=r20,16 // sp + st8 [r31]=r21,16 // unat + mov r25=pr + ;; +} +{ .mmi + st8 [r30]=r24,16 // rp (syscall stub) + st8 [r31]=r25,16 // pr + mov r26=ar.pfs ;; } { .mmi - st8 [r31]=r29,16 // tf_flags - mov r27=psr - mov r25=b6 + st8 [r30]=r26,16 // pfs (syscall stub) + st8 [r31]=r18,16 // bspstore + sub r27=r23,r15 ;; } { .mmi - st8 [r30]=r20,16 // sp - st8 [r31]=r18,16 // unat - mov r26=pr + st8 [r30]=r19,16 // rnat + st8 [r31]=r0,16 // __spare + nop 0 ;; } { .mmi - st8 [r30]=r25,16 // rp - st8 [r31]=r26,16 // pr - sub r24=r24,r15 + st8 [r30]=r17,16 // tp + st8 [r31]=r16,16 // rsc + nop 0 ;; } { .mmi - st8 [r30]=r9,16 // pfs - st8 [r31]=r21,16 // bspstore + st8 [r30]=r22,16 // fpsr + st8 [r31]=r11,16 // psr nop 0 ;; } { .mmi - st8 [r30]=r22,16 // rnat - st8 [r31]=r24,16 // __spare (=ndirty) + st8 [r30]=r1,16 // gp + st8 [r31]=r27,16 // ndirty nop 0 ;; } { .mmi - st8 [r30]=r23,16 // tp - st8 [r31]=r17,16 // rsc + st8 [r30]=r9,16 // pfs (syscall caller) + st8 [r31]=r10,16 // rp (syscall caller) nop 0 ;; } { .mmi - st8 [r30]=r19,128 // fpsr - st8 [r31]=r27,128 // psr + st8 [r30]=r0,80 // ifa + st8 [r31]=r0,80 // isr nop 0 ;; } +{ .mmi st8 [r30]=r8,16 // syscall number (=r15) - st8 [r31]=r32,16 // arg0 (=r16) + .mem.offset 0,0 + st8.spill [r31]=r32,16 // arg0 (=r16) + nop 0 ;; - st8 [r30]=r33,16 // arg1 (=r17) - st8 [r31]=r34,16 // arg2 (=r18) +} +{ .mmi + .mem.offset 8,0 + st8.spill [r30]=r33,16 // arg1 (=r17) + .mem.offset 16,0 + st8.spill [r31]=r34,16 // arg2 (=r18) + nop 0 ;; - st8 [r30]=r35,16 // arg3 (=r19) - st8 [r31]=r36,16 // arg4 (=r20) +} +{ .mmi + .mem.offset 24,0 + st8.spill [r30]=r35,16 // arg3 (=r19) + .mem.offset 32,0 + st8.spill [r31]=r36,16 // arg4 (=r20) + nop 0 ;; - st8 [r30]=r37,16 // arg5 (=r21) - st8 [r31]=r38,16 // arg6 (=r22) +} +{ .mmi + .mem.offset 40,0 + st8.spill [r30]=r37,16 // arg5 (=r21) + .mem.offset 48,0 + st8.spill [r31]=r38,16 // arg6 (=r22) + nop 0 ;; - st8 [r30]=r39,8 // arg7 (=r23) - mov r13=ar.k4 +} +{ .mmi + .mem.offset 56,0 + st8.spill [r30]=r39,8 // arg7 (=r23) + ssm psr.dfh|psr.ac + nop 0 ;; - +} { .mlx alloc r14=ar.pfs,0,0,3,0 movl gp=__gp @@ -187,10 +246,109 @@ ;; } { .mfb - ssm psr.dfh + srlz.d nop 0 br.call.sptk rp=syscall ;; } - break 0 + + .global syscall_return + .type syscall_return, @function +syscall_return: +{ .mmi + alloc r31=ar.pfs,0,0,0,0 + add r14=32,sp + add r15=16,sp + ;; +} +{ .mmi + ld8 r31=[r15],24 // tf_length + ld8 r16=[r14],16 // sp + add sp=16,sp + ;; +} +{ .mmi + ld8 r17=[r15],16 // unat (before) + ld8 r18=[r14],16 // rp (syscall stub) + add r31=r31,sp + ;; +} +{ .mmi + ld8 r19=[r15],16 // pr + ld8 r20=[r14],16 // pfs (syscall stub) + mov sp=r16 + ;; +} +{ .mmi + ld8 r21=[r15],24 // bspstore + ld8 r22=[r14],24 // rnat + mov b6=r18 + ;; +} +{ .mmi + ld8 r23=[r15],16 // tp + ld8 r24=[r14],16 // rsc + mov pr=r19,0x1fffe + ;; +} +{ .mmi + ld8 r25=[r15],16 // fpsr + ld8 r26=[r14],16 // psr + mov ar.pfs=r20 + ;; +} +{ .mmi + ld8 gp=[r15],16 // gp + ld8 r27=[r14],16 // ndirty + nop 0 + ;; +} +{ .mmi + ld8 r28=[r15],56 // pfs (syscall caller) + ld8 r29=[r14],56 // rp (syscall caller) + shl r27=r27,16 + ;; +} +{ .mmi + ld8 r8=[r15],16 // r8 + mov ar.rsc=r27 + nop 0 + ;; +} +{ .mmi + ld8 r9=[r14] // r9 + ld8 r10=[r15] // r10 + nop 0 + ;; +} +{ .mmi + loadrs + mov ar.k7=r31 + dep r26=-1,r26,19,1 // Set psr.dfh + ;; +} +{ .mmi + mov r31=ar.bspstore + mov ar.bspstore=r21 + mov r13=r23 + ;; +} +{ .mmi + mov r14=ar.k5 + mov ar.k6=r31 + nop 0 + ;; +} +{ .mmi + mov psr.l=r26 + mov ar.unat=r17 + add r14=gw_ret-ia64_gateway_page,r14 + ;; +} +{ .mib + srlz.d + mov b7=r14 + br.ret.sptk b7 + ;; +} .endp epc_syscall ==== //depot/projects/ia64_epc/sys/ia64/include/asm.h#3 (text+ko) ==== @@ -164,11 +164,12 @@ #define EPC_CALLSYS_NOERROR(name) \ { .mmi ; \ alloc r9 = ar.pfs, 0, 0, 8, 0 ; \ - mov r14 = ar.k3 ;; } \ + mov r31 = ar.k5 ; \ + mov r10 = b0 ;; } \ { .mib ; \ mov r8 = SYSCALLNUM(name) ; \ - mov b7 = r14 ; \ - br.call.sptk b6 = b7 } + mov b7 = r31 ; \ + br.call.sptk b0 = b7 ;; } /* From owner-p4-projects@FreeBSD.ORG Thu Apr 17 08:23:49 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4A75D37B404; Thu, 17 Apr 2003 08:23:49 -0700 (PDT) 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 D96E237B401 for ; Thu, 17 Apr 2003 08:23:48 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C238343F3F for ; Thu, 17 Apr 2003 08:23:47 -0700 (PDT) (envelope-from jhb@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 h3HFNl0U027189 for ; Thu, 17 Apr 2003 08:23:47 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3HFNkvZ027186 for perforce@freebsd.org; Thu, 17 Apr 2003 08:23:46 -0700 (PDT) Date: Thu, 17 Apr 2003 08:23:46 -0700 (PDT) Message-Id: <200304171523.h3HFNkvZ027186@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29118 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 15:23:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=29118 Change 29118 by jhb@jhb_laptop on 2003/04/17 08:22:52 IFC @29117. Affected files ... .. //depot/projects/smpng/sys/boot/alpha/boot1/boot1.c#3 integrate .. //depot/projects/smpng/sys/boot/arc/lib/arcdisk.c#3 integrate .. //depot/projects/smpng/sys/boot/arc/lib/devicename.c#2 integrate .. //depot/projects/smpng/sys/boot/ofw/libofw/devicename.c#6 integrate .. //depot/projects/smpng/sys/boot/ofw/libofw/ofw_disk.c#7 integrate .. //depot/projects/smpng/sys/boot/sparc64/boot1/boot1.c#6 integrate .. //depot/projects/smpng/sys/compat/linux/linux_ioctl.c#25 integrate .. //depot/projects/smpng/sys/compat/linux/linux_misc.c#36 integrate .. //depot/projects/smpng/sys/conf/files#73 integrate .. //depot/projects/smpng/sys/conf/files.alpha#22 integrate .. //depot/projects/smpng/sys/conf/files.i386#39 integrate .. //depot/projects/smpng/sys/conf/files.ia64#26 integrate .. //depot/projects/smpng/sys/conf/files.pc98#39 integrate .. //depot/projects/smpng/sys/conf/files.sparc64#26 integrate .. //depot/projects/smpng/sys/dev/asr/asr.c#18 integrate .. //depot/projects/smpng/sys/dev/firewire/firewire.c#13 integrate .. //depot/projects/smpng/sys/dev/firewire/firewire.h#6 integrate .. //depot/projects/smpng/sys/dev/firewire/firewire_phy.h#2 integrate .. //depot/projects/smpng/sys/dev/firewire/firewirereg.h#7 integrate .. //depot/projects/smpng/sys/dev/firewire/fwcrom.c#3 integrate .. //depot/projects/smpng/sys/dev/firewire/fwdev.c#6 integrate .. //depot/projects/smpng/sys/dev/firewire/fwdma.c#1 branch .. //depot/projects/smpng/sys/dev/firewire/fwdma.h#1 branch .. //depot/projects/smpng/sys/dev/firewire/fwmem.c#8 integrate .. //depot/projects/smpng/sys/dev/firewire/fwmem.h#4 integrate .. //depot/projects/smpng/sys/dev/firewire/fwohci.c#14 integrate .. //depot/projects/smpng/sys/dev/firewire/fwohci_pci.c#10 integrate .. //depot/projects/smpng/sys/dev/firewire/fwohcireg.h#5 integrate .. //depot/projects/smpng/sys/dev/firewire/fwohcivar.h#5 integrate .. //depot/projects/smpng/sys/dev/firewire/iec13213.h#3 integrate .. //depot/projects/smpng/sys/dev/firewire/iec68113.h#3 integrate .. //depot/projects/smpng/sys/dev/firewire/if_fwe.c#10 integrate .. //depot/projects/smpng/sys/dev/firewire/if_fwevar.h#3 integrate .. //depot/projects/smpng/sys/dev/firewire/sbp.c#13 integrate .. //depot/projects/smpng/sys/dev/mcd/mcd_isa.c#3 integrate .. //depot/projects/smpng/sys/dev/scd/scd_isa.c#2 integrate .. //depot/projects/smpng/sys/dev/sound/pci/via8233.c#6 integrate .. //depot/projects/smpng/sys/dev/sound/pci/via8233.h#3 integrate .. //depot/projects/smpng/sys/dev/wds/wd7000.c#3 integrate .. //depot/projects/smpng/sys/geom/geom_bsd.c#26 integrate .. //depot/projects/smpng/sys/geom/geom_bsd_enc.c#1 branch .. //depot/projects/smpng/sys/i386/isa/bs/bsif.h#4 integrate .. //depot/projects/smpng/sys/kern/kern_shutdown.c#34 integrate .. //depot/projects/smpng/sys/kern/subr_devstat.c#9 integrate .. //depot/projects/smpng/sys/kern/subr_disk.c#19 integrate .. //depot/projects/smpng/sys/modules/firewire/Makefile.inc#2 integrate .. //depot/projects/smpng/sys/modules/firewire/firewire/Makefile#7 integrate .. //depot/projects/smpng/sys/modules/firewire/fwe/Makefile#3 integrate .. //depot/projects/smpng/sys/pc98/pc98/wd.c#11 integrate .. //depot/projects/smpng/sys/pci/if_dc.c#32 integrate .. //depot/projects/smpng/sys/sys/disklabel.h#24 integrate .. //depot/projects/smpng/sys/sys/param.h#38 integrate .. //depot/user/jhb/proc/proc.fields#19 edit Differences ... ==== //depot/projects/smpng/sys/boot/alpha/boot1/boot1.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * $FreeBSD: src/sys/boot/alpha/boot1/boot1.c,v 1.12 2002/06/29 02:32:32 peter Exp $ + * $FreeBSD: src/sys/boot/alpha/boot1/boot1.c,v 1.13 2003/04/16 21:09:41 phk Exp $ * From $NetBSD: bootxx.c,v 1.4 1997/09/06 14:08:29 drochner Exp $ */ @@ -33,7 +33,6 @@ #include #include #include -#include #include #include ==== //depot/projects/smpng/sys/boot/arc/lib/arcdisk.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/arc/lib/arcdisk.c,v 1.5 2003/04/04 16:35:14 phk Exp $ + * $FreeBSD: src/sys/boot/arc/lib/arcdisk.c,v 1.6 2003/04/16 21:09:41 phk Exp $ */ /* @@ -39,7 +39,6 @@ #include -#include #include ==== //depot/projects/smpng/sys/boot/arc/lib/devicename.c#2 (text+ko) ==== @@ -23,12 +23,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/arc/lib/devicename.c,v 1.2 1999/08/28 00:39:38 peter Exp $ + * $FreeBSD: src/sys/boot/arc/lib/devicename.c,v 1.3 2003/04/16 21:09:41 phk Exp $ */ #include #include -#include #include "bootstrap.h" #include "libarc.h" ==== //depot/projects/smpng/sys/boot/ofw/libofw/devicename.c#6 (text+ko) ==== @@ -23,11 +23,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/ofw/libofw/devicename.c,v 1.12 2002/12/02 01:46:22 jake Exp $ + * $FreeBSD: src/sys/boot/ofw/libofw/devicename.c,v 1.13 2003/04/16 21:09:41 phk Exp $ */ #include -#include #include "libofw.h" static int ofw_parsedev(struct ofw_devdesc **, const char *, const char **); ==== //depot/projects/smpng/sys/boot/ofw/libofw/ofw_disk.c#7 (text+ko) ==== @@ -22,7 +22,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/ofw/libofw/ofw_disk.c,v 1.8 2002/11/10 19:17:36 jake Exp $ + * $FreeBSD: src/sys/boot/ofw/libofw/ofw_disk.c,v 1.9 2003/04/16 21:09:41 phk Exp $ */ /* @@ -30,7 +30,6 @@ */ #include -#include #include ==== //depot/projects/smpng/sys/boot/sparc64/boot1/boot1.c#6 (text+ko) ==== @@ -17,10 +17,9 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/sparc64/boot1/boot1.c,v 1.15 2003/04/04 16:35:15 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/sparc64/boot1/boot1.c,v 1.16 2003/04/16 21:09:41 phk Exp $"); #include -#include #include #include #include ==== //depot/projects/smpng/sys/compat/linux/linux_ioctl.c#25 (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/compat/linux/linux_ioctl.c,v 1.105 2003/04/01 12:34:47 phk Exp $ + * $FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.106 2003/04/16 20:57:35 phk Exp $ */ #include @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include ==== //depot/projects/smpng/sys/compat/linux/linux_misc.c#36 (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/compat/linux/linux_misc.c,v 1.140 2003/04/16 20:07:48 jhb Exp $ + * $FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.141 2003/04/16 20:43:10 jhb Exp $ */ #include "opt_mac.h" @@ -878,7 +878,7 @@ { #ifdef DEBUG if (ldebug(personality)) - printf(ARGS(personality, "%ld"), args->per); + printf(ARGS(personality, "%lu"), (unsigned long)args->per); #endif #ifndef __alpha__ if (args->per != 0) ==== //depot/projects/smpng/sys/conf/files#73 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.782 2003/04/15 04:08:01 mdodd Exp $ +# $FreeBSD: src/sys/conf/files,v 1.784 2003/04/17 07:39:03 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -395,6 +395,7 @@ dev/firewire/firewire.c optional firewire dev/firewire/fwcrom.c optional firewire dev/firewire/fwdev.c optional firewire +dev/firewire/fwdma.c optional firewire dev/firewire/fwmem.c optional firewire dev/firewire/fwohci.c optional firewire dev/firewire/fwohci_pci.c optional firewire pci @@ -891,6 +892,7 @@ geom/geom_aes.c optional geom_aes geom/geom_apple.c optional geom_apple geom/geom_bsd.c optional geom_bsd +geom/geom_bsd_enc.c optional geom_bsd geom/geom_ctl.c standard geom/geom_dev.c standard geom/geom_disk.c standard ==== //depot/projects/smpng/sys/conf/files.alpha#22 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.alpha,v 1.100 2003/02/28 21:59:13 ru Exp $ +# $FreeBSD: src/sys/conf/files.alpha,v 1.101 2003/04/17 07:39:03 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -192,6 +192,7 @@ dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc geom/geom_bsd.c standard +geom/geom_bsd_enc.c standard isa/atkbd_isa.c optional atkbd isa/atkbdc_isa.c optional atkbdc isa/fd.c optional fdc ==== //depot/projects/smpng/sys/conf/files.i386#39 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.442 2003/04/12 08:34:40 phk Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.443 2003/04/17 07:39:03 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -147,6 +147,7 @@ dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc geom/geom_bsd.c standard +geom/geom_bsd_enc.c standard geom/geom_mbr.c standard geom/geom_mbr_enc.c standard gnu/i386/fpemul/div_small.s optional gpl_math_emulate \ ==== //depot/projects/smpng/sys/conf/files.ia64#26 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.ia64,v 1.49 2003/04/12 08:34:40 phk Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.50 2003/04/17 07:39:03 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -93,6 +93,7 @@ dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc geom/geom_bsd.c standard +geom/geom_bsd_enc.c standard geom/geom_gpt.c standard geom/geom_mbr.c standard geom/geom_mbr_enc.c standard ==== //depot/projects/smpng/sys/conf/files.pc98#39 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.267 2003/03/25 05:19:17 mdodd Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.268 2003/04/17 07:39:03 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -124,6 +124,7 @@ dev/syscons/scvidctl.c optional sc dev/syscons/sysmouse.c optional sc geom/geom_bsd.c standard +geom/geom_bsd_enc.c standard geom/geom_pc98.c standard gnu/i386/fpemul/div_small.s optional gpl_math_emulate \ warning "kernel contains GPL contaminated math emulator" ==== //depot/projects/smpng/sys/conf/files.sparc64#26 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sparc64,v 1.40 2003/03/19 06:55:36 jake Exp $ +# $FreeBSD: src/sys/conf/files.sparc64,v 1.41 2003/04/17 07:39:03 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -18,6 +18,7 @@ dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa geom/geom_bsd.c standard +geom/geom_bsd_enc.c standard geom/geom_sunlabel.c standard libkern/ffs.c standard kern/syscalls.c optional ktr ==== //depot/projects/smpng/sys/dev/asr/asr.c#18 (text+ko) ==== @@ -103,7 +103,7 @@ * use proprietary packet creation instead of scsi_inquire * CAM layer sends synchronize commands. * - * $FreeBSD: src/sys/dev/asr/asr.c,v 1.33 2003/03/03 12:15:40 phk Exp $ + * $FreeBSD: src/sys/dev/asr/asr.c,v 1.34 2003/04/16 20:46:30 phk Exp $ */ #define ASR_VERSION 1 @@ -216,7 +216,7 @@ #include #include #include -#include +#include #include #include #include ==== //depot/projects/smpng/sys/dev/firewire/firewire.c#13 (text+ko) ==== @@ -1,4 +1,5 @@ /* + * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa * All rights reserved. * @@ -30,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.45 2003/03/24 04:11:21 simokawa Exp $ + * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.46 2003/04/17 03:38:02 simokawa Exp $ * */ @@ -44,13 +45,13 @@ #include #include #include -#include #include #include /* for rdtsc proto for clock.h below */ #include #include /* used by smbus and newbus */ +#include #include #include @@ -71,8 +72,6 @@ #define FW_MAXASYRTY 4 #define FW_MAXDEVRCNT 4 -#define XFER_TIMEOUT 0 - devclass_t firewire_devclass; static int firewire_match __P((device_t)); @@ -202,9 +201,9 @@ xferq = fc->ats; len = info->hdr_len; if (info->flag & FWTI_BLOCK_STR) - len += ntohs(fp->mode.stream.len); + len += fp->mode.stream.len; else if (info->flag & FWTI_BLOCK_ASY) - len += ntohs(fp->mode.rresb.len); + len += fp->mode.rresb.len; if( len > xfer->send.len ){ printf("len(%d) > send.len(%d) (tcode=%d)\n", len, xfer->send.len, tcode); @@ -230,11 +229,9 @@ } xfer->tl = tl; - xfer->tcode = tcode; xfer->resp = 0; xfer->fc = fc; xfer->q = xferq; - xfer->act_type = FWACT_XFER; xfer->retry_req = fw_asybusy; fw_asystart(xfer); @@ -252,12 +249,7 @@ * Postpone to later retry. */ void fw_asybusy(struct fw_xfer *xfer){ -#if 1 printf("fw_asybusy\n"); -#endif -#if XFER_TIMEOUT - untimeout(fw_xfer_timeout, (void *)xfer, xfer->ch); -#endif /* xfer->ch = timeout((timeout_t *)fw_asystart, (void *)xfer, 20000); */ @@ -265,24 +257,7 @@ fw_asystart(xfer); return; } -#if XFER_TIMEOUT -/* - * Post timeout for async. request. - */ -void -fw_xfer_timeout(void *arg) -{ - int s; - struct fw_xfer *xfer; - xfer = (struct fw_xfer *)arg; - printf("fw_xfer_timeout status=%d resp=%d\n", xfer->state, xfer->resp); - /* XXX set error code */ - s = splfw(); - xfer->act.hand(xfer); - splx(s); -} -#endif /* * Async. request with given xfer structure. */ @@ -292,6 +267,7 @@ struct firewire_comm *fc = xfer->fc; int s; if(xfer->retry++ >= fc->max_asyretry){ + device_printf(fc->bdev, "max_asyretry exceeded\n"); xfer->resp = EBUSY; xfer->state = FWXF_BUSY; xfer->act.hand(xfer); @@ -314,10 +290,6 @@ /* XXX just queue for mbuf */ if (xfer->mbuf == NULL) xfer->q->start(fc); -#if XFER_TIMEOUT - if (xfer->act.hand != NULL) - xfer->ch = timeout(fw_xfer_timeout, (void *)xfer, hz); -#endif return; } @@ -355,15 +327,7 @@ xfer->dst, i); xfer->resp = ETIMEDOUT; STAILQ_REMOVE_HEAD(&fc->tlabels[i], link); - switch (xfer->act_type) { - case FWACT_XFER: - fw_xfer_done(xfer); - break; - default: - /* ??? */ - fw_xfer_free(xfer); - break; - } + fw_xfer_done(xfer); } } splx(s); @@ -437,10 +401,8 @@ /* launch attachement of the added children */ bus_generic_attach(dev); -#if 1 /* bus_reset */ fc->ibr(fc); -#endif return 0; } @@ -524,15 +486,7 @@ STAILQ_REMOVE_HEAD(&xferq->q, link); xferq->queued --; xfer->resp = EAGAIN; - switch (xfer->act_type) { - case FWACT_XFER: - fw_xfer_done(xfer); - break; - default: - /* ??? */ - fw_xfer_free(xfer); - break; - } + fw_xfer_done(xfer); } } @@ -553,6 +507,9 @@ void fw_busreset(struct firewire_comm *fc) { + struct firewire_dev_comm *fdc; + device_t *devlistp; + int devcnt; int i; switch(fc->status){ @@ -601,6 +558,16 @@ CSRARC(fc, STATE_CLEAR) &= ~(1 << 23 | 1 << 15 | 1 << 14 ); CSRARC(fc, STATE_SET) = CSRARC(fc, STATE_CLEAR); + + if (device_get_children(fc->bdev, &devlistp, &devcnt) == 0) { + for( i = 0 ; i < devcnt ; i++) + if (device_get_state(devlistp[i]) >= DS_ATTACHED) { + fdc = device_get_softc(devlistp[i]); + if (fdc->post_busreset != NULL) + fdc->post_busreset(fdc); + } + free(devlistp, M_TEMP); + } } /* Call once after reboot */ @@ -620,21 +587,15 @@ fc->atq->queued = 0; fc->ats->queued = 0; - fc->arq->psize = PAGE_SIZE; - fc->ars->psize = PAGE_SIZE; - fc->atq->psize = 0; - fc->ats->psize = 0; - - fc->arq->buf = NULL; fc->ars->buf = NULL; fc->atq->buf = NULL; fc->ats->buf = NULL; - fc->arq->flag = FWXFERQ_PACKET; - fc->ars->flag = FWXFERQ_PACKET; - fc->atq->flag = FWXFERQ_PACKET; - fc->ats->flag = FWXFERQ_PACKET; + fc->arq->flag = 0; + fc->ars->flag = 0; + fc->atq->flag = 0; + fc->ats->flag = 0; STAILQ_INIT(&fc->atq->q); STAILQ_INIT(&fc->ats->q); @@ -723,7 +684,6 @@ fw_xfer_free(xfer); } xfer->act.hand = fw_vmaccess; - xfer->act_type = FWACT_XFER; xfer->fc = fc; xfer->sc = NULL; @@ -744,7 +704,7 @@ struct fw_bind *tfw; for(tfw = STAILQ_FIRST(&fc->binds) ; tfw != NULL ; tfw = STAILQ_NEXT(tfw, fclist)){ - if(tfw->xfer->act_type != FWACT_NULL && + if (tfw->act_type != FWACT_NULL && tfw->start_hi == dest_hi && tfw->start_lo <= dest_lo && (tfw->start_lo + tfw->addrlen) > dest_lo){ @@ -796,9 +756,8 @@ STAILQ_INSERT_TAIL(&fc->binds, fwb, fclist); } out: - if(!err && fwb->xfer->act_type == FWACT_CH){ - STAILQ_INSERT_HEAD(&fc->ir[fwb->xfer->sub]->binds, fwb, chlist); - } + if (!err && fwb->act_type == FWACT_CH) + STAILQ_INSERT_HEAD(&fc->ir[fwb->sub]->binds, fwb, chlist); return err; } @@ -809,14 +768,19 @@ fw_bindremove(struct firewire_comm *fc, struct fw_bind *fwb) { int s; + struct fw_xfer *xfer, *next; s = splfw(); /* shall we check the existance? */ STAILQ_REMOVE(&fc->binds, fwb, fw_bind, fclist); + /* shall we do this? */ + for (xfer = STAILQ_FIRST(&fwb->xferlist); xfer != NULL; xfer = next) { + next = STAILQ_NEXT(xfer, link); + fw_xfer_free(xfer); + } + STAILQ_INIT(&fwb->xferlist); + splx(s); - if (fwb->xfer) - fw_xfer_free(fwb->xfer); - return 0; } @@ -881,12 +845,40 @@ return xfer; microtime(&xfer->tv); - xfer->sub = -1; xfer->malloc = type; return xfer; } +struct fw_xfer * +fw_xfer_alloc_buf(struct malloc_type *type, int send_len, int recv_len) +{ + struct fw_xfer *xfer; + + xfer = fw_xfer_alloc(type); + xfer->send.len = send_len; + xfer->recv.len = recv_len; + if (xfer == NULL) + return(NULL); + if (send_len) { + xfer->send.buf = malloc(send_len, type, M_NOWAIT | M_ZERO); + if (xfer->send.buf == NULL) { + fw_xfer_free(xfer); + return(NULL); + } + } + if (recv_len) { + xfer->recv.buf = malloc(recv_len, type, M_NOWAIT); + if (xfer->recv.buf == NULL) { + if (xfer->send.buf != NULL) + free(xfer->send.buf, type); + fw_xfer_free(xfer); + return(NULL); + } + } + return(xfer); +} + /* * IEEE1394 XFER post process. */ @@ -896,10 +888,6 @@ if (xfer->act.hand == NULL) return; -#if XFER_TIMEOUT - untimeout(fw_xfer_timeout, (void *)xfer, xfer->ch); -#endif - if (xfer->fc->status != FWBUSRESET) xfer->act.hand(xfer); else { @@ -911,13 +899,11 @@ } } -/* - * To free IEEE1394 XFER structure. - */ void -fw_xfer_free( struct fw_xfer* xfer) +fw_xfer_unload(struct fw_xfer* xfer) { int s; + if(xfer == NULL ) return; if(xfer->state == FWXF_INQ){ printf("fw_xfer_free FWXF_INQ\n"); @@ -926,25 +912,31 @@ xfer->q->queued --; splx(s); } - if(xfer->fc != NULL){ - if(xfer->state == FWXF_START){ -#if 0 /* this could happen if we call fwohci_arcv() before fwohci_txd() */ - printf("fw_xfer_free FWXF_START\n"); + if (xfer->fc != NULL) { +#if 1 /* this could happen if we call fwohci_arcv() before fwohci_txd() */ + if(xfer->state == FWXF_START) + panic("fw_xfer_free FWXF_START\n"); #endif - s = splfw(); - xfer->q->drain(xfer->fc, xfer); - splx(s); - } + fw_tl_free(xfer->fc, xfer); } + xfer->state = FWXF_INIT; + xfer->resp = 0; + xfer->retry = 0; +} +/* + * To free IEEE1394 XFER structure. + */ +void +fw_xfer_free( struct fw_xfer* xfer) +{ + if(xfer == NULL ) return; + fw_xfer_unload(xfer); if(xfer->send.buf != NULL){ - free(xfer->send.buf, M_FW); + free(xfer->send.buf, xfer->malloc); } if(xfer->recv.buf != NULL){ - free(xfer->recv.buf, M_FW); + free(xfer->recv.buf, xfer->malloc); } - if(xfer->fc != NULL){ - fw_tl_free(xfer->fc, xfer); - } free(xfer, xfer->malloc); } @@ -969,24 +961,19 @@ fc->status = FWBUSPHYCONF; -#if 0 - DELAY(100000); -#endif - xfer = fw_xfer_alloc(M_FWXFER); - xfer->send.len = 12; - xfer->send.off = 0; + xfer = fw_xfer_alloc_buf(M_FWXFER, 12, 0); + if (xfer == NULL) + return; xfer->fc = fc; xfer->retry_req = fw_asybusy; xfer->act.hand = fw_asy_callback_free; - xfer->send.buf = malloc(sizeof(u_int32_t), - M_FW, M_NOWAIT | M_ZERO); fp = (struct fw_pkt *)xfer->send.buf; fp->mode.ld[1] = 0; if (root_node >= 0) - fp->mode.ld[1] |= htonl((root_node & 0x3f) << 24 | 1 << 23); + fp->mode.ld[1] |= (root_node & 0x3f) << 24 | 1 << 23; if (gap_count >= 0) - fp->mode.ld[1] |= htonl(1 << 22 | (gap_count & 0x3f) << 16); + fp->mode.ld[1] |= 1 << 22 | (gap_count & 0x3f) << 16; fp->mode.ld[2] = ~fp->mode.ld[1]; /* XXX Dangerous, how to pass PHY packet to device driver */ fp->mode.common.tcode |= FWTCODE_PHY; @@ -1018,9 +1005,9 @@ /* * To receive self ID. */ -void fw_sidrcv(struct firewire_comm* fc, caddr_t buf, u_int len, u_int off) +void fw_sidrcv(struct firewire_comm* fc, u_int32_t *sid, u_int len) { - u_int32_t *p, *sid = (u_int32_t *)(buf + off); + u_int32_t *p; union fw_self_id *self_id; u_int i, j, node, c_port = 0, i_branch = 0; @@ -1103,9 +1090,7 @@ bcopy(p, &CSRARC(fc, SPED_MAP + 8), (fc->speed_map->crc_len - 1)*4); fc->max_hop = fc->max_node - i_branch; -#if 1 printf(", maxhop <= %d", fc->max_hop); -#endif if(fc->irm == -1 ){ printf(", Not found IRM capable node"); @@ -1132,7 +1117,6 @@ CSRARC(fc, BUS_MGR_ID)); #endif } - free(buf, M_FW); if(fc->irm == ((CSRARC(fc, NODE_IDS) >> 16 ) & 0x3f)){ /* I am BMGR */ fw_bmr(fc); @@ -1240,12 +1224,7 @@ fwdev->dst = fc->ongonode; fwdev->eui.hi = fc->ongoeui.hi; fwdev->eui.lo = fc->ongoeui.lo; fwdev->status = FWDEVINIT; -#if 0 - fwdev->speed = CSRARC(fc, SPED_MAP + 8 + fc->ongonode / 4) - >> ((3 - (fc->ongonode % 4)) * 8); -#else fwdev->speed = fc->speed_map->speed[fc->nodeid][fc->ongonode]; -#endif pfwdev = NULL; STAILQ_FOREACH(tfwdev, &fc->devices, link) { @@ -1276,28 +1255,20 @@ fw_bus_explore_callback); if(xfer == NULL) goto done; #else - xfer = fw_xfer_alloc(M_FWXFER); + xfer = fw_xfer_alloc_buf(M_FWXFER, 16, 16); if(xfer == NULL){ goto done; } - xfer->send.len = 16; xfer->spd = 0; - xfer->send.buf = malloc(16, M_FW, M_NOWAIT); - if(xfer->send.buf == NULL){ - fw_xfer_free( xfer); - return; - } - - xfer->send.off = 0; fp = (struct fw_pkt *)xfer->send.buf; - fp->mode.rreqq.dest_hi = htons(0xffff); + fp->mode.rreqq.dest_hi = 0xffff; fp->mode.rreqq.tlrt = 0; fp->mode.rreqq.tcode = FWTCODE_RREQQ; fp->mode.rreqq.pri = 0; fp->mode.rreqq.src = 0; xfer->dst = FWLOCALBUS | fc->ongonode; - fp->mode.rreqq.dst = htons(xfer->dst); - fp->mode.rreqq.dest_lo = htonl(addr); + fp->mode.rreqq.dst = xfer->dst; + fp->mode.rreqq.dest_lo = addr; xfer->act.hand = fw_bus_explore_callback; if (firewire_debug) @@ -1330,21 +1301,13 @@ struct fw_pkt *fp; int err; - xfer = fw_xfer_alloc(M_FWXFER); - if(xfer == NULL){ + xfer = fw_xfer_alloc_buf(M_FWXFER, 16, 16); + if (xfer == NULL) return NULL; - } - xfer->send.len = 16; + xfer->spd = spd; /* XXX:min(spd, fc->spd) */ - xfer->send.buf = malloc(16, M_FW, M_NOWAIT); - if(xfer->send.buf == NULL){ - fw_xfer_free( xfer); - return NULL; - } - - xfer->send.off = 0; fp = (struct fw_pkt *)xfer->send.buf; - fp->mode.rreqq.dest_hi = htons(addr_hi & 0xffff); + fp->mode.rreqq.dest_hi = addr_hi & 0xffff; if(tl & FWP_TL_VALID){ fp->mode.rreqq.tlrt = (tl & 0x3f) << 2; }else{ @@ -1355,8 +1318,8 @@ fp->mode.rreqq.pri = 0; fp->mode.rreqq.src = 0; xfer->dst = addr_hi >> 16; - fp->mode.rreqq.dst = htons(xfer->dst); - fp->mode.rreqq.dest_lo = htonl(addr_lo); + fp->mode.rreqq.dst = xfer->dst; + fp->mode.rreqq.dest_lo = addr_lo; xfer->act.hand = hand; err = fw_asyreq(fc, -1, xfer); @@ -1420,14 +1383,14 @@ qld = (u_int32_t *)xfer->recv.buf; printf("len:%d\n", xfer->recv.len); for( i = 0 ; i <= xfer->recv.len && i < 32; i+= 4){ - printf("0x%08x ", ntohl(rfp->mode.ld[i/4])); + printf("0x%08x ", rfp->mode.ld[i/4]); if((i % 16) == 15) printf("\n"); } if((i % 16) != 15) printf("\n"); } #endif if(fc->ongodev == NULL){ - if(sfp->mode.rreqq.dest_lo == htonl((0xf0000000 | CSRROMOFF))){ + if(sfp->mode.rreqq.dest_lo == (0xf0000000 | CSRROMOFF)){ rfp->mode.rresq.data = ntohl(rfp->mode.rresq.data); chdr = (struct csrhdr *)(&rfp->mode.rresq.data); /* If CSR is minimal confinguration, more investgation is not needed. */ @@ -1439,10 +1402,10 @@ }else{ fc->ongoaddr = CSRROMOFF + 0xc; } - }else if(sfp->mode.rreqq.dest_lo == htonl((0xf0000000 |(CSRROMOFF + 0xc)))){ + }else if(sfp->mode.rreqq.dest_lo == (0xf0000000 |(CSRROMOFF + 0xc))){ fc->ongoeui.hi = ntohl(rfp->mode.rresq.data); fc->ongoaddr = CSRROMOFF + 0x10; - }else if(sfp->mode.rreqq.dest_lo == htonl((0xf0000000 |(CSRROMOFF + 0x10)))){ + }else if(sfp->mode.rreqq.dest_lo == (0xf0000000 |(CSRROMOFF + 0x10))){ fc->ongoeui.lo = ntohl(rfp->mode.rresq.data); if (fc->ongoeui.hi == 0 && fc->ongoeui.lo == 0) { if (firewire_debug) @@ -1701,17 +1664,42 @@ return(-1); } +static void +fw_rcv_copy(struct fw_xfer *xfer, struct iovec *vec, int nvec) +{ + char *p; + int res, i, len; + + p = xfer->recv.buf; + res = xfer->recv.len; + for (i = 0; i < nvec; i++, vec++) { + len = vec->iov_len; + if (res < len) { + printf("rcv buffer(%d) is %d bytes short.\n", + xfer->recv.len, len - res); + len = res; + } + bcopy(vec->iov_base, p, len); + p += len; + res -= len; + if (res <= 0) + break; + } + xfer->recv.len -= res; +} + /* * Generic packet receving process. */ void -fw_rcv(struct firewire_comm* fc, caddr_t buf, u_int len, u_int sub, u_int off, u_int spd) +fw_rcv(struct firewire_comm *fc, struct iovec *vec, int nvec, u_int sub, u_int spd) { struct fw_pkt *fp, *resfp; struct fw_xfer *xfer; struct fw_bind *bind; struct firewire_softc *sc; - int s; + int tcode, s; + int i, len, oldstate; #if 0 { u_int32_t *qld; @@ -1725,25 +1713,37 @@ if((i % 16) != 15) printf("\n"); } #endif - fp = (struct fw_pkt *)(buf + off); - switch(fp->mode.common.tcode){ + fp = (struct fw_pkt *)vec[0].iov_base; + tcode = fp->mode.common.tcode; +#if 0 /* XXX this check is not valid for RRESQ and WREQQ */ + if (vec[0].iov_len < fc->tcode[tcode].hdr_len) { +#if __FreeBSD_version >= 500000 + printf("fw_rcv: iov_len(%zu) is less than" +#else + printf("fw_rcv: iov_len(%u) is less than" +#endif + " hdr_len(%d:tcode=%d)\n", vec[0].iov_len, + fc->tcode[tcode].hdr_len, tcode); + } +#endif + switch (tcode) { case FWTCODE_WRES: case FWTCODE_RRESQ: case FWTCODE_RRESB: case FWTCODE_LRES: - xfer = fw_tl2xfer(fc, ntohs(fp->mode.hdr.src), + xfer = fw_tl2xfer(fc, fp->mode.hdr.src, fp->mode.hdr.tlrt >> 2); if(xfer == NULL) { printf("fw_rcv: unknown response " "tcode=%d src=0x%x tl=0x%x rt=%d data=0x%x\n", - fp->mode.common.tcode, - ntohs(fp->mode.hdr.src), + tcode, + fp->mode.hdr.src, fp->mode.hdr.tlrt >> 2, fp->mode.hdr.tlrt & 3, fp->mode.rresq.data); #if 1 printf("try ad-hoc work around!!\n"); - xfer = fw_tl2xfer(fc, ntohs(fp->mode.hdr.src), + xfer = fw_tl2xfer(fc, fp->mode.hdr.src, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Apr 17 08:36:08 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6879537B404; Thu, 17 Apr 2003 08:36:08 -0700 (PDT) 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 F1F3537B401 for ; Thu, 17 Apr 2003 08:36:07 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C0A343FAF for ; Thu, 17 Apr 2003 08:36:07 -0700 (PDT) (envelope-from jhb@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 h3HFa70U028123 for ; Thu, 17 Apr 2003 08:36:07 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3HFa6Ir028120 for perforce@freebsd.org; Thu, 17 Apr 2003 08:36:06 -0700 (PDT) Date: Thu, 17 Apr 2003 08:36:06 -0700 (PDT) Message-Id: <200304171536.h3HFa6Ir028120@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29123 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 15:36:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=29123 Change 29123 by jhb@jhb_laptop on 2003/04/17 08:35:36 This assert actually triggered while syncing buffers on shutdown, so make it into a printf instead of a panic so I don't lose my buffers. Affected files ... .. //depot/projects/smpng/sys/kern/kern_lock.c#25 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_lock.c#25 (text+ko) ==== @@ -229,10 +229,8 @@ error = 0; if (td == NULL) thr = LK_KERNPROC; - else { - MPASS(td == curthread); + else thr = td; - } if ((flags & LK_INTERNAL) == 0) mtx_lock(lkp->lk_interlock); @@ -267,6 +265,12 @@ */ if (lkp->lk_lockholder != thr) { lockflags = LK_HAVE_EXCL; +#ifdef INVARIANTS + if (td != NULL && td != curthread) + printf("%s: weird thread pid %d (%s)\n", + __func__, td->td_proc->p_pid, + td->td_proc->p_comm); +#endif if (td != NULL && !(td->td_flags & TDF_DEADLKTREAT)) lockflags |= LK_WANT_EXCL | LK_WANT_UPGRADE; error = acquire(&lkp, extflags, lockflags); From owner-p4-projects@FreeBSD.ORG Thu Apr 17 11:31:53 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4676237B404; Thu, 17 Apr 2003 11:31:53 -0700 (PDT) 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 D489B37B405 for ; Thu, 17 Apr 2003 11:31:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 592FA43FA3 for ; Thu, 17 Apr 2003 11:31:52 -0700 (PDT) (envelope-from marcel@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 h3HIVq0U050525 for ; Thu, 17 Apr 2003 11:31:52 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3HIVp7i050522 for perforce@freebsd.org; Thu, 17 Apr 2003 11:31:51 -0700 (PDT) Date: Thu, 17 Apr 2003 11:31:51 -0700 (PDT) Message-Id: <200304171831.h3HIVp7i050522@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29139 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 18:31:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=29139 Change 29139 by marcel@marcel_nfs on 2003/04/17 11:31:14 Unstaticize kptdir and raname it to ia64_kptdir to avoid name clashes. This allows us to use the kernel page tables for handling nested TLB faults. Affected files ... .. //depot/projects/ia64_epc/lib/libkvm/kvm_ia64.c#2 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#5 edit Differences ... ==== //depot/projects/ia64_epc/lib/libkvm/kvm_ia64.c#2 (text+ko) ==== @@ -148,7 +148,7 @@ * addresses/values. */ - nlist[0].n_name = "kptdir"; + nlist[0].n_name = "ia64_kptdir"; nlist[1].n_name = 0; if (kvm_nlist(kd, nlist) != 0) { ==== //depot/projects/ia64_epc/sys/ia64/ia64/pmap.c#5 (text+ko) ==== @@ -202,7 +202,7 @@ * ia64_lptes. This gives us up to 2Gb of kernel virtual space. */ static int nkpt; -static struct ia64_lpte **kptdir; +struct ia64_lpte **ia64_kptdir; #define KPTE_DIR_INDEX(va) \ ((va >> (2*PAGE_SHIFT-5)) & ((1<<(PAGE_SHIFT-3))-1)) #define KPTE_PTE_INDEX(va) \ @@ -346,9 +346,9 @@ /* * Allocate some memory for initial kernel 'page tables'. */ - kptdir = (struct ia64_lpte **) pmap_steal_memory(PAGE_SIZE); + ia64_kptdir = (void *)pmap_steal_memory(PAGE_SIZE); for (i = 0; i < NKPT; i++) { - kptdir[i] = (struct ia64_lpte *) pmap_steal_memory(PAGE_SIZE); + ia64_kptdir[i] = (void*)pmap_steal_memory(PAGE_SIZE); } nkpt = NKPT; @@ -878,7 +878,7 @@ } addr = (addr + PAGE_SIZE * NKPTEPG) & ~(PAGE_SIZE * NKPTEPG - 1); while (kernel_vm_end < addr) { - if (kptdir[KPTE_DIR_INDEX(kernel_vm_end)]) { + if (ia64_kptdir[KPTE_DIR_INDEX(kernel_vm_end)]) { kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NKPTEPG) & ~(PAGE_SIZE * NKPTEPG - 1); continue; @@ -902,7 +902,7 @@ ptepage = (struct ia64_lpte *) IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS(nkpg)); bzero(ptepage, PAGE_SIZE); - kptdir[KPTE_DIR_INDEX(kernel_vm_end)] = ptepage; + ia64_kptdir[KPTE_DIR_INDEX(kernel_vm_end)] = ptepage; kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NKPTEPG) & ~(PAGE_SIZE * NKPTEPG - 1); } @@ -1171,7 +1171,7 @@ ("kernel mapping 0x%lx not in region 5", va)); KASSERT(IA64_RR_MASK(va) < (nkpt * PAGE_SIZE * NKPTEPG), ("kernel mapping 0x%lx out of range", va)); - return &kptdir[KPTE_DIR_INDEX(va)][KPTE_PTE_INDEX(va)]; + return (&ia64_kptdir[KPTE_DIR_INDEX(va)][KPTE_PTE_INDEX(va)]); } /* From owner-p4-projects@FreeBSD.ORG Thu Apr 17 11:38:02 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3FE3837B401; Thu, 17 Apr 2003 11:38:01 -0700 (PDT) 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 BD59537B40E for ; Thu, 17 Apr 2003 11:38:00 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6476843FBD for ; Thu, 17 Apr 2003 11:38:00 -0700 (PDT) (envelope-from marcel@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 h3HIc00U050715 for ; Thu, 17 Apr 2003 11:38:00 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3HIbxGH050712 for perforce@freebsd.org; Thu, 17 Apr 2003 11:37:59 -0700 (PDT) Date: Thu, 17 Apr 2003 11:37:59 -0700 (PDT) Message-Id: <200304171837.h3HIbxGH050712@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29140 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 18:38:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=29140 Change 29140 by marcel@marcel_nfs on 2003/04/17 11:37:51 When we switch to virtual addressing on the AP, enable interrupt collection as well. This avoids nested TLB faults in cases we have to deal with a fault. There's also no need to keep interrupt collection disabled. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#11 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#7 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#11 (text+ko) ==== @@ -282,7 +282,7 @@ ;; 1: mov r16 = ip add r17 = 2f-1b, r17 - movl r18 = (IA64_PSR_AC|IA64_PSR_BN|IA64_PSR_DFH|IA64_PSR_DT|IA64_PSR_IT|IA64_PSR_RT) + movl r18 = (IA64_PSR_AC|IA64_PSR_BN|IA64_PSR_DFH|IA64_PSR_DT|IA64_PSR_IC|IA64_PSR_IT|IA64_PSR_RT) ;; add r17 = r17, r16 mov cr.ipsr = r18 ==== //depot/projects/ia64_epc/sys/ia64/ia64/mp_machdep.c#7 (text+ko) ==== @@ -104,7 +104,7 @@ while (ap_spin) /* spin */; - __asm __volatile("ssm psr.ic|psr.i;; srlz.i;;"); + __asm __volatile("ssm psr.i;; srlz.d;;"); /* * Get and save the CPU specific MCA records. Should we get the From owner-p4-projects@FreeBSD.ORG Thu Apr 17 13:28:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BCEED37B404; Thu, 17 Apr 2003 13:28:20 -0700 (PDT) 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 408DD37B401 for ; Thu, 17 Apr 2003 13:28:20 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AEF8F43F3F for ; Thu, 17 Apr 2003 13:28:19 -0700 (PDT) (envelope-from marcel@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 h3HKSJ0U066186 for ; Thu, 17 Apr 2003 13:28:19 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3HKSJp1066183 for perforce@freebsd.org; Thu, 17 Apr 2003 13:28:19 -0700 (PDT) Date: Thu, 17 Apr 2003 13:28:19 -0700 (PDT) Message-Id: <200304172028.h3HKSJp1066183@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29149 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 20:28:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=29149 Change 29149 by marcel@marcel_nfs on 2003/04/17 13:27:57 Now, this I like: we don't have to do anything special when we enter the child's user space after a fork. We can simply jump to where we return from a syscall. It also turns out that we don't have to worry about the RSE backing store, provided we flushed it. The kernel backing store is always PAGE_SIZE aligned, which in all reasonable cases is sufficient to not have to worry about differently aligned backing stores and thus different NaT collection points (512 byte alignment is required minimally to be able to copy backing stores around without having to deal with the NaT collection). Note also that we can guarentee the alignment by virtue of always having switched from user space. We never execute a fork() from an exception (which is when we can nest and thus loose the guarantee that the RSE backing store is sufficiently aligned. Thus: we only have to copy "ndirty" bytes from the parent's backing store to the child's and that's it. Sweet! Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#12 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/vm_machdep.c#8 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#12 (text+ko) ==== @@ -158,69 +158,10 @@ .global enter_userland .type enter_userland, @function enter_userland: -{ .mmi - alloc r16=ar.pfs,0,0,0,0 - mov ar.rsc=0 - add r14=32,sp - ;; -} -{ .mmi - loadrs - ld8 r31=[r14],32 // sp - add r15=48,sp - ;; -} -{ .mmi - ld8 r16=[r15],24 // rp - mov r30=ar.bspstore - add r29=16,sp - ;; -} -{ .mmi - ld8 r17=[r14],40 // pfs - ld8 r18=[r15],40 // bspstore - mov rp=r16 - ;; -} -{ .mlx - mov ar.bspstore=r18 - movl r16=0x180000 - ;; -} -{ .mmi - ld8 r28=[r29] - mov ar.rsc=r16 - mov sp=r31 - ;; -} -{ .mmi - loadrs - ld8 r16=[r14],16 // rsc - add r29=r28,r29 - ;; -} -{ .mmi - mov ar.rsc=r16 - ld8 r18=[r15] // fpsr - mov ar.pfs=r17 - ;; -} -{ .mmb - ld8 r16=[r14] // psr - mov ar.fpsr=r18 +{ .mfb nop 0 - ;; -} -{ .mmi - mov psr.l=r16 - mov ar.k7=r29 nop 0 - ;; -} -{ .mmb - srlz.d - mov ar.k6=r30 - br.ret.sptk rp + br.sptk syscall_return ;; } END(fork_trampoline) ==== //depot/projects/ia64_epc/sys/ia64/ia64/vm_machdep.c#8 (text+ko) ==== @@ -127,144 +127,65 @@ * ready to run and return to user mode. */ void -cpu_fork(td1, p2, td2, flags) - register struct thread *td1; - register struct proc *p2; - register struct thread *td2; - int flags; +cpu_fork(struct thread *td1, struct proc *p2 __unused, struct thread *td2, + int flags) { - struct proc *p1; - struct trapframe *p2tf; - u_int64_t bspstore, *p1bs, *p2bs, rnat; + char *stackp; KASSERT(td1 == curthread || td1 == &thread0, - ("cpu_fork: p1 not curproc and not proc0")); + ("cpu_fork: td1 not curthread and not thread0")); if ((flags & RFPROC) == 0) return; - p1 = td1->td_proc; - td2->td_pcb = (struct pcb *) - (td2->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; - td2->td_md.md_flags = td1->td_md.md_flags & (MDP_FPUSED | MDP_UAC_MASK); - - /* Save the high FP registers so that we can copy them. */ - ia64_highfp_save(td1); - /* - * Copy pcb and stack from proc p1 to p2. We do this as - * cheaply as possible, copying only the active part of the - * stack. The stack and pcb need to agree. Make sure that the - * new process has FEN disabled. + * Save the preserved registers and the high FP registers in the + * PCB if we're the parent (ie td1 == curthread) so that we have + * a valid PCB. This also causes a RSE flush. We don't have to + * do that otherwise, because there wouldn't be anything important + * to save. */ - bcopy(td1->td_pcb, td2->td_pcb, sizeof(struct pcb)); - - /* - * create the child's kernel stack, from scratch. - * - * Pick a stack pointer, leaving room for a trapframe; - * copy trapframe from parent so return to user mode - * will be to right address, with correct registers. Clear the - * high-fp enable for the new process so that it is forced to - * load its state from the pcb. - */ - td2->td_frame = (struct trapframe *)td2->td_pcb - 1; - bcopy(td1->td_frame, td2->td_frame, sizeof(struct trapframe)); - td2->td_frame->tf_special.psr |= IA64_PSR_DFH; - - /* - * Set up return-value registers as fork() libc stub expects. - */ - p2tf = td2->td_frame; - if (p2tf->tf_special.psr & IA64_PSR_IS) { - p2tf->tf_scratch.gr8 = 0; /* child returns zero (eax) */ - p2tf->tf_scratch.gr10 = 1; /* is child (edx) */ - } else { - p2tf->tf_scratch.gr8 = 0; /* child's pid (linux) */ - p2tf->tf_scratch.gr9 = 1; /* is child (FreeBSD) */ - p2tf->tf_scratch.gr10 = 0; /* no error */ + if (td1 == curthread) { + if (savectx(td1->td_pcb) != 0) + panic("unexpected return from savectx()"); + ia64_highfp_save(td1); } /* - * Turn off RSE for a moment and work out our current - * ar.bspstore. This assumes that td1==curthread. Also - * flush dirty regs to ensure that the user's stacked - * regs are written out to backing store. - * - * We could cope with td1!=curthread by digging values - * out of its PCB but I don't see the point since - * current usage only allows &thread0 when creating kernel - * threads and &thread0 doesn't have any dirty regs. + * create the child's kernel stack and backing store. We basicly + * create an image of the parent's stack and backing store and + * adjust where necessary. */ + stackp = (char *)(td2->td_kstack + KSTACK_PAGES * PAGE_SIZE); - p1bs = (u_int64_t *)td1->td_kstack; - p2bs = (u_int64_t *)td2->td_kstack; + stackp -= sizeof(struct pcb); + td2->td_pcb = (struct pcb *)stackp; + bcopy(td1->td_pcb, td2->td_pcb, sizeof(struct pcb)); - if (td1 == curthread) { - __asm __volatile("mov ar.rsc=0;;"); - __asm __volatile("flushrs;;" ::: "memory"); - __asm __volatile("mov %0=ar.bspstore" : "=r"(bspstore)); - } else { - bspstore = (u_int64_t) p1bs; - } + stackp -= sizeof(struct trapframe); + td2->td_frame = (struct trapframe *)stackp; + bcopy(td1->td_frame, td2->td_frame, sizeof(struct trapframe)); + td2->td_frame->tf_length = sizeof(struct trapframe); -#if 0 - /* - * Copy enough of td1's backing store to include all - * the user's stacked regs. - */ - bcopy(p1bs, p2bs, td1->td_frame->tf_ndirty); + bcopy((void*)td1->td_kstack, (void*)td2->td_kstack, + td2->td_frame->tf_special.ndirty); - /* - * To calculate the ar.rnat for td2, we need to decide - * if td1's ar.bspstore has advanced past the place - * where the last ar.rnat which covers the user's - * saved registers would be placed. If so, we read - * that one from memory, otherwise we take td1's - * current ar.rnat. If we are simply spawning a new kthread - * from &thread0 we don't care about ar.rnat. - */ - if (td1 == curthread) { - uint64_t rnatloc = (u_int64_t)p1bs + td1->td_frame->tf_ndirty; - rnatloc |= 0x1f8; - if (bspstore > rnatloc) - rnat = *(u_int64_t *) rnatloc; - else - __asm __volatile("mov %0=ar.rnat;;" : "=r"(rnat)); - - /* - * Switch the RSE back on. - */ - __asm __volatile("mov ar.rsc=3;;"); + /* Set-up the return values as expected by the fork() libc stub. */ + if (td2->td_frame->tf_special.psr & IA64_PSR_IS) { + td2->td_frame->tf_scratch.gr8 = 0; + td2->td_frame->tf_scratch.gr10 = 1; } else { - rnat = 0; + td2->td_frame->tf_scratch.gr8 = 0; + td2->td_frame->tf_scratch.gr9 = 1; + td2->td_frame->tf_scratch.gr10 = 0; } -#else - rnat = 0; -#endif - /* - * Setup the child's pcb so that its ar.bspstore - * starts just above the region which we copied. This - * should work since the child will normally return - * straight into exception_restore. Also initialise its - * pmap to the containing proc's vmspace. - */ - td2->td_pcb->pcb_special.bspstore = (u_int64_t)p2bs; - td2->td_pcb->pcb_special.rnat = rnat; + td2->td_pcb->pcb_special.bspstore = td2->td_kstack + + td2->td_frame->tf_special.ndirty; td2->td_pcb->pcb_special.pfs = 0; td2->td_pcb->pcb_current_pmap = vmspace_pmap(td2->td_proc->p_vmspace); - /* - * 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! - * - * The extra 16 bytes subtracted from sp is part of the ia64 - * ABI - a function can assume that the 16 bytes above sp are - * available as scratch space. - */ - td2->td_pcb->pcb_special.sp = (u_int64_t)p2tf - 16; + td2->td_pcb->pcb_special.sp = (uintptr_t)stackp - 16; td2->td_pcb->pcb_special.rp = FDESC_FUNC(fork_trampoline); cpu_set_fork_handler(td2, (void (*)(void*))fork_return, td2); } From owner-p4-projects@FreeBSD.ORG Thu Apr 17 18:27:37 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C1D6737B404; Thu, 17 Apr 2003 18:27:36 -0700 (PDT) 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 695DA37B401 for ; Thu, 17 Apr 2003 18:27:36 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB4CA43FAF for ; Thu, 17 Apr 2003 18:27:35 -0700 (PDT) (envelope-from marcel@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 h3I1RZ0U098965 for ; Thu, 17 Apr 2003 18:27:35 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3I1RZ4v098962 for perforce@freebsd.org; Thu, 17 Apr 2003 18:27:35 -0700 (PDT) Date: Thu, 17 Apr 2003 18:27:35 -0700 (PDT) Message-Id: <200304180127.h3I1RZ4v098962@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29166 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 01:27:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=29166 Change 29166 by marcel@marcel_nfs on 2003/04/17 18:27:01 Implement the Data Nested TLB fault handler. This is pretty much a requirement now that we don't switch to physical addressing and don't use direct mapped virtual addressing. The handler obtains the PTE from the page table and performs a TLB insertion. The PTE has been modified first with access and dirty bits set to avoid Data Access and Data Dirty bit faults. The Data Nested TLB fault will fail if the kernel page tables are not mapped. Since we use direct mapped virtual addresses for them, this should not be a problem. Note however that if the page tables are not mapped by a translation register (but rather by a translation cache entry), forward progress is not guaranteed and we may need to be able to deal with a second nested fault. This has not been implemented. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#11 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#11 (text+ko) ==== @@ -805,7 +805,64 @@ IVT_END(Alternate_Data_TLB) IVT_ENTRY(Data_Nested_TLB, 0x1400) - TRAP(5) + // See exception_save. Things get tricky here. Don't use p14, p15, + // sp and r16-r21. +{ .mlx + mov r22=cr.ifa + movl r24=ia64_kptdir + ;; +} +{ .mmi + mov r23=cr.itir + ld8 r24=[r24] + extr.u r25=sp,PAGE_SHIFT,61-PAGE_SHIFT + ;; +} +{ .mii + mov cr.ifa=sp + shr.u r26=r25,PAGE_SHIFT-5 // dir index + extr.u r27=r25,0,PAGE_SHIFT-5 // pte index + ;; +} +{ .mmi + shladd r24=r26,3,r24 + ;; + ld8 r24=[r24] + shl r27=r27,5 + ;; +} +{ .mmi + add r24=r24,r27 // address of pte + ;; + ld8 r25=[r24] + extr.u r26=sp,61,3 + ;; +} +{ .mmi + mov r26=rr[r26] + ;; + or r25=PTE_D|PTE_A,r25 + dep r26=0,r26,0,2 + ;; +} +{ .mmi + st8 [r24]=r25 + mov cr.itir=r26 + nop 0 + ;; +} +{ .mmi + itc.d r25 + ;; + srlz.d + nop 0 +} +{ .mmb + mov cr.ifa=r22 + mov cr.itir=r23 + br.sptk exception_save_restart + ;; +} IVT_END(Data_Nested_TLB) IVT_ENTRY(Instruction_Key_Miss, 0x1800) From owner-p4-projects@FreeBSD.ORG Thu Apr 17 21:27:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C1E7D37B404; Thu, 17 Apr 2003 21:27:20 -0700 (PDT) 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 61C0137B401 for ; Thu, 17 Apr 2003 21:27:20 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E9A543FEA for ; Thu, 17 Apr 2003 21:27:20 -0700 (PDT) (envelope-from marcel@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 h3I4RJ0U020306 for ; Thu, 17 Apr 2003 21:27:19 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3I4RJWt020303 for perforce@freebsd.org; Thu, 17 Apr 2003 21:27:19 -0700 (PDT) Date: Thu, 17 Apr 2003 21:27:19 -0700 (PDT) Message-Id: <200304180427.h3I4RJWt020303@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29176 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 04:27:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=29176 Change 29176 by marcel@marcel_nfs on 2003/04/17 21:26:35 Manually set psr.cpl to 3 (=user) when constructing the syscall frame. This allows us to check these bits to determine whether we're going to return to user space or not. Note that the mov-to-psr ignores psr.cpl and the mov-from-psr zeroes it. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#7 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#7 (text+ko) ==== @@ -169,7 +169,7 @@ { .mmi st8 [r30]=r17,16 // tp st8 [r31]=r16,16 // rsc - nop 0 + dep r11=-1,r11,32,2 // Set psr.cpl=3 ;; } { .mmi From owner-p4-projects@FreeBSD.ORG Thu Apr 17 22:14:18 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C106A37B404; Thu, 17 Apr 2003 22:14:17 -0700 (PDT) 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 6F97337B401 for ; Thu, 17 Apr 2003 22:14:17 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B2EA43FA3 for ; Thu, 17 Apr 2003 22:14:17 -0700 (PDT) (envelope-from marcel@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 h3I5EG0U025857 for ; Thu, 17 Apr 2003 22:14:16 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3I5EGHV025854 for perforce@freebsd.org; Thu, 17 Apr 2003 22:14:16 -0700 (PDT) Date: Thu, 17 Apr 2003 22:14:16 -0700 (PDT) Message-Id: <200304180514.h3I5EGHV025854@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29177 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 05:14:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=29177 Change 29177 by marcel@marcel_nfs on 2003/04/17 22:13:52 Make it permanent... Affected files ... .. //depot/projects/ia64_epc/lib/libc/ia64/SYS.h#3 edit .. //depot/projects/ia64_epc/sys/ia64/include/asm.h#4 edit Differences ... ==== //depot/projects/ia64_epc/lib/libc/ia64/SYS.h#3 (text+ko) ==== @@ -33,7 +33,7 @@ #include #define CALLSYS_ERROR(name) \ - EPC_CALLSYS_NOERROR(name); \ + CALLSYS_NOERROR(name); \ cmp.ne p6,p0=r0,r10; \ (p6) br.cond.sptk.few .cerror ==== //depot/projects/ia64_epc/sys/ia64/include/asm.h#4 (text+ko) ==== @@ -157,11 +157,7 @@ */ #define SYSCALLNUM(name) SYS_ ## name -#define CALLSYS_NOERROR(name) \ - mov r15=SYSCALLNUM(name); \ - break 0x100000 ;; - -#define EPC_CALLSYS_NOERROR(name) \ +#define CALLSYS_NOERROR(name) \ { .mmi ; \ alloc r9 = ar.pfs, 0, 0, 8, 0 ; \ mov r31 = ar.k5 ; \ From owner-p4-projects@FreeBSD.ORG Fri Apr 18 00:44:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 32C1037B404; Fri, 18 Apr 2003 00:44:21 -0700 (PDT) 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 DE50537B401 for ; Fri, 18 Apr 2003 00:44:20 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8423A43FE1 for ; Fri, 18 Apr 2003 00:44:20 -0700 (PDT) (envelope-from marcel@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 h3I7iK0U040739 for ; Fri, 18 Apr 2003 00:44:20 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3I7iKgk040736 for perforce@freebsd.org; Fri, 18 Apr 2003 00:44:20 -0700 (PDT) Date: Fri, 18 Apr 2003 00:44:20 -0700 (PDT) Message-Id: <200304180744.h3I7iKgk040736@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29181 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 07:44:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=29181 Change 29181 by marcel@marcel_nfs on 2003/04/18 00:43:24 We don't preserve the non-local registers in the register window, and since we turn all input registers into output registers, as part of the syscall code, we cannot use any inputs after the syscall. Note that this is completely in accordance with the runtime specs. Save registers in the memory stack scratch area if we need them after the syscall. Affected files ... .. //depot/projects/ia64_epc/lib/libc/ia64/sys/brk.S#3 edit .. //depot/projects/ia64_epc/lib/libc/ia64/sys/pipe.S#3 edit .. //depot/projects/ia64_epc/lib/libc/ia64/sys/sbrk.S#3 edit Differences ... ==== //depot/projects/ia64_epc/lib/libc/ia64/sys/brk.S#3 (text+ko) ==== @@ -45,11 +45,13 @@ ld8 r14=[r14] ;; ld8 r14=[r14] ;; cmp.ltu p6,p0=r32,r14 ;; -(p6) mov r32=r14 +(p6) mov r32=r14 ;; + st8 [sp]=r32 CALLSYS_ERROR(break) + ld8 r15=[sp] add r14=@ltoff(curbrk),gp ;; ld8 r14=[r14] ;; - st8 [r14]=r32 + st8 [r14]=r15 mov ret0=0 br.ret.sptk.few rp END(brk) ==== //depot/projects/ia64_epc/lib/libc/ia64/sys/pipe.S#3 (text+ko) ==== @@ -32,10 +32,16 @@ #include "SYS.h" -SYSCALL(pipe) - .regstk 1,0,0,0 - st4 [in0]=ret0,4 ;; - st4 [in0]=ret1 - mov ret0=0 +ENTRY(__sys_pipe, 1) + WEAK_ALIAS(pipe, __sys_pipe) + WEAK_ALIAS(_pipe, __sys_pipe) + st8 [sp]=r32 + CALLSYS_ERROR(pipe) + ld8 r14=[sp] + ;; + st4 [r14]=ret0,4 + ;; + st4 [r14]=ret1 + mov ret0=0 br.ret.sptk.few rp -END(pipe) +END(__sys_pipe) ==== //depot/projects/ia64_epc/lib/libc/ia64/sys/sbrk.S#3 (text+ko) ==== @@ -49,12 +49,15 @@ (p6) br.ret.sptk.few rp ;; add r32 = ret0, r32 + ;; + st8 [sp] = r32 CALLSYS_ERROR(break) + ld8 r15 = [sp] add r14 = @ltoff(curbrk), gp ;; ld8 r14 = [r14] ;; ld8 ret0 = [r14] - st8 [r14] = r32 + st8 [r14] = r15 br.ret.sptk.few rp END(sbrk) From owner-p4-projects@FreeBSD.ORG Fri Apr 18 10:30:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EB55B37B404; Fri, 18 Apr 2003 10:30:21 -0700 (PDT) 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 7F52437B405 for ; Fri, 18 Apr 2003 10:30:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DF8D43FE9 for ; Fri, 18 Apr 2003 10:30:20 -0700 (PDT) (envelope-from jhb@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 h3IHUK0U011499 for ; Fri, 18 Apr 2003 10:30:20 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3IHUJlN011490 for perforce@freebsd.org; Fri, 18 Apr 2003 10:30:19 -0700 (PDT) Date: Fri, 18 Apr 2003 10:30:19 -0700 (PDT) Message-Id: <200304181730.h3IHUJlN011490@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29196 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 17:30:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=29196 Change 29196 by jhb@jhb_laptop on 2003/04/18 10:29:19 IFC @29195. Look back round one of proc locking commits. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/vm_machdep.c#21 integrate .. //depot/projects/smpng/sys/alpha/include/_limits.h#1 branch .. //depot/projects/smpng/sys/alpha/include/proc.h#7 integrate .. //depot/projects/smpng/sys/arm/include/_limits.h#1 branch .. //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#26 integrate .. //depot/projects/smpng/sys/compat/linux/linux_misc.c#37 integrate .. //depot/projects/smpng/sys/compat/linux/linux_signal.c#10 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#23 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_signal.c#9 integrate .. //depot/projects/smpng/sys/dev/pccard/pccarddevs#23 integrate .. //depot/projects/smpng/sys/dev/pccard/pccarddevs.h#23 integrate .. //depot/projects/smpng/sys/dev/sound/pci/emu10k1.c#10 integrate .. //depot/projects/smpng/sys/dev/wl/if_wl.c#13 integrate .. //depot/projects/smpng/sys/fs/procfs/procfs.c#8 integrate .. //depot/projects/smpng/sys/fs/procfs/procfs_ctl.c#17 integrate .. //depot/projects/smpng/sys/fs/procfs/procfs_ioctl.c#10 integrate .. //depot/projects/smpng/sys/fs/procfs/procfs_status.c#15 integrate .. //depot/projects/smpng/sys/gnu/dev/sound/pci/emu10k1.h#2 integrate .. //depot/projects/smpng/sys/gnu/i386/fpemul/fpu_entry.c#4 integrate .. //depot/projects/smpng/sys/i386/i386/genassym.c#22 integrate .. //depot/projects/smpng/sys/i386/include/_limits.h#1 branch .. //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#30 integrate .. //depot/projects/smpng/sys/i386/svr4/svr4_machdep.c#11 integrate .. //depot/projects/smpng/sys/ia64/include/_limits.h#1 branch .. //depot/projects/smpng/sys/kern/kern_acct.c#26 integrate .. //depot/projects/smpng/sys/kern/kern_condvar.c#27 integrate .. //depot/projects/smpng/sys/kern/kern_context.c#3 integrate .. //depot/projects/smpng/sys/kern/kern_exit.c#61 integrate .. //depot/projects/smpng/sys/kern/kern_fork.c#56 integrate .. //depot/projects/smpng/sys/kern/kern_idle.c#13 integrate .. //depot/projects/smpng/sys/kern/kern_intr.c#28 integrate .. //depot/projects/smpng/sys/kern/kern_jail.c#26 integrate .. //depot/projects/smpng/sys/kern/kern_kthread.c#10 integrate .. //depot/projects/smpng/sys/kern/kern_mutex.c#68 integrate .. //depot/projects/smpng/sys/kern/kern_shutdown.c#35 integrate .. //depot/projects/smpng/sys/kern/kern_sig.c#58 integrate .. //depot/projects/smpng/sys/kern/kern_thr.c#5 integrate .. //depot/projects/smpng/sys/kern/kern_thread.c#25 integrate .. //depot/projects/smpng/sys/kern/sched_ule.c#6 integrate .. //depot/projects/smpng/sys/kern/subr_prf.c#28 integrate .. //depot/projects/smpng/sys/kern/subr_trap.c#50 integrate .. //depot/projects/smpng/sys/kern/sys_process.c#26 integrate .. //depot/projects/smpng/sys/kern/tty.c#33 integrate .. //depot/projects/smpng/sys/kern/vfs_aio.c#38 integrate .. //depot/projects/smpng/sys/kern/vfs_subr.c#48 integrate .. //depot/projects/smpng/sys/netgraph/ng_message.h#3 integrate .. //depot/projects/smpng/sys/pci/if_dc.c#33 integrate .. //depot/projects/smpng/sys/pci/if_dcreg.h#12 integrate .. //depot/projects/smpng/sys/pci/if_pcn.c#15 integrate .. //depot/projects/smpng/sys/pci/if_rl.c#27 integrate .. //depot/projects/smpng/sys/pci/if_sf.c#17 integrate .. //depot/projects/smpng/sys/pci/if_sis.c#23 integrate .. //depot/projects/smpng/sys/pci/if_sk.c#16 integrate .. //depot/projects/smpng/sys/pci/if_ste.c#19 integrate .. //depot/projects/smpng/sys/pci/if_ti.c#25 integrate .. //depot/projects/smpng/sys/pci/if_tl.c#14 integrate .. //depot/projects/smpng/sys/pci/if_vr.c#16 integrate .. //depot/projects/smpng/sys/pci/if_wb.c#15 integrate .. //depot/projects/smpng/sys/pci/if_xl.c#26 integrate .. //depot/projects/smpng/sys/powerpc/include/_limits.h#1 branch .. //depot/projects/smpng/sys/powerpc/include/bus.h#9 integrate .. //depot/projects/smpng/sys/powerpc/powermac/ata_macio.c#4 integrate .. //depot/projects/smpng/sys/powerpc/powermac/macio.c#5 integrate .. //depot/projects/smpng/sys/powerpc/powermac/uninorth.c#3 integrate .. //depot/projects/smpng/sys/powerpc/psim/ata_iobus.c#3 integrate .. //depot/projects/smpng/sys/powerpc/psim/iobus.c#3 integrate .. //depot/projects/smpng/sys/sparc64/include/_limits.h#1 branch .. //depot/projects/smpng/sys/sys/proc.h#78 integrate .. //depot/projects/smpng/sys/vm/uma_core.c#28 integrate .. //depot/projects/smpng/sys/vm/vm_glue.c#22 integrate .. //depot/projects/smpng/sys/vm/vm_mmap.c#27 integrate .. //depot/projects/smpng/sys/vm/vnode_pager.c#28 integrate .. //depot/projects/smpng/sys/x86_64/include/_limits.h#1 branch Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/vm_machdep.c#21 (text+ko) ==== @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.83 2003/02/20 20:54:42 phk Exp $ + * $FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.84 2003/04/17 21:57:16 jhb Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -119,7 +119,9 @@ td2->td_pcb = (struct pcb *) (td2->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; td2->td_md.md_flags = td1->td_md.md_flags & MDTD_FPUSED; + PROC_LOCK(p2); p2->p_md.md_uac = p1->p_md.md_uac; + PROC_UNLOCK(p2); /* * Cache the physical address of the pcb, so we can ==== //depot/projects/smpng/sys/alpha/include/proc.h#7 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/proc.h,v 1.15 2002/07/31 19:37:02 jhb Exp $ */ +/* $FreeBSD: src/sys/alpha/include/proc.h,v 1.16 2003/04/17 21:57:16 jhb Exp $ */ /* From: NetBSD: proc.h,v 1.3 1997/04/06 08:47:36 cgd Exp */ /* @@ -62,7 +62,7 @@ #define MDP_UAC_MASK (MDP_UAC_NOPRINT | MDP_UAC_NOFIX | MDP_UAC_SIGBUS) struct mdproc { - u_int md_uac; /* Unaligned Access Check flags. */ + u_int md_uac; /* (c) Unaligned Access Check flags. */ }; #endif /* !_MACHINE_PROC_H_ */ ==== //depot/projects/smpng/sys/compat/linprocfs/linprocfs.c#26 (text+ko) ==== @@ -38,7 +38,7 @@ * * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94 * - * $FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.63 2003/04/16 19:46:26 jhb Exp $ + * $FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.64 2003/04/17 21:58:45 jhb Exp $ */ #include @@ -549,12 +549,13 @@ struct thread *td2; int i; - mtx_lock_spin(&sched_lock); + PROC_LOCK(p); td2 = FIRST_THREAD_IN_PROC(p); /* XXXKSE pretend only one thread */ if (P_SHOULDSTOP(p)) { state = "T (stopped)"; } else { + mtx_lock_spin(&sched_lock); switch(p->p_state) { case PRS_NEW: state = "I (idle)"; @@ -584,10 +585,9 @@ state = "? (unknown)"; break; } + mtx_unlock_spin(&sched_lock); } - mtx_unlock_spin(&sched_lock); - PROC_LOCK(p); fill_kinfo_proc(p, &kp); sbuf_printf(sb, "Name:\t%s\n", p->p_comm); /* XXX escape */ sbuf_printf(sb, "State:\t%s\n", state); ==== //depot/projects/smpng/sys/compat/linux/linux_misc.c#37 (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/compat/linux/linux_misc.c,v 1.141 2003/04/16 20:43:10 jhb Exp $ + * $FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.142 2003/04/17 22:02:46 jhb Exp $ */ #include "opt_mac.h" @@ -164,6 +164,7 @@ { struct itimerval it, old_it; struct timeval tv; + struct proc *p; #ifdef DEBUG if (ldebug(alarm)) @@ -177,18 +178,19 @@ it.it_value.tv_usec = 0; it.it_interval.tv_sec = 0; it.it_interval.tv_usec = 0; - PROC_LOCK(td->td_proc); - old_it = td->td_proc->p_realtimer; + p = td->td_proc; + PROC_LOCK(p); + old_it = p->p_realtimer; getmicrouptime(&tv); if (timevalisset(&old_it.it_value)) - callout_stop(&td->td_proc->p_itcallout); + callout_stop(&p->p_itcallout); if (it.it_value.tv_sec != 0) { - callout_reset(&td->td_proc->p_itcallout, tvtohz(&it.it_value), - realitexpire, td->td_proc); + callout_reset(&p->p_itcallout, tvtohz(&it.it_value), + realitexpire, p); timevaladd(&it.it_value, &tv); } - td->td_proc->p_realtimer = it; - PROC_UNLOCK(td->td_proc); + p->p_realtimer = it; + PROC_UNLOCK(p); if (timevalcmp(&old_it.it_value, &tv, >)) { timevalsub(&old_it.it_value, &tv); if (old_it.it_value.tv_usec != 0) @@ -809,6 +811,7 @@ struct rusage *rusage; } */ tmp; int error, tmpstat; + struct proc *p; #ifdef DEBUG if (ldebug(wait4)) @@ -828,9 +831,10 @@ if ((error = wait4(td, &tmp)) != 0) return error; - PROC_LOCK(td->td_proc); - SIGDELSET(td->td_proc->p_siglist, SIGCHLD); - PROC_UNLOCK(td->td_proc); + p = td->td_proc; + PROC_LOCK(p); + SIGDELSET(p->p_siglist, SIGCHLD); + PROC_UNLOCK(p); if (args->status) { if ((error = copyin(args->status, &tmpstat, sizeof(int))) != 0) ==== //depot/projects/smpng/sys/compat/linux/linux_signal.c#10 (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/compat/linux/linux_signal.c,v 1.40 2003/03/31 22:49:14 jeff Exp $ + * $FreeBSD: src/sys/compat/linux/linux_signal.c,v 1.41 2003/04/17 22:07:56 jhb Exp $ */ #include @@ -396,8 +396,8 @@ bset = p->p_siglist; SIGSETOR(bset, td->td_siglist); SIGSETAND(bset, td->td_sigmask); + PROC_UNLOCK(p); bsd_to_linux_sigset(&bset, &lset); - PROC_UNLOCK(p); mask = lset.__bits[0]; return (copyout(&mask, args->mask, sizeof(mask))); } ==== //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#23 (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/compat/svr4/svr4_misc.c,v 1.61 2003/03/02 16:54:32 des Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.62 2003/04/17 22:09:08 jhb Exp $ */ /* @@ -1272,10 +1272,8 @@ continue; } nfound++; - mtx_lock_spin(&sched_lock); if ((q->p_state == PRS_ZOMBIE) && ((uap->options & (SVR4_WEXITED|SVR4_WTRAPPED)))) { - mtx_unlock_spin(&sched_lock); PROC_UNLOCK(q); sx_sunlock(&proctree_lock); *retval = 0; @@ -1396,7 +1394,6 @@ if (P_SHOULDSTOP(q) && ((q->p_flag & P_WAITED) == 0) && (q->p_flag & P_TRACED || (uap->options & (SVR4_WSTOPPED|SVR4_WCONTINUED)))) { - mtx_unlock_spin(&sched_lock); DPRINTF(("jobcontrol %d\n", q->p_pid)); if (((uap->options & SVR4_WNOWAIT)) == 0) q->p_flag |= P_WAITED; @@ -1405,7 +1402,6 @@ return svr4_setinfo(q, W_STOPCODE(q->p_xstat), uap->info); } - mtx_unlock_spin(&sched_lock); PROC_UNLOCK(q); } ==== //depot/projects/smpng/sys/compat/svr4/svr4_signal.c#9 (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/compat/svr4/svr4_signal.c,v 1.25 2003/03/31 22:49:14 jeff Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_signal.c,v 1.26 2003/04/17 22:02:46 jhb Exp $ */ #include @@ -554,21 +554,21 @@ struct thread *td; struct svr4_sys_sigpending_args *uap; { + struct proc *p; sigset_t bss; - int *retval; svr4_sigset_t sss; - DPRINTF(("@@@ svr4_sys_sigpending(%d)\n", td->td_proc->p_pid)); - retval = td->td_retval; + p = td->td_proc; + DPRINTF(("@@@ svr4_sys_sigpending(%d)\n", p->p_pid)); switch (uap->what) { case 1: /* sigpending */ if (uap->mask == NULL) return 0; - PROC_LOCK(td->td_proc); - bss = td->td_proc->p_siglist; + PROC_LOCK(p); + bss = p->p_siglist; SIGSETOR(bss, td->td_siglist); SIGSETAND(bss, td->td_sigmask); - PROC_UNLOCK(td->td_proc); + PROC_UNLOCK(p); bsd_to_svr4_sigset(&bss, &sss); break; ==== //depot/projects/smpng/sys/dev/pccard/pccarddevs#23 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.47 2003/04/10 07:21:11 imp Exp $ +$FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.48 2003/04/18 14:52:14 sanpei Exp $ /* $NetBSD: pcmciadevs,v 1.182 2003/04/09 02:09:55 christos Exp $ */ /* $OpenBSD: pcmciadevs,v 1.93 2002/06/21 08:31:10 henning Exp $ */ @@ -109,7 +109,7 @@ vendor CONTEC 0xc001 Contec vendor MACNICA 0xc00b MACNICA vendor ROLAND 0xc00c Roland -vendor COREGA 0xc00f Corega K.K. +vendor COREGA2 0xc00f Corega K.K. vendor ALLIEDTELESIS 0xc00f Allied Telesis K.K. vendor HAGIWARASYSCOM 0xc012 Hagiwara SYS-COM vendor RATOC 0xc015 RATOC System Inc. @@ -424,6 +424,7 @@ vendor AMD -1 AMD vendor BILLIONTON -1 Billionton Systems Inc. vendor CNET -1 CNet +vendor COREGA -1 Corega K.K. vendor DIGITAL -1 Digital Equipment Corporation vendor DLINK -1 D-Link vendor DYNALINK -1 DynaLink ==== //depot/projects/smpng/sys/dev/pccard/pccarddevs.h#23 (text+ko) ==== @@ -1,10 +1,10 @@ -/* $FreeBSD: src/sys/dev/pccard/pccarddevs.h,v 1.47 2003/04/10 07:21:11 imp Exp $ */ +/* $FreeBSD: src/sys/dev/pccard/pccarddevs.h,v 1.48 2003/04/18 15:35:52 sanpei Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.46 2003/04/10 06:58:40 imp Exp + * FreeBSD: src/sys/dev/pccard/pccarddevs,v 1.48 2003/04/18 14:52:14 sanpei Exp */ /* $NetBSD: pcmciadevs,v 1.182 2003/04/09 02:09:55 christos Exp $ */ /* $OpenBSD: pcmciadevs,v 1.93 2002/06/21 08:31:10 henning Exp $ */ @@ -116,7 +116,7 @@ #define PCMCIA_VENDOR_CONTEC 0xc001 /* Contec */ #define PCMCIA_VENDOR_MACNICA 0xc00b /* MACNICA */ #define PCMCIA_VENDOR_ROLAND 0xc00c /* Roland */ -#define PCMCIA_VENDOR_COREGA 0xc00f /* Corega K.K. */ +#define PCMCIA_VENDOR_COREGA2 0xc00f /* Corega K.K. */ #define PCMCIA_VENDOR_ALLIEDTELESIS 0xc00f /* Allied Telesis K.K. */ #define PCMCIA_VENDOR_HAGIWARASYSCOM 0xc012 /* Hagiwara SYS-COM */ #define PCMCIA_VENDOR_RATOC 0xc015 /* RATOC System Inc. */ @@ -751,6 +751,7 @@ #define PCMCIA_VENDOR_AMD 0xffffffff /* AMD */ #define PCMCIA_VENDOR_BILLIONTON 0xffffffff /* Billionton Systems Inc. */ #define PCMCIA_VENDOR_CNET 0xffffffff /* CNet */ +#define PCMCIA_VENDOR_COREGA 0xffffffff /* Corega K.K. */ #define PCMCIA_VENDOR_DIGITAL 0xffffffff /* Digital Equipment Corporation */ #define PCMCIA_VENDOR_DLINK 0xffffffff /* D-Link */ #define PCMCIA_VENDOR_DYNALINK 0xffffffff /* DynaLink */ @@ -1013,13 +1014,6 @@ #define PCMCIA_CIS_SVEC_LANCARD { "SVEC", "FD605 PCMCIA EtherNet Card", "V1-1", NULL } #define PCMCIA_PRODUCT_SVEC_LANCARD 0xffffffff #define PCMCIA_STR_SVEC_LANCARD "SVEC PCMCIA Lan Card" -/* - * vendor ID of PN650TX is LINKSYS (0x0149) and product ID is 0xc1ab, but - * it conflicts with LINKSYS Combo EthernetCard. - */ -#define PCMCIA_CIS_SVEC_PN650TX { NULL, NULL, NULL, NULL } -#define PCMCIA_PRODUCT_SVEC_PN650TX -1 -#define PCMCIA_STR_SVEC_PN650TX "SVEC PN650TX 10/100 Dual Speed Fast Ethernet PC Card" #define PCMCIA_CIS_SYNERGY21_S21810 { "PCMCIA", "Ethernet", "A", "004743118001" } #define PCMCIA_PRODUCT_SYNERGY21_S21810 0xffffffff #define PCMCIA_STR_SYNERGY21_S21810 "Synergy 21 S21810+ NE2000 Compatible Card" ==== //depot/projects/smpng/sys/dev/sound/pci/emu10k1.c#10 (text+ko) ==== @@ -32,7 +32,7 @@ #include #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/emu10k1.c,v 1.33 2003/02/26 16:11:18 cognet Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/emu10k1.c,v 1.34 2003/04/18 04:13:38 obrien Exp $"); /* -------------------------------------------------------------------- */ @@ -1243,7 +1243,7 @@ u_int32_t spcs, ch, tmp, i; /* disable audio and lock cache */ - emu_wr(sc, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE | HCFG_MUTEBUTTONENABLE, 4); + emu_wr(sc, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, 4); /* reset recording buffers */ emu_wrptr(sc, 0, MICBS, ADCBS_BUFSIZE_NONE); @@ -1365,7 +1365,7 @@ * Lock Sound Memory = 0 * Auto Mute = 1 */ - tmp = HCFG_AUDIOENABLE | HCFG_LOCKTANKCACHE | HCFG_AUTOMUTE; + tmp = HCFG_AUDIOENABLE | HCFG_LOCKTANKCACHE_MASK | HCFG_AUTOMUTE; if (sc->rev >= 6) tmp |= HCFG_JOYENABLE; emu_wr(sc, HCFG, tmp, 4); @@ -1401,7 +1401,7 @@ } /* disable audio and lock cache */ - emu_wr(sc, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE | HCFG_MUTEBUTTONENABLE, 4); + emu_wr(sc, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, 4); emu_wrptr(sc, 0, PTB, 0); /* reset recording buffers */ ==== //depot/projects/smpng/sys/dev/wl/if_wl.c#13 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/wl/if_wl.c,v 1.50 2003/04/16 17:42:38 jhay Exp $ */ +/* $FreeBSD: src/sys/dev/wl/if_wl.c,v 1.53 2003/04/17 17:51:24 jhay Exp $ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -389,7 +389,7 @@ short base; char *str = "wl%d: board out of range [0..%d]\n"; u_char inbuf[100]; - unsigned long junk, sirq; + unsigned long junk, oldpri, sirq; int error, irq; error = ISA_PNP_PROBE(device_get_parent(device), device, wl_ids); @@ -408,10 +408,12 @@ */ #define PCMD(base, hacr) outw((base), (hacr)) + oldpri = splimp(); PCMD(base, HACR_RESET); /* reset the board */ DELAY(DELAYCONST); /* >> 4 clocks at 6MHz */ PCMD(base, HACR_RESET); /* reset the board */ DELAY(DELAYCONST); /* >> 4 clocks at 6MHz */ + splx(oldpri); /* clear reset command and set PIO#1 in autoincrement mode */ PCMD(base, HACR_DEFAULT); @@ -798,6 +800,7 @@ struct wl_softc *sc = xsc; struct ifnet *ifp = &sc->wl_if; int stat; + u_long oldpri; #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) @@ -805,6 +808,8 @@ #endif if (TAILQ_FIRST(&ifp->if_addrhead) == (struct ifaddr *)0) return; + WL_LOCK(sc); + oldpri = splimp(); if ((stat = wlhwrst(sc)) == TRUE) { sc->wl_if.if_flags |= IFF_RUNNING; /* same as DSF_RUNNING */ /* @@ -821,6 +826,8 @@ } else { printf("wl%d init(): trouble resetting board.\n", sc->unit); } + splx(oldpri); + WL_UNLOCK(sc); } /* @@ -1112,7 +1119,14 @@ */ mlen = 0; mb_p = mtod(m, u_char *); - bytes_in_mbuf = MCLBYTES; + bytes_in_mbuf = m->m_len; + + /* Put the ethernet header inside the mbuf. */ + bcopy(&fd.destination[0], mb_p, 14); + mb_p += 14; + mlen += 14; + bytes_in_mbuf -= 14; + bytes = min(bytes_in_mbuf, bytes_in_msg); for (;;) { if (bytes & 1) { @@ -1137,6 +1151,7 @@ return 0; } mb_p += bytes; + bytes_in_mbuf -= bytes; bytes_in_msg -= bytes; if (bytes_in_msg == 0) { if (rbd.status & RBD_SW_EOF || rbd.next_rbd_offset == I82586NULL) { @@ -1222,7 +1237,7 @@ struct wl_softc *sc = ifp->if_softc; short base = sc->base; short mode = 0; - int error = 0; + int opri, error = 0; struct thread *td = curthread; /* XXX */ int irq, irqval, i, isroot; caddr_t up; @@ -1236,6 +1251,7 @@ if (sc->wl_if.if_flags & IFF_DEBUG) printf("wl%d: entered wlioctl()\n",unit); #endif + opri = splimp(); switch (cmd) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_ALLMULTI) { @@ -1444,6 +1460,7 @@ error = ether_ioctl(ifp, cmd, data); break; } + splx(opri); WL_UNLOCK(sc); return (error); } @@ -2393,7 +2410,7 @@ wlsetpsa(struct wl_softc *sc) { short base = sc->base; - int i; + int i, oldpri; u_short crc; crc = wlpsacrc(sc->psa); /* calculate CRC of PSA */ @@ -2401,6 +2418,8 @@ sc->psa[WLPSA_CRCHIGH] = (crc >> 8) & 0xff; sc->psa[WLPSA_CRCOK] = 0x55; /* default to 'bad' until programming complete */ + oldpri = splimp(); /* ick, long pause */ + PCMD(base, HACR_DEFAULT & ~HACR_16BITS); PCMD(base, HACR_DEFAULT & ~HACR_16BITS); @@ -2419,6 +2438,8 @@ PCMD(base, HACR_DEFAULT); PCMD(base, HACR_DEFAULT); + + splx(oldpri); } /* ==== //depot/projects/smpng/sys/fs/procfs/procfs.c#8 (text+ko) ==== @@ -37,7 +37,7 @@ * * @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95 * - * $FreeBSD: src/sys/fs/procfs/procfs.c,v 1.8 2002/10/26 14:38:19 rwatson Exp $ + * $FreeBSD: src/sys/fs/procfs/procfs.c,v 1.9 2003/04/17 22:12:12 jhb Exp $ */ #include @@ -93,6 +93,9 @@ int procfs_attr(PFS_ATTR_ARGS) { + + PROC_LOCK_ASSERT(p, MA_OWNED); + /* XXX inefficient, split into separate functions */ if (p->p_flag & P_SUGID) vap->va_mode = 0; @@ -106,8 +109,6 @@ strcmp(pn->pn_name, "fpregs") == 0) vap->va_mode = 0600; - /* p is locked by caller */ - PROC_LOCK_ASSERT(p, MA_OWNED); vap->va_uid = p->p_ucred->cr_uid; vap->va_gid = p->p_ucred->cr_gid; @@ -121,6 +122,7 @@ int procfs_notsystem(PFS_VIS_ARGS) { + PROC_LOCK_ASSERT(p, MA_OWNED); return ((p->p_flag & P_SYSTEM) == 0); } ==== //depot/projects/smpng/sys/fs/procfs/procfs_ctl.c#17 (text+ko) ==== @@ -38,7 +38,7 @@ * * From: * $Id: procfs_ctl.c,v 3.2 1993/12/15 09:40:17 jsp Exp $ - * $FreeBSD: src/sys/fs/procfs/procfs_ctl.c,v 1.48 2003/03/02 15:13:06 des Exp $ + * $FreeBSD: src/sys/fs/procfs/procfs_ctl.c,v 1.49 2003/04/17 22:14:30 jhb Exp $ */ #include @@ -263,8 +263,8 @@ * or some other trap. */ case PROCFS_CTL_RUN: + p->p_flag &= ~P_STOPPED_SIG; /* this uses SIGSTOP */ PROC_UNLOCK(p); - p->p_flag &= ~P_STOPPED_SIG; /* this uses SIGSTOP */ break; /* @@ -349,9 +349,9 @@ /* XXXKSE: */ FIX_SSTEP(FIRST_THREAD_IN_PROC(p)); #endif - mtx_lock_spin(&sched_lock); /* XXXKSE: */ p->p_flag &= ~P_STOPPED_SIG; + mtx_lock_spin(&sched_lock); thread_unsuspend(p); mtx_unlock_spin(&sched_lock); } else ==== //depot/projects/smpng/sys/fs/procfs/procfs_ioctl.c#10 (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/fs/procfs/procfs_ioctl.c,v 1.8 2002/09/11 08:13:52 julian Exp $ + * $FreeBSD: src/sys/fs/procfs/procfs_ioctl.c,v 1.9 2003/04/17 22:13:46 jhb Exp $ */ #include @@ -92,18 +92,15 @@ break; } #if 0 - mtx_lock_spin(&sched_lock); p->p_step = 0; if (P_SHOULDSTOP(p)) { p->p_xstat = sig; p->p_flag &= ~(P_STOPPED_TRACE|P_STOPPED_SIG); + mtx_lock_spin(&sched_lock); thread_unsuspend(p); mtx_unlock_spin(&sched_lock); - } else { - mtx_unlock_spin(&sched_lock); - if (sig) - psignal(p, sig); - } + } else if (sig) + psignal(p, sig); #else if (sig) psignal(p, sig); @@ -126,6 +123,7 @@ procfs_close(PFS_CLOSE_ARGS) { if (p != NULL && (p->p_pfsflags & PF_LINGER) == 0) { + PROC_LOCK_ASSERT(p, MA_OWNED); p->p_pfsflags = 0; p->p_stops = 0; p->p_step = 0; ==== //depot/projects/smpng/sys/fs/procfs/procfs_status.c#15 (text+ko) ==== @@ -38,7 +38,7 @@ * * From: * $Id: procfs_status.c,v 3.1 1993/12/15 09:40:17 jsp Exp $ - * $FreeBSD: src/sys/fs/procfs/procfs_status.c,v 1.46 2003/02/27 02:05:16 julian Exp $ + * $FreeBSD: src/sys/fs/procfs/procfs_status.c,v 1.47 2003/04/17 22:16:58 jhb Exp $ */ #include @@ -70,6 +70,7 @@ struct thread *tdfirst; struct tty *tp; struct ucred *cr; + const char *wmesg; char *pc; char *sep; int pid, ppid, pgid, sid; @@ -95,7 +96,7 @@ sbuf_putc(sb, *pc); } while (*++pc); sbuf_printf(sb, " %d %d %d %d ", pid, ppid, pgid, sid); - if ((p->p_flag&P_CONTROLT) && (tp = sess->s_ttyp)) + if ((p->p_flag & P_CONTROLT) && (tp = sess->s_ttyp)) sbuf_printf(sb, "%d,%d ", major(tp->t_dev), minor(tp->t_dev)); else sbuf_printf(sb, "%d,%d ", -1, -1); @@ -115,6 +116,18 @@ } mtx_lock_spin(&sched_lock); + if (p->p_flag & P_THREADED) + wmesg = "-kse- "; + else { + tdfirst = FIRST_THREAD_IN_PROC(p); + if (tdfirst->td_wchan != NULL) { + KASSERT(tdfirst->td_wmesg != NULL, + ("wchan %p has no wmesg", tdfirst->td_wchan)); + wmesg = tdfirst->td_wmesg; + } else + wmesg = "nochan"; + } + if (p->p_sflag & PS_INMEM) { struct timeval ut, st; @@ -130,14 +143,7 @@ sbuf_printf(sb, " -1,-1 -1,-1 -1,-1"); } - if (p->p_flag & P_THREADED) - sbuf_printf(sb, " %s", "-kse- "); - else { - tdfirst = FIRST_THREAD_IN_PROC(p); /* XXX diff from td? */ - sbuf_printf(sb, " %s", - (tdfirst->td_wchan && tdfirst->td_wmesg) ? - tdfirst->td_wmesg : "nochan"); - } + sbuf_printf(sb, " %s", wmesg); cr = p->p_ucred; ==== //depot/projects/smpng/sys/gnu/dev/sound/pci/emu10k1.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * * ********************************************************************** - * $FreeBSD: src/sys/gnu/dev/sound/pci/emu10k1.h,v 1.5 2001/05/24 18:19:00 bde Exp $ + * $FreeBSD: src/sys/gnu/dev/sound/pci/emu10k1.h,v 1.6 2003/04/18 04:13:38 obrien Exp $ */ @@ -184,7 +184,7 @@ /* async audio source */ #define HCFG_LOCKSOUNDCACHE 0x00000008 /* 1 = Cancel bustmaster accesses to soundcache */ /* NOTE: This should generally never be used. */ -#define HCFG_LOCKTANKCACHE 0x00000004 /* 1 = Cancel bustmaster accesses to tankcache */ +#define HCFG_LOCKTANKCACHE_MASK 0x00000004 /* 1 = Cancel bustmaster accesses to tankcache */ /* NOTE: This should generally never be used. */ #define HCFG_MUTEBUTTONENABLE 0x00000002 /* 1 = Master mute button sets AUDIOENABLE = 0. */ /* NOTE: This is a 'cheap' way to implement a */ @@ -260,7 +260,7 @@ #define AC97_RECORDSELECT 0x1a #define AC97_RECORDGAIN 0x1c #define AC97_RECORDGAINMIC 0x1e -#define AC97_GENERALPUPOSE 0x20 +#define AC97_GENERALPURPOSE 0x20 #define AC97_3DCONTROL 0x22 #define AC97_MODEMRATE 0x24 #define AC97_POWERDOWN 0x26 @@ -371,7 +371,7 @@ #define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ #define ENVVOL 0x10 /* Volume envelope register */ -#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ +#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ /* 0x8000-n == 666*n usec delay */ #define ATKHLDV 0x11 /* Volume envelope hold and attack register */ ==== //depot/projects/smpng/sys/gnu/i386/fpemul/fpu_entry.c#4 (text+ko) ==== @@ -55,7 +55,7 @@ * * W. Metzenthen June 1994. * - * $FreeBSD: src/sys/gnu/i386/fpemul/fpu_entry.c,v 1.27 2001/11/12 21:58:23 keramida Exp $ + * $FreeBSD: src/sys/gnu/i386/fpemul/fpu_entry.c,v 1.28 2003/04/17 22:02:47 jhb Exp $ * */ @@ -198,7 +198,7 @@ static int math_emulate(struct trapframe * tframe) { - + struct proc *p; unsigned char FPU_modrm; unsigned short code; #ifdef LOOKAHEAD_LIMIT @@ -232,10 +232,11 @@ #endif FPU_lookahead = FPU_LOOKAHEAD; - PROC_LOCK(curthread->td_proc); - if (curproc->p_flag & P_TRACED) + p = curthread->td_proc; + PROC_LOCK(p); + if (p->p_flag & P_TRACED) FPU_lookahead = 0; - PROC_UNLOCK(curthread->td_proc); + PROC_UNLOCK(p); do_another_FPU_instruction: ==== //depot/projects/smpng/sys/i386/i386/genassym.c#22 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.139 2003/04/10 17:35:43 julian Exp $ + * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.140 2003/04/17 22:17:28 jhb Exp $ */ #include "opt_compat.h" @@ -80,11 +80,9 @@ ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); ASSYM(P_SFLAG, offsetof(struct proc, p_sflag)); -ASSYM(P_STATE, offsetof(struct proc, p_state)); ASSYM(P_UAREA, offsetof(struct proc, p_uarea)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); -ASSYM(TD_WCHAN, offsetof(struct thread, td_wchan)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); ASSYM(TD_PROC, offsetof(struct thread, td_proc)); ASSYM(TD_INTR_NESTING_LEVEL, offsetof(struct thread, td_intr_nesting_level)); ==== //depot/projects/smpng/sys/i386/linux/linux_sysvec.c#30 (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/linux/linux_sysvec.c,v 1.120 2003/03/31 22:49:15 jeff Exp $ + * $FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.121 2003/04/17 22:18:07 jhb Exp $ */ /* XXX we use functions that might not exist. */ @@ -288,7 +288,6 @@ p->p_sigstk.ss_size - sizeof(struct l_rt_sigframe)); } else fp = (struct l_rt_sigframe *)regs->tf_esp - 1; - PROC_UNLOCK(p); /* * Build the argument list for the signal handler. @@ -315,7 +314,6 @@ frame.sf_sc.uc_flags = 0; /* XXX ??? */ frame.sf_sc.uc_link = NULL; /* XXX ??? */ - PROC_LOCK(p); frame.sf_sc.uc_stack.ss_sp = p->p_sigstk.ss_sp; frame.sf_sc.uc_stack.ss_size = p->p_sigstk.ss_size; frame.sf_sc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK) ==== //depot/projects/smpng/sys/i386/svr4/svr4_machdep.c#11 (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/svr4/svr4_machdep.c,v 1.30 2003/03/31 22:49:15 jeff Exp $ + * $FreeBSD: src/sys/i386/svr4/svr4_machdep.c,v 1.31 2003/04/17 22:19:47 jhb Exp $ */ #include @@ -216,8 +216,10 @@ * set to 0 right now? */ - if ((uc->uc_flags & SVR4_UC_CPU) == 0) + if ((uc->uc_flags & SVR4_UC_CPU) == 0) { + PROC_UNLOCK(p); return 0; + } DPRINTF(("svr4_setcontext(%d)\n", p->p_pid)); @@ -244,8 +246,10 @@ * the trap, rather than doing all of the checking here. */ if (((r[SVR4_X86_EFL] ^ tf->tf_eflags) & PSL_USERSTATIC) != 0 || - !USERMODE(r[SVR4_X86_CS], r[SVR4_X86_EFL])) + !USERMODE(r[SVR4_X86_CS], r[SVR4_X86_EFL])) { + PROC_UNLOCK(p); return (EINVAL); + } #if defined(__NetBSD__) /* %fs and %gs were restored by the trampoline. */ ==== //depot/projects/smpng/sys/kern/kern_acct.c#26 (text+ko) ==== @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_acct.c 8.1 (Berkeley) 6/14/93 - * $FreeBSD: src/sys/kern/kern_acct.c,v 1.62 2003/03/13 23:07:09 jhb Exp $ + * $FreeBSD: src/sys/kern/kern_acct.c,v 1.63 2003/04/17 22:20:30 jhb Exp $ */ #include "opt_mac.h" @@ -238,6 +238,7 @@ * Get process accounting information. */ + PROC_LOCK(p); /* (1) The name of the command that ran */ bcopy(p->p_comm, acct.ac_comm, sizeof acct.ac_comm); @@ -272,17 +273,16 @@ acct.ac_gid = p->p_ucred->cr_rgid; /* (7) The terminal from which the process was started */ - PROC_LOCK(p); SESS_LOCK(p->p_session); if ((p->p_flag & P_CONTROLT) && p->p_pgrp->pg_session->s_ttyp) acct.ac_tty = dev2udev(p->p_pgrp->pg_session->s_ttyp->t_dev); else acct.ac_tty = NOUDEV; SESS_UNLOCK(p->p_session); - PROC_UNLOCK(p); /* (8) The boolean flags that tell how the process terminated, etc. */ acct.ac_flag = p->p_acflag; + PROC_UNLOCK(p); /* * Write the accounting information to the file. ==== //depot/projects/smpng/sys/kern/kern_condvar.c#27 (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_condvar.c,v 1.39 2003/03/31 22:41:47 julian Exp $ + * $FreeBSD: src/sys/kern/kern_condvar.c,v 1.40 2003/04/17 22:21:05 jhb Exp $ */ #include "opt_ktrace.h" @@ -291,9 +291,9 @@ else rval = ERESTART; } - PROC_UNLOCK(p); if (p->p_flag & P_WEXIT) rval = EINTR; + PROC_UNLOCK(p); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -454,10 +454,9 @@ else rval = ERESTART; } - PROC_UNLOCK(p); - if (p->p_flag & P_WEXIT) rval = EINTR; + PROC_UNLOCK(p); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) ==== //depot/projects/smpng/sys/kern/kern_context.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ * */ /* - * $FreeBSD: src/sys/kern/kern_context.c,v 1.3 2003/04/01 23:25:18 jake Exp $ + * $FreeBSD: src/sys/kern/kern_context.c,v 1.4 2003/04/17 22:21:57 jhb Exp $ */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Apr 18 11:18:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 12C3537B407; Fri, 18 Apr 2003 11:18:30 -0700 (PDT) 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 95E6437B405 for ; Fri, 18 Apr 2003 11:18:29 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9256843FBD for ; Fri, 18 Apr 2003 11:18:27 -0700 (PDT) (envelope-from marcel@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 h3IIIR0U016411 for ; Fri, 18 Apr 2003 11:18:27 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3IIIOiv016407 for perforce@freebsd.org; Fri, 18 Apr 2003 11:18:24 -0700 (PDT) Date: Fri, 18 Apr 2003 11:18:24 -0700 (PDT) Message-Id: <200304181818.h3IIIOiv016407@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29205 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 18:18:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=29205 Change 29205 by marcel@marcel_pluto1 on 2003/04/18 11:17:57 IFC @29204 Affected files ... .. //depot/projects/ia64/Makefile.inc1#56 integrate .. //depot/projects/ia64/etc/defaults/rc.conf#28 integrate .. //depot/projects/ia64/etc/network.subr#1 branch .. //depot/projects/ia64/etc/rc.d/Makefile#10 integrate .. //depot/projects/ia64/etc/rc.d/jail#1 branch .. //depot/projects/ia64/etc/sendmail/freebsd.mc#8 integrate .. //depot/projects/ia64/include/Makefile#25 integrate .. //depot/projects/ia64/include/grp.h#9 integrate .. //depot/projects/ia64/include/nss.h#1 branch .. //depot/projects/ia64/include/nsswitch.h#3 integrate .. //depot/projects/ia64/include/pwd.h#8 integrate .. //depot/projects/ia64/lib/libc/gen/Makefile.inc#23 integrate .. //depot/projects/ia64/lib/libc/gen/getgrent.3#4 integrate .. //depot/projects/ia64/lib/libc/gen/getgrent.c#5 integrate .. //depot/projects/ia64/lib/libc/gen/getpwent.3#4 integrate .. //depot/projects/ia64/lib/libc/gen/getpwent.c#7 integrate .. //depot/projects/ia64/lib/libc/include/namespace.h#9 integrate .. //depot/projects/ia64/lib/libc/include/nss_tls.h#1 branch .. //depot/projects/ia64/lib/libc/include/un-namespace.h#7 integrate .. //depot/projects/ia64/lib/libc/net/Makefile.inc#6 integrate .. //depot/projects/ia64/lib/libc/net/nsdispatch.3#5 integrate .. //depot/projects/ia64/lib/libc/net/nsdispatch.c#6 integrate .. //depot/projects/ia64/lib/libc/net/nslexer.l#5 integrate .. //depot/projects/ia64/lib/libc/net/nsparser.y#4 integrate .. //depot/projects/ia64/lib/libc/net/nss_backends.h#1 branch .. //depot/projects/ia64/lib/libc/net/nss_compat.c#1 branch .. //depot/projects/ia64/lib/libc/posix1e/mac.3#8 integrate .. //depot/projects/ia64/lib/libc/sys/Makefile.inc#14 integrate .. //depot/projects/ia64/lib/libc/sys/ntp_gettime.2#1 branch .. //depot/projects/ia64/lib/libipsec/pfkey_dump.c#3 integrate .. //depot/projects/ia64/lib/libncurses/Makefile#13 integrate .. //depot/projects/ia64/lib/libpthread/Makefile#4 integrate .. //depot/projects/ia64/lib/libpthread/arch/i386/i386/ksd.c#1 branch .. //depot/projects/ia64/lib/libpthread/arch/i386/i386/thr_enter_uts.S#3 integrate .. //depot/projects/ia64/lib/libpthread/arch/i386/i386/thr_getcontext.S#1 branch .. //depot/projects/ia64/lib/libpthread/arch/i386/i386/thr_switch.S#4 integrate .. //depot/projects/ia64/lib/libpthread/arch/i386/include/atomic_ops.h#1 branch .. //depot/projects/ia64/lib/libpthread/arch/i386/include/ksd.h#1 branch .. //depot/projects/ia64/lib/libpthread/arch/i386/include/pthread_md.h#1 branch .. //depot/projects/ia64/lib/libpthread/sys/Makefile.inc#3 integrate .. //depot/projects/ia64/lib/libpthread/sys/lock.c#1 branch .. //depot/projects/ia64/lib/libpthread/sys/lock.h#1 branch .. //depot/projects/ia64/lib/libpthread/sys/thr_error.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/Makefile.inc#6 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_acl_aclcheck_fd.c#2 delete .. //depot/projects/ia64/lib/libpthread/thread/thr_aio_suspend.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_attr_get_np.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_attr_init.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_attr_setguardsize.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_attr_setschedparam.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_attr_setscope.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_autoinit.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_cancel.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_clean.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_close.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_cond.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_condattr_init.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_creat.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_create.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_detach.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_exit.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_fcntl.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_find_thread.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_fork.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_fsync.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_gc.c#2 delete .. //depot/projects/ia64/lib/libpthread/thread/thr_getschedparam.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_info.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_init.c#5 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_join.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#8 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_kill.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_main_np.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_mattr_init.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_msync.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_mutex.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_mutex_prioceiling.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_mutex_protocol.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_nanosleep.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_once.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_open.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_pause.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_poll.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_printf.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_priority_queue.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_private.h#5 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_pselect.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_read.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_readv.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_resume_np.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_rwlock.c#4 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_select.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_self.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sem.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_seterrno.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_setschedparam.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sig.c#4 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigaction.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigmask.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigpending.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigsuspend.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sigwait.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sleep.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_spec.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_spinlock.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_stack.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_suspend_np.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_switch_np.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_system.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_tcdrain.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_wait.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_wait4.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_waitpid.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_write.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_writev.c#2 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_yield.c#2 integrate .. //depot/projects/ia64/release/Makefile#45 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#42 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#79 integrate .. //depot/projects/ia64/release/i386/dokern.sh#15 integrate .. //depot/projects/ia64/release/i386/drivers.conf#16 integrate .. //depot/projects/ia64/release/pc98/dokern.sh#10 integrate .. //depot/projects/ia64/sbin/bsdlabel/Makefile#1 branch .. //depot/projects/ia64/sbin/bsdlabel/bsdlabel.5#1 branch .. //depot/projects/ia64/sbin/bsdlabel/bsdlabel.8#1 branch .. //depot/projects/ia64/sbin/bsdlabel/bsdlabel.c#1 branch .. //depot/projects/ia64/sbin/bsdlabel/pathnames.h#1 branch .. //depot/projects/ia64/sbin/disklabel/disklabel.8#16 integrate .. //depot/projects/ia64/sbin/gbde/Makefile#5 integrate .. //depot/projects/ia64/sbin/route/route.c#10 integrate .. //depot/projects/ia64/sbin/sunlabel/Makefile#2 integrate .. //depot/projects/ia64/sbin/sunlabel/sunlabel.c#2 integrate .. //depot/projects/ia64/share/man/Makefile#5 integrate .. //depot/projects/ia64/share/man/man4/firewire.4#7 integrate .. //depot/projects/ia64/share/man/man4/fwohci.4#6 integrate .. //depot/projects/ia64/share/man/man5/rc.conf.5#32 integrate .. //depot/projects/ia64/share/man/man8/intro.8#7 integrate .. //depot/projects/ia64/share/misc/iso3166#5 integrate .. //depot/projects/ia64/sys/alpha/alpha/sys_machdep.c#7 integrate .. //depot/projects/ia64/sys/alpha/alpha/vm_machdep.c#18 integrate .. //depot/projects/ia64/sys/alpha/include/_limits.h#1 branch .. //depot/projects/ia64/sys/alpha/include/proc.h#5 integrate .. //depot/projects/ia64/sys/alpha/linux/linux.h#3 integrate .. //depot/projects/ia64/sys/alpha/linux/linux_machdep.c#7 integrate .. //depot/projects/ia64/sys/arm/include/_limits.h#1 branch .. //depot/projects/ia64/sys/boot/alpha/boot1/boot1.c#4 integrate .. //depot/projects/ia64/sys/boot/arc/lib/arcdisk.c#3 integrate .. //depot/projects/ia64/sys/boot/arc/lib/devicename.c#2 integrate .. //depot/projects/ia64/sys/boot/ofw/libofw/devicename.c#5 integrate .. //depot/projects/ia64/sys/boot/ofw/libofw/ofw_disk.c#6 integrate .. //depot/projects/ia64/sys/boot/sparc64/boot1/boot1.c#6 integrate .. //depot/projects/ia64/sys/compat/linprocfs/linprocfs.c#16 integrate .. //depot/projects/ia64/sys/compat/linux/linux_ioctl.c#23 integrate .. //depot/projects/ia64/sys/compat/linux/linux_misc.c#22 integrate .. //depot/projects/ia64/sys/compat/linux/linux_signal.c#8 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_misc.c#17 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_signal.c#7 integrate .. //depot/projects/ia64/sys/conf/files#73 integrate .. //depot/projects/ia64/sys/conf/files.alpha#19 integrate .. //depot/projects/ia64/sys/conf/files.i386#35 integrate .. //depot/projects/ia64/sys/conf/files.ia64#36 integrate .. //depot/projects/ia64/sys/conf/files.pc98#28 integrate .. //depot/projects/ia64/sys/conf/files.sparc64#28 integrate .. //depot/projects/ia64/sys/dev/asr/asr.c#16 integrate .. //depot/projects/ia64/sys/dev/ata/ata-chipset.c#10 integrate .. //depot/projects/ia64/sys/dev/ata/ata-pci.c#26 integrate .. //depot/projects/ia64/sys/dev/bge/if_bge.c#25 integrate .. //depot/projects/ia64/sys/dev/em/if_em.c#20 integrate .. //depot/projects/ia64/sys/dev/firewire/firewire.c#23 integrate .. //depot/projects/ia64/sys/dev/firewire/firewire.h#9 integrate .. //depot/projects/ia64/sys/dev/firewire/firewire_phy.h#2 integrate .. //depot/projects/ia64/sys/dev/firewire/firewirereg.h#15 integrate .. //depot/projects/ia64/sys/dev/firewire/fwcrom.c#3 integrate .. //depot/projects/ia64/sys/dev/firewire/fwdev.c#14 integrate .. //depot/projects/ia64/sys/dev/firewire/fwdma.c#1 branch .. //depot/projects/ia64/sys/dev/firewire/fwdma.h#1 branch .. //depot/projects/ia64/sys/dev/firewire/fwmem.c#11 integrate .. //depot/projects/ia64/sys/dev/firewire/fwmem.h#4 integrate .. //depot/projects/ia64/sys/dev/firewire/fwohci.c#21 integrate .. //depot/projects/ia64/sys/dev/firewire/fwohci_pci.c#14 integrate .. //depot/projects/ia64/sys/dev/firewire/fwohcireg.h#7 integrate .. //depot/projects/ia64/sys/dev/firewire/fwohcivar.h#7 integrate .. //depot/projects/ia64/sys/dev/firewire/iec13213.h#3 integrate .. //depot/projects/ia64/sys/dev/firewire/iec68113.h#4 integrate .. //depot/projects/ia64/sys/dev/firewire/if_fwe.c#13 integrate .. //depot/projects/ia64/sys/dev/firewire/if_fwevar.h#3 integrate .. //depot/projects/ia64/sys/dev/firewire/sbp.c#24 integrate .. //depot/projects/ia64/sys/dev/fxp/if_fxp.c#27 integrate .. //depot/projects/ia64/sys/dev/gem/if_gem_pci.c#9 integrate .. //depot/projects/ia64/sys/dev/hea/hea_pci.c#4 integrate .. //depot/projects/ia64/sys/dev/hfa/hfa_pci.c#3 integrate .. //depot/projects/ia64/sys/dev/hme/if_hme_pci.c#6 integrate .. //depot/projects/ia64/sys/dev/lge/if_lge.c#12 integrate .. //depot/projects/ia64/sys/dev/mcd/mcd_isa.c#3 integrate .. //depot/projects/ia64/sys/dev/nge/if_nge.c#20 integrate .. //depot/projects/ia64/sys/dev/pccard/pccarddevs#23 integrate .. //depot/projects/ia64/sys/dev/pccard/pccarddevs.h#23 integrate .. //depot/projects/ia64/sys/dev/pci/pci.c#19 integrate .. //depot/projects/ia64/sys/dev/pci/pci_if.m#2 integrate .. //depot/projects/ia64/sys/dev/pci/pci_private.h#6 integrate .. //depot/projects/ia64/sys/dev/pci/pcivar.h#7 integrate .. //depot/projects/ia64/sys/dev/pdq/if_fpa.c#5 integrate .. //depot/projects/ia64/sys/dev/scd/scd_isa.c#2 integrate .. //depot/projects/ia64/sys/dev/sound/pci/ds1.c#6 integrate .. //depot/projects/ia64/sys/dev/sound/pci/emu10k1.c#8 integrate .. //depot/projects/ia64/sys/dev/sound/pci/ich.c#13 integrate .. //depot/projects/ia64/sys/dev/sound/pci/via8233.c#6 integrate .. //depot/projects/ia64/sys/dev/sound/pci/via8233.h#3 integrate .. //depot/projects/ia64/sys/dev/txp/if_txp.c#11 integrate .. //depot/projects/ia64/sys/dev/wds/wd7000.c#3 integrate .. //depot/projects/ia64/sys/dev/wl/if_wl.c#9 integrate .. //depot/projects/ia64/sys/dev/wl/if_wl.h#3 integrate .. //depot/projects/ia64/sys/fs/procfs/procfs.c#6 integrate .. //depot/projects/ia64/sys/fs/procfs/procfs_ctl.c#13 integrate .. //depot/projects/ia64/sys/fs/procfs/procfs_ioctl.c#8 integrate .. //depot/projects/ia64/sys/fs/procfs/procfs_status.c#10 integrate .. //depot/projects/ia64/sys/geom/geom_bsd.c#29 integrate .. //depot/projects/ia64/sys/geom/geom_bsd_enc.c#1 branch .. //depot/projects/ia64/sys/gnu/dev/sound/pci/emu10k1.h#2 integrate .. //depot/projects/ia64/sys/gnu/i386/fpemul/fpu_entry.c#3 integrate .. //depot/projects/ia64/sys/i386/i386/genassym.c#15 integrate .. //depot/projects/ia64/sys/i386/include/_limits.h#1 branch .. //depot/projects/ia64/sys/i386/isa/bs/bsif.h#3 integrate .. //depot/projects/ia64/sys/i386/isa/if_le.c#10 integrate .. //depot/projects/ia64/sys/i386/linux/linux_sysvec.c#22 integrate .. //depot/projects/ia64/sys/i386/svr4/svr4_machdep.c#7 integrate .. //depot/projects/ia64/sys/ia64/conf/GENERIC#28 integrate .. //depot/projects/ia64/sys/ia64/include/_limits.h#1 branch .. //depot/projects/ia64/sys/kern/kern_acct.c#18 integrate .. //depot/projects/ia64/sys/kern/kern_condvar.c#22 integrate .. //depot/projects/ia64/sys/kern/kern_context.c#3 integrate .. //depot/projects/ia64/sys/kern/kern_exit.c#40 integrate .. //depot/projects/ia64/sys/kern/kern_fork.c#34 integrate .. //depot/projects/ia64/sys/kern/kern_idle.c#10 integrate .. //depot/projects/ia64/sys/kern/kern_intr.c#21 integrate .. //depot/projects/ia64/sys/kern/kern_jail.c#15 integrate .. //depot/projects/ia64/sys/kern/kern_kthread.c#7 integrate .. //depot/projects/ia64/sys/kern/kern_mutex.c#24 integrate .. //depot/projects/ia64/sys/kern/kern_shutdown.c#18 integrate .. //depot/projects/ia64/sys/kern/kern_sig.c#43 integrate .. //depot/projects/ia64/sys/kern/kern_thr.c#4 integrate .. //depot/projects/ia64/sys/kern/kern_thread.c#37 integrate .. //depot/projects/ia64/sys/kern/sched_ule.c#12 integrate .. //depot/projects/ia64/sys/kern/subr_devstat.c#7 integrate .. //depot/projects/ia64/sys/kern/subr_disk.c#16 integrate .. //depot/projects/ia64/sys/kern/subr_prf.c#24 integrate .. //depot/projects/ia64/sys/kern/subr_trap.c#27 integrate .. //depot/projects/ia64/sys/kern/sys_process.c#18 integrate .. //depot/projects/ia64/sys/kern/tty.c#25 integrate .. //depot/projects/ia64/sys/kern/vfs_aio.c#31 integrate .. //depot/projects/ia64/sys/kern/vfs_subr.c#40 integrate .. //depot/projects/ia64/sys/modules/firewire/Makefile.inc#2 integrate .. //depot/projects/ia64/sys/modules/firewire/firewire/Makefile#7 integrate .. //depot/projects/ia64/sys/modules/firewire/fwe/Makefile#3 integrate .. //depot/projects/ia64/sys/netgraph/ng_message.h#3 integrate .. //depot/projects/ia64/sys/pc98/pc98/wd.c#10 integrate .. //depot/projects/ia64/sys/pci/if_dc.c#31 integrate .. //depot/projects/ia64/sys/pci/if_dcreg.h#10 integrate .. //depot/projects/ia64/sys/pci/if_pcn.c#14 integrate .. //depot/projects/ia64/sys/pci/if_rl.c#29 integrate .. //depot/projects/ia64/sys/pci/if_sf.c#13 integrate .. //depot/projects/ia64/sys/pci/if_sis.c#19 integrate .. //depot/projects/ia64/sys/pci/if_sk.c#13 integrate .. //depot/projects/ia64/sys/pci/if_ste.c#17 integrate .. //depot/projects/ia64/sys/pci/if_ti.c#21 integrate .. //depot/projects/ia64/sys/pci/if_tl.c#12 integrate .. //depot/projects/ia64/sys/pci/if_vr.c#19 integrate .. //depot/projects/ia64/sys/pci/if_wb.c#14 integrate .. //depot/projects/ia64/sys/pci/if_xl.c#30 integrate .. //depot/projects/ia64/sys/powerpc/include/_limits.h#1 branch .. //depot/projects/ia64/sys/powerpc/include/bus.h#9 integrate .. //depot/projects/ia64/sys/powerpc/powermac/ata_macio.c#5 integrate .. //depot/projects/ia64/sys/powerpc/powermac/macio.c#8 integrate .. //depot/projects/ia64/sys/powerpc/powermac/uninorth.c#3 integrate .. //depot/projects/ia64/sys/powerpc/psim/ata_iobus.c#4 integrate .. //depot/projects/ia64/sys/powerpc/psim/iobus.c#4 integrate .. //depot/projects/ia64/sys/sparc64/include/_limits.h#1 branch .. //depot/projects/ia64/sys/sys/disklabel.h#24 integrate .. //depot/projects/ia64/sys/sys/param.h#31 integrate .. //depot/projects/ia64/sys/sys/proc.h#56 integrate .. //depot/projects/ia64/sys/vm/uma_core.c#37 integrate .. //depot/projects/ia64/sys/vm/vm_glue.c#22 integrate .. //depot/projects/ia64/sys/vm/vm_mmap.c#18 integrate .. //depot/projects/ia64/sys/vm/vnode_pager.c#29 integrate .. //depot/projects/ia64/sys/x86_64/include/_limits.h#1 branch .. //depot/projects/ia64/usr.bin/calendar/calendars/calendar.history#10 integrate .. //depot/projects/ia64/usr.bin/calendar/calendars/calendar.usholiday#2 integrate .. //depot/projects/ia64/usr.sbin/fwcontrol/fwcontrol.c#6 integrate .. //depot/projects/ia64/usr.sbin/fwcontrol/fwcrom.c#3 integrate .. //depot/projects/ia64/usr.sbin/fwcontrol/fwdv.c#3 integrate .. //depot/projects/ia64/usr.sbin/jls/jls.c#2 integrate .. //depot/projects/ia64/usr.sbin/mrouted/map-mbone/Makefile#3 integrate .. //depot/projects/ia64/usr.sbin/mrouted/mrinfo/Makefile#3 integrate .. //depot/projects/ia64/usr.sbin/named/Makefile#6 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/add/perform.c#6 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/add/pkg_add.1#8 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/create/create.h#3 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/create/main.c#4 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/create/perform.c#12 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/create/pkg_create.1#10 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/info/show.c#11 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/lib/lib.h#8 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/lib/plist.c#10 integrate .. //depot/projects/ia64/usr.sbin/pkg_install/lib/url.c#3 integrate .. //depot/projects/ia64/usr.sbin/pwd_mkdb/pwd_mkdb.c#4 integrate .. //depot/projects/ia64/usr.sbin/setkey/setkey.c#2 integrate Differences ... ==== //depot/projects/ia64/Makefile.inc1#56 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.348 2003/04/14 14:46:13 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.349 2003/04/16 21:05:06 jhb Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -460,9 +460,9 @@ .endif INSTKERNNAME?= kernel -KRNLSRCDIR= ${.CURDIR}/sys -KRNLCONFDIR= ${KRNLSRCDIR}/${TARGET}/conf -KRNLOBJDIR= ${OBJTREE}${KRNLSRCDIR} +KERNSRCDIR?= ${.CURDIR}/sys +KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf +KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR} KERNCONFDIR?= ${KRNLCONFDIR} BUILDKERNELS= @@ -510,12 +510,12 @@ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} ${CLEANDIR} .endif cd ${KRNLOBJDIR}/${_kernel}; \ - MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DNO_CPU_CFLAGS -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile + MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ + ${MAKE} -DNO_CPU_CFLAGS -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile cd ${KRNLOBJDIR}/${_kernel}; \ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} obj # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. -.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules) +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${.CURDIR}/sys/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ @@ -676,7 +676,7 @@ # # build-tools: Build special purpose build tools # -.if defined(MODULES_WITH_WORLD) && exists(${KRNLSRCDIR}/modules) +.if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules) _aicasm= sys/modules/aic7xxx/aicasm .endif ==== //depot/projects/ia64/etc/defaults/rc.conf#28 (text+ko) ==== @@ -13,7 +13,7 @@ # # All arguments must be in double or single quotes. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.171 2003/03/17 23:15:53 cjc Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.172 2003/04/16 16:29:51 mtm Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -426,6 +426,11 @@ harvest_ethernet="YES" # Entropy device harvests ethernet randomness harvest_p_to_p="YES" # Entropy device harvests point-to-point randomness dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot +jail_enable="NO" # Set to NO to disable starting of any jails +jail_list="" # Space separated list of names of jails +jail_set_hostname_allow="YES" # Allow root user in a jail to change its hostname +jail_socket_unixiproute_only="YES" # Route only TCP/IP within a jail +jail_sysvipc_allow="NO" # Allow SystemV IPC use from within a jail ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## ==== //depot/projects/ia64/etc/rc.d/Makefile#10 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.11 2003/03/17 23:20:48 cjc Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.12 2003/04/16 16:27:23 mtm Exp $ .include @@ -7,7 +7,7 @@ apm apmd atm1 atm2.sh atm3.sh archdep bgfsck bootparams ccd cleanvar \ cleartmp cron devd devdb devfs diskless dmesg dumpon fsck inetd \ initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat ipsec \ - ipxrouted isdnd kadmind kerberos keyserv kldxref ldconfig local \ + ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig local \ localdaemons lomac lpd motd mountcritlocal mountcritremote \ mountd moused mroute6d mrouted msgs named network1 network2 \ network3 network_ipv6 nfsclient nfsd nfslocking nfsserver ntpd \ ==== //depot/projects/ia64/etc/sendmail/freebsd.mc#8 (text+ko) ==== @@ -44,7 +44,7 @@ # divert(0) -VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.27 2002/10/16 22:52:56 keramida Exp $') +VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.28 2003/04/18 01:25:41 gshapiro Exp $') OSTYPE(freebsd5) DOMAIN(generic) @@ -86,7 +86,6 @@ dnl DAEMON_OPTIONS(`Name=IPv6, Family=inet6') define(`confBIND_OPTS', `WorkAroundBrokenAAAA') -define(`confMAX_MIME_HEADER_LENGTH', `256/128') define(`confNO_RCPT_ACTION', `add-to-undisclosed') define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy') MAILER(local) ==== //depot/projects/ia64/include/Makefile#25 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 1/4/94 -# $FreeBSD: src/include/Makefile,v 1.195 2003/03/05 19:21:02 peter Exp $ +# $FreeBSD: src/include/Makefile,v 1.196 2003/04/17 14:14:21 nectar Exp $ # # Doing a make install builds /usr/include # @@ -13,7 +13,8 @@ fts.h getopt.h glob.h grp.h hesiod.h histedit.h ieeefp.h ifaddrs.h \ inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ locale.h malloc.h memory.h monetary.h mpool.h ndbm.h netconfig.h \ - netdb.h nl_types.h nlist.h nsswitch.h objformat.h paths.h pthread.h \ + netdb.h nl_types.h nlist.h nss.h nsswitch.h objformat.h paths.h \ + pthread.h \ pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \ resolv.h rune.h runetype.h search.h setjmp.h sgtty.h signal.h stab.h \ stdbool.h stddef.h stdio.h stdlib.h strhash.h string.h stringlist.h \ ==== //depot/projects/ia64/include/grp.h#9 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)grp.h 8.2 (Berkeley) 1/21/94 - * $FreeBSD: src/include/grp.h,v 1.17 2002/09/18 02:07:08 mike Exp $ + * $FreeBSD: src/include/grp.h,v 1.18 2003/04/17 14:15:25 nectar Exp $ */ #ifndef _GRP_H_ @@ -52,6 +52,11 @@ #define _GID_T_DECLARED #endif +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + struct group { char *gr_name; /* group name */ char *gr_passwd; /* group password */ @@ -70,15 +75,17 @@ const char *group_from_gid(gid_t, int); #endif #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +/* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ int setgrent(void); +int getgrgid_r(gid_t, struct group *, char *, size_t, + struct group **); +int getgrnam_r(const char *, struct group *, char *, size_t, + struct group **); #endif #if __BSD_VISIBLE -void setgrfile(const char *); +int getgrent_r(struct group *, char *, size_t, struct group **); int setgroupent(int); #endif -/* - * XXX missing getgrgid_r(), getgrnam_r(). - */ __END_DECLS #endif /* !_GRP_H_ */ ==== //depot/projects/ia64/include/nsswitch.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: nsswitch.h,v 1.6 1999/01/26 01:04:07 lukem Exp $ */ -/* $FreeBSD: src/include/nsswitch.h,v 1.2 2002/03/23 17:24:53 imp Exp $ */ +/* $FreeBSD: src/include/nsswitch.h,v 1.3 2003/04/17 14:14:21 nectar Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -41,20 +41,24 @@ #define _NSSWITCH_H 1 #include +#include -#include +#define NSS_MODULE_INTERFACE_VERSION 1 #ifndef _PATH_NS_CONF #define _PATH_NS_CONF "/etc/nsswitch.conf" #endif -#define NS_CONTINUE 0 -#define NS_RETURN 1 +/* NSS source actions */ +#define NS_ACTION_CONTINUE 0 /* try the next source */ +#define NS_ACTION_RETURN 1 /* look no further */ #define NS_SUCCESS (1<<0) /* entry was found */ #define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */ #define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */ -#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */ +#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retry */ +#define NS_RETURN (1<<4) /* stop search, e.g. for ERANGE */ +#define NS_TERMINATE (NS_SUCCESS|NS_RETURN) /* flags that end search */ #define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */ /* @@ -98,13 +102,26 @@ #define NSDB_TTYS "ttys" /* + * ns_dtab `method' function signature. + */ +typedef int (*nss_method)(void *_retval, void *_mdata, va_list _ap); + +/* + * Macro for generating method prototypes. + */ +#define NSS_METHOD_PROTOTYPE(method) \ + int method(void *, void *, va_list) + +/* * ns_dtab - `nsswitch dispatch table' - * contains an entry for each source and the appropriate function to call + * Contains an entry for each source and the appropriate function to + * call. ns_dtabs are used in the nsdispatch() API in order to allow + * the application to override built-in actions. */ -typedef struct { - const char *src; - int (*callback)(void *retval, void *cb_data, va_list ap); - void *cb_data; +typedef struct _ns_dtab { + const char *src; /* Source this entry implements */ + nss_method method; /* Method to be called */ + void *mdata; /* Data passed to method */ } ns_dtab; /* @@ -130,7 +147,7 @@ * used by the nsparser routines to store a mapping between a source * and its dispatch control flags for a given database. */ -typedef struct { +typedef struct _ns_src { const char *name; u_int32_t flags; } ns_src; @@ -142,7 +159,39 @@ */ extern const ns_src __nsdefaultsrc[]; +/* + * ns_mtab - NSS method table + * An NSS module provides a mapping from (database name, method name) + * tuples to the nss_method and associated data. + */ +typedef struct _ns_mtab { + const char *database; + const char *name; + nss_method method; + void *mdata; +} ns_mtab; + +/* + * NSS module de-registration, called at module unload. + */ +typedef void (*nss_module_unregister_fn)(ns_mtab *, unsigned int); +/* + * NSS module registration, called at module load. + */ +typedef ns_mtab *(*nss_module_register_fn)(const char *, unsigned int *, + nss_module_unregister_fn *); + +/* + * Many NSS interfaces follow the getXXnam, getXXid, getXXent pattern. + * Developers are encouraged to use nss_lookup_type where approriate. + */ +enum nss_lookup_type { + nss_lt_name = 1, + nss_lt_id = 2, + nss_lt_all = 3 +}; + #ifdef _NS_PRIVATE /* @@ -154,12 +203,23 @@ * for each database in /etc/nsswitch.conf there is a ns_dbt, with its * name and a list of ns_src's containing the source information. */ -typedef struct { +typedef struct _ns_dbt { const char *name; /* name of database */ ns_src *srclist; /* list of sources */ int srclistsize; /* size of srclist */ } ns_dbt; +/* + * ns_mod - NSS module + */ +typedef struct _ns_mod { + char *name; /* module name */ + void *handle; /* handle from dlopen */ + ns_mtab *mtab; /* method table */ + unsigned int mtabsize; /* count of entries in method table */ + nss_module_unregister_fn unregister; /* called to unload module */ +} ns_mod; + #endif /* _NS_PRIVATE */ @@ -171,12 +231,14 @@ #ifdef _NS_PRIVATE extern void _nsdbtaddsrc(ns_dbt *, const ns_src *); -extern void _nsdbtdump(const ns_dbt *); -extern const ns_dbt *_nsdbtget(const char *); extern void _nsdbtput(const ns_dbt *); extern void _nsyyerror(const char *); extern int _nsyylex(void); +extern int _nsyyparse(void); extern int _nsyylineno; +#ifdef _NSS_DEBUG +extern void _nsdbtdump(const ns_dbt *); +#endif #endif /* _NS_PRIVATE */ __END_DECLS ==== //depot/projects/ia64/include/pwd.h#8 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)pwd.h 8.2 (Berkeley) 1/21/94 - * $FreeBSD: src/include/pwd.h,v 1.13 2002/08/21 16:19:55 mike Exp $ + * $FreeBSD: src/include/pwd.h,v 1.15 2003/04/18 14:11:17 nectar Exp $ */ #ifndef _PWD_H_ @@ -60,6 +60,11 @@ #define _UID_T_DECLARED #endif +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + #define _PATH_PWD "/etc" #define _PATH_PASSWD "/etc/passwd" #define _PASSWD "passwd" @@ -73,11 +78,36 @@ #define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" -#define _PW_KEYBYNAME '1' /* stored by name */ -#define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ -#define _PW_KEYBYUID '3' /* stored by uid */ -#define _PW_KEYYPENABLED '4' /* YP is enabled */ -#define _PW_KEYYPBYNUM '5' /* special +@netgroup entries */ +/* Historically, the keys in _PATH_MP_DB/_PATH_SMP_DB had the format + * `1 octet tag | key', where the tag is one of the _PW_KEY* values + * listed below. These values happen to be ASCII digits. Starting + * with FreeBSD 5.1, the tag is now still a single octet, but the + * upper 4 bits are interpreted as a version. Pre-FreeBSD 5.1 format + * entries are version `3' -- this conveniently results in the same + * key values as before. The new, architecture-independent entries + * are version `4'. + * As it happens, some applications read the database directly. + * (Bad app, no cookie!) Thus, we leave the _PW_KEY* symbols at their + * old pre-FreeBSD 5.1 values so these apps still work. Consequently + * we have to do muck around a bit more to get the correct, versioned + * tag, and that is what the _PW_VERSIONED macros is about. + */ + +#define _PW_VERSION_MASK '0xF0' +#define _PW_VERSIONED(x, v) ((unsigned char)(((x) & 0xCF) | ((v)<<4))) + +#define _PW_KEYBYNAME '\x31' /* stored by name */ +#define _PW_KEYBYNUM '\x32' /* stored by entry in the "file" */ +#define _PW_KEYBYUID '\x33' /* stored by uid */ +#define _PW_KEYYPENABLED '\x34' /* YP is enabled */ +#define _PW_KEYYPBYNUM '\x35' /* special +@netgroup entries */ + +/* The database also contains a key to indicate the format version of + * the entries therein. There may be other, older versioned entries + * as well. + */ +#define _PWD_VERSION_KEY "\xFF" "VERSION" +#define _PWD_CURRENT_VERSION '\x04' #define _PASSWORD_EFMT1 '_' /* extended encryption format */ @@ -110,6 +140,9 @@ #define _PWF_SHELL _PWF(8) #define _PWF_EXPIRE _PWF(9) +/* XXX These flags are bogus. With nsswitch, there are many + * possible sources and they cannot be represented in a small integer. + */ #define _PWF_SOURCE 0x3000 #define _PWF_FILES 0x1000 #define _PWF_NIS 0x2000 @@ -123,12 +156,14 @@ void endpwent(void); struct passwd *getpwent(void); void setpwent(void); -/* - * XXX missing getpwnam_r() and getpwuid_r(). - */ +int getpwnam_r(const char *, struct passwd *, char *, size_t, + struct passwd **); +int getpwuid_r(uid_t, struct passwd *, char *, size_t, + struct passwd **); #endif #if __BSD_VISIBLE +int getpwent_r(struct passwd *, char *, size_t, struct passwd **); int setpassent(int); const char *user_from_uid(uid_t, int); #endif ==== //depot/projects/ia64/lib/libc/gen/Makefile.inc#23 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 -# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.105 2003/04/07 12:55:00 mdodd Exp $ +# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.106 2003/04/17 14:14:22 nectar Exp $ # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen @@ -93,7 +93,9 @@ getnetgrent.3 setnetgrent.3 MLINKS+=getprogname.3 setprogname.3 MLINKS+=getpwent.3 endpwent.3 getpwent.3 getpwnam.3 getpwent.3 getpwuid.3 \ - getpwent.3 setpassent.3 getpwent.3 setpwent.3 getpwent.3 setpwfile.3 + getpwent.3 setpassent.3 getpwent.3 setpwent.3 getpwent.3 setpwfile.3 \ + getpwent.3 getpwent_r.3 getpwent.3 getpwnam_r.3 \ + getpwent.3 getpwuid_r.3 MLINKS+=getttyent.3 endttyent.3 getttyent.3 getttynam.3 \ getttyent.3 isdialuptty.3 getttyent.3 isnettty.3 \ getttyent.3 setttyent.3 ==== //depot/projects/ia64/lib/libc/gen/getgrent.3#4 (text+ko) ==== @@ -30,17 +30,19 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)getgrent.3 8.2 (Berkeley) 4/19/94 -.\" $FreeBSD: src/lib/libc/gen/getgrent.3,v 1.21 2002/12/18 13:33:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/getgrent.3,v 1.22 2003/04/17 14:15:26 nectar Exp $ .\" -.Dd September 29, 1994 +.Dd April 16, 2003 .Dt GETGRENT 3 .Os .Sh NAME .Nm getgrent , +.Nm getgrent_r , .Nm getgrnam , +.Nm getgrnam_r , .Nm getgrgid , +.Nm getgrgid_r , .Nm setgroupent , -.\" .Nm setgrfile , .Nm setgrent , .Nm endgrent .Nd group database operations @@ -50,14 +52,18 @@ .In grp.h .Ft struct group * .Fn getgrent void +.Ft int +.Fn getgrent_r "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result" .Ft struct group * .Fn getgrnam "const char *name" +.Ft int +.Fn getgrnam_r "const char *name" "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result" .Ft struct group * .Fn getgrgid "gid_t gid" .Ft int +.Fn getgrgid_r "gid_t gid" "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result" +.Ft int .Fn setgroupent "int stayopen" -.\" .Ft void -.\" .Fn setgrfile "const char *name" .Ft int .Fn setgrent void .Ft void @@ -99,7 +105,36 @@ sequentially reads the group database and is intended for programs that wish to step through the complete list of groups. .Pp -All three routines will open the group file for reading, if necessary. +The functions +.Fn getgrent_r , +.Fn getgrnam_r , +and +.Fn getgrgid_r +are thread-safe versions of +.Fn getgrent , +.Fn getgrnam , +and +.Fn getgrgid , +respectively. +The caller must provide storage for the results of the search in +the +.Fa grp , +.Fa buffer , +.Fa bufsize , +and +.Fa result +arguments. +When these functions are successful, the +.Fa grp +argument will be filled-in, and a pointer to that argument will be +stored in +.Fa result . +If an entry is not found or an error occurs, +.Fa result +will be set to +.Dv NULL . +.Pp +These functions will open the group file for reading, if necessary. .Pp The .Fn setgroupent @@ -130,8 +165,25 @@ .Fn getgrnam , and .Fn getgrgid , -return a pointer to the group entry if successful; if end-of-file -is reached or an error occurs a null pointer is returned. +return a pointer to a group structure on success or +.Dv NULL +if the entry is not found or if an error occurs. +In the latter case, +.Va errno +will be set. +The functions +.Fn getgrent_r , +.Fn getgrnam_r , +and +.Fn getgrgid_r +return 0 if no error occurred, or an error number to indicate failure. +It is not an error if a matching entry is not found. +(Thus, if +.Fa result +is set to +.Dv NULL +and the return value is 0, no matching entry exists.) +.Pp The functions .Fn setgroupent and @@ -169,6 +221,30 @@ .Fn setgroupent appeared in .Bx 4.3 Reno . +The functions +.Fn getgrent_r , +.Fn getgrnam_r , +and +.Fn getgrgid_r +appeared in +.Fx 5.1 . +.Sh STANDARDS +The +.Fn getgrent , +.Fn getgrnam , +.Fn getgrnam_r , +.Fn getgrgid , +.Fn getgrgid_r +and +.Fn endgrent +functions conform to +.St -p1003.1-96 . +The +.Fn setgrent +function differs from that standard in that its return type is +.Vt int +rather than +.Vt void . .Sh COMPATIBILITY The historic function .Fn setgrfile , @@ -190,6 +266,7 @@ .Pp The functions .Fn getgrent , +.Fn getgrent_r , .Fn endgrent , .Fn setgroupent , and @@ -198,7 +275,9 @@ avoided, if possible. The .Fn getgrent -function -makes no attempt to suppress duplicate information if multiple +and +.Fn getgrent_r +functions +make no attempt to suppress duplicate information if multiple sources are specified in .Xr nsswitch.conf 5 . ==== //depot/projects/ia64/lib/libc/gen/getgrent.c#5 (text+ko) ==== @@ -1,7 +1,12 @@ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * Portions Copyright (c) 1994, Jason Downs. All Rights Reserved. +/*- + * Copyright (c) 2003 Networks Associates Technology, Inc. + * All rights reserved. + * + * This software was developed for the FreeBSD Project by + * Jacques A. Vidrine, Safeport Network Services, and Network + * Associates Laboratories, the Security Research Division of Network + * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 + * ("CBOSS"), as part of the DARPA CHATS research program. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,18 +16,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -30,679 +28,1095 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94"; -#endif /* LIBC_SCCS and not lint */ -/* $NetBSD: getgrent.c,v 1.34.2.1 1999/04/27 14:10:58 perry Exp $ */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/getgrent.c,v 1.24 2003/03/19 14:01:35 robert Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/getgrent.c,v 1.26 2003/04/18 01:00:37 nectar Exp $"); -#include - +#include "namespace.h" +#include +#ifdef YP +#include +#include +#include +#endif +#include #include >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Apr 18 11:20:35 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 263D437B405; Fri, 18 Apr 2003 11:20:35 -0700 (PDT) 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 C5BC837B404 for ; Fri, 18 Apr 2003 11:20:34 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7E1243FE0 for ; Fri, 18 Apr 2003 11:20:32 -0700 (PDT) (envelope-from marcel@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 h3IIKW0U017972 for ; Fri, 18 Apr 2003 11:20:32 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3IIKUiu017917 for perforce@freebsd.org; Fri, 18 Apr 2003 11:20:30 -0700 (PDT) Date: Fri, 18 Apr 2003 11:20:30 -0700 (PDT) Message-Id: <200304181820.h3IIKUiu017917@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29206 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 18:20:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=29206 Change 29206 by marcel@marcel_pluto1 on 2003/04/18 11:20:21 IFia64 Affected files ... .. //depot/projects/ia64_epc/Makefile.inc1#10 integrate .. //depot/projects/ia64_epc/etc/defaults/rc.conf#4 integrate .. //depot/projects/ia64_epc/etc/network.subr#1 branch .. //depot/projects/ia64_epc/etc/rc.d/Makefile#3 integrate .. //depot/projects/ia64_epc/etc/rc.d/jail#1 branch .. //depot/projects/ia64_epc/etc/sendmail/freebsd.mc#2 integrate .. //depot/projects/ia64_epc/include/Makefile#3 integrate .. //depot/projects/ia64_epc/include/grp.h#2 integrate .. //depot/projects/ia64_epc/include/nss.h#1 branch .. //depot/projects/ia64_epc/include/nsswitch.h#2 integrate .. //depot/projects/ia64_epc/include/pwd.h#2 integrate .. //depot/projects/ia64_epc/lib/libc/gen/Makefile.inc#5 integrate .. //depot/projects/ia64_epc/lib/libc/gen/getgrent.3#2 integrate .. //depot/projects/ia64_epc/lib/libc/gen/getgrent.c#3 integrate .. //depot/projects/ia64_epc/lib/libc/gen/getpwent.3#2 integrate .. //depot/projects/ia64_epc/lib/libc/gen/getpwent.c#3 integrate .. //depot/projects/ia64_epc/lib/libc/include/namespace.h#3 integrate .. //depot/projects/ia64_epc/lib/libc/include/nss_tls.h#1 branch .. //depot/projects/ia64_epc/lib/libc/include/un-namespace.h#3 integrate .. //depot/projects/ia64_epc/lib/libc/net/Makefile.inc#3 integrate .. //depot/projects/ia64_epc/lib/libc/net/nsdispatch.3#2 integrate .. //depot/projects/ia64_epc/lib/libc/net/nsdispatch.c#3 integrate .. //depot/projects/ia64_epc/lib/libc/net/nslexer.l#3 integrate .. //depot/projects/ia64_epc/lib/libc/net/nsparser.y#2 integrate .. //depot/projects/ia64_epc/lib/libc/net/nss_backends.h#1 branch .. //depot/projects/ia64_epc/lib/libc/net/nss_compat.c#1 branch .. //depot/projects/ia64_epc/lib/libc/posix1e/mac.3#3 integrate .. //depot/projects/ia64_epc/lib/libc/sys/Makefile.inc#4 integrate .. //depot/projects/ia64_epc/lib/libc/sys/ntp_gettime.2#1 branch .. //depot/projects/ia64_epc/lib/libipsec/pfkey_dump.c#2 integrate .. //depot/projects/ia64_epc/lib/libncurses/Makefile#4 integrate .. //depot/projects/ia64_epc/lib/libpthread/Makefile#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/arch/i386/i386/ksd.c#1 branch .. //depot/projects/ia64_epc/lib/libpthread/arch/i386/i386/thr_enter_uts.S#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/arch/i386/i386/thr_getcontext.S#1 branch .. //depot/projects/ia64_epc/lib/libpthread/arch/i386/i386/thr_switch.S#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/arch/i386/include/atomic_ops.h#1 branch .. //depot/projects/ia64_epc/lib/libpthread/arch/i386/include/ksd.h#1 branch .. //depot/projects/ia64_epc/lib/libpthread/arch/i386/include/pthread_md.h#1 branch .. //depot/projects/ia64_epc/lib/libpthread/sys/Makefile.inc#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/sys/lock.c#1 branch .. //depot/projects/ia64_epc/lib/libpthread/sys/lock.h#1 branch .. //depot/projects/ia64_epc/lib/libpthread/sys/thr_error.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/Makefile.inc#4 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_acl_aclcheck_fd.c#2 delete .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_aio_suspend.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_attr_get_np.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_attr_init.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_attr_setguardsize.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_attr_setschedparam.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_attr_setscope.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_autoinit.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_cancel.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_clean.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_close.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_cond.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_condattr_init.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_creat.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_create.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_detach.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_exit.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_fcntl.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_find_thread.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_fork.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_fsync.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_gc.c#2 delete .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_getschedparam.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_info.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_init.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_join.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_kern.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_kill.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_main_np.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_mattr_init.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_msync.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_mutex.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_mutex_prioceiling.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_mutex_protocol.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_nanosleep.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_once.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_open.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_pause.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_poll.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_printf.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_priority_queue.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_private.h#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_pselect.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_read.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_readv.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_resume_np.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_rwlock.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_select.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_self.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sem.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_seterrno.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_setschedparam.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sig.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sigaction.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sigmask.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sigpending.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sigsuspend.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sigwait.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_sleep.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_spec.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_spinlock.c#3 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_stack.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_suspend_np.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_switch_np.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_system.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_tcdrain.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_wait.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_wait4.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_waitpid.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_write.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_writev.c#2 integrate .. //depot/projects/ia64_epc/lib/libpthread/thread/thr_yield.c#2 integrate .. //depot/projects/ia64_epc/release/Makefile#7 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#6 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#10 integrate .. //depot/projects/ia64_epc/release/i386/dokern.sh#4 integrate .. //depot/projects/ia64_epc/release/i386/drivers.conf#4 integrate .. //depot/projects/ia64_epc/release/pc98/dokern.sh#4 integrate .. //depot/projects/ia64_epc/sbin/bsdlabel/Makefile#1 branch .. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.5#1 branch .. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.8#1 branch .. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.c#1 branch .. //depot/projects/ia64_epc/sbin/bsdlabel/pathnames.h#1 branch .. //depot/projects/ia64_epc/sbin/disklabel/disklabel.8#5 integrate .. //depot/projects/ia64_epc/sbin/gbde/Makefile#3 integrate .. //depot/projects/ia64_epc/sbin/route/route.c#3 integrate .. //depot/projects/ia64_epc/sbin/sunlabel/Makefile#2 integrate .. //depot/projects/ia64_epc/sbin/sunlabel/sunlabel.c#2 integrate .. //depot/projects/ia64_epc/share/man/Makefile#2 integrate .. //depot/projects/ia64_epc/share/man/man4/firewire.4#3 integrate .. //depot/projects/ia64_epc/share/man/man4/fwohci.4#3 integrate .. //depot/projects/ia64_epc/share/man/man5/rc.conf.5#8 integrate .. //depot/projects/ia64_epc/share/man/man8/intro.8#2 integrate .. //depot/projects/ia64_epc/share/misc/iso3166#2 integrate .. //depot/projects/ia64_epc/sys/alpha/alpha/sys_machdep.c#3 integrate .. //depot/projects/ia64_epc/sys/alpha/alpha/vm_machdep.c#3 integrate .. //depot/projects/ia64_epc/sys/alpha/include/_limits.h#1 branch .. //depot/projects/ia64_epc/sys/alpha/include/proc.h#2 integrate .. //depot/projects/ia64_epc/sys/alpha/linux/linux.h#2 integrate .. //depot/projects/ia64_epc/sys/alpha/linux/linux_machdep.c#3 integrate .. //depot/projects/ia64_epc/sys/arm/include/_limits.h#1 branch .. //depot/projects/ia64_epc/sys/boot/alpha/boot1/boot1.c#2 integrate .. //depot/projects/ia64_epc/sys/boot/arc/lib/arcdisk.c#3 integrate .. //depot/projects/ia64_epc/sys/boot/arc/lib/devicename.c#2 integrate .. //depot/projects/ia64_epc/sys/boot/ofw/libofw/devicename.c#2 integrate .. //depot/projects/ia64_epc/sys/boot/ofw/libofw/ofw_disk.c#2 integrate .. //depot/projects/ia64_epc/sys/boot/sparc64/boot1/boot1.c#3 integrate .. //depot/projects/ia64_epc/sys/compat/linprocfs/linprocfs.c#4 integrate .. //depot/projects/ia64_epc/sys/compat/linux/linux_ioctl.c#6 integrate .. //depot/projects/ia64_epc/sys/compat/linux/linux_misc.c#6 integrate .. //depot/projects/ia64_epc/sys/compat/linux/linux_signal.c#4 integrate .. //depot/projects/ia64_epc/sys/compat/svr4/svr4_misc.c#4 integrate .. //depot/projects/ia64_epc/sys/compat/svr4/svr4_signal.c#3 integrate .. //depot/projects/ia64_epc/sys/conf/files#10 integrate .. //depot/projects/ia64_epc/sys/conf/files.alpha#4 integrate .. //depot/projects/ia64_epc/sys/conf/files.i386#7 integrate .. //depot/projects/ia64_epc/sys/conf/files.ia64#8 integrate .. //depot/projects/ia64_epc/sys/conf/files.pc98#6 integrate .. //depot/projects/ia64_epc/sys/conf/files.sparc64#5 integrate .. //depot/projects/ia64_epc/sys/dev/asr/asr.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/ata/ata-chipset.c#7 integrate .. //depot/projects/ia64_epc/sys/dev/ata/ata-pci.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/bge/if_bge.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/em/if_em.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/firewire.c#6 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/firewire.h#3 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/firewire_phy.h#2 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/firewirereg.h#5 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/fwcrom.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/fwdev.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/fwdma.c#1 branch .. //depot/projects/ia64_epc/sys/dev/firewire/fwdma.h#1 branch .. //depot/projects/ia64_epc/sys/dev/firewire/fwmem.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/fwmem.h#2 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/fwohci.c#6 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/fwohci_pci.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/fwohcireg.h#3 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/fwohcivar.h#2 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/iec13213.h#2 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/iec68113.h#3 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/if_fwe.c#6 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/if_fwevar.h#3 integrate .. //depot/projects/ia64_epc/sys/dev/firewire/sbp.c#8 integrate .. //depot/projects/ia64_epc/sys/dev/fxp/if_fxp.c#10 integrate .. //depot/projects/ia64_epc/sys/dev/gem/if_gem_pci.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/hea/hea_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/hfa/hfa_pci.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/hme/if_hme_pci.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/lge/if_lge.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/mcd/mcd_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/nge/if_nge.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/pccard/pccarddevs#5 integrate .. //depot/projects/ia64_epc/sys/dev/pccard/pccarddevs.h#5 integrate .. //depot/projects/ia64_epc/sys/dev/pci/pci.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/pci/pci_if.m#2 integrate .. //depot/projects/ia64_epc/sys/dev/pci/pci_private.h#3 integrate .. //depot/projects/ia64_epc/sys/dev/pci/pcivar.h#2 integrate .. //depot/projects/ia64_epc/sys/dev/pdq/if_fpa.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/scd/scd_isa.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/sound/pci/ds1.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/sound/pci/emu10k1.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/sound/pci/ich.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/sound/pci/via8233.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/sound/pci/via8233.h#3 integrate .. //depot/projects/ia64_epc/sys/dev/txp/if_txp.c#5 integrate .. //depot/projects/ia64_epc/sys/dev/wds/wd7000.c#2 integrate .. //depot/projects/ia64_epc/sys/dev/wl/if_wl.c#3 integrate .. //depot/projects/ia64_epc/sys/dev/wl/if_wl.h#2 integrate .. //depot/projects/ia64_epc/sys/fs/procfs/procfs.c#2 integrate .. //depot/projects/ia64_epc/sys/fs/procfs/procfs_ctl.c#3 integrate .. //depot/projects/ia64_epc/sys/fs/procfs/procfs_ioctl.c#2 integrate .. //depot/projects/ia64_epc/sys/fs/procfs/procfs_status.c#3 integrate .. //depot/projects/ia64_epc/sys/geom/geom_bsd.c#5 integrate .. //depot/projects/ia64_epc/sys/geom/geom_bsd_enc.c#1 branch .. //depot/projects/ia64_epc/sys/gnu/dev/sound/pci/emu10k1.h#2 integrate .. //depot/projects/ia64_epc/sys/gnu/i386/fpemul/fpu_entry.c#2 integrate .. //depot/projects/ia64_epc/sys/i386/i386/genassym.c#4 integrate .. //depot/projects/ia64_epc/sys/i386/include/_limits.h#1 branch .. //depot/projects/ia64_epc/sys/i386/isa/bs/bsif.h#2 integrate .. //depot/projects/ia64_epc/sys/i386/isa/if_le.c#4 integrate .. //depot/projects/ia64_epc/sys/i386/linux/linux_sysvec.c#6 integrate .. //depot/projects/ia64_epc/sys/i386/svr4/svr4_machdep.c#3 integrate .. //depot/projects/ia64_epc/sys/ia64/conf/GENERIC#5 integrate .. //depot/projects/ia64_epc/sys/ia64/include/_limits.h#1 branch .. //depot/projects/ia64_epc/sys/kern/kern_acct.c#4 integrate .. //depot/projects/ia64_epc/sys/kern/kern_condvar.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/kern_context.c#3 integrate .. //depot/projects/ia64_epc/sys/kern/kern_exit.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/kern_fork.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/kern_idle.c#2 integrate .. //depot/projects/ia64_epc/sys/kern/kern_intr.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/kern_jail.c#4 integrate .. //depot/projects/ia64_epc/sys/kern/kern_kthread.c#2 integrate .. //depot/projects/ia64_epc/sys/kern/kern_mutex.c#7 integrate .. //depot/projects/ia64_epc/sys/kern/kern_shutdown.c#3 integrate .. //depot/projects/ia64_epc/sys/kern/kern_sig.c#8 integrate .. //depot/projects/ia64_epc/sys/kern/kern_thr.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/kern_thread.c#10 integrate .. //depot/projects/ia64_epc/sys/kern/sched_ule.c#7 integrate .. //depot/projects/ia64_epc/sys/kern/subr_devstat.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/subr_disk.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/subr_prf.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/subr_trap.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/sys_process.c#3 integrate .. //depot/projects/ia64_epc/sys/kern/tty.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/vfs_aio.c#5 integrate .. //depot/projects/ia64_epc/sys/kern/vfs_subr.c#7 integrate .. //depot/projects/ia64_epc/sys/modules/firewire/Makefile.inc#2 integrate .. //depot/projects/ia64_epc/sys/modules/firewire/firewire/Makefile#3 integrate .. //depot/projects/ia64_epc/sys/modules/firewire/fwe/Makefile#2 integrate .. //depot/projects/ia64_epc/sys/netgraph/ng_message.h#2 integrate .. //depot/projects/ia64_epc/sys/pc98/pc98/wd.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_dc.c#6 integrate .. //depot/projects/ia64_epc/sys/pci/if_dcreg.h#2 integrate .. //depot/projects/ia64_epc/sys/pci/if_pcn.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_rl.c#7 integrate .. //depot/projects/ia64_epc/sys/pci/if_sf.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_sis.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_sk.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_ste.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_ti.c#6 integrate .. //depot/projects/ia64_epc/sys/pci/if_tl.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_vr.c#6 integrate .. //depot/projects/ia64_epc/sys/pci/if_wb.c#5 integrate .. //depot/projects/ia64_epc/sys/pci/if_xl.c#10 integrate .. //depot/projects/ia64_epc/sys/powerpc/include/_limits.h#1 branch .. //depot/projects/ia64_epc/sys/powerpc/include/bus.h#4 integrate .. //depot/projects/ia64_epc/sys/powerpc/powermac/ata_macio.c#3 integrate .. //depot/projects/ia64_epc/sys/powerpc/powermac/macio.c#4 integrate .. //depot/projects/ia64_epc/sys/powerpc/powermac/uninorth.c#2 integrate .. //depot/projects/ia64_epc/sys/powerpc/psim/ata_iobus.c#3 integrate .. //depot/projects/ia64_epc/sys/powerpc/psim/iobus.c#3 integrate .. //depot/projects/ia64_epc/sys/sparc64/include/_limits.h#1 branch .. //depot/projects/ia64_epc/sys/sys/disklabel.h#3 integrate .. //depot/projects/ia64_epc/sys/sys/param.h#8 integrate .. //depot/projects/ia64_epc/sys/sys/proc.h#8 integrate .. //depot/projects/ia64_epc/sys/vm/uma_core.c#5 integrate .. //depot/projects/ia64_epc/sys/vm/vm_glue.c#2 integrate .. //depot/projects/ia64_epc/sys/vm/vm_mmap.c#3 integrate .. //depot/projects/ia64_epc/sys/vm/vnode_pager.c#4 integrate .. //depot/projects/ia64_epc/sys/x86_64/include/_limits.h#1 branch .. //depot/projects/ia64_epc/usr.bin/calendar/calendars/calendar.history#4 integrate .. //depot/projects/ia64_epc/usr.bin/calendar/calendars/calendar.usholiday#2 integrate .. //depot/projects/ia64_epc/usr.sbin/fwcontrol/fwcontrol.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/fwcontrol/fwcrom.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/fwcontrol/fwdv.c#3 integrate .. //depot/projects/ia64_epc/usr.sbin/jls/jls.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/mrouted/map-mbone/Makefile#3 integrate .. //depot/projects/ia64_epc/usr.sbin/mrouted/mrinfo/Makefile#3 integrate .. //depot/projects/ia64_epc/usr.sbin/named/Makefile#3 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/add/perform.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/add/pkg_add.1#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/create/create.h#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/create/main.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/create/perform.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/create/pkg_create.1#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/info/show.c#3 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/lib/lib.h#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/lib/plist.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/pkg_install/lib/url.c#3 integrate .. //depot/projects/ia64_epc/usr.sbin/pwd_mkdb/pwd_mkdb.c#2 integrate .. //depot/projects/ia64_epc/usr.sbin/setkey/setkey.c#2 integrate Differences ... ==== //depot/projects/ia64_epc/Makefile.inc1#10 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.348 2003/04/14 14:46:13 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.349 2003/04/16 21:05:06 jhb Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -460,9 +460,9 @@ .endif INSTKERNNAME?= kernel -KRNLSRCDIR= ${.CURDIR}/sys -KRNLCONFDIR= ${KRNLSRCDIR}/${TARGET}/conf -KRNLOBJDIR= ${OBJTREE}${KRNLSRCDIR} +KERNSRCDIR?= ${.CURDIR}/sys +KRNLCONFDIR= ${KERNSRCDIR}/${TARGET}/conf +KRNLOBJDIR= ${OBJTREE}${KERNSRCDIR} KERNCONFDIR?= ${KRNLCONFDIR} BUILDKERNELS= @@ -510,12 +510,12 @@ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} ${CLEANDIR} .endif cd ${KRNLOBJDIR}/${_kernel}; \ - MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} -DNO_CPU_CFLAGS -f ${KRNLSRCDIR}/dev/aic7xxx/aicasm/Makefile + MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ + ${MAKE} -DNO_CPU_CFLAGS -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile cd ${KRNLOBJDIR}/${_kernel}; \ ${KMAKEENV} ${MAKE} KERNEL=${INSTKERNNAME} obj # XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. -.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KRNLSRCDIR}/modules) +.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) .for target in obj depend all cd ${.CURDIR}/sys/modules/aic7xxx/aicasm; \ MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ @@ -676,7 +676,7 @@ # # build-tools: Build special purpose build tools # -.if defined(MODULES_WITH_WORLD) && exists(${KRNLSRCDIR}/modules) +.if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules) _aicasm= sys/modules/aic7xxx/aicasm .endif ==== //depot/projects/ia64_epc/etc/defaults/rc.conf#4 (text+ko) ==== @@ -13,7 +13,7 @@ # # All arguments must be in double or single quotes. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.171 2003/03/17 23:15:53 cjc Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.172 2003/04/16 16:29:51 mtm Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -426,6 +426,11 @@ harvest_ethernet="YES" # Entropy device harvests ethernet randomness harvest_p_to_p="YES" # Entropy device harvests point-to-point randomness dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot +jail_enable="NO" # Set to NO to disable starting of any jails +jail_list="" # Space separated list of names of jails +jail_set_hostname_allow="YES" # Allow root user in a jail to change its hostname +jail_socket_unixiproute_only="YES" # Route only TCP/IP within a jail +jail_sysvipc_allow="NO" # Allow SystemV IPC use from within a jail ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## ==== //depot/projects/ia64_epc/etc/rc.d/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.11 2003/03/17 23:20:48 cjc Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.12 2003/04/16 16:27:23 mtm Exp $ .include @@ -7,7 +7,7 @@ apm apmd atm1 atm2.sh atm3.sh archdep bgfsck bootparams ccd cleanvar \ cleartmp cron devd devdb devfs diskless dmesg dumpon fsck inetd \ initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat ipsec \ - ipxrouted isdnd kadmind kerberos keyserv kldxref ldconfig local \ + ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig local \ localdaemons lomac lpd motd mountcritlocal mountcritremote \ mountd moused mroute6d mrouted msgs named network1 network2 \ network3 network_ipv6 nfsclient nfsd nfslocking nfsserver ntpd \ ==== //depot/projects/ia64_epc/etc/sendmail/freebsd.mc#2 (text+ko) ==== @@ -44,7 +44,7 @@ # divert(0) -VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.27 2002/10/16 22:52:56 keramida Exp $') +VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.28 2003/04/18 01:25:41 gshapiro Exp $') OSTYPE(freebsd5) DOMAIN(generic) @@ -86,7 +86,6 @@ dnl DAEMON_OPTIONS(`Name=IPv6, Family=inet6') define(`confBIND_OPTS', `WorkAroundBrokenAAAA') -define(`confMAX_MIME_HEADER_LENGTH', `256/128') define(`confNO_RCPT_ACTION', `add-to-undisclosed') define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy') MAILER(local) ==== //depot/projects/ia64_epc/include/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 1/4/94 -# $FreeBSD: src/include/Makefile,v 1.195 2003/03/05 19:21:02 peter Exp $ +# $FreeBSD: src/include/Makefile,v 1.196 2003/04/17 14:14:21 nectar Exp $ # # Doing a make install builds /usr/include # @@ -13,7 +13,8 @@ fts.h getopt.h glob.h grp.h hesiod.h histedit.h ieeefp.h ifaddrs.h \ inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ locale.h malloc.h memory.h monetary.h mpool.h ndbm.h netconfig.h \ - netdb.h nl_types.h nlist.h nsswitch.h objformat.h paths.h pthread.h \ + netdb.h nl_types.h nlist.h nss.h nsswitch.h objformat.h paths.h \ + pthread.h \ pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \ resolv.h rune.h runetype.h search.h setjmp.h sgtty.h signal.h stab.h \ stdbool.h stddef.h stdio.h stdlib.h strhash.h string.h stringlist.h \ ==== //depot/projects/ia64_epc/include/grp.h#2 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)grp.h 8.2 (Berkeley) 1/21/94 - * $FreeBSD: src/include/grp.h,v 1.17 2002/09/18 02:07:08 mike Exp $ + * $FreeBSD: src/include/grp.h,v 1.18 2003/04/17 14:15:25 nectar Exp $ */ #ifndef _GRP_H_ @@ -52,6 +52,11 @@ #define _GID_T_DECLARED #endif +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + struct group { char *gr_name; /* group name */ char *gr_passwd; /* group password */ @@ -70,15 +75,17 @@ const char *group_from_gid(gid_t, int); #endif #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +/* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ int setgrent(void); +int getgrgid_r(gid_t, struct group *, char *, size_t, + struct group **); +int getgrnam_r(const char *, struct group *, char *, size_t, + struct group **); #endif #if __BSD_VISIBLE -void setgrfile(const char *); +int getgrent_r(struct group *, char *, size_t, struct group **); int setgroupent(int); #endif -/* - * XXX missing getgrgid_r(), getgrnam_r(). - */ __END_DECLS #endif /* !_GRP_H_ */ ==== //depot/projects/ia64_epc/include/nsswitch.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: nsswitch.h,v 1.6 1999/01/26 01:04:07 lukem Exp $ */ -/* $FreeBSD: src/include/nsswitch.h,v 1.2 2002/03/23 17:24:53 imp Exp $ */ +/* $FreeBSD: src/include/nsswitch.h,v 1.3 2003/04/17 14:14:21 nectar Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -41,20 +41,24 @@ #define _NSSWITCH_H 1 #include +#include -#include +#define NSS_MODULE_INTERFACE_VERSION 1 #ifndef _PATH_NS_CONF #define _PATH_NS_CONF "/etc/nsswitch.conf" #endif -#define NS_CONTINUE 0 -#define NS_RETURN 1 +/* NSS source actions */ +#define NS_ACTION_CONTINUE 0 /* try the next source */ +#define NS_ACTION_RETURN 1 /* look no further */ #define NS_SUCCESS (1<<0) /* entry was found */ #define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */ #define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */ -#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */ +#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retry */ +#define NS_RETURN (1<<4) /* stop search, e.g. for ERANGE */ +#define NS_TERMINATE (NS_SUCCESS|NS_RETURN) /* flags that end search */ #define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */ /* @@ -98,13 +102,26 @@ #define NSDB_TTYS "ttys" /* + * ns_dtab `method' function signature. + */ +typedef int (*nss_method)(void *_retval, void *_mdata, va_list _ap); + +/* + * Macro for generating method prototypes. + */ +#define NSS_METHOD_PROTOTYPE(method) \ + int method(void *, void *, va_list) + +/* * ns_dtab - `nsswitch dispatch table' - * contains an entry for each source and the appropriate function to call + * Contains an entry for each source and the appropriate function to + * call. ns_dtabs are used in the nsdispatch() API in order to allow + * the application to override built-in actions. */ -typedef struct { - const char *src; - int (*callback)(void *retval, void *cb_data, va_list ap); - void *cb_data; +typedef struct _ns_dtab { + const char *src; /* Source this entry implements */ + nss_method method; /* Method to be called */ + void *mdata; /* Data passed to method */ } ns_dtab; /* @@ -130,7 +147,7 @@ * used by the nsparser routines to store a mapping between a source * and its dispatch control flags for a given database. */ -typedef struct { +typedef struct _ns_src { const char *name; u_int32_t flags; } ns_src; @@ -142,7 +159,39 @@ */ extern const ns_src __nsdefaultsrc[]; +/* + * ns_mtab - NSS method table + * An NSS module provides a mapping from (database name, method name) + * tuples to the nss_method and associated data. + */ +typedef struct _ns_mtab { + const char *database; + const char *name; + nss_method method; + void *mdata; +} ns_mtab; + +/* + * NSS module de-registration, called at module unload. + */ +typedef void (*nss_module_unregister_fn)(ns_mtab *, unsigned int); +/* + * NSS module registration, called at module load. + */ +typedef ns_mtab *(*nss_module_register_fn)(const char *, unsigned int *, + nss_module_unregister_fn *); + +/* + * Many NSS interfaces follow the getXXnam, getXXid, getXXent pattern. + * Developers are encouraged to use nss_lookup_type where approriate. + */ +enum nss_lookup_type { + nss_lt_name = 1, + nss_lt_id = 2, + nss_lt_all = 3 +}; + #ifdef _NS_PRIVATE /* @@ -154,12 +203,23 @@ * for each database in /etc/nsswitch.conf there is a ns_dbt, with its * name and a list of ns_src's containing the source information. */ -typedef struct { +typedef struct _ns_dbt { const char *name; /* name of database */ ns_src *srclist; /* list of sources */ int srclistsize; /* size of srclist */ } ns_dbt; +/* + * ns_mod - NSS module + */ +typedef struct _ns_mod { + char *name; /* module name */ + void *handle; /* handle from dlopen */ + ns_mtab *mtab; /* method table */ + unsigned int mtabsize; /* count of entries in method table */ + nss_module_unregister_fn unregister; /* called to unload module */ +} ns_mod; + #endif /* _NS_PRIVATE */ @@ -171,12 +231,14 @@ #ifdef _NS_PRIVATE extern void _nsdbtaddsrc(ns_dbt *, const ns_src *); -extern void _nsdbtdump(const ns_dbt *); -extern const ns_dbt *_nsdbtget(const char *); extern void _nsdbtput(const ns_dbt *); extern void _nsyyerror(const char *); extern int _nsyylex(void); +extern int _nsyyparse(void); extern int _nsyylineno; +#ifdef _NSS_DEBUG +extern void _nsdbtdump(const ns_dbt *); +#endif #endif /* _NS_PRIVATE */ __END_DECLS ==== //depot/projects/ia64_epc/include/pwd.h#2 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)pwd.h 8.2 (Berkeley) 1/21/94 - * $FreeBSD: src/include/pwd.h,v 1.13 2002/08/21 16:19:55 mike Exp $ + * $FreeBSD: src/include/pwd.h,v 1.15 2003/04/18 14:11:17 nectar Exp $ */ #ifndef _PWD_H_ @@ -60,6 +60,11 @@ #define _UID_T_DECLARED #endif +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + #define _PATH_PWD "/etc" #define _PATH_PASSWD "/etc/passwd" #define _PASSWD "passwd" @@ -73,11 +78,36 @@ #define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" -#define _PW_KEYBYNAME '1' /* stored by name */ -#define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ -#define _PW_KEYBYUID '3' /* stored by uid */ -#define _PW_KEYYPENABLED '4' /* YP is enabled */ -#define _PW_KEYYPBYNUM '5' /* special +@netgroup entries */ +/* Historically, the keys in _PATH_MP_DB/_PATH_SMP_DB had the format + * `1 octet tag | key', where the tag is one of the _PW_KEY* values + * listed below. These values happen to be ASCII digits. Starting + * with FreeBSD 5.1, the tag is now still a single octet, but the + * upper 4 bits are interpreted as a version. Pre-FreeBSD 5.1 format + * entries are version `3' -- this conveniently results in the same + * key values as before. The new, architecture-independent entries + * are version `4'. + * As it happens, some applications read the database directly. + * (Bad app, no cookie!) Thus, we leave the _PW_KEY* symbols at their + * old pre-FreeBSD 5.1 values so these apps still work. Consequently + * we have to do muck around a bit more to get the correct, versioned + * tag, and that is what the _PW_VERSIONED macros is about. + */ + +#define _PW_VERSION_MASK '0xF0' +#define _PW_VERSIONED(x, v) ((unsigned char)(((x) & 0xCF) | ((v)<<4))) + +#define _PW_KEYBYNAME '\x31' /* stored by name */ +#define _PW_KEYBYNUM '\x32' /* stored by entry in the "file" */ +#define _PW_KEYBYUID '\x33' /* stored by uid */ +#define _PW_KEYYPENABLED '\x34' /* YP is enabled */ +#define _PW_KEYYPBYNUM '\x35' /* special +@netgroup entries */ + +/* The database also contains a key to indicate the format version of + * the entries therein. There may be other, older versioned entries + * as well. + */ +#define _PWD_VERSION_KEY "\xFF" "VERSION" +#define _PWD_CURRENT_VERSION '\x04' #define _PASSWORD_EFMT1 '_' /* extended encryption format */ @@ -110,6 +140,9 @@ #define _PWF_SHELL _PWF(8) #define _PWF_EXPIRE _PWF(9) +/* XXX These flags are bogus. With nsswitch, there are many + * possible sources and they cannot be represented in a small integer. + */ #define _PWF_SOURCE 0x3000 #define _PWF_FILES 0x1000 #define _PWF_NIS 0x2000 @@ -123,12 +156,14 @@ void endpwent(void); struct passwd *getpwent(void); void setpwent(void); -/* - * XXX missing getpwnam_r() and getpwuid_r(). - */ +int getpwnam_r(const char *, struct passwd *, char *, size_t, + struct passwd **); +int getpwuid_r(uid_t, struct passwd *, char *, size_t, + struct passwd **); #endif #if __BSD_VISIBLE +int getpwent_r(struct passwd *, char *, size_t, struct passwd **); int setpassent(int); const char *user_from_uid(uid_t, int); #endif ==== //depot/projects/ia64_epc/lib/libc/gen/Makefile.inc#5 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 -# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.105 2003/04/07 12:55:00 mdodd Exp $ +# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.106 2003/04/17 14:14:22 nectar Exp $ # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen @@ -93,7 +93,9 @@ getnetgrent.3 setnetgrent.3 MLINKS+=getprogname.3 setprogname.3 MLINKS+=getpwent.3 endpwent.3 getpwent.3 getpwnam.3 getpwent.3 getpwuid.3 \ - getpwent.3 setpassent.3 getpwent.3 setpwent.3 getpwent.3 setpwfile.3 + getpwent.3 setpassent.3 getpwent.3 setpwent.3 getpwent.3 setpwfile.3 \ + getpwent.3 getpwent_r.3 getpwent.3 getpwnam_r.3 \ + getpwent.3 getpwuid_r.3 MLINKS+=getttyent.3 endttyent.3 getttyent.3 getttynam.3 \ getttyent.3 isdialuptty.3 getttyent.3 isnettty.3 \ getttyent.3 setttyent.3 ==== //depot/projects/ia64_epc/lib/libc/gen/getgrent.3#2 (text+ko) ==== @@ -30,17 +30,19 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)getgrent.3 8.2 (Berkeley) 4/19/94 -.\" $FreeBSD: src/lib/libc/gen/getgrent.3,v 1.21 2002/12/18 13:33:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/getgrent.3,v 1.22 2003/04/17 14:15:26 nectar Exp $ .\" -.Dd September 29, 1994 +.Dd April 16, 2003 .Dt GETGRENT 3 .Os .Sh NAME .Nm getgrent , +.Nm getgrent_r , .Nm getgrnam , +.Nm getgrnam_r , .Nm getgrgid , +.Nm getgrgid_r , .Nm setgroupent , -.\" .Nm setgrfile , .Nm setgrent , .Nm endgrent .Nd group database operations @@ -50,14 +52,18 @@ .In grp.h .Ft struct group * .Fn getgrent void +.Ft int +.Fn getgrent_r "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result" .Ft struct group * .Fn getgrnam "const char *name" +.Ft int +.Fn getgrnam_r "const char *name" "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result" .Ft struct group * .Fn getgrgid "gid_t gid" .Ft int +.Fn getgrgid_r "gid_t gid" "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result" +.Ft int .Fn setgroupent "int stayopen" -.\" .Ft void -.\" .Fn setgrfile "const char *name" .Ft int .Fn setgrent void .Ft void @@ -99,7 +105,36 @@ sequentially reads the group database and is intended for programs that wish to step through the complete list of groups. .Pp -All three routines will open the group file for reading, if necessary. +The functions +.Fn getgrent_r , +.Fn getgrnam_r , +and +.Fn getgrgid_r +are thread-safe versions of +.Fn getgrent , +.Fn getgrnam , +and +.Fn getgrgid , +respectively. +The caller must provide storage for the results of the search in +the +.Fa grp , +.Fa buffer , +.Fa bufsize , +and +.Fa result +arguments. +When these functions are successful, the +.Fa grp +argument will be filled-in, and a pointer to that argument will be +stored in +.Fa result . +If an entry is not found or an error occurs, +.Fa result +will be set to +.Dv NULL . +.Pp +These functions will open the group file for reading, if necessary. .Pp The .Fn setgroupent @@ -130,8 +165,25 @@ .Fn getgrnam , and .Fn getgrgid , -return a pointer to the group entry if successful; if end-of-file -is reached or an error occurs a null pointer is returned. +return a pointer to a group structure on success or +.Dv NULL +if the entry is not found or if an error occurs. +In the latter case, +.Va errno +will be set. +The functions +.Fn getgrent_r , +.Fn getgrnam_r , +and +.Fn getgrgid_r +return 0 if no error occurred, or an error number to indicate failure. +It is not an error if a matching entry is not found. +(Thus, if +.Fa result +is set to +.Dv NULL +and the return value is 0, no matching entry exists.) +.Pp The functions .Fn setgroupent and @@ -169,6 +221,30 @@ .Fn setgroupent appeared in .Bx 4.3 Reno . +The functions +.Fn getgrent_r , +.Fn getgrnam_r , +and +.Fn getgrgid_r +appeared in +.Fx 5.1 . +.Sh STANDARDS +The +.Fn getgrent , +.Fn getgrnam , +.Fn getgrnam_r , +.Fn getgrgid , +.Fn getgrgid_r +and +.Fn endgrent +functions conform to +.St -p1003.1-96 . +The +.Fn setgrent +function differs from that standard in that its return type is +.Vt int +rather than +.Vt void . .Sh COMPATIBILITY The historic function .Fn setgrfile , @@ -190,6 +266,7 @@ .Pp The functions .Fn getgrent , +.Fn getgrent_r , .Fn endgrent , .Fn setgroupent , and @@ -198,7 +275,9 @@ avoided, if possible. The .Fn getgrent -function -makes no attempt to suppress duplicate information if multiple +and +.Fn getgrent_r +functions +make no attempt to suppress duplicate information if multiple sources are specified in .Xr nsswitch.conf 5 . ==== //depot/projects/ia64_epc/lib/libc/gen/getgrent.c#3 (text+ko) ==== @@ -1,7 +1,12 @@ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * Portions Copyright (c) 1994, Jason Downs. All Rights Reserved. +/*- + * Copyright (c) 2003 Networks Associates Technology, Inc. + * All rights reserved. + * + * This software was developed for the FreeBSD Project by + * Jacques A. Vidrine, Safeport Network Services, and Network + * Associates Laboratories, the Security Research Division of Network + * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 + * ("CBOSS"), as part of the DARPA CHATS research program. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,18 +16,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -30,679 +28,1095 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94"; -#endif /* LIBC_SCCS and not lint */ -/* $NetBSD: getgrent.c,v 1.34.2.1 1999/04/27 14:10:58 perry Exp $ */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/getgrent.c,v 1.24 2003/03/19 14:01:35 robert Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/getgrent.c,v 1.26 2003/04/18 01:00:37 nectar Exp $"); -#include - +#include "namespace.h" +#include +#ifdef YP +#include +#include +#include +#endif +#include #include >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Apr 18 12:50:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA36E37B404; Fri, 18 Apr 2003 12:50:24 -0700 (PDT) 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 567A637B401 for ; Fri, 18 Apr 2003 12:50:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EADEC43F75 for ; Fri, 18 Apr 2003 12:50:23 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3IJoN0U031642 for ; Fri, 18 Apr 2003 12:50:23 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3IJoNPR031636 for perforce@freebsd.org; Fri, 18 Apr 2003 12:50:23 -0700 (PDT) Date: Fri, 18 Apr 2003 12:50:23 -0700 (PDT) Message-Id: <200304181950.h3IJoNPR031636@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 29210 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 19:50:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=29210 Change 29210 by rwatson@rwatson_paprika on 2003/04/18 12:49:43 Update NAI copyrights, missed in earlier edits. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#382 edit .. //depot/projects/trustedbsd/mac/sys/sys/mac.h#234 edit .. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#186 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#382 (text+ko) ==== @@ -1,7 +1,7 @@ /*- * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson * Copyright (c) 2001 Ilmar S. Habibulin - * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. + * Copyright (c) 2001, 2002, 2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed by Robert Watson and Ilmar Habibulin for the ==== //depot/projects/trustedbsd/mac/sys/sys/mac.h#234 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson - * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. + * Copyright (c) 2001, 2002, 2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. ==== //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#186 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson - * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. + * Copyright (c) 2001, 2002, 2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. From owner-p4-projects@FreeBSD.ORG Fri Apr 18 13:26:12 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D0AC337B405; Fri, 18 Apr 2003 13:26:11 -0700 (PDT) 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 70ED537B401 for ; Fri, 18 Apr 2003 13:26:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 009D943FD7 for ; Fri, 18 Apr 2003 13:26:11 -0700 (PDT) (envelope-from jhb@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 h3IKQA0U035778 for ; Fri, 18 Apr 2003 13:26:10 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3IKQAdk035774 for perforce@freebsd.org; Fri, 18 Apr 2003 13:26:10 -0700 (PDT) Date: Fri, 18 Apr 2003 13:26:10 -0700 (PDT) Message-Id: <200304182026.h3IKQAdk035774@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29216 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 20:26:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=29216 Change 29216 by jhb@jhb_laptop on 2003/04/18 13:26:04 IFC. Affected files ... .. //depot/projects/smpng/sys/security/mac_ifoff/mac_ifoff.c#4 integrate Differences ... ==== //depot/projects/smpng/sys/security/mac_ifoff/mac_ifoff.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/security/mac_ifoff/mac_ifoff.c,v 1.5 2003/03/27 19:26:38 rwatson Exp $ + * $FreeBSD: src/sys/security/mac_ifoff/mac_ifoff.c,v 1.6 2003/04/18 20:22:23 rwatson Exp $ */ /* @@ -147,10 +147,9 @@ struct mbuf *m, struct label *mbuflabel) { - if (m->m_flags & M_PKTHDR) { - if (m->m_pkthdr.rcvif != NULL) - return (check_ifnet_incoming(m->m_pkthdr.rcvif, 0)); - } + M_ASSERTPKTHDR(m); + if (m->m_pkthdr.rcvif != NULL) + return (check_ifnet_incoming(m->m_pkthdr.rcvif, 0)); return (0); } From owner-p4-projects@FreeBSD.ORG Fri Apr 18 13:26:13 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 80B6C37B40A; Fri, 18 Apr 2003 13:26:12 -0700 (PDT) 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 B4A0C37B404 for ; Fri, 18 Apr 2003 13:26:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80EA143F93 for ; Fri, 18 Apr 2003 13:26:10 -0700 (PDT) (envelope-from jhb@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 h3IKQA0U035771 for ; Fri, 18 Apr 2003 13:26:10 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3IKQ9LA035767 for perforce@freebsd.org; Fri, 18 Apr 2003 13:26:09 -0700 (PDT) Date: Fri, 18 Apr 2003 13:26:09 -0700 (PDT) Message-Id: <200304182026.h3IKQ9LA035767@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29215 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 20:26:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=29215 Change 29215 by jhb@jhb_laptop on 2003/04/18 13:25:33 IFC @29213 loop back in more proc locking commits. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/machdep.c#54 integrate .. //depot/projects/smpng/sys/alpha/alpha/sys_machdep.c#14 integrate .. //depot/projects/smpng/sys/alpha/alpha/trap.c#45 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#19 integrate .. //depot/projects/smpng/sys/i386/i386/machdep.c#57 integrate .. //depot/projects/smpng/sys/i386/i386/trap.c#52 integrate .. //depot/projects/smpng/sys/ia64/ia64/trap.c#44 integrate .. //depot/projects/smpng/sys/kern/kern_mac.c#22 integrate .. //depot/projects/smpng/sys/kern/kern_proc.c#49 integrate .. //depot/projects/smpng/sys/kern/kern_resource.c#34 integrate .. //depot/projects/smpng/sys/kern/kern_sig.c#59 integrate .. //depot/projects/smpng/sys/kern/kern_thread.c#26 integrate .. //depot/projects/smpng/sys/pc98/i386/machdep.c#51 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/trap.c#48 integrate .. //depot/projects/smpng/sys/sys/cdefs.h#18 integrate .. //depot/projects/smpng/sys/sys/mac.h#16 integrate .. //depot/projects/smpng/sys/sys/mac_policy.h#14 integrate .. //depot/projects/smpng/sys/sys/proc.h#79 integrate .. //depot/projects/smpng/sys/sys/syscallsubr.h#5 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/machdep.c#54 (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.199 2003/04/01 00:18:54 jeff Exp $ + * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.200 2003/04/18 20:09:03 jhb Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1132,11 +1132,11 @@ td = curthread; p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); frame = td->td_frame; oonstack = sigonstack(alpha_pal_rdusp()); fsize = sizeof ksi; rndfsize = ((fsize + 15) / 16) * 16; - PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; /* @@ -1993,7 +1993,9 @@ mcp->mc_regs[FRAME_SP] = alpha_pal_rdusp(); mcp->mc_format = _MC_REV0_TRAPFRAME; + PROC_LOCK(curthread->td_proc); mcp->mc_onstack = sigonstack(alpha_pal_rdusp()) ? 1 : 0; + PROC_UNLOCK(curthread->td_proc); get_fpcontext(td, mcp); return (0); } ==== //depot/projects/smpng/sys/alpha/alpha/sys_machdep.c#14 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 - * $FreeBSD: src/sys/alpha/alpha/sys_machdep.c,v 1.22 2003/03/06 04:47:47 rwatson Exp $ + * $FreeBSD: src/sys/alpha/alpha/sys_machdep.c,v 1.23 2003/04/18 18:06:32 jhb Exp $ * */ @@ -209,7 +209,7 @@ pp = p->p_pptr; if (pp != NULL) { PROC_LOCK(pp); - uac = p->p_md.md_uac; + uac = pp->p_md.md_uac; PROC_UNLOCK(pp); PROC_UNLOCK(p); error = copyout(&uac, args, sizeof(uac)); ==== //depot/projects/smpng/sys/alpha/alpha/trap.c#45 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.110 2003/03/31 22:02:36 jeff Exp $ */ +/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.111 2003/04/18 20:19:59 jhb Exp $ */ /* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */ /* @@ -298,12 +298,13 @@ td->td_frame = framep; if (td->td_ucred != p->p_ucred) cred_update_thread(td); + PROC_LOCK(p); if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - PROC_LOCK(p); mtx_lock_spin(&sched_lock); thread_exit(); /* NOTREACHED */ } + PROC_UNLOCK(p); } else { sticks = 0; /* XXX bogus -Wuninitialized warning */ KASSERT(cold || td->td_ucred != NULL, ==== //depot/projects/smpng/sys/dev/em/if_em.c#19 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.21 2003/04/15 06:37:23 mdodd Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.22 2003/04/18 17:36:13 pdeuskar Exp $*/ #include @@ -1609,6 +1609,10 @@ ifp->if_capenable = ifp->if_capabilities; } + /* + * Tell the upper layer(s) we support long frames. + */ + ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); #if __FreeBSD_version >= 500000 ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; #endif ==== //depot/projects/smpng/sys/i386/i386/machdep.c#57 (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.561 2003/04/02 23:53:28 peter Exp $ + * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.562 2003/04/18 20:09:03 jhb Exp $ */ #include "opt_atalk.h" @@ -2368,7 +2368,9 @@ tp = td->td_frame; + PROC_LOCK(curthread->td_proc); mcp->mc_onstack = sigonstack(tp->tf_esp); + PROC_UNLOCK(curthread->td_proc); mcp->mc_gs = td->td_pcb->pcb_gs; mcp->mc_fs = tp->tf_fs; mcp->mc_es = tp->tf_es; ==== //depot/projects/smpng/sys/i386/i386/trap.c#52 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/i386/i386/trap.c,v 1.245 2003/03/31 22:41:32 jeff Exp $ + * $FreeBSD: src/sys/i386/i386/trap.c,v 1.246 2003/04/18 20:19:59 jhb Exp $ */ /* @@ -271,14 +271,14 @@ /* * First check that we shouldn't just abort. * But check if we are the single thread first! - * XXX p_singlethread not locked, but should be safe. */ + PROC_LOCK(p); if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - PROC_LOCK(p); mtx_lock_spin(&sched_lock); thread_exit(); /* NOTREACHED */ } + PROC_UNLOCK(p); switch (type) { case T_PRIVINFLT: /* privileged instruction fault */ ==== //depot/projects/smpng/sys/ia64/ia64/trap.c#44 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/ia64/ia64/trap.c,v 1.72 2003/03/31 22:02:37 jeff Exp $ */ +/* $FreeBSD: src/sys/ia64/ia64/trap.c,v 1.73 2003/04/18 20:19:59 jhb Exp $ */ /* From: src/sys/alpha/alpha/trap.c,v 1.33 */ /* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */ @@ -334,11 +334,13 @@ td->td_frame = framep; if (td->td_ucred != p->p_ucred) cred_update_thread(td); + PROC_LOCK(p); if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { mtx_lock_spin(&sched_lock); - thread_exit(); /* XXXKSE need proc lock? */ + thread_exit(); /* NOTREACHED */ } + PROC_UNLOCK(p); } else { sticks = 0; /* XXX bogus -Wuninitialized warning */ KASSERT(cold || td->td_ucred != NULL, ==== //depot/projects/smpng/sys/kern/kern_mac.c#22 (text+ko) ==== @@ -1,7 +1,7 @@ /*- * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson * Copyright (c) 2001 Ilmar S. Habibulin - * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. + * Copyright (c) 2001, 2002, 2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed by Robert Watson and Ilmar Habibulin for the @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/kern_mac.c,v 1.86 2003/04/15 19:33:23 rwatson Exp $ + * $FreeBSD: src/sys/kern/kern_mac.c,v 1.87 2003/04/18 19:57:37 rwatson Exp $ */ /* * Developed by the TrustedBSD Project. ==== //depot/projects/smpng/sys/kern/kern_proc.c#49 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 - * $FreeBSD: src/sys/kern/kern_proc.c,v 1.178 2003/04/10 17:35:44 julian Exp $ + * $FreeBSD: src/sys/kern/kern_proc.c,v 1.179 2003/04/18 20:17:05 jhb Exp $ */ #include "opt_ktrace.h" @@ -72,11 +72,9 @@ MALLOC_DEFINE(M_SUBPROC, "subproc", "Proc sub-structures"); static void doenterpgrp(struct proc *, struct pgrp *); - +static void orphanpg(struct pgrp *pg); +static void pgadjustjobc(struct pgrp *pgrp, int entering); static void pgdelete(struct pgrp *); - -static void orphanpg(struct pgrp *pg); - static void proc_ctor(void *mem, int size, void *arg); static void proc_dtor(void *mem, int size, void *arg); static void proc_init(void *mem, int size); @@ -476,6 +474,23 @@ FREE(pgrp, M_PGRP); } +static void +pgadjustjobc(pgrp, entering) + struct pgrp *pgrp; + int entering; +{ + + PGRP_LOCK(pgrp); + if (entering) + pgrp->pg_jobc++; + else { + --pgrp->pg_jobc; + if (pgrp->pg_jobc == 0) + orphanpg(pgrp); + } + PGRP_UNLOCK(pgrp); +} + /* * Adjust pgrp jobc counters when specified process changes process group. * We count the number of processes in each process group that "qualify" @@ -506,17 +521,8 @@ */ mysession = pgrp->pg_session; if ((hispgrp = p->p_pptr->p_pgrp) != pgrp && - hispgrp->pg_session == mysession) { - PGRP_LOCK(pgrp); - if (entering) - pgrp->pg_jobc++; - else { - --pgrp->pg_jobc; - if (pgrp->pg_jobc == 0) - orphanpg(pgrp); - } - PGRP_UNLOCK(pgrp); - } + hispgrp->pg_session == mysession) + pgadjustjobc(pgrp, entering); /* * Check this process' children to see whether they qualify @@ -524,19 +530,17 @@ * process groups. */ LIST_FOREACH(p, &p->p_children, p_sibling) { - if ((hispgrp = p->p_pgrp) != pgrp && - hispgrp->pg_session == mysession && - p->p_state != PRS_ZOMBIE) { - PGRP_LOCK(hispgrp); - if (entering) - hispgrp->pg_jobc++; - else { - --hispgrp->pg_jobc; - if (hispgrp->pg_jobc == 0) - orphanpg(hispgrp); - } - PGRP_UNLOCK(hispgrp); + hispgrp = p->p_pgrp; + if (hispgrp == pgrp || + hispgrp->pg_session != mysession) + continue; + PROC_LOCK(p); + if (p->p_state == PRS_ZOMBIE) { + PROC_UNLOCK(p); + continue; } + PROC_UNLOCK(p); + pgadjustjobc(hispgrp, entering); } } @@ -553,10 +557,10 @@ PGRP_LOCK_ASSERT(pg, MA_OWNED); - mtx_lock_spin(&sched_lock); LIST_FOREACH(p, &pg->pg_members, p_pglist) { + PROC_LOCK(p); if (P_SHOULDSTOP(p)) { - mtx_unlock_spin(&sched_lock); + PROC_UNLOCK(p); LIST_FOREACH(p, &pg->pg_members, p_pglist) { PROC_LOCK(p); psignal(p, SIGHUP); @@ -565,8 +569,8 @@ } return; } + PROC_UNLOCK(p); } - mtx_unlock_spin(&sched_lock); } #include "opt_ddb.h" @@ -897,18 +901,20 @@ else p = LIST_FIRST(&zombproc); for (; p != 0; p = LIST_NEXT(p, p_list)) { - PROC_LOCK(p); /* - * Show a user only appropriate processes. + * Skip embryonic processes. */ - if (p_cansee(curthread, p)) { - PROC_UNLOCK(p); + mtx_lock_spin(&sched_lock); + if (p->p_state == PRS_NEW) { + mtx_unlock_spin(&sched_lock); continue; } + mtx_unlock_spin(&sched_lock); + PROC_LOCK(p); /* - * Skip embryonic processes. + * Show a user only appropriate processes. */ - if (p->p_state == PRS_NEW) { + if (p_cansee(curthread, p)) { PROC_UNLOCK(p); continue; } ==== //depot/projects/smpng/sys/kern/kern_resource.c#34 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_resource.c 8.5 (Berkeley) 1/21/94 - * $FreeBSD: src/sys/kern/kern_resource.c,v 1.122 2003/04/11 03:39:07 jeff Exp $ + * $FreeBSD: src/sys/kern/kern_resource.c,v 1.123 2003/04/18 20:17:47 jhb Exp $ */ #include "opt_compat.h" @@ -392,6 +392,7 @@ rtp_to_pri(struct rtprio *rtp, struct ksegrp *kg) { + mtx_assert(&sched_lock, MA_OWNED); if (rtp->prio > RTP_PRIO_MAX) return (EINVAL); switch (RTP_PRIO_BASE(rtp->type)) { @@ -419,6 +420,7 @@ pri_to_rtp(struct ksegrp *kg, struct rtprio *rtp) { + mtx_assert(&sched_lock, MA_OWNED); switch (PRI_BASE(kg->kg_pri_class)) { case PRI_REALTIME: rtp->prio = kg->kg_user_pri - PRI_MIN_REALTIME; ==== //depot/projects/smpng/sys/kern/kern_sig.c#59 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_sig.c 8.7 (Berkeley) 4/18/94 - * $FreeBSD: src/sys/kern/kern_sig.c,v 1.226 2003/04/17 22:07:56 jhb Exp $ + * $FreeBSD: src/sys/kern/kern_sig.c,v 1.227 2003/04/18 20:18:44 jhb Exp $ */ #include "opt_compat.h" @@ -89,8 +89,6 @@ static void filt_sigdetach(struct knote *kn); static int filt_signal(struct knote *kn, long hint); static struct thread *sigtd(struct proc *p, int sig, int prop); -static int do_sigprocmask(struct thread *td, int how, - sigset_t *set, sigset_t *oset, int old); static int kern_sigtimedwait(struct thread *td, sigset_t set, siginfo_t *info, struct timespec *timeout); @@ -590,12 +588,12 @@ } /* - * do_sigprocmask() + * kern_sigprocmask() * * Manipulate signal mask. */ -static int -do_sigprocmask(td, how, set, oset, old) +int +kern_sigprocmask(td, how, set, oset, old) struct thread *td; int how; sigset_t *set, *oset; @@ -636,7 +634,7 @@ } /* - * sigprocmask() - MP SAFE (XXXKSE not under KSE it isn't) + * sigprocmask() - MP SAFE */ #ifndef _SYS_SYSPROTO_H_ @@ -662,7 +660,7 @@ if (error) return (error); } - error = do_sigprocmask(td, uap->how, setp, osetp, 0); + error = kern_sigprocmask(td, uap->how, setp, osetp, 0); if (osetp && !error) { error = copyout(osetp, uap->oset, sizeof(oset)); } @@ -688,7 +686,7 @@ int error; OSIG2SIG(uap->mask, set); - error = do_sigprocmask(td, uap->how, &set, &oset, 1); + error = kern_sigprocmask(td, uap->how, &set, &oset, 1); SIG2OSIG(oset, td->td_retval[0]); return (error); } ==== //depot/projects/smpng/sys/kern/kern_thread.c#26 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * - * $FreeBSD: src/sys/kern/kern_thread.c,v 1.116 2003/04/18 00:16:13 julian Exp $ + * $FreeBSD: src/sys/kern/kern_thread.c,v 1.117 2003/04/18 20:19:59 jhb Exp $ */ #include @@ -1544,15 +1544,15 @@ /* * First check that we shouldn't just abort. * But check if we are the single thread first! - * XXX p_singlethread not locked, but should be safe. */ + PROC_LOCK(p); if ((p->p_flag & P_SINGLE_EXIT) && (p->p_singlethread != td)) { - PROC_LOCK(p); mtx_lock_spin(&sched_lock); thread_stopped(p); thread_exit(); /* NOTREACHED */ } + PROC_UNLOCK(p); /* * If we are doing a syscall in a KSE environment, ==== //depot/projects/smpng/sys/pc98/i386/machdep.c#51 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/pc98/i386/machdep.c,v 1.314 2003/04/03 12:39:18 nyan Exp $ + * $FreeBSD: src/sys/pc98/i386/machdep.c,v 1.315 2003/04/18 20:09:04 jhb Exp $ */ #include "opt_atalk.h" @@ -2434,7 +2434,9 @@ tp = td->td_frame; + PROC_LOCK(curthread->td_proc); mcp->mc_onstack = sigonstack(tp->tf_esp); + PROC_UNLOCK(curthread->td_proc); mcp->mc_gs = td->td_pcb->pcb_gs; mcp->mc_fs = tp->tf_fs; mcp->mc_es = tp->tf_es; ==== //depot/projects/smpng/sys/sparc64/sparc64/trap.c#48 (text+ko) ==== @@ -37,7 +37,7 @@ * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 * from: FreeBSD: src/sys/i386/i386/trap.c,v 1.197 2001/07/19 - * $FreeBSD: src/sys/sparc64/sparc64/trap.c,v 1.58 2003/03/31 22:02:38 jeff Exp $ + * $FreeBSD: src/sys/sparc64/sparc64/trap.c,v 1.59 2003/04/18 20:20:00 jhb Exp $ */ #include "opt_ddb.h" @@ -245,12 +245,13 @@ td->td_frame = tf; if (td->td_ucred != p->p_ucred) cred_update_thread(td); + PROC_LOCK(p); if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - PROC_LOCK(p); mtx_lock_spin(&sched_lock); thread_exit(); /* NOTREACHED */ } + PROC_UNLOCK(p); switch (tf->tf_type) { case T_DATA_MISS: ==== //depot/projects/smpng/sys/sys/cdefs.h#18 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/sys/cdefs.h,v 1.68 2002/10/21 20:50:30 mike Exp $ + * $FreeBSD: src/sys/sys/cdefs.h,v 1.69 2003/04/18 18:59:34 bde Exp $ */ #ifndef _SYS_CDEFS_H_ @@ -189,7 +189,7 @@ #endif /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ -#if __FreeBSD_cc_version >= 300001 && __FreeBSD_cc_version < 500003 +#if __FreeBSD_cc_version >= 300001 #define __printf0like(fmtarg, firstvararg) \ __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) #else @@ -232,7 +232,7 @@ * Embed the rcs id of a source file in the resulting library. Note that in * more recent ELF binutils, we use .ident allowing the ID to be stripped. * Usage: - * __FBSDID("$FreeBSD: src/sys/sys/cdefs.h,v 1.68 2002/10/21 20:50:30 mike Exp $"); + * __FBSDID("$FreeBSD: src/sys/sys/cdefs.h,v 1.69 2003/04/18 18:59:34 bde Exp $"); */ #ifndef __FBSDID #if !defined(lint) && !defined(STRIP_FBSDID) ==== //depot/projects/smpng/sys/sys/mac.h#16 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson - * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. + * Copyright (c) 2001, 2002, 2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/mac.h,v 1.39 2003/04/14 20:39:06 rwatson Exp $ + * $FreeBSD: src/sys/sys/mac.h,v 1.40 2003/04/18 19:57:37 rwatson Exp $ */ /* * Userland/kernel interface for Mandatory Access Control. ==== //depot/projects/smpng/sys/sys/mac_policy.h#14 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson - * Copyright (c) 2001, 2002 Networks Associates Technology, Inc. + * Copyright (c) 2001, 2002, 2003 Networks Associates Technology, Inc. * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/mac_policy.h,v 1.38 2003/04/14 20:39:06 rwatson Exp $ + * $FreeBSD: src/sys/sys/mac_policy.h,v 1.39 2003/04/18 19:57:37 rwatson Exp $ */ /* * Kernel interface for MAC policy modules. ==== //depot/projects/smpng/sys/sys/proc.h#79 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)proc.h 8.15 (Berkeley) 5/19/95 - * $FreeBSD: src/sys/sys/proc.h,v 1.315 2003/04/18 00:16:13 julian Exp $ + * $FreeBSD: src/sys/sys/proc.h,v 1.316 2003/04/18 18:51:52 julian Exp $ */ #ifndef _SYS_PROC_H_ @@ -567,11 +567,12 @@ struct vnode *p_tracevp; /* (c + o) Trace to vnode. */ struct ucred *p_tracecred; /* (o) Credentials to trace with. */ struct vnode *p_textvp; /* (b) Vnode of executable. */ - sigset_t p_siglist; /* (c) Sigs not delivered to a td. */ + sigset_t p_siglist; /* (c) Sigs held for the process */ char p_lock; /* (c) Proclock (prevent swap) count. */ struct klist p_klist; /* (c) Knotes attached to this proc. */ struct sigiolst p_sigiolst; /* (c) List of sigio sources. */ int p_sigparent; /* (c) Signal to parent on exit. */ + sigset_t p_oldsigmask; /* (c) Saved mask from pre-sigpause. */ int p_sig; /* (n) For core dump/debugger XXX. */ u_long p_code; /* (n) For core dump/debugger XXX. */ u_int p_stops; /* (c) Stop event bitmask. */ @@ -583,10 +584,11 @@ struct thread *p_singlethread;/* (j) If single threading this is it */ int p_suspcount; /* (j) # threads in suspended mode */ /* End area that is zeroed on creation. */ -#define p_endzero p_sigstk +#define p_endzero p_sigmask /* The following fields are all copied upon creation in fork. */ #define p_startcopy p_endzero + sigset_t p_sigmask; /* (c) Current signal mask. */ stack_t p_sigstk; /* (c) Stack ptr and on-stack flag. */ u_int p_magic; /* (b) Magic number. */ char p_comm[MAXCOMLEN + 1]; /* (b) Process name. */ @@ -634,7 +636,7 @@ #define P_WAITED 0x01000 /* Someone is waiting for us */ #define P_WEXIT 0x02000 /* Working on exiting. */ #define P_EXEC 0x04000 /* Process called exec. */ -#define P_THREADED 0x08000 /* Process is using threads. */ +#define P_THREADED 0x08000 /* Process is using M:N threads. */ #define P_CONTINUED 0x10000 /* Proc has continued from a stopped state. */ #define P_PROTECTED 0x20000 /* Do not kill on memory overcommit. */ @@ -654,8 +656,9 @@ #define P_COWINPROGRESS 0x400000 /* Snapshot copy-on-write in progress. */ #define P_JAILED 0x1000000 /* Process is in jail. */ -#define P_ALTSTACK 0x2000000 /* Have alternate signal stack. */ -#define P_INEXEC 0x4000000 /* Process is in execve(). */ +#define P_OLDMASK 0x2000000 /* Need to restore mask after suspend. */ +#define P_ALTSTACK 0x4000000 /* Have alternate signal stack. */ +#define P_INEXEC 0x8000000 /* Process is in execve(). */ /* These flags are kept in p_sflag and are protected with sched_lock. */ #define PS_INMEM 0x00001 /* Loaded into memory. */ @@ -666,6 +669,7 @@ #define PS_PROFPEND 0x00040 /* Pending SIGPROF needs to be posted. */ #define PS_SWAPINREQ 0x00100 /* Swapin request due to wakeup. */ #define PS_SWAPPING 0x00200 /* Process is being swapped. */ +#define PS_NEEDSIGCHK 0x02000 /* Process may need signal delivery. */ #define PS_SWAPPINGIN 0x04000 /* Swapin in progress. */ #define PS_MACPEND 0x08000 /* Ast()-based MAC event pending. */ ==== //depot/projects/smpng/sys/sys/syscallsubr.h#5 (text+ko) ==== @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/syscallsubr.h,v 1.6 2003/02/03 17:36:52 ume Exp $ + * $FreeBSD: src/sys/sys/syscallsubr.h,v 1.7 2003/04/18 20:18:44 jhb Exp $ */ #ifndef _SYS_SYSCALLSUBR_H_ @@ -73,6 +73,8 @@ int kern_sigaction(struct thread *td, int sig, struct sigaction *act, struct sigaction *oact, int flags); int kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss); +int kern_sigprocmask(struct thread *td, int how, + sigset_t *set, sigset_t *oset, int old); int kern_sigsuspend(struct thread *td, sigset_t mask); int kern_symlink(struct thread *td, char *path, char *link, enum uio_seg segflg); From owner-p4-projects@FreeBSD.ORG Fri Apr 18 14:05:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EC30137B404; Fri, 18 Apr 2003 14:05:04 -0700 (PDT) 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 8B87537B401 for ; Fri, 18 Apr 2003 14:05:04 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3359A43FA3 for ; Fri, 18 Apr 2003 14:05:04 -0700 (PDT) (envelope-from marcel@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 h3IL540U039894 for ; Fri, 18 Apr 2003 14:05:04 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3IL53VY039891 for perforce@freebsd.org; Fri, 18 Apr 2003 14:05:03 -0700 (PDT) Date: Fri, 18 Apr 2003 14:05:03 -0700 (PDT) Message-Id: <200304182105.h3IL53VY039891@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29226 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 21:05:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=29226 Change 29226 by marcel@marcel_nfs on 2003/04/18 14:04:05 Preserve the value of cr.iim as cr.ifa in the trapframe for the following faults: o the break instruction fault writes the immediate operand of the break instruction in cr.iim, o the speculative operation fault encodes the displacement of the target operand of the chk.a and chk.s instructions in cr.iim, o the ia32 faults and traps using the ia32 intercept vector write the cause of the interception in cr.iim. In the above cases cr.ifa is undefined and in all other cases cr.iim is undefined. Hence no information is lost by copying cr.iim into cr.ifa prior to saving the context in the trapframe. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#12 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#12 (text+ko) ==== @@ -1081,6 +1081,18 @@ IVT_END(Data_Access_Bit) IVT_ENTRY(Break_Instruction, 0x2c00) +{ .mmi + mov r16=cr.iim + ;; + mov cr.ifa=r16 + nop 0 + ;; +} +{ .mfb + srlz.d + nop 0 + nop 0 +} TRAP(11) IVT_END(Break_Instruction) @@ -1174,6 +1186,18 @@ IVT_END(NaT_Consumption) IVT_ENTRY(Speculation, 0x5700) +{ .mmi + mov r16=cr.iim + ;; + mov cr.ifa=r16 + nop 0 + ;; +} +{ .mfb + srlz.d + nop 0 + nop 0 +} TRAP(27) IVT_END(Speculation) @@ -1250,6 +1274,18 @@ IVT_END(IA_32_Exception) IVT_ENTRY(IA_32_Intercept, 0x6a00) +{ .mmi + mov r16=cr.iim + ;; + mov cr.ifa=r16 + nop 0 + ;; +} +{ .mfb + srlz.d + nop 0 + nop 0 +} TRAP(46) IVT_END(IA_32_Intercept) From owner-p4-projects@FreeBSD.ORG Fri Apr 18 14:38:47 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EEB6337B401; Fri, 18 Apr 2003 14:38:46 -0700 (PDT) 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 6509337B404 for ; Fri, 18 Apr 2003 14:38:46 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADF6143FE0 for ; Fri, 18 Apr 2003 14:38:45 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3ILcj0U042746 for ; Fri, 18 Apr 2003 14:38:45 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3ILcjlR042743 for perforce@freebsd.org; Fri, 18 Apr 2003 14:38:45 -0700 (PDT) Date: Fri, 18 Apr 2003 14:38:45 -0700 (PDT) Message-Id: <200304182138.h3ILcjlR042743@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@tislabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 29228 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 21:38:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=29228 Change 29228 by cvance@cvance_demo on 2003/04/18 14:37:57 Resize main application window Affected files ... .. //depot/projects/trustedbsd/misc/kugidfw/main.cc#2 edit Differences ... ==== //depot/projects/trustedbsd/misc/kugidfw/main.cc#2 (text+ko) ==== @@ -41,6 +41,7 @@ KApplication a(argc, argv, "KUGIDFW"); KUGIDFW *w = new KUGIDFW(); + w->resize(800,600); a.setMainWidget( w ); w->show(); return a.exec(); From owner-p4-projects@FreeBSD.ORG Fri Apr 18 14:42:52 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4549037B404; Fri, 18 Apr 2003 14:42:52 -0700 (PDT) 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 D456837B401 for ; Fri, 18 Apr 2003 14:42:51 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64A5B43F93 for ; Fri, 18 Apr 2003 14:42:51 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3ILgp0U043314 for ; Fri, 18 Apr 2003 14:42:51 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3ILgodx043311 for perforce@freebsd.org; Fri, 18 Apr 2003 14:42:50 -0700 (PDT) Date: Fri, 18 Apr 2003 14:42:50 -0700 (PDT) Message-Id: <200304182142.h3ILgodx043311@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@tislabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 29229 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 21:42:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=29229 Change 29229 by cvance@cvance_demo on 2003/04/18 14:41:53 * Add new rule editor windows to the application, fixup Makefile so it is included in the build. Yuck, this was based on auto-generated code from an IDE, so it's UGLY. This is also for a demo, nothing more, so don't poke beyond the surface :) * Update KUDIDFW class to use a buttonbar, fix the main-window splitter so everything fills in the window better, fill the last column of the viewer table all the way to the window border * Update the action for the newRule button to use the new dialog class. Affected files ... .. //depot/projects/trustedbsd/misc/kugidfw/Makefile#3 edit .. //depot/projects/trustedbsd/misc/kugidfw/kugidfw.cc#4 edit .. //depot/projects/trustedbsd/misc/kugidfw/kugidfw.h#3 edit .. //depot/projects/trustedbsd/misc/kugidfw/ruleeditor.cc#1 add .. //depot/projects/trustedbsd/misc/kugidfw/ruleeditor.h#1 add Differences ... ==== //depot/projects/trustedbsd/misc/kugidfw/Makefile#3 (text+ko) ==== @@ -41,10 +41,13 @@ all: kugidfw main.o: main.cc kugidfw.h +ruleeditor.moc: ruleeditor.h + ${MOC} ruleeditor.h -o ruleeditor.moc kugidfw.moc: kugidfw.h ${MOC} kugidfw.h -o kugidfw.moc -kugidfw.o: kugidfw.cc kugidfw.h kugidfw.moc -kugidfw: main.o kugidfw.o +kugidfw.o: kugidfw.cc kugidfw.h kugidfw.moc ruleeditor.h ruleeditor.moc +ruleeditor.o: ruleeditor.cc ruleeditor.h ruleeditor.moc +kugidfw: main.o kugidfw.o ruleeditor.o g++ -o ${.TARGET} ${.ALLSRC} ${LDFLAGS} clean: ==== //depot/projects/trustedbsd/misc/kugidfw/kugidfw.cc#4 (text+ko) ==== @@ -52,43 +52,37 @@ #include +#include "ruleeditor.h" + #include "../kmacmanager/konqueror.h" KUGIDFW::KUGIDFW() : KMainWindow() { - file = new QPopupMenu(); + QPopupMenu *file = new QPopupMenu(); file->insertItem("&About", this, SLOT(slotAbout())); file->insertItem("&Refresh", this, SLOT(slotRefresh())); file->insertSeparator(); file->insertItem("&Exit", this, SLOT(slotExit())); - menu = menuBar(); + KMenuBar *menu = menuBar(); menu->insertItem("&File", file); - bar = statusBar(); - QSplitter *splitter = new QSplitter(this); splitter->setOrientation(Vertical); - QHBox *hbox = new QHBox(splitter); - pushbutton_edit = new QPushButton("Edit", hbox); - pushbutton_new = new QPushButton("New", hbox); - pushbutton_remove = new QPushButton("Remove", hbox); + KButtonBox *buttonBar = new KButtonBox(splitter); + buttonBar->addButton("New", this, SLOT(slotNew())); + buttonBar->addButton("Edit", this, SLOT(slotEdit())); + buttonBar->addButton("Remove", this, SLOT(slotRemove())); - listview = new QListView(splitter, ""); - listview->setAllColumnsShowFocus(true); - + listview = new KListView(splitter, ""); + listview->setFullWidth(); listview->addColumn("#"); listview->addColumn("rule"); connect(listview, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(slotDoubleClick(QListViewItem *))); - connect(pushbutton_edit, SIGNAL(clicked()), this, SLOT(slotEdit())); - connect(pushbutton_new, SIGNAL(clicked()), this, SLOT(slotNew())); - connect(pushbutton_remove, SIGNAL(clicked()), this, - SLOT(slotRemove())); - setCentralWidget(splitter); refresh(); @@ -113,48 +107,9 @@ void KUGIDFW::slotNew() { - struct mac_bsdextended_rule rule; - char errstr[BUFSIZ]; - char *string, *stringp; - const char *rulenum; - bool ok = FALSE; - int error, ruleint; - - QString returned_string = QInputDialog::getText("New rule", - "Enter rule number and rule", QLineEdit::Normal, - "", &ok, this, ""); - if (!ok) - return; - - stringp = string = strdup(returned_string.latin1()); - - while (*stringp == ' ' || *stringp == '\t') - stringp++; - - rulenum = strsep(&stringp, " \t"); - ruleint = atoi(rulenum); - - if (stringp == NULL) { - QMessageBox::information(this, "Invalid string", - "Short string"); - free(string); - return; - } - - error = bsde_parse_rule_string(stringp, &rule, BUFSIZ, errstr); - if (error) - QMessageBox::information(this, errstr, errstr); - else { - error = bsde_set_rule(ruleint, &rule, BUFSIZ, errstr); - if (error) - QMessageBox::information(this, errstr, errstr); - else { - refresh(); - KONQUEROR_REFRESH(); - } - } - - free(string); + RuleEditor *editor = new RuleEditor(); + editor->exec(); + refresh(); } void KUGIDFW::slotRemove() ==== //depot/projects/trustedbsd/misc/kugidfw/kugidfw.h#3 (text+ko) ==== @@ -43,12 +43,12 @@ #include #include +#include #include #include #include #include -#include -#include +#include #include #include #include @@ -67,22 +67,16 @@ void slotRefresh(); void slotRemove(); void slotExit(); + void refresh(); private: - void refresh(); int pause; + /* KMenuBar *menu; KStatusBar *bar; QPopupMenu *file; - QListView *listview; + */ + KListView *listview; kvm_t *kvm_handle; - - /* Display toggles */ - QCheckBox *checkbox_kernel; - QCheckBox *checkbox_user; - QCheckBox *checkbox_other_user; - QPushButton *pushbutton_edit; - QPushButton *pushbutton_new; - QPushButton *pushbutton_remove; }; #endif From owner-p4-projects@FreeBSD.ORG Fri Apr 18 14:43:55 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7946837B401; Fri, 18 Apr 2003 14:43:54 -0700 (PDT) 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 1063137B408 for ; Fri, 18 Apr 2003 14:43:54 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5551643FCB for ; Fri, 18 Apr 2003 14:43:53 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3ILhr0U043491 for ; Fri, 18 Apr 2003 14:43:53 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3ILhqtq043488 for perforce@freebsd.org; Fri, 18 Apr 2003 14:43:52 -0700 (PDT) Date: Fri, 18 Apr 2003 14:43:52 -0700 (PDT) Message-Id: <200304182143.h3ILhqtq043488@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@tislabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 29230 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 21:43:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=29230 Change 29230 by cvance@cvance_demo on 2003/04/18 14:43:25 Add some files that can be used to create a mac_bsdextended package - This still needs a bit of work, but this check-in provides at least a bit of functionality Affected files ... .. //depot/projects/trustedbsd/misc/discex3/package/README#1 add .. //depot/projects/trustedbsd/misc/discex3/package/create.sh#1 add .. //depot/projects/trustedbsd/misc/discex3/package/pkg-comment#1 add .. //depot/projects/trustedbsd/misc/discex3/package/pkg-descr#1 add .. //depot/projects/trustedbsd/misc/discex3/package/pkg-plist#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Apr 18 14:44:56 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F053D37B404; Fri, 18 Apr 2003 14:44:55 -0700 (PDT) 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 A588C37B401 for ; Fri, 18 Apr 2003 14:44:55 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E94D43F75 for ; Fri, 18 Apr 2003 14:44:55 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3ILit0U043524 for ; Fri, 18 Apr 2003 14:44:55 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3ILisvn043521 for perforce@freebsd.org; Fri, 18 Apr 2003 14:44:54 -0700 (PDT) Date: Fri, 18 Apr 2003 14:44:54 -0700 (PDT) Message-Id: <200304182144.h3ILisvn043521@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@tislabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 29231 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 21:44:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=29231 Change 29231 by cvance@cvance_demo on 2003/04/18 14:44:36 Add some misc. scripts that are useful for prepping systems for a demo Affected files ... .. //depot/projects/trustedbsd/misc/discex3/scripts/README#1 add .. //depot/projects/trustedbsd/misc/discex3/scripts/system_clean.sh#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Fri Apr 18 14:46:59 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4022C37B404; Fri, 18 Apr 2003 14:46:59 -0700 (PDT) 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 D3ABE37B401 for ; Fri, 18 Apr 2003 14:46:58 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69D7F43FAF for ; Fri, 18 Apr 2003 14:46:58 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3ILkw0U043658 for ; Fri, 18 Apr 2003 14:46:58 -0700 (PDT) (envelope-from cvance@tislabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3ILkv94043655 for perforce@freebsd.org; Fri, 18 Apr 2003 14:46:57 -0700 (PDT) Date: Fri, 18 Apr 2003 14:46:57 -0700 (PDT) Message-Id: <200304182146.h3ILkv94043655@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@tislabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 29232 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 21:47:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=29232 Change 29232 by cvance@cvance_demo on 2003/04/18 14:45:59 Add files for a _very_ basic installer for the bsd_extended module. Please note that the path to the installation package is currently (incorrectly) hard-coded to /tmp/mac_bsdextended.tgz. Yes this needs changing. Affected files ... .. //depot/projects/trustedbsd/misc/kbsdextinstall/Makefile#1 add .. //depot/projects/trustedbsd/misc/kbsdextinstall/kbsdextinstaller.cc#1 add .. //depot/projects/trustedbsd/misc/kbsdextinstall/kbsdextinstaller.h#1 add .. //depot/projects/trustedbsd/misc/kbsdextinstall/main.cc#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sat Apr 19 14:39:14 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4DBF37B40E; Sat, 19 Apr 2003 14:39:13 -0700 (PDT) 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 3854C37B404 for ; Sat, 19 Apr 2003 14:39:13 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7269443F85 for ; Sat, 19 Apr 2003 14:39:12 -0700 (PDT) (envelope-from marcel@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 h3JLdC0U006489 for ; Sat, 19 Apr 2003 14:39:12 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3JLdCk4006486 for perforce@freebsd.org; Sat, 19 Apr 2003 14:39:12 -0700 (PDT) Date: Sat, 19 Apr 2003 14:39:12 -0700 (PDT) Message-Id: <200304192139.h3JLdCk4006486@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29267 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2003 21:39:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=29267 Change 29267 by marcel@marcel_nfs on 2003/04/19 14:38:55 o Change the prototype of trap(). We don't need to pass cr.iim as the second argument, because it's available as cr.ifa in the trapframe. o Add support for "legacy" syscalls. This is implemented by forcing a RSE flush on break instruction faults so that the stacked registers in the current frame can be accessed. o Make sure thread0's trapframe is marked as FRAME_SYSCALL so that we take the syscall_return path into init(8). o Instruduce do_ast() as the centralized place where we check whether we have an AST. This may be hand-inlined in the future, but for now it keeps the assembly in syscall.s unencumbered. o Use atomic operations to increment the vmmeter counters. o Change the prototype of syscall() to return the error. This way we can handle ERESTART in the most convenient way. The "legacy" syscall handles ERESTART already. The EPC based syscalls need to have support added still. o Style changes. o Remove some bogus prototypes. Affected files ... .. //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#13 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/genassym.c#7 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#13 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#13 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#8 edit .. //depot/projects/ia64_epc/sys/ia64/ia64/trap.c#9 edit .. //depot/projects/ia64_epc/sys/ia64/include/cpu.h#6 edit Differences ... ==== //depot/projects/ia64_epc/sys/ia64/ia64/exception.s#13 (text+ko) ==== @@ -559,16 +559,23 @@ { .mib ; \ nop _n_ ; \ mov r16=ip ; \ - br.sptk.few exception_save ; \ + br.sptk exception_save ; \ +} ; \ +{ .mmi ; \ +(p11) ssm psr.i ;; \ + alloc r15=ar.pfs,0,0,2,0 ; \ + mov out0=_n_ ;; \ +} ; \ +{ .mmb ; \ + mov out1=sp ; \ + add sp=-16,sp ; \ + br.call.sptk rp=trap ; \ } ; \ -(p11) ssm psr.i; \ - alloc r15=ar.pfs,0,0,3,0; \ - mov out0=_n_; \ - mov out1=r14; \ - mov out2=sp;; \ - add sp=-16,sp;; \ - br.call.sptk.few rp=trap; \ -3: br.sptk.many exception_restore +{ .mfb ; \ + nop 0 ; \ + nop 0 ; \ + br.sptk exception_restore ; \ +} #define IVT_ENTRY(name, offset) \ .org ia64_vector_table + offset; \ @@ -1088,12 +1095,36 @@ nop 0 ;; } +{ .mib + srlz.d + mov r16=ip + br.sptk exception_save + ;; +} +{ .mmi + flushrs +(p11) ssm psr.i + nop 0 + ;; +} +{ .mmi + alloc r15=ar.pfs,0,0,2,0 + mov out0=11 + mov out1=sp + ;; +} { .mfb - srlz.d + add sp=-16,sp + nop 0 + br.call.sptk rp=trap + ;; +} +{ .mfb nop 0 nop 0 + br.sptk exception_restore + ;; } - TRAP(11) IVT_END(Break_Instruction) IVT_ENTRY(External_Interrupt, 0x3000) ==== //depot/projects/ia64_epc/sys/ia64/ia64/genassym.c#7 (text+ko) ==== @@ -74,6 +74,7 @@ ASSYM(EFAULT, EFAULT); ASSYM(ENAMETOOLONG, ENAMETOOLONG); +ASSYM(ERESTART, ERESTART); ASSYM(FRAME_SYSCALL, FRAME_SYSCALL); @@ -117,9 +118,7 @@ ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); -ASSYM(TF_SPECIAL_NDIRTY,offsetof(struct trapframe, tf_special.ndirty)); -ASSYM(TF_SPECIAL_PFS, offsetof(struct trapframe, tf_special.pfs)); -ASSYM(TF_SPECIAL_PSR, offsetof(struct trapframe, tf_special.psr)); +ASSYM(TF_SPECIAL_NDIRTY, offsetof(struct trapframe, tf_special.ndirty)); ASSYM(UC_MCONTEXT, offsetof(ucontext_t, uc_mcontext)); ==== //depot/projects/ia64_epc/sys/ia64/ia64/locore.s#13 (text+ko) ==== @@ -158,10 +158,17 @@ .global enter_userland .type enter_userland, @function enter_userland: -{ .mfb +{ .mmi + add r14=24,sp + ;; + ld8 r14=[r14] nop 0 - nop 0 - br.sptk syscall_return + ;; +} +{ .mbb + cmp.eq p6,p7=r0,r14 +(p6) br.sptk exception_restore +(p7) br.sptk syscall_return ;; } END(fork_trampoline) ==== //depot/projects/ia64_epc/sys/ia64/ia64/machdep.c#13 (text+ko) ==== @@ -736,6 +736,8 @@ * XXX what is all this +/- 16 stuff? */ thread0.td_frame = (struct trapframe *)thread0.td_pcb - 1; + thread0.td_frame->tf_length = sizeof(struct trapframe); + thread0.td_frame->tf_flags = FRAME_SYSCALL; thread0.td_pcb->pcb_special.sp = (u_int64_t)thread0.td_frame - 16; thread0.td_pcb->pcb_special.bspstore = (u_int64_t)proc0kstack; @@ -1063,36 +1065,60 @@ } /* - * Clear registers on exec + * Clear registers on exec. */ void exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings) { - struct trapframe *frame; + struct trapframe *tf; - frame = td->td_frame; - bzero(frame, sizeof(*frame)); - frame->tf_length = sizeof(*frame); - frame->tf_flags = FRAME_SYSCALL; - frame->tf_special.sp = (stack & ~15) - 16; - frame->tf_special.rp = entry; - frame->tf_special.pfs = (3UL<<62) | (3UL<<7) | 3UL; - frame->tf_special.bspstore = td->td_md.md_bspstore + 24; - frame->tf_special.rsc = 0xf; - frame->tf_special.fpsr = IA64_FPSR_DEFAULT; - frame->tf_special.psr = IA64_PSR_IC | IA64_PSR_I | IA64_PSR_IT | + tf = td->td_frame; + if ((tf->tf_flags & FRAME_SYSCALL) == 0) { /* break syscalls. */ + uint64_t *args; + uint64_t ndirty; + ndirty = tf->tf_special.ndirty; + bzero(&tf->tf_special, sizeof(tf->tf_special)); + tf->tf_special.ndirty = ndirty; + bzero(&tf->tf_scratch, sizeof(tf->tf_scratch)); + bzero(&tf->tf_scratch_fp, sizeof(tf->tf_scratch_fp)); + tf->tf_special.iip = entry; + tf->tf_special.cfm = (1UL<<63) | (3UL<<7) | 3UL; + tf->tf_special.bspstore = td->td_md.md_bspstore; + /* + * Copy the arguments onto the kernel register stack so that + * they get loaded by the loadrs. This involves some NaT + * collection magic. + */ + args = (uint64_t*)(td->td_kstack + ndirty); + args -= (((uintptr_t)args & 0x1ff) < 24) ? 4 : 3; + *args++ = stack; + if (((uintptr_t)args & 0x1ff) == 0x1f8) + args++; + *args++ = ps_strings; + if (((uintptr_t)args & 0x1ff) == 0x1f8) + args++; + *args = 0; + } else { /* epc syscalls (default). */ + bzero(&tf->tf_special, sizeof(tf->tf_special)); + tf->tf_special.rp = entry; + tf->tf_special.pfs = (3UL<<62) | (3UL<<7) | 3UL; + tf->tf_special.bspstore = td->td_md.md_bspstore + 24; + /* + * Write values for out0, out1 and out2 to the user's backing + * store and arrange for them to be restored into the user's + * initial register frame. + * Assumes that (bspstore & 0x1f8) < 0x1e0. + */ + suword((caddr_t)tf->tf_special.bspstore - 24, stack); + suword((caddr_t)tf->tf_special.bspstore - 16, ps_strings); + suword((caddr_t)tf->tf_special.bspstore - 8, 0); + } + tf->tf_special.sp = (stack & ~15) - 16; + tf->tf_special.rsc = 0xf; + tf->tf_special.fpsr = IA64_FPSR_DEFAULT; + tf->tf_special.psr = IA64_PSR_IC | IA64_PSR_I | IA64_PSR_IT | IA64_PSR_DT | IA64_PSR_RT | IA64_PSR_DFH | IA64_PSR_BN | IA64_PSR_CPL_USER; - - /* - * Write values for out0, out1 and out2 to the user's backing - * store and arrange for them to be restored into the user's - * initial register frame. Assumes that (bspstore & 0x1f8) < - * 0x1e0. - */ - suword((caddr_t)frame->tf_special.bspstore - 24, stack); - suword((caddr_t)frame->tf_special.bspstore - 16, ps_strings); - suword((caddr_t)frame->tf_special.bspstore - 8, 0); } int ==== //depot/projects/ia64_epc/sys/ia64/ia64/syscall.s#8 (text+ko) ==== @@ -251,6 +251,12 @@ br.call.sptk rp=syscall ;; } +{ .mfb + add out0=16,sp + nop 0 + br.call.sptk rp=do_ast + ;; +} .global syscall_return .type syscall_return, @function ==== //depot/projects/ia64_epc/sys/ia64/ia64/trap.c#9 (text+ko) ==== @@ -80,6 +80,8 @@ CTLFLAG_RW, &print_usertrap, 0, ""); extern int unaligned_fixup(struct trapframe *framep, struct thread *td); + +static void break_syscall(struct trapframe *tf); static void ia32_syscall(struct trapframe *framep); /* @@ -279,7 +281,7 @@ } static void -printtrap(int vector, int imm, struct trapframe *framep, int isfatal, int user) +printtrap(int vector, struct trapframe *framep, int isfatal, int user) { printf("\n"); printf("%s %s trap (cpu %d):\n", isfatal? "fatal" : "handled", @@ -295,7 +297,6 @@ printisr(framep->tf_special.isr); printf(")\n"); printf(" cr.ifa = 0x%lx\n", framep->tf_special.ifa); - printf(" cr.iim = 0x%x\n", imm); if (framep->tf_special.psr & IA64_PSR_IS) { printf(" ar.cflg = 0x%lx\n", ia64_get_cflg()); printf(" ar.csd = 0x%lx\n", ia64_get_csd()); @@ -309,34 +310,55 @@ } /* + * + */ +void +do_ast(struct trapframe *tf) +{ + while (1) { + disable_intr(); + if (curthread->td_flags & (TDF_ASTPENDING|TDF_NEEDRESCHED)) { + enable_intr(); + printf("XXX calling ast()\n"); + ast(tf); + } else + break; + } + /* Keep interrupts disabled. */ +} + +/* * Trap is called from exception.s to handle most types of processor traps. - * System calls are broken out for efficiency and ASTs are broken out - * to make the code a bit cleaner and more representative of the - * architecture. */ /*ARGSUSED*/ void -trap(int vector, int imm, struct trapframe *framep) +trap(int vector, struct trapframe *framep) { + struct proc *p; struct thread *td; - struct proc *p; + u_int64_t ucode; int i; - u_int64_t ucode; u_int sticks; int user; - cnt.v_trap++; + user = ((framep->tf_special.psr & IA64_PSR_CPL) == IA64_PSR_CPL_USER); + + /* Short-circuit break instruction based system calls. */ + if (vector == IA64_VEC_BREAK && user && + framep->tf_special.ifa == 0x100000) { + break_syscall(framep); + return; + } + + /* Sanitize the FP state in case the user has trashed it. */ + ia64_set_fpsr(IA64_FPSR_DEFAULT); + + atomic_add_int(&cnt.v_trap, 1); + td = curthread; p = td->td_proc; ucode = 0; - /* - * Make sure we have a sane floating-point state in case the - * user has trashed it. - */ - ia64_set_fpsr(IA64_FPSR_DEFAULT); - - user = ((framep->tf_special.psr & IA64_PSR_CPL) == IA64_PSR_CPL_USER); if (user) { sticks = td->td_sticks; td->td_frame = framep; @@ -354,7 +376,8 @@ } switch (vector) { - case IA64_VEC_UNALIGNED_REFERENCE: + + case IA64_VEC_UNALIGNED_REFERENCE: { /* * If user-land, do whatever fixups, printing, and * signalling is appropriate (based on system-wide @@ -384,9 +407,9 @@ * does cause an unaligned access it's a kernel bug. */ goto dopanic; + } - case IA64_VEC_FLOATING_POINT_FAULT: - { + case IA64_VEC_FLOATING_POINT_FAULT: { FP_STATE fp_state; FPSWA_RET fpswa_ret; FPSWA_BUNDLE bundle; @@ -461,8 +484,7 @@ } } - case IA64_VEC_FLOATING_POINT_TRAP: - { + case IA64_VEC_FLOATING_POINT_TRAP: { FP_STATE fp_state; FPSWA_RET fpswa_ret; FPSWA_BUNDLE bundle; @@ -594,8 +616,7 @@ case IA64_VEC_PAGE_NOT_PRESENT: case IA64_VEC_INST_ACCESS_RIGHTS: - case IA64_VEC_DATA_ACCESS_RIGHTS: - { + case IA64_VEC_DATA_ACCESS_RIGHTS: { vm_offset_t va; struct vmspace *vm; vm_map_t map; @@ -687,10 +708,10 @@ break; } + case IA64_VEC_BREAK: + case IA64_VEC_DEBUG: case IA64_VEC_SINGLE_STEP_TRAP: - case IA64_VEC_DEBUG: - case IA64_VEC_TAKEN_BRANCH_TRAP: - case IA64_VEC_BREAK: + case IA64_VEC_TAKEN_BRANCH_TRAP: { /* * These are always fatal in kernel, and should never happen. */ @@ -711,26 +732,28 @@ } i = SIGTRAP; break; + } - case IA64_VEC_GENERAL_EXCEPTION: + case IA64_VEC_GENERAL_EXCEPTION: { if (user) { ucode = vector; i = SIGILL; break; } goto dopanic; + } case IA64_VEC_UNSUPP_DATA_REFERENCE: - case IA64_VEC_LOWER_PRIVILEGE_TRANSFER: + case IA64_VEC_LOWER_PRIVILEGE_TRANSFER: { if (user) { ucode = vector; i = SIGBUS; break; } goto dopanic; + } - case IA64_VEC_IA32_EXCEPTION: - { + case IA64_VEC_IA32_EXCEPTION: { u_int64_t isr = framep->tf_special.isr; switch ((isr >> 16) & 0xffff) { @@ -787,7 +810,7 @@ break; } - case IA64_VEC_IA32_INTERRUPT: + case IA64_VEC_IA32_INTERRUPT: { /* * INT n instruction - probably a syscall. */ @@ -799,20 +822,24 @@ i = SIGILL; break; } + } - case IA64_VEC_IA32_INTERCEPT: + case IA64_VEC_IA32_INTERCEPT: { /* * Maybe need to emulate ia32 instruction. */ goto dopanic; + } default: goto dopanic; } if (print_usertrap) - printtrap(vector, imm, framep, 1, user); + printtrap(vector, framep, 1, user); + trapsignal(td, i, ucode); + out: if (user) { userret(td, framep, sticks); @@ -820,45 +847,80 @@ #ifdef DIAGNOSTIC cred_free_thread(td); #endif + do_ast(framep); } return; dopanic: - printtrap(vector, imm, framep, 1, user); - - /* XXX dump registers */ - + printtrap(vector, framep, 1, user); #ifdef DDB kdb_trap(vector, framep); #endif + panic("trap"); +} - panic("trap"); + +/* + * Handle break instruction based system calls. + */ +void +break_syscall(struct trapframe *tf) +{ + uint64_t *bsp, *tfp; + uint64_t iip, psr; + int error, nargs; + + /* Save address of break instruction. */ + iip = tf->tf_special.iip; + psr = tf->tf_special.psr; + + /* Advance to the next instruction. */ + tf->tf_special.psr += IA64_PSR_RI_1; + if ((tf->tf_special.psr & IA64_PSR_RI) > IA64_PSR_RI_2) { + tf->tf_special.iip += 16; + tf->tf_special.psr &= ~IA64_PSR_RI; + } + + /* + * Copy the arguments on the register stack into the trapframe + * to avoid having interleaved NaT collections. + */ + tfp = &tf->tf_scratch.gr16; + nargs = tf->tf_special.cfm & 0x7f; + bsp = (uint64_t*)(curthread->td_kstack + tf->tf_special.ndirty); + bsp -= (((uintptr_t)bsp & 0x1ff) < 64) ? (nargs + 1): nargs; + while (nargs--) { + *tfp++ = *bsp++; + if (((uintptr_t)bsp & 0x1ff) == 0x1e8) + bsp++; + } + error = syscall(tf->tf_scratch.gr15, &tf->tf_scratch.gr16, tf); + if (error == ERESTART) { + tf->tf_special.iip = iip; + tf->tf_special.psr = psr; + } + + do_ast(tf); } /* * Process a system call. * - * System calls are strange beasts. They are passed the syscall number - * in r15, and the arguments in the registers (as normal). They return - * an error flag in r10 (if r10 != 0 on return, the syscall had an error), - * and the return value (if any) in r8 and r9. - * - * The assembly stub takes care of moving the call number into a register - * we can get to, and moves all of the argument registers into a stack - * buffer. On return, it restores r8-r10 from the frame before - * returning to the user process. + * See syscall.s for details as to how we get here. In order to support + * the ERESTART case, we return the error to our caller. They deal with + * the hairy details. */ -void +int syscall(int code, u_int64_t *args, struct trapframe *framep) { struct sysent *callp; + struct proc *p; struct thread *td; - struct proc *p; - int error = 0; - u_int64_t oldip, oldri; + int error; u_int sticks; - cnt.v_syscall++; + atomic_add_int(&cnt.v_syscall, 1); + td = curthread; p = td->td_proc; @@ -866,24 +928,8 @@ sticks = td->td_sticks; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - - /* - * Skip past the break instruction. Remember old address in case - * we have to restart. - */ - oldip = framep->tf_special.iip; - oldri = framep->tf_special.psr & IA64_PSR_RI; - framep->tf_special.psr += IA64_PSR_RI_1; - if ((framep->tf_special.psr & IA64_PSR_RI) > IA64_PSR_RI_2) { - framep->tf_special.psr &= ~IA64_PSR_RI; - framep->tf_special.iip += 16; - } - if (p->p_flag & P_THREADED) thread_user_enter(p, td); -#ifdef DIAGNOSTIC - ia64_fpstate_check(td); -#endif if (p->p_sysent->sv_prepsyscall) { /* (*p->p_sysent->sv_prepsyscall)(framep, args, &code, ¶ms); */ @@ -919,14 +965,13 @@ if (KTRPOINT(td, KTR_SYSCALL)) ktrsyscall(code, (callp->sy_narg & SYF_ARGMASK), args); #endif - if (error == 0) { - td->td_retval[0] = 0; - td->td_retval[1] = 0; + + td->td_retval[0] = 0; + td->td_retval[1] = 0; - STOPEVENT(p, S_SCE, (callp->sy_narg & SYF_ARGMASK)); + STOPEVENT(p, S_SCE, (callp->sy_narg & SYF_ARGMASK)); - error = (*callp->sy_call)(td, args); - } + error = (*callp->sy_call)(td, args); switch (error) { case 0: @@ -935,16 +980,13 @@ framep->tf_scratch.gr10 = 0; break; case ERESTART: - framep->tf_special.iip = oldip; - framep->tf_special.psr = - (framep->tf_special.psr & ~IA64_PSR_RI) | oldri; break; case EJUSTRETURN: break; default: if (p->p_sysent->sv_errsize) { if (error >= p->p_sysent->sv_errsize) - error = -1; /* XXX */ + error = -1; /* XXX */ else error = p->p_sysent->sv_errtbl[error]; } @@ -965,6 +1007,7 @@ if (KTRPOINT(td, KTR_SYSRET)) ktrsysret(code, error, td->td_retval[0]); #endif + /* * This works because errno is findable through the * register set. If we ever support an emulation where this @@ -975,10 +1018,13 @@ #ifdef DIAGNOSTIC cred_free_thread(td); #endif + WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", syscallnames[code]); mtx_assert(&sched_lock, MA_NOTOWNED); mtx_assert(&Giant, MA_NOTOWNED); + + return (error); } #include ==== //depot/projects/ia64_epc/sys/ia64/include/cpu.h#6 (text+ko) ==== @@ -104,12 +104,11 @@ extern struct rpb *hwrpb; extern volatile int mc_expected, mc_received; -int badaddr (void *, size_t); +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); -void do_sir(void); +void do_ast(struct trapframe *); void dumpconf(void); -void exception_restore(void); /* MAGIC */ void frametoreg(struct trapframe *, struct reg *); long fswintrberr(void); /* MAGIC */ int ia64_highfp_drop(struct thread *); @@ -119,16 +118,16 @@ int ia64_pa_access(u_long); void init_prom_interface(struct rpb*); void interrupt(u_int64_t, struct trapframe *); -void machine_check - (unsigned long, struct trapframe *, unsigned long, unsigned long); +void machine_check(unsigned long, struct trapframe *, unsigned long, + unsigned long); u_int64_t hwrpb_checksum(void); void hwrpb_restart_setup(void); void regdump(struct trapframe *); void regtoframe(struct reg *, struct trapframe *); void set_iointr(void (*)(void *, unsigned long)); void fork_trampoline(void); /* MAGIC */ -void syscall(int, u_int64_t *, struct trapframe *); -void trap(int vector, int imm, struct trapframe *framep); +int syscall(int, u_int64_t *, struct trapframe *); +void trap(int vector, struct trapframe *framep); void ia64_probe_sapics(void); int ia64_count_cpus(void); void map_gateway_page(void); From owner-p4-projects@FreeBSD.ORG Sat Apr 19 14:44:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8BCEB37B404; Sat, 19 Apr 2003 14:44:21 -0700 (PDT) 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 3811F37B401 for ; Sat, 19 Apr 2003 14:44:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DA2343FE0 for ; Sat, 19 Apr 2003 14:44:20 -0700 (PDT) (envelope-from marcel@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 h3JLiK0U007265 for ; Sat, 19 Apr 2003 14:44:20 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3JLiINf007253 for perforce@freebsd.org; Sat, 19 Apr 2003 14:44:18 -0700 (PDT) Date: Sat, 19 Apr 2003 14:44:18 -0700 (PDT) Message-Id: <200304192144.h3JLiINf007253@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29268 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2003 21:44:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=29268 Change 29268 by marcel@marcel_pluto1 on 2003/04/19 14:43:50 IFC @29266 Affected files ... .. //depot/projects/ia64/MAINTAINERS#24 integrate .. //depot/projects/ia64/etc/Makefile#26 integrate .. //depot/projects/ia64/etc/network.subr#2 integrate .. //depot/projects/ia64/etc/rc.d/Makefile#11 integrate .. //depot/projects/ia64/etc/rc.d/NETWORKING#4 integrate .. //depot/projects/ia64/etc/rc.d/adjkerntz#2 integrate .. //depot/projects/ia64/etc/rc.d/atm1#4 integrate .. //depot/projects/ia64/etc/rc.d/atm2.sh#4 integrate .. //depot/projects/ia64/etc/rc.d/cleanvar#4 integrate .. //depot/projects/ia64/etc/rc.d/dhclient#3 integrate .. //depot/projects/ia64/etc/rc.d/hostname#1 branch .. //depot/projects/ia64/etc/rc.d/isdnd#7 integrate .. //depot/projects/ia64/etc/rc.d/jail#2 integrate .. //depot/projects/ia64/etc/rc.d/kldxref#2 integrate .. //depot/projects/ia64/etc/rc.d/mrouted#4 integrate .. //depot/projects/ia64/etc/rc.d/netif#1 branch .. //depot/projects/ia64/etc/rc.d/network1#10 integrate .. //depot/projects/ia64/etc/rc.d/network2#3 integrate .. //depot/projects/ia64/etc/rc.d/nisdomain#1 branch .. //depot/projects/ia64/etc/rc.d/ppp-user#4 integrate .. //depot/projects/ia64/etc/rc.d/random#3 integrate .. //depot/projects/ia64/etc/rc.d/routed#5 integrate .. //depot/projects/ia64/etc/rc.d/sppp#2 integrate .. //depot/projects/ia64/lib/libc/gen/getpwent.c#8 integrate .. //depot/projects/ia64/lib/libdevstat/devstat.c#6 integrate .. //depot/projects/ia64/libexec/tftpd/tftpd.c#8 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#43 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#80 integrate .. //depot/projects/ia64/sbin/bsdlabel/Makefile#2 integrate .. //depot/projects/ia64/sbin/bsdlabel/bsdlabel.8#2 integrate .. //depot/projects/ia64/sbin/bsdlabel/bsdlabel.c#2 integrate .. //depot/projects/ia64/sbin/bsdlabel/runtest.sh#1 branch .. //depot/projects/ia64/sbin/sunlabel/sunlabel.c#3 integrate .. //depot/projects/ia64/sys/alpha/alpha/machdep.c#26 integrate .. //depot/projects/ia64/sys/alpha/alpha/trap.c#24 integrate .. //depot/projects/ia64/sys/alpha/linux/linux_machdep.c#8 integrate .. //depot/projects/ia64/sys/dev/tx/if_tx.c#10 integrate .. //depot/projects/ia64/sys/geom/geom_bsd.c#30 integrate .. //depot/projects/ia64/sys/geom/geom_slice.c#25 integrate .. //depot/projects/ia64/sys/geom/geom_slice.h#11 integrate .. //depot/projects/ia64/sys/i386/i386/machdep.c#37 integrate .. //depot/projects/ia64/sys/i386/i386/trap.c#27 integrate .. //depot/projects/ia64/sys/i386/include/cpufunc.h#12 integrate .. //depot/projects/ia64/sys/i386/linux/linux_machdep.c#14 integrate .. //depot/projects/ia64/sys/ia64/ia64/trap.c#47 integrate .. //depot/projects/ia64/sys/kern/kern_mac.c#23 integrate .. //depot/projects/ia64/sys/kern/kern_proc.c#36 integrate .. //depot/projects/ia64/sys/kern/kern_resource.c#22 integrate .. //depot/projects/ia64/sys/kern/kern_sig.c#44 integrate .. //depot/projects/ia64/sys/kern/kern_thread.c#38 integrate .. //depot/projects/ia64/sys/kern/uipc_jumbo.c#6 integrate .. //depot/projects/ia64/sys/kern/vfs_bio.c#48 integrate .. //depot/projects/ia64/sys/pc98/i386/machdep.c#34 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/busdma_machdep.c#12 integrate .. //depot/projects/ia64/sys/security/mac_ifoff/mac_ifoff.c#6 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/trap.c#23 integrate .. //depot/projects/ia64/sys/sys/cdefs.h#13 integrate .. //depot/projects/ia64/sys/sys/mac.h#16 integrate .. //depot/projects/ia64/sys/sys/mac_policy.h#14 integrate .. //depot/projects/ia64/sys/sys/proc.h#57 integrate .. //depot/projects/ia64/sys/sys/syscallsubr.h#5 integrate .. //depot/projects/ia64/sys/vm/swap_pager.c#21 integrate .. //depot/projects/ia64/sys/vm/uma_core.c#38 integrate .. //depot/projects/ia64/sys/vm/vm_map.c#48 integrate .. //depot/projects/ia64/sys/vm/vm_object.c#43 integrate .. //depot/projects/ia64/sys/vm/vm_object.h#17 integrate .. //depot/projects/ia64/usr.bin/passwd/passwd.c#7 integrate Differences ... ==== //depot/projects/ia64/MAINTAINERS#24 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.58 2003/02/18 00:07:06 jmallett Exp $ +$FreeBSD: src/MAINTAINERS,v 1.59 2003/04/18 21:17:46 nectar Exp $ subsystem login notes ----------------------------- @@ -77,3 +77,5 @@ libufs jmallett Willing to handle problems, help with work. fdc(4) joerg Just keep me informed of changes, try not to break it. sppp(4) joerg Just keep me informed of changes, try not to break it. +libc nectar Opportuntity for pre-commit review appreciated for + nsdispatch(3) and its consumers. ==== //depot/projects/ia64/etc/Makefile#26 (text+ko) ==== @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 -# $FreeBSD: src/etc/Makefile,v 1.308 2003/04/08 16:14:02 des Exp $ +# $FreeBSD: src/etc/Makefile,v 1.309 2003/04/18 17:51:53 mtm Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail @@ -10,7 +10,7 @@ devd.conf dhclient.conf disktab fbtab ftpusers gettytab group \ hosts hosts.allow hosts.equiv hosts.lpd \ inetd.conf login.access login.conf \ - mac.conf motd netconfig networks newsyslog.conf \ + mac.conf motd netconfig network.subr networks newsyslog.conf \ phones printcap profile protocols \ rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \ rc.network rc.network6 rc.pccard rc.sendmail rc.serial rc.shutdown \ ==== //depot/projects/ia64/etc/network.subr#2 (text+ko) ==== @@ -1,67 +1,121 @@ -#!/bin/sh -x +# +# Copyright (c) 2003 The FreeBSD Project. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (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/etc/network.subr,v 1.145 2003/02/12 04:26:10 imp Exp $ +# $FreeBSD: src/etc/network.subr,v 1.146 2003/04/18 17:51:53 mtm Exp $ # -# PROVIDE: network1 -# REQUIRE: atm1 ipfilter mountcritlocal pccard serial sppp sysctl tty -# KEYWORD: FreeBSD +# +# Subroutines commonly used from network startup scripts. +# Requires that rc.conf be loaded first. +# -. /etc/rc.subr +# ifconfig_up if +# Evaluate ifconfig(8) arguments for interface $if and +# run ifconfig(8) with those arguments. It returns 0 if +# arguments were found and executed or 1 if the interface +# had no arguments. +# +ifconfig_up() +{ + eval ifconfig_args=\$ifconfig_$1 + if [ -n "${ifconfig_args}" ]; then + ifconfig $1 ${ifconfig_args} + return 0 + fi + return 1 +} -name="network1" -start_cmd="network_start" -stop_cmd="network_stop" +# ifalias_up if +# Configure aliases for network interface $if. +# It returns 0 if at least one alias was configured or +# 1 if there were none. +# +ifalias_up() +{ + _ret=1 + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_$1_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig $1 ${ifconfig_args} alias + alias=$((${alias} + 1)) + _ret=0 + else + break + fi + done + return $_ret +} -convert_host_conf() +# ifscript_up if +# Evaluate a startup script for the $if interface. +# It returns 0 if a script was found and processed or +# 1 if no script was found. +# +ifscript_up() { - host_conf=$1; shift; - nsswitch_conf=$1; shift; - awk ' \ - /^[:blank:]*#/ { next } \ - /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ - /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ - /nis/ { nsswitch[c] = "nis"; c++; next } \ - { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ - END { \ - printf "hosts: "; \ - for (i in nsswitch) printf "%s ", nsswitch[i]; \ - printf "\n"; \ - }' < $host_conf > $nsswitch_conf + if [ -r /etc/start_if.$1 ]; then + . /etc/start_if.$1 + return 0 + fi + return 1 } -generate_host_conf() +# Create cloneable interfaces. +# +clone_up() { - nsswitch_conf=$1; shift; - host_conf=$1; shift; + _prefix= + _list= + for ifn in ${cloned_interfaces}; do + ifconfig ${ifn} create + if $? ; then + _list="${_list}${_prefix}${ifn}" + [ -z "$_prefix" ] && _prefix=' ' + fi + done + debug "Cloned: ${_list}" +} - awk ' - BEGIN { - xlat["files"] = "hosts"; - xlat["dns"] = "bind"; - xlat["nis"] = "nis"; - cont = 0; - } - sub(/^[\t ]*hosts:/, "") || cont { - if (!cont) - srcs = "" - sub(/#.*/, "") - gsub(/[][]/, " & ") - cont = sub(/\\$/, "") - srcs = srcs " " $0 - } - END { - print "# Auto-generated from nsswitch.conf, do not edit" - ns = split(srcs, s) - for (n = 1; n <= ns; ++n) { - if (s[n] in xlat) - print xlat[s[n]] - } - } - ' <$nsswitch_conf >$host_conf +# Destroy cloned interfaces. Destroyed interfaces are echoed +# to standard output. +# +clone_down() +{ + _prefix= + _list= + for ifn in ${cloned_interfaces}; do + ifconfig ${ifn} destroy + if $? ; then + _list="${_list}${_prefix}${ifn}" + [ -z "$_prefix" ] && _prefix=' ' + fi + done + debug "Destroyed clones: ${_list}" } -network_gif_setup() { +gif_up() { case ${gif_interfaces} in [Nn][Oo] | '') ;; @@ -83,144 +137,78 @@ esac } -network_start() +# +# ipx_up ifn +# Configure any IPX addresses for interface $ifn. Returns 0 if IPX +# arguments were found and configured; returns 1 otherwise. +# +ipx_up() { - # set hostname, turn on network - # - echo -n "Doing initial network setup:" - - # Generate host.conf for compatibility - # - if [ -f "/etc/nsswitch.conf" ]; then - echo -n ' host.conf' - generate_host_conf /etc/nsswitch.conf /etc/host.conf + ifn="$1" + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + return 0 fi + return 1 +} - # Convert host.conf to nsswitch.conf if necessary - # - if [ -f "/etc/host.conf" -a ! -f "/etc/nsswitch.conf" ]; then - echo '' - echo 'Warning: /etc/host.conf is no longer used' - echo ' /etc/nsswitch.conf will be created for you' - convert_host_conf /etc/host.conf /etc/nsswitch.conf - fi +# +# list_net_interfaces type +# List all network interfaces. The type of interface returned +# can be controlled by the type argument. The type +# argument can be any of the following: +# nodhcp - all interfaces, excluding DHCP configured interfaces +# dhcp - list only DHCP configured interfaces +# If no argument is specified all network interfaces are output. +# Note that the list always includes cloned interfaces. +# +list_net_interfaces() +{ + type=$1 - # Set the host name if it is not already set + # Get a list of ALL the interfaces # - if [ -z "`hostname -s`" ]; then - hostname ${hostname} - echo -n ' hostname' - fi - - # Set the domainname if we're using NIS - # - case ${nisdomainname} in - [Nn][Oo]|'') - ;; - *) - domainname ${nisdomainname} - echo -n ' domain' - ;; - esac - - echo '.' - - # Attempt to create cloned interfaces. - for ifn in ${cloned_interfaces}; do - ifconfig ${ifn} create - done - - # gifconfig - network_gif_setup - - # Set up all the network interfaces, calling startup scripts if needed - # case ${network_interfaces} in [Aa][Uu][Tt][Oo]) - network_interfaces="`ifconfig -l`" + _tmplist="`ifconfig -l`" ;; *) - network_interfaces="${network_interfaces} ${cloned_interfaces}" + _tmplist="${network_interfaces}" ;; esac + _tmplist="${_tmplist} ${cloned_interfaces}" - dhcp_interfaces="" - for ifn in ${network_interfaces}; do - if [ -r /etc/start_if.${ifn} ]; then - . /etc/start_if.${ifn} - eval showstat_$ifn=1 - fi + if [ -z "$type" ]; then + echo $_tmplist + return 0 + fi - # Do the primary ifconfig if specified - # - eval ifconfig_args=\$ifconfig_${ifn} - - case ${ifconfig_args} in - '') - ;; + # Separate out dhcp and non-dhcp intefraces + # + _aprefix= + _brefix= + for _if in ${_tmplist} ; do + eval _ifarg="\$ifconfig_${_if}" + case "$_ifarg" in [Dd][Hh][Cc][Pp]) - # DHCP inits are done all in one go below - dhcp_interfaces="$dhcp_interfaces $ifn" - eval showstat_$ifn=1 + _dhcplist="${_dhcplist}${_aprefix}${_if}" + [ -z "$_aprefix" ] && _aprefix=' ' ;; - *) - ifconfig ${ifn} ${ifconfig_args} - eval showstat_$ifn=1 + ''|*) + _nodhcplist="${_nodhcplist}${_bprefix}${_if}" + [ -z "$_bprefix" ] && _bprefix=' ' ;; esac done - if [ ! -z "${dhcp_interfaces}" ]; then - ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} - fi - - for ifn in ${network_interfaces}; do - # Check to see if aliases need to be added - # - alias=0 - while : ; do - eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} - if [ -n "${ifconfig_args}" ]; then - ifconfig ${ifn} ${ifconfig_args} alias - eval showstat_$ifn=1 - alias=$((${alias} + 1)) - else - break; - fi - done - - # Do ipx address if specified - # - eval ifconfig_args=\$ifconfig_${ifn}_ipx - if [ -n "${ifconfig_args}" ]; then - ifconfig ${ifn} ${ifconfig_args} - eval showstat_$ifn=1 - fi - done - - # Display ifconfiged interfaces - for ifn in ${network_interfaces}; do - eval showstat=\$showstat_${ifn} - if [ ! -z ${showstat} ]; then - ifconfig ${ifn} - fi - done - - # Resync ipfilter - /etc/rc.d/ipfilter resync -} - -network_stop() -{ - echo -n "Stopping network:" - - # flush routes - # - echo -n " flush routes" - route -n flush - - echo '.' + case "$type" in + nodhcp) + echo $_nodhcplist + ;; + dhcp) + echo $_dhcplist + ;; + esac + return 0 } - -load_rc_config $name -run_rc_command "$1" ==== //depot/projects/ia64/etc/rc.d/Makefile#11 (text+ko) ==== @@ -1,16 +1,16 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.12 2003/04/16 16:27:23 mtm Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.14 2003/04/19 01:56:44 mtm Exp $ .include FILES= DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz amd \ apm apmd atm1 atm2.sh atm3.sh archdep bgfsck bootparams ccd cleanvar \ - cleartmp cron devd devdb devfs diskless dmesg dumpon fsck inetd \ - initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat ipsec \ - ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig local \ - localdaemons lomac lpd motd mountcritlocal mountcritremote \ - mountd moused mroute6d mrouted msgs named network1 network2 \ - network3 network_ipv6 nfsclient nfsd nfslocking nfsserver ntpd \ + cleartmp cron devd devdb devfs dhclient diskless dmesg dumpon fsck \ + hostname inetd initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat \ + ipsec ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig \ + local localdaemons lomac lpd motd mountcritlocal mountcritremote \ + mountd moused mroute6d mrouted msgs named netif network1 network2 network3 \ + network_ipv6 nfsclient nfsd nfslocking nfsserver nisdomain ntpd \ ntpdate othermta pccard pcvt ppp-user pppoed pwcheck quota random \ rarpd rcconf.sh root route6d routed rpcbind rtadvd rwho savecore \ securelevel sendmail serial sppp sshd swap1 syscons sysctl \ ==== //depot/projects/ia64/etc/rc.d/NETWORKING#4 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: NETWORKING,v 1.2 2002/03/22 04:33:57 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/NETWORKING,v 1.4 2003/01/25 23:14:08 mtm Exp $ +# $FreeBSD: src/etc/rc.d/NETWORKING,v 1.5 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: NETWORKING NETWORK -# REQUIRE: network dhclient altqd network1 network2 network_ipv6 isdnd ppp-user +# REQUIRE: network dhclient altqd netif network2 network_ipv6 isdnd ppp-user # REQUIRE: routed mrouted route6d mroute6d # KEYWORD: FreeBSD NetBSD ==== //depot/projects/ia64/etc/rc.d/adjkerntz#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/adjkerntz,v 1.1 2002/06/13 22:14:36 gordon Exp $ +# $FreeBSD: src/etc/rc.d/adjkerntz,v 1.2 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: adjkerntz # REQUIRE: diskless mountcritlocal random -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/atm1#4 (text+ko) ==== @@ -24,12 +24,12 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/atm1,v 1.11 2002/09/30 08:01:43 mdodd Exp $ +# $FreeBSD: src/etc/rc.d/atm1,v 1.12 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: atm1 # REQUIRE: root -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/atm2.sh#4 (text+ko) ==== @@ -24,11 +24,11 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/atm2.sh,v 1.11 2002/10/12 10:31:31 schweikh Exp $ +# $FreeBSD: src/etc/rc.d/atm2.sh,v 1.12 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: atm2 -# REQUIRE: atm1 network1 +# REQUIRE: atm1 netif # BEFORE: network2 # KEYWORD: FreeBSD ==== //depot/projects/ia64/etc/rc.d/cleanvar#4 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/cleanvar,v 1.3 2003/02/15 06:00:11 mtm Exp $ +# $FreeBSD: src/etc/rc.d/cleanvar,v 1.4 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: cleanvar # REQUIRE: adjkerntz mountcritlocal -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD purgedir() ==== //depot/projects/ia64/etc/rc.d/dhclient#3 (text+ko) ==== @@ -1,23 +1,53 @@ #!/bin/sh # # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/dhclient,v 1.2 2002/06/13 22:14:36 gordon Exp $ +# $FreeBSD: src/etc/rc.d/dhclient,v 1.3 2003/04/18 17:53:02 mtm Exp $ # # PROVIDE: dhclient -# REQUIRE: network mountcritlocal +# REQUIRE: network netif mountcritlocal # BEFORE: NETWORKING +# KEYWORD: FreeBSD NetBSD # # Note that there no syslog logging of dhclient messages at boot because # dhclient needs to start before services that syslog depends upon do. # . /etc/rc.subr +. /etc/network.subr name="dhclient" -rcvar=$name command="/sbin/${name}" pidfile="/var/run/${name}.pid" +case "${OSTYPE}" in +FreeBSD) + rcvar= + start_precmd="dhclient_prestart" + start_postcmd="dhclient_poststart" + ;; +NetBSD) + rcvar=$name + ;; +esac + +dhclient_prestart() +{ + dhcp_list="`list_net_interfaces dhcp`" + if [ -z "$dhcp_list" ]; then + return 1 + fi + rc_flags="${rc_flags} ${dhcp_flags} ${dhcp_list}" + return 0 +} + +dhclient_poststart() +{ + for ifn in ${dhcp_list}; do + ifalias_up ${ifn} + ipx_up ${ifn} + ifconfig ${ifn} + done +} load_rc_config $name run_rc_command "$1" ==== //depot/projects/ia64/etc/rc.d/isdnd#7 (text+ko) ==== @@ -1,13 +1,13 @@ #!/bin/sh # # $NetBSD: isdnd,v 1.9 2002/04/10 23:37:13 martin Exp $ -# $FreeBSD: src/etc/rc.d/isdnd,v 1.13 2003/01/25 23:03:48 mtm Exp $ +# $FreeBSD: src/etc/rc.d/isdnd,v 1.14 2003/04/18 17:55:05 mtm Exp $ # # Mostly based on original script (/etc/rc.isdn) written by Hellmuth Michaelis # # PROVIDE: isdnd -# REQUIRE: network1 mountcritlocal +# REQUIRE: netif mountcritlocal # KEYWORD: FreeBSD NetBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/jail#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/jail,v 1.2 2003/04/16 16:44:00 mtm Exp $ +# $FreeBSD: src/etc/rc.d/jail,v 1.3 2003/04/19 07:50:32 mtm Exp $ # # PROVIDE: jail @@ -51,7 +51,7 @@ eval jail_rootdir=\"\$jail_${_jail}_rootdir\" eval jail_hostname=\"\$jail_${_jail}_hostname\" eval jail_ip=\"\$jail_${_jail}_ip\" - eval jail_exec=\"\$jail_${_jail_name}_exec\" + eval jail_exec=\"\$jail_${_jail}_exec\" [ -z ${jail_exec} ] && jail_exec="/bin/sh /etc/rc" jail ${jail_rootdir} ${jail_hostname} ${jail_ip} ${jail_exec} ==== //depot/projects/ia64/etc/rc.d/kldxref#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/kldxref,v 1.1 2003/03/17 23:15:52 cjc Exp $ +# $FreeBSD: src/etc/rc.d/kldxref,v 1.2 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: kldxref # REQUIRE: root mountcritlocal -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/mrouted#4 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: mrouted,v 1.6 2002/03/22 04:33:59 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/mrouted,v 1.3 2003/01/25 23:14:08 mtm Exp $ +# $FreeBSD: src/etc/rc.d/mrouted,v 1.4 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: mrouted -# REQUIRE: network1 network2 +# REQUIRE: netif network2 # KEYWORD: FreeBSD NetBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/network1#10 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh -x # -# $FreeBSD: src/etc/rc.d/network1,v 1.145 2003/02/12 04:26:10 imp Exp $ +# $FreeBSD: src/etc/rc.d/network1,v 1.146 2003/04/18 17:51:54 mtm Exp $ # # PROVIDE: network1 # REQUIRE: atm1 ipfilter mountcritlocal pccard serial sppp sysctl tty -# KEYWORD: FreeBSD +# KEYWORD: FreeBSD nostart . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/network2#3 (text+ko) ==== @@ -2,11 +2,11 @@ # # Configure routing and miscellaneous network tunables # -# $FreeBSD: src/etc/rc.d/network2,v 1.135 2002/06/13 22:14:36 gordon Exp $ +# $FreeBSD: src/etc/rc.d/network2,v 1.136 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: network2 -# REQUIRE: network1 ppp-user +# REQUIRE: netif ppp-user # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/ppp-user#4 (text+ko) ==== @@ -1,10 +1,10 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ppp-user,v 1.3 2003/01/25 23:03:48 mtm Exp $ +# $FreeBSD: src/etc/rc.d/ppp-user,v 1.4 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: ppp-user -# REQUIRE: network1 isdnd +# REQUIRE: netif isdnd # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/random#3 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/random,v 1.2 2002/10/12 10:31:31 schweikh Exp $ +# $FreeBSD: src/etc/rc.d/random,v 1.3 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: random # REQUIRE: diskless mountcritlocal initrandom -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD shutdown . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/routed#5 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: routed,v 1.7 2002/03/22 04:34:00 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/routed,v 1.4 2003/01/25 23:14:08 mtm Exp $ +# $FreeBSD: src/etc/rc.d/routed,v 1.5 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: routed -# REQUIRE: network1 network2 +# REQUIRE: netif network2 # KEYWORD: FreeBSD NetBSD . /etc/rc.subr ==== //depot/projects/ia64/etc/rc.d/sppp#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/sppp,v 1.1 2002/06/13 22:14:36 gordon Exp $ +# $FreeBSD: src/etc/rc.d/sppp,v 1.2 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: sppp # REQUIRE: root -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64/lib/libc/gen/getpwent.c#8 (text+ko) ==== @@ -31,7 +31,7 @@ * */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/getpwent.c,v 1.74 2003/04/18 17:27:05 nectar Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/getpwent.c,v 1.76 2003/04/18 22:07:30 nectar Exp $"); #include "namespace.h" #include @@ -91,7 +91,7 @@ const char *, uid_t); int __pw_parse_entry(char *, size_t, struct passwd *, int, int *errnop); -static int pwd_init(struct passwd *, char *, size_t); +static void pwd_init(struct passwd *); union key { const char *name; @@ -268,10 +268,9 @@ }; int rv, ret_errno; + pwd_init(pwd); + ret_errno = 0; *result = NULL; - ret_errno = pwd_init(pwd, buffer, bufsize); - if (ret_errno != 0) - return (ret_errno); rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwent_r", defaultsrc, pwd, buffer, bufsize, &ret_errno); if (rv == NS_SUCCESS) @@ -298,10 +297,9 @@ }; int rv, ret_errno; + pwd_init(pwd); + ret_errno = 0; *result = NULL; - ret_errno = pwd_init(pwd, buffer, bufsize); - if (ret_errno != 0) - return (ret_errno); rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwnam_r", defaultsrc, name, pwd, buffer, bufsize, &ret_errno); if (rv == NS_SUCCESS) @@ -328,10 +326,9 @@ }; int rv, ret_errno; + pwd_init(pwd); + ret_errno = 0; *result = NULL; - ret_errno = pwd_init(pwd, buffer, bufsize); - if (ret_errno != 0) - return (ret_errno); rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwuid_r", defaultsrc, uid, pwd, buffer, bufsize, &ret_errno); if (rv == NS_SUCCESS) @@ -341,23 +338,20 @@ } -static int -pwd_init(struct passwd *pwd, char *buffer, size_t bufsize) +static void +pwd_init(struct passwd *pwd) { + static char nul[] = ""; - if (bufsize < 1) - return (ERANGE); - buffer[0] = '\0'; memset(pwd, 0, sizeof(*pwd)); pwd->pw_uid = (uid_t)-1; /* Considered least likely to lead to */ pwd->pw_gid = (gid_t)-1; /* a security issue. */ - pwd->pw_name = buffer; - pwd->pw_passwd = buffer; - pwd->pw_class = buffer; - pwd->pw_gecos = buffer; - pwd->pw_dir = buffer; - pwd->pw_shell = buffer; - return (0); + pwd->pw_name = nul; + pwd->pw_passwd = nul; + pwd->pw_class = nul; + pwd->pw_gecos = nul; + pwd->pw_dir = nul; + pwd->pw_shell = nul; } @@ -1436,8 +1430,9 @@ size_t bufsize; uid_t uid; uint32_t store; - int rv, stayopen, *errnop; + int rv, from_compat, stayopen, *errnop; + from_compat = 0; name = NULL; uid = (uid_t)-1; how = (enum nss_lookup_type)mdata; @@ -1516,8 +1511,10 @@ default: break; } - if (rv & NS_TERMINATE) + if (rv & NS_TERMINATE) { + from_compat = 1; goto fin; + } key.data = keybuf; rv = NS_NOTFOUND; while (st->keynum >= 0) { @@ -1626,8 +1623,14 @@ (void)st->db->close(st->db); st->db = NULL; } - if (rv == NS_SUCCESS && retval != NULL) - *(struct passwd **)retval = pwd; + if (rv == NS_SUCCESS) { + if (!from_compat) { + pwd->pw_fields &= ~_PWF_SOURCE; + pwd->pw_fields |= _PWF_FILES; + } + if (retval != NULL) + *(struct passwd **)retval = pwd; + } return (rv); } ==== //depot/projects/ia64/lib/libdevstat/devstat.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libdevstat/devstat.c,v 1.22 2003/04/09 07:49:15 phk Exp $"); +__FBSDID("$FreeBSD: src/lib/libdevstat/devstat.c,v 1.23 2003/04/19 07:42:13 phk Exp $"); #include #include @@ -47,6 +47,14 @@ #include "devstat.h" +int +compute_stats(struct devstat *current, struct devstat *previous, + long double etime, u_int64_t *total_bytes, + u_int64_t *total_transfers, u_int64_t *total_blocks, + long double *kb_per_transfer, long double *transfers_per_second, + long double *mb_per_second, long double *blocks_per_second, + long double *ms_per_transaction); + typedef enum { DEVSTAT_ARG_NOTYPE, DEVSTAT_ARG_UINT64, ==== //depot/projects/ia64/libexec/tftpd/tftpd.c#8 (text+ko) ==== @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)tftpd.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$FreeBSD: src/libexec/tftpd/tftpd.c,v 1.26 2003/03/20 22:42:22 dwmalone Exp $"; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Apr 19 14:45:24 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD97A37B404; Sat, 19 Apr 2003 14:45:23 -0700 (PDT) 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 7821437B401 for ; Sat, 19 Apr 2003 14:45:23 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CB4843FAF for ; Sat, 19 Apr 2003 14:45:22 -0700 (PDT) (envelope-from marcel@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 h3JLjM0U007785 for ; Sat, 19 Apr 2003 14:45:22 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3JLjLlP007782 for perforce@freebsd.org; Sat, 19 Apr 2003 14:45:21 -0700 (PDT) Date: Sat, 19 Apr 2003 14:45:21 -0700 (PDT) Message-Id: <200304192145.h3JLjLlP007782@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 29269 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2003 21:45:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=29269 Change 29269 by marcel@marcel_pluto1 on 2003/04/19 14:45:01 IFia64 Affected files ... .. //depot/projects/ia64_epc/MAINTAINERS#3 integrate .. //depot/projects/ia64_epc/etc/Makefile#5 integrate .. //depot/projects/ia64_epc/etc/network.subr#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/Makefile#4 integrate .. //depot/projects/ia64_epc/etc/rc.d/NETWORKING#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/adjkerntz#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/atm1#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/atm2.sh#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/cleanvar#3 integrate .. //depot/projects/ia64_epc/etc/rc.d/dhclient#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/hostname#1 branch .. //depot/projects/ia64_epc/etc/rc.d/isdnd#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/jail#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/kldxref#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/mrouted#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/netif#1 branch .. //depot/projects/ia64_epc/etc/rc.d/network1#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/network2#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/nisdomain#1 branch .. //depot/projects/ia64_epc/etc/rc.d/ppp-user#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/random#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/routed#2 integrate .. //depot/projects/ia64_epc/etc/rc.d/sppp#2 integrate .. //depot/projects/ia64_epc/lib/libc/gen/getpwent.c#4 integrate .. //depot/projects/ia64_epc/lib/libdevstat/devstat.c#5 integrate .. //depot/projects/ia64_epc/libexec/tftpd/tftpd.c#3 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#7 integrate .. //depot/projects/ia64_epc/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#11 integrate .. //depot/projects/ia64_epc/sbin/bsdlabel/Makefile#2 integrate .. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.8#2 integrate .. //depot/projects/ia64_epc/sbin/bsdlabel/bsdlabel.c#2 integrate .. //depot/projects/ia64_epc/sbin/bsdlabel/runtest.sh#1 branch .. //depot/projects/ia64_epc/sbin/sunlabel/sunlabel.c#3 integrate .. //depot/projects/ia64_epc/sys/alpha/alpha/machdep.c#4 integrate .. //depot/projects/ia64_epc/sys/alpha/alpha/trap.c#5 integrate .. //depot/projects/ia64_epc/sys/alpha/linux/linux_machdep.c#4 integrate .. //depot/projects/ia64_epc/sys/dev/tx/if_tx.c#4 integrate .. //depot/projects/ia64_epc/sys/geom/geom_bsd.c#6 integrate .. //depot/projects/ia64_epc/sys/geom/geom_slice.c#6 integrate .. //depot/projects/ia64_epc/sys/geom/geom_slice.h#3 integrate .. //depot/projects/ia64_epc/sys/i386/i386/machdep.c#4 integrate .. //depot/projects/ia64_epc/sys/i386/i386/trap.c#5 integrate .. //depot/projects/ia64_epc/sys/i386/include/cpufunc.h#2 integrate .. //depot/projects/ia64_epc/sys/i386/linux/linux_machdep.c#5 integrate .. //depot/projects/ia64_epc/sys/ia64/ia64/trap.c#10 integrate .. //depot/projects/ia64_epc/sys/kern/kern_mac.c#7 integrate .. //depot/projects/ia64_epc/sys/kern/kern_proc.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/kern_resource.c#6 integrate .. //depot/projects/ia64_epc/sys/kern/kern_sig.c#9 integrate .. //depot/projects/ia64_epc/sys/kern/kern_thread.c#11 integrate .. //depot/projects/ia64_epc/sys/kern/uipc_jumbo.c#4 integrate .. //depot/projects/ia64_epc/sys/kern/vfs_bio.c#8 integrate .. //depot/projects/ia64_epc/sys/pc98/i386/machdep.c#4 integrate .. //depot/projects/ia64_epc/sys/powerpc/powerpc/busdma_machdep.c#7 integrate .. //depot/projects/ia64_epc/sys/security/mac_ifoff/mac_ifoff.c#3 integrate .. //depot/projects/ia64_epc/sys/sparc64/sparc64/trap.c#5 integrate .. //depot/projects/ia64_epc/sys/sys/cdefs.h#2 integrate .. //depot/projects/ia64_epc/sys/sys/mac.h#5 integrate .. //depot/projects/ia64_epc/sys/sys/mac_policy.h#5 integrate .. //depot/projects/ia64_epc/sys/sys/proc.h#9 integrate .. //depot/projects/ia64_epc/sys/sys/syscallsubr.h#2 integrate .. //depot/projects/ia64_epc/sys/vm/swap_pager.c#3 integrate .. //depot/projects/ia64_epc/sys/vm/uma_core.c#6 integrate .. //depot/projects/ia64_epc/sys/vm/vm_map.c#6 integrate .. //depot/projects/ia64_epc/sys/vm/vm_object.c#7 integrate .. //depot/projects/ia64_epc/sys/vm/vm_object.h#5 integrate .. //depot/projects/ia64_epc/usr.bin/passwd/passwd.c#2 integrate Differences ... ==== //depot/projects/ia64_epc/MAINTAINERS#3 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.58 2003/02/18 00:07:06 jmallett Exp $ +$FreeBSD: src/MAINTAINERS,v 1.59 2003/04/18 21:17:46 nectar Exp $ subsystem login notes ----------------------------- @@ -77,3 +77,5 @@ libufs jmallett Willing to handle problems, help with work. fdc(4) joerg Just keep me informed of changes, try not to break it. sppp(4) joerg Just keep me informed of changes, try not to break it. +libc nectar Opportuntity for pre-commit review appreciated for + nsdispatch(3) and its consumers. ==== //depot/projects/ia64_epc/etc/Makefile#5 (text+ko) ==== @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 -# $FreeBSD: src/etc/Makefile,v 1.308 2003/04/08 16:14:02 des Exp $ +# $FreeBSD: src/etc/Makefile,v 1.309 2003/04/18 17:51:53 mtm Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail @@ -10,7 +10,7 @@ devd.conf dhclient.conf disktab fbtab ftpusers gettytab group \ hosts hosts.allow hosts.equiv hosts.lpd \ inetd.conf login.access login.conf \ - mac.conf motd netconfig networks newsyslog.conf \ + mac.conf motd netconfig network.subr networks newsyslog.conf \ phones printcap profile protocols \ rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \ rc.network rc.network6 rc.pccard rc.sendmail rc.serial rc.shutdown \ ==== //depot/projects/ia64_epc/etc/network.subr#2 (text+ko) ==== @@ -1,67 +1,121 @@ -#!/bin/sh -x +# +# Copyright (c) 2003 The FreeBSD Project. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (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/etc/network.subr,v 1.145 2003/02/12 04:26:10 imp Exp $ +# $FreeBSD: src/etc/network.subr,v 1.146 2003/04/18 17:51:53 mtm Exp $ # -# PROVIDE: network1 -# REQUIRE: atm1 ipfilter mountcritlocal pccard serial sppp sysctl tty -# KEYWORD: FreeBSD +# +# Subroutines commonly used from network startup scripts. +# Requires that rc.conf be loaded first. +# -. /etc/rc.subr +# ifconfig_up if +# Evaluate ifconfig(8) arguments for interface $if and +# run ifconfig(8) with those arguments. It returns 0 if +# arguments were found and executed or 1 if the interface +# had no arguments. +# +ifconfig_up() +{ + eval ifconfig_args=\$ifconfig_$1 + if [ -n "${ifconfig_args}" ]; then + ifconfig $1 ${ifconfig_args} + return 0 + fi + return 1 +} -name="network1" -start_cmd="network_start" -stop_cmd="network_stop" +# ifalias_up if +# Configure aliases for network interface $if. +# It returns 0 if at least one alias was configured or +# 1 if there were none. +# +ifalias_up() +{ + _ret=1 + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_$1_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig $1 ${ifconfig_args} alias + alias=$((${alias} + 1)) + _ret=0 + else + break + fi + done + return $_ret +} -convert_host_conf() +# ifscript_up if +# Evaluate a startup script for the $if interface. +# It returns 0 if a script was found and processed or +# 1 if no script was found. +# +ifscript_up() { - host_conf=$1; shift; - nsswitch_conf=$1; shift; - awk ' \ - /^[:blank:]*#/ { next } \ - /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ - /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ - /nis/ { nsswitch[c] = "nis"; c++; next } \ - { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ - END { \ - printf "hosts: "; \ - for (i in nsswitch) printf "%s ", nsswitch[i]; \ - printf "\n"; \ - }' < $host_conf > $nsswitch_conf + if [ -r /etc/start_if.$1 ]; then + . /etc/start_if.$1 + return 0 + fi + return 1 } -generate_host_conf() +# Create cloneable interfaces. +# +clone_up() { - nsswitch_conf=$1; shift; - host_conf=$1; shift; + _prefix= + _list= + for ifn in ${cloned_interfaces}; do + ifconfig ${ifn} create + if $? ; then + _list="${_list}${_prefix}${ifn}" + [ -z "$_prefix" ] && _prefix=' ' + fi + done + debug "Cloned: ${_list}" +} - awk ' - BEGIN { - xlat["files"] = "hosts"; - xlat["dns"] = "bind"; - xlat["nis"] = "nis"; - cont = 0; - } - sub(/^[\t ]*hosts:/, "") || cont { - if (!cont) - srcs = "" - sub(/#.*/, "") - gsub(/[][]/, " & ") - cont = sub(/\\$/, "") - srcs = srcs " " $0 - } - END { - print "# Auto-generated from nsswitch.conf, do not edit" - ns = split(srcs, s) - for (n = 1; n <= ns; ++n) { - if (s[n] in xlat) - print xlat[s[n]] - } - } - ' <$nsswitch_conf >$host_conf +# Destroy cloned interfaces. Destroyed interfaces are echoed +# to standard output. +# +clone_down() +{ + _prefix= + _list= + for ifn in ${cloned_interfaces}; do + ifconfig ${ifn} destroy + if $? ; then + _list="${_list}${_prefix}${ifn}" + [ -z "$_prefix" ] && _prefix=' ' + fi + done + debug "Destroyed clones: ${_list}" } -network_gif_setup() { +gif_up() { case ${gif_interfaces} in [Nn][Oo] | '') ;; @@ -83,144 +137,78 @@ esac } -network_start() +# +# ipx_up ifn +# Configure any IPX addresses for interface $ifn. Returns 0 if IPX +# arguments were found and configured; returns 1 otherwise. +# +ipx_up() { - # set hostname, turn on network - # - echo -n "Doing initial network setup:" - - # Generate host.conf for compatibility - # - if [ -f "/etc/nsswitch.conf" ]; then - echo -n ' host.conf' - generate_host_conf /etc/nsswitch.conf /etc/host.conf + ifn="$1" + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + return 0 fi + return 1 +} - # Convert host.conf to nsswitch.conf if necessary - # - if [ -f "/etc/host.conf" -a ! -f "/etc/nsswitch.conf" ]; then - echo '' - echo 'Warning: /etc/host.conf is no longer used' - echo ' /etc/nsswitch.conf will be created for you' - convert_host_conf /etc/host.conf /etc/nsswitch.conf - fi +# +# list_net_interfaces type +# List all network interfaces. The type of interface returned +# can be controlled by the type argument. The type +# argument can be any of the following: +# nodhcp - all interfaces, excluding DHCP configured interfaces +# dhcp - list only DHCP configured interfaces +# If no argument is specified all network interfaces are output. +# Note that the list always includes cloned interfaces. +# +list_net_interfaces() +{ + type=$1 - # Set the host name if it is not already set + # Get a list of ALL the interfaces # - if [ -z "`hostname -s`" ]; then - hostname ${hostname} - echo -n ' hostname' - fi - - # Set the domainname if we're using NIS - # - case ${nisdomainname} in - [Nn][Oo]|'') - ;; - *) - domainname ${nisdomainname} - echo -n ' domain' - ;; - esac - - echo '.' - - # Attempt to create cloned interfaces. - for ifn in ${cloned_interfaces}; do - ifconfig ${ifn} create - done - - # gifconfig - network_gif_setup - - # Set up all the network interfaces, calling startup scripts if needed - # case ${network_interfaces} in [Aa][Uu][Tt][Oo]) - network_interfaces="`ifconfig -l`" + _tmplist="`ifconfig -l`" ;; *) - network_interfaces="${network_interfaces} ${cloned_interfaces}" + _tmplist="${network_interfaces}" ;; esac + _tmplist="${_tmplist} ${cloned_interfaces}" - dhcp_interfaces="" - for ifn in ${network_interfaces}; do - if [ -r /etc/start_if.${ifn} ]; then - . /etc/start_if.${ifn} - eval showstat_$ifn=1 - fi + if [ -z "$type" ]; then + echo $_tmplist + return 0 + fi - # Do the primary ifconfig if specified - # - eval ifconfig_args=\$ifconfig_${ifn} - - case ${ifconfig_args} in - '') - ;; + # Separate out dhcp and non-dhcp intefraces + # + _aprefix= + _brefix= + for _if in ${_tmplist} ; do + eval _ifarg="\$ifconfig_${_if}" + case "$_ifarg" in [Dd][Hh][Cc][Pp]) - # DHCP inits are done all in one go below - dhcp_interfaces="$dhcp_interfaces $ifn" - eval showstat_$ifn=1 + _dhcplist="${_dhcplist}${_aprefix}${_if}" + [ -z "$_aprefix" ] && _aprefix=' ' ;; - *) - ifconfig ${ifn} ${ifconfig_args} - eval showstat_$ifn=1 + ''|*) + _nodhcplist="${_nodhcplist}${_bprefix}${_if}" + [ -z "$_bprefix" ] && _bprefix=' ' ;; esac done - if [ ! -z "${dhcp_interfaces}" ]; then - ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} - fi - - for ifn in ${network_interfaces}; do - # Check to see if aliases need to be added - # - alias=0 - while : ; do - eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} - if [ -n "${ifconfig_args}" ]; then - ifconfig ${ifn} ${ifconfig_args} alias - eval showstat_$ifn=1 - alias=$((${alias} + 1)) - else - break; - fi - done - - # Do ipx address if specified - # - eval ifconfig_args=\$ifconfig_${ifn}_ipx - if [ -n "${ifconfig_args}" ]; then - ifconfig ${ifn} ${ifconfig_args} - eval showstat_$ifn=1 - fi - done - - # Display ifconfiged interfaces - for ifn in ${network_interfaces}; do - eval showstat=\$showstat_${ifn} - if [ ! -z ${showstat} ]; then - ifconfig ${ifn} - fi - done - - # Resync ipfilter - /etc/rc.d/ipfilter resync -} - -network_stop() -{ - echo -n "Stopping network:" - - # flush routes - # - echo -n " flush routes" - route -n flush - - echo '.' + case "$type" in + nodhcp) + echo $_nodhcplist + ;; + dhcp) + echo $_dhcplist + ;; + esac + return 0 } - -load_rc_config $name -run_rc_command "$1" ==== //depot/projects/ia64_epc/etc/rc.d/Makefile#4 (text+ko) ==== @@ -1,16 +1,16 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.12 2003/04/16 16:27:23 mtm Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.14 2003/04/19 01:56:44 mtm Exp $ .include FILES= DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz amd \ apm apmd atm1 atm2.sh atm3.sh archdep bgfsck bootparams ccd cleanvar \ - cleartmp cron devd devdb devfs diskless dmesg dumpon fsck inetd \ - initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat ipsec \ - ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig local \ - localdaemons lomac lpd motd mountcritlocal mountcritremote \ - mountd moused mroute6d mrouted msgs named network1 network2 \ - network3 network_ipv6 nfsclient nfsd nfslocking nfsserver ntpd \ + cleartmp cron devd devdb devfs dhclient diskless dmesg dumpon fsck \ + hostname inetd initdiskless initrandom ip6fw ipfilter ipfw ipmon ipnat \ + ipsec ipxrouted isdnd jail kadmind kerberos keyserv kldxref ldconfig \ + local localdaemons lomac lpd motd mountcritlocal mountcritremote \ + mountd moused mroute6d mrouted msgs named netif network1 network2 network3 \ + network_ipv6 nfsclient nfsd nfslocking nfsserver nisdomain ntpd \ ntpdate othermta pccard pcvt ppp-user pppoed pwcheck quota random \ rarpd rcconf.sh root route6d routed rpcbind rtadvd rwho savecore \ securelevel sendmail serial sppp sshd swap1 syscons sysctl \ ==== //depot/projects/ia64_epc/etc/rc.d/NETWORKING#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: NETWORKING,v 1.2 2002/03/22 04:33:57 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/NETWORKING,v 1.4 2003/01/25 23:14:08 mtm Exp $ +# $FreeBSD: src/etc/rc.d/NETWORKING,v 1.5 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: NETWORKING NETWORK -# REQUIRE: network dhclient altqd network1 network2 network_ipv6 isdnd ppp-user +# REQUIRE: network dhclient altqd netif network2 network_ipv6 isdnd ppp-user # REQUIRE: routed mrouted route6d mroute6d # KEYWORD: FreeBSD NetBSD ==== //depot/projects/ia64_epc/etc/rc.d/adjkerntz#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/adjkerntz,v 1.1 2002/06/13 22:14:36 gordon Exp $ +# $FreeBSD: src/etc/rc.d/adjkerntz,v 1.2 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: adjkerntz # REQUIRE: diskless mountcritlocal random -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/atm1#2 (text+ko) ==== @@ -24,12 +24,12 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/atm1,v 1.11 2002/09/30 08:01:43 mdodd Exp $ +# $FreeBSD: src/etc/rc.d/atm1,v 1.12 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: atm1 # REQUIRE: root -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/atm2.sh#2 (text+ko) ==== @@ -24,11 +24,11 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/atm2.sh,v 1.11 2002/10/12 10:31:31 schweikh Exp $ +# $FreeBSD: src/etc/rc.d/atm2.sh,v 1.12 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: atm2 -# REQUIRE: atm1 network1 +# REQUIRE: atm1 netif # BEFORE: network2 # KEYWORD: FreeBSD ==== //depot/projects/ia64_epc/etc/rc.d/cleanvar#3 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/cleanvar,v 1.3 2003/02/15 06:00:11 mtm Exp $ +# $FreeBSD: src/etc/rc.d/cleanvar,v 1.4 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: cleanvar # REQUIRE: adjkerntz mountcritlocal -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD purgedir() ==== //depot/projects/ia64_epc/etc/rc.d/dhclient#2 (text+ko) ==== @@ -1,23 +1,53 @@ #!/bin/sh # # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/dhclient,v 1.2 2002/06/13 22:14:36 gordon Exp $ +# $FreeBSD: src/etc/rc.d/dhclient,v 1.3 2003/04/18 17:53:02 mtm Exp $ # # PROVIDE: dhclient -# REQUIRE: network mountcritlocal +# REQUIRE: network netif mountcritlocal # BEFORE: NETWORKING +# KEYWORD: FreeBSD NetBSD # # Note that there no syslog logging of dhclient messages at boot because # dhclient needs to start before services that syslog depends upon do. # . /etc/rc.subr +. /etc/network.subr name="dhclient" -rcvar=$name command="/sbin/${name}" pidfile="/var/run/${name}.pid" +case "${OSTYPE}" in +FreeBSD) + rcvar= + start_precmd="dhclient_prestart" + start_postcmd="dhclient_poststart" + ;; +NetBSD) + rcvar=$name + ;; +esac + +dhclient_prestart() +{ + dhcp_list="`list_net_interfaces dhcp`" + if [ -z "$dhcp_list" ]; then + return 1 + fi + rc_flags="${rc_flags} ${dhcp_flags} ${dhcp_list}" + return 0 +} + +dhclient_poststart() +{ + for ifn in ${dhcp_list}; do + ifalias_up ${ifn} + ipx_up ${ifn} + ifconfig ${ifn} + done +} load_rc_config $name run_rc_command "$1" ==== //depot/projects/ia64_epc/etc/rc.d/isdnd#2 (text+ko) ==== @@ -1,13 +1,13 @@ #!/bin/sh # # $NetBSD: isdnd,v 1.9 2002/04/10 23:37:13 martin Exp $ -# $FreeBSD: src/etc/rc.d/isdnd,v 1.13 2003/01/25 23:03:48 mtm Exp $ +# $FreeBSD: src/etc/rc.d/isdnd,v 1.14 2003/04/18 17:55:05 mtm Exp $ # # Mostly based on original script (/etc/rc.isdn) written by Hellmuth Michaelis # # PROVIDE: isdnd -# REQUIRE: network1 mountcritlocal +# REQUIRE: netif mountcritlocal # KEYWORD: FreeBSD NetBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/jail#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/jail,v 1.2 2003/04/16 16:44:00 mtm Exp $ +# $FreeBSD: src/etc/rc.d/jail,v 1.3 2003/04/19 07:50:32 mtm Exp $ # # PROVIDE: jail @@ -51,7 +51,7 @@ eval jail_rootdir=\"\$jail_${_jail}_rootdir\" eval jail_hostname=\"\$jail_${_jail}_hostname\" eval jail_ip=\"\$jail_${_jail}_ip\" - eval jail_exec=\"\$jail_${_jail_name}_exec\" + eval jail_exec=\"\$jail_${_jail}_exec\" [ -z ${jail_exec} ] && jail_exec="/bin/sh /etc/rc" jail ${jail_rootdir} ${jail_hostname} ${jail_ip} ${jail_exec} ==== //depot/projects/ia64_epc/etc/rc.d/kldxref#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/kldxref,v 1.1 2003/03/17 23:15:52 cjc Exp $ +# $FreeBSD: src/etc/rc.d/kldxref,v 1.2 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: kldxref # REQUIRE: root mountcritlocal -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/mrouted#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: mrouted,v 1.6 2002/03/22 04:33:59 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/mrouted,v 1.3 2003/01/25 23:14:08 mtm Exp $ +# $FreeBSD: src/etc/rc.d/mrouted,v 1.4 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: mrouted -# REQUIRE: network1 network2 +# REQUIRE: netif network2 # KEYWORD: FreeBSD NetBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/network1#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh -x # -# $FreeBSD: src/etc/rc.d/network1,v 1.145 2003/02/12 04:26:10 imp Exp $ +# $FreeBSD: src/etc/rc.d/network1,v 1.146 2003/04/18 17:51:54 mtm Exp $ # # PROVIDE: network1 # REQUIRE: atm1 ipfilter mountcritlocal pccard serial sppp sysctl tty -# KEYWORD: FreeBSD +# KEYWORD: FreeBSD nostart . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/network2#2 (text+ko) ==== @@ -2,11 +2,11 @@ # # Configure routing and miscellaneous network tunables # -# $FreeBSD: src/etc/rc.d/network2,v 1.135 2002/06/13 22:14:36 gordon Exp $ +# $FreeBSD: src/etc/rc.d/network2,v 1.136 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: network2 -# REQUIRE: network1 ppp-user +# REQUIRE: netif ppp-user # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/ppp-user#2 (text+ko) ==== @@ -1,10 +1,10 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ppp-user,v 1.3 2003/01/25 23:03:48 mtm Exp $ +# $FreeBSD: src/etc/rc.d/ppp-user,v 1.4 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: ppp-user -# REQUIRE: network1 isdnd +# REQUIRE: netif isdnd # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/random#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/random,v 1.2 2002/10/12 10:31:31 schweikh Exp $ +# $FreeBSD: src/etc/rc.d/random,v 1.3 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: random # REQUIRE: diskless mountcritlocal initrandom -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD shutdown . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/routed#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # # $NetBSD: routed,v 1.7 2002/03/22 04:34:00 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/routed,v 1.4 2003/01/25 23:14:08 mtm Exp $ +# $FreeBSD: src/etc/rc.d/routed,v 1.5 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: routed -# REQUIRE: network1 network2 +# REQUIRE: netif network2 # KEYWORD: FreeBSD NetBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/etc/rc.d/sppp#2 (text+ko) ==== @@ -1,11 +1,11 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/sppp,v 1.1 2002/06/13 22:14:36 gordon Exp $ +# $FreeBSD: src/etc/rc.d/sppp,v 1.2 2003/04/18 17:55:05 mtm Exp $ # # PROVIDE: sppp # REQUIRE: root -# BEFORE: network1 +# BEFORE: netif # KEYWORD: FreeBSD . /etc/rc.subr ==== //depot/projects/ia64_epc/lib/libc/gen/getpwent.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ * */ #include -__FBSDID("$FreeBSD: src/lib/libc/gen/getpwent.c,v 1.74 2003/04/18 17:27:05 nectar Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/getpwent.c,v 1.76 2003/04/18 22:07:30 nectar Exp $"); #include "namespace.h" #include @@ -91,7 +91,7 @@ const char *, uid_t); int __pw_parse_entry(char *, size_t, struct passwd *, int, int *errnop); -static int pwd_init(struct passwd *, char *, size_t); +static void pwd_init(struct passwd *); union key { const char *name; @@ -268,10 +268,9 @@ }; int rv, ret_errno; + pwd_init(pwd); + ret_errno = 0; *result = NULL; - ret_errno = pwd_init(pwd, buffer, bufsize); - if (ret_errno != 0) - return (ret_errno); rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwent_r", defaultsrc, pwd, buffer, bufsize, &ret_errno); if (rv == NS_SUCCESS) @@ -298,10 +297,9 @@ }; int rv, ret_errno; + pwd_init(pwd); + ret_errno = 0; *result = NULL; - ret_errno = pwd_init(pwd, buffer, bufsize); - if (ret_errno != 0) - return (ret_errno); rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwnam_r", defaultsrc, name, pwd, buffer, bufsize, &ret_errno); if (rv == NS_SUCCESS) @@ -328,10 +326,9 @@ }; int rv, ret_errno; + pwd_init(pwd); + ret_errno = 0; *result = NULL; - ret_errno = pwd_init(pwd, buffer, bufsize); - if (ret_errno != 0) - return (ret_errno); rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwuid_r", defaultsrc, uid, pwd, buffer, bufsize, &ret_errno); if (rv == NS_SUCCESS) @@ -341,23 +338,20 @@ } -static int -pwd_init(struct passwd *pwd, char *buffer, size_t bufsize) +static void +pwd_init(struct passwd *pwd) { + static char nul[] = ""; - if (bufsize < 1) - return (ERANGE); - buffer[0] = '\0'; memset(pwd, 0, sizeof(*pwd)); pwd->pw_uid = (uid_t)-1; /* Considered least likely to lead to */ pwd->pw_gid = (gid_t)-1; /* a security issue. */ - pwd->pw_name = buffer; - pwd->pw_passwd = buffer; - pwd->pw_class = buffer; - pwd->pw_gecos = buffer; - pwd->pw_dir = buffer; - pwd->pw_shell = buffer; - return (0); + pwd->pw_name = nul; + pwd->pw_passwd = nul; + pwd->pw_class = nul; + pwd->pw_gecos = nul; + pwd->pw_dir = nul; + pwd->pw_shell = nul; } @@ -1436,8 +1430,9 @@ size_t bufsize; uid_t uid; uint32_t store; - int rv, stayopen, *errnop; + int rv, from_compat, stayopen, *errnop; + from_compat = 0; name = NULL; uid = (uid_t)-1; how = (enum nss_lookup_type)mdata; @@ -1516,8 +1511,10 @@ default: break; } - if (rv & NS_TERMINATE) + if (rv & NS_TERMINATE) { + from_compat = 1; goto fin; + } key.data = keybuf; rv = NS_NOTFOUND; while (st->keynum >= 0) { @@ -1626,8 +1623,14 @@ (void)st->db->close(st->db); st->db = NULL; } - if (rv == NS_SUCCESS && retval != NULL) - *(struct passwd **)retval = pwd; + if (rv == NS_SUCCESS) { + if (!from_compat) { + pwd->pw_fields &= ~_PWF_SOURCE; + pwd->pw_fields |= _PWF_FILES; + } + if (retval != NULL) + *(struct passwd **)retval = pwd; + } return (rv); } ==== //depot/projects/ia64_epc/lib/libdevstat/devstat.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libdevstat/devstat.c,v 1.22 2003/04/09 07:49:15 phk Exp $"); +__FBSDID("$FreeBSD: src/lib/libdevstat/devstat.c,v 1.23 2003/04/19 07:42:13 phk Exp $"); #include #include @@ -47,6 +47,14 @@ #include "devstat.h" +int +compute_stats(struct devstat *current, struct devstat *previous, + long double etime, u_int64_t *total_bytes, + u_int64_t *total_transfers, u_int64_t *total_blocks, + long double *kb_per_transfer, long double *transfers_per_second, + long double *mb_per_second, long double *blocks_per_second, + long double *ms_per_transaction); + typedef enum { DEVSTAT_ARG_NOTYPE, DEVSTAT_ARG_UINT64, ==== //depot/projects/ia64_epc/libexec/tftpd/tftpd.c#3 (text+ko) ==== @@ -42,7 +42,7 @@ static char sccsid[] = "@(#)tftpd.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$FreeBSD: src/libexec/tftpd/tftpd.c,v 1.26 2003/03/20 22:42:22 dwmalone Exp $"; >>> TRUNCATED FOR MAIL (1000 lines) <<<