From owner-p4-projects@FreeBSD.ORG Sun Aug 29 01:10:55 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D73A716A4D0; Sun, 29 Aug 2004 01:10:54 +0000 (GMT) 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 9D36416A4CE for ; Sun, 29 Aug 2004 01:10:54 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 805D043D5A for ; Sun, 29 Aug 2004 01:10:54 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7T1AsJx030129 for ; Sun, 29 Aug 2004 01:10:54 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7T1AscI030126 for perforce@freebsd.org; Sun, 29 Aug 2004 01:10:54 GMT (envelope-from wsalamon@computer.org) Date: Sun, 29 Aug 2004 01:10:54 GMT Message-Id: <200408290110.i7T1AscI030126@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Subject: PERFORCE change 60626 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, 29 Aug 2004 01:10:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=60626 Change 60626 by wsalamon@wsalamon_epi on 2004/08/29 01:10:45 Remove superfluous check of string termination character after using strlen(). Affected files ... .. //depot/projects/trustedbsd/audit3/contrib/bsm/lib/bsm_token.c#3 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_bsm_token.c#5 edit Differences ... ==== //depot/projects/trustedbsd/audit3/contrib/bsm/lib/bsm_token.c#3 (text+ko) ==== @@ -74,12 +74,7 @@ return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, 9 + textlen); if(t == NULL) { return NULL; @@ -107,12 +102,7 @@ return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, 13 + textlen); if(t == NULL) { return NULL; @@ -537,12 +527,7 @@ if(file == NULL) { return NULL; } - /* Make sure that text is null terminated */ filelen = strlen(file); - if(file[filelen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, filelen + 12); if(t == NULL) { return NULL; @@ -576,12 +561,7 @@ if(text == NULL) { return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, textlen + 4); if(t == NULL) { return NULL; @@ -610,12 +590,7 @@ if(text == NULL) { return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, textlen + 4); if(t == NULL) { return NULL; @@ -1085,10 +1060,6 @@ int nextlen; nextlen = strlen(nextarg); - if(nextarg[nextlen] != '\0') { - return NULL; - } - totlen += nextlen + 1; count++; nextarg = *(args + count); @@ -1135,10 +1106,6 @@ int nextlen; nextlen = strlen(nextenv); - if(nextenv[nextlen] != '\0') { - return NULL; - } - totlen += nextlen + 1; count++; nextenv = *(env + count); ==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_bsm_token.c#5 (text+ko) ==== @@ -57,12 +57,7 @@ return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, 9 + textlen); if(t == NULL) { return NULL; @@ -90,12 +85,7 @@ return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, 13 + textlen); if(t == NULL) { return NULL; @@ -508,12 +498,7 @@ if(file == NULL) { return NULL; } - /* Make sure that text is null terminated */ filelen = strlen(file); - if(file[filelen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, filelen + 12); if(t == NULL) { return NULL; @@ -548,12 +533,7 @@ if(text == NULL) { return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, textlen + 4); if(t == NULL) { return NULL; @@ -582,12 +562,7 @@ if(text == NULL) { return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, textlen + 4); if(t == NULL) { return NULL; @@ -1201,10 +1176,6 @@ int nextlen; nextlen = strlen(nextarg); - if(nextarg[nextlen] != '\0') { - return NULL; - } - totlen += nextlen + 1; count++; nextarg = *(args + count); @@ -1251,10 +1222,6 @@ int nextlen; nextlen = strlen(nextenv); - if(nextenv[nextlen] != '\0') { - return NULL; - } - totlen += nextlen + 1; count++; nextenv = *(env + count); From owner-p4-projects@FreeBSD.ORG Sun Aug 29 23:04:14 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D1DB116A4D0; Sun, 29 Aug 2004 23:04:13 +0000 (GMT) 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 77ACB16A4CE for ; Sun, 29 Aug 2004 23:04:13 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5301D43D2D for ; Sun, 29 Aug 2004 23:04:13 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7TN4DlR075592 for ; Sun, 29 Aug 2004 23:04:13 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7TN4CYX075589 for perforce@freebsd.org; Sun, 29 Aug 2004 23:04:12 GMT (envelope-from julian@freebsd.org) Date: Sun, 29 Aug 2004 23:04:12 GMT Message-Id: <200408292304.i7TN4CYX075589@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 60668 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, 29 Aug 2004 23:04:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=60668 Change 60668 by julian@julian_ref on 2004/08/29 23:03:27 IFC@60665 Affected files ... .. //depot/projects/nsched/sys/alpha/conf/GENERIC#6 integrate .. //depot/projects/nsched/sys/alpha/conf/NOTES#3 integrate .. //depot/projects/nsched/sys/alpha/pci/pcibus.c#3 integrate .. //depot/projects/nsched/sys/amd64/amd64/mp_machdep.c#6 integrate .. //depot/projects/nsched/sys/amd64/amd64/pmap.c#17 integrate .. //depot/projects/nsched/sys/boot/common/Makefile.inc#2 integrate .. //depot/projects/nsched/sys/boot/common/bootstrap.h#2 integrate .. //depot/projects/nsched/sys/boot/common/load_elf.c#2 integrate .. //depot/projects/nsched/sys/boot/common/load_elf32_obj.c#1 branch .. //depot/projects/nsched/sys/boot/common/load_elf64_obj.c#1 branch .. //depot/projects/nsched/sys/boot/common/load_elf_obj.c#1 branch .. //depot/projects/nsched/sys/boot/common/misc.c#2 integrate .. //depot/projects/nsched/sys/boot/common/reloc_elf.c#1 branch .. //depot/projects/nsched/sys/boot/common/reloc_elf32.c#1 branch .. //depot/projects/nsched/sys/boot/common/reloc_elf64.c#1 branch .. //depot/projects/nsched/sys/boot/i386/boot2/boot1.S#6 integrate .. //depot/projects/nsched/sys/boot/i386/libi386/elf32_freebsd.c#2 integrate .. //depot/projects/nsched/sys/boot/i386/libi386/elf64_freebsd.c#2 integrate .. //depot/projects/nsched/sys/boot/i386/loader/conf.c#2 integrate .. //depot/projects/nsched/sys/boot/i386/mbr/Makefile#3 integrate .. //depot/projects/nsched/sys/boot/i386/mbr/mbr.s#2 integrate .. //depot/projects/nsched/sys/cam/scsi/scsi_da.c#5 integrate .. //depot/projects/nsched/sys/conf/NOTES#13 integrate .. //depot/projects/nsched/sys/conf/files#20 integrate .. //depot/projects/nsched/sys/conf/kmod.mk#9 integrate .. //depot/projects/nsched/sys/conf/options#14 integrate .. //depot/projects/nsched/sys/dev/drm/radeon_drv.c#2 integrate .. //depot/projects/nsched/sys/dev/firewire/fwcrom.c#3 integrate .. //depot/projects/nsched/sys/dev/re/if_re.c#7 integrate .. //depot/projects/nsched/sys/dev/tga/tga_pci.c#3 integrate .. //depot/projects/nsched/sys/dev/usb/usbdi.c#3 integrate .. //depot/projects/nsched/sys/geom/mirror/g_mirror.c#4 integrate .. //depot/projects/nsched/sys/geom/raid3/g_raid3.c#5 integrate .. //depot/projects/nsched/sys/geom/raid3/g_raid3_ctl.c#3 integrate .. //depot/projects/nsched/sys/i386/conf/NOTES#11 integrate .. //depot/projects/nsched/sys/i386/i386/mp_machdep.c#6 integrate .. //depot/projects/nsched/sys/i386/i386/pmap.c#15 integrate .. //depot/projects/nsched/sys/kern/kern_kse.c#25 integrate .. //depot/projects/nsched/sys/kern/kern_shutdown.c#8 integrate .. //depot/projects/nsched/sys/kern/kern_switch.c#6 integrate .. //depot/projects/nsched/sys/kern/link_elf_obj.c#7 integrate .. //depot/projects/nsched/sys/kern/sched_ule.c#20 integrate .. //depot/projects/nsched/sys/kern/subr_bus.c#8 integrate .. //depot/projects/nsched/sys/kern/subr_smp.c#5 integrate .. //depot/projects/nsched/sys/modules/Makefile#8 integrate .. //depot/projects/nsched/sys/modules/cam/Makefile#3 integrate .. //depot/projects/nsched/sys/net/netisr.c#4 integrate .. //depot/projects/nsched/sys/netgraph/ng_tty.c#6 integrate .. //depot/projects/nsched/sys/netinet6/ipsec.c#3 integrate .. //depot/projects/nsched/sys/netipx/ipx.c#2 integrate .. //depot/projects/nsched/sys/pc98/pc98/wd.c#3 integrate .. //depot/projects/nsched/sys/pci/if_pcn.c#5 integrate .. //depot/projects/nsched/sys/pci/if_rlreg.h#5 integrate .. //depot/projects/nsched/sys/pci/if_sf.c#6 integrate .. //depot/projects/nsched/sys/pci/if_ste.c#8 integrate .. //depot/projects/nsched/sys/pci/if_ti.c#5 integrate .. //depot/projects/nsched/sys/pci/if_tl.c#3 integrate .. //depot/projects/nsched/sys/pci/if_wb.c#5 integrate .. //depot/projects/nsched/sys/powerpc/powerpc/pmap.c#9 integrate .. //depot/projects/nsched/sys/sys/kernel.h#3 integrate .. //depot/projects/nsched/sys/sys/proc.h#23 integrate .. //depot/projects/nsched/sys/sys/smp.h#3 integrate .. //depot/projects/nsched/sys/sys/systm.h#8 integrate .. //depot/projects/nsched/sys/vm/vm_object.c#6 integrate .. //depot/projects/nsched/sys/vm/vm_zeroidle.c#3 integrate Differences ... ==== //depot/projects/nsched/sys/alpha/conf/GENERIC#6 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.175 2004/08/27 15:16:21 andre Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.176 2004/08/28 21:42:15 wilko Exp $ machine alpha cpu EV4 @@ -41,7 +41,8 @@ options DEC_ST550 # Personal Workstation 433, 500, 600 options DEC_ST6600 # XP1000, DP264, DS20, DS10, family options DEC_1000A # AlphaServer 1000, 1000A, 800 -options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) +# TurboLaser support is broken +# options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) ==== //depot/projects/nsched/sys/alpha/conf/NOTES#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.154 2004/07/10 22:29:40 marcel Exp $ +# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.155 2004/08/28 21:47:24 wilko Exp $ # # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. @@ -36,7 +36,8 @@ options DEC_ST550 # Personal Workstation 433, 500, 600 options DEC_ST6600 # XP1000, DP264, DS20, DS10, family options DEC_1000A # AlphaServer 1000, 1000A, 800 -options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) +# TurboLaser support is broken +# options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) ==== //depot/projects/nsched/sys/alpha/pci/pcibus.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.34 2004/07/01 15:07:27 gallatin Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.35 2004/08/29 19:07:14 marcel Exp $"); #include "opt_isa.h" @@ -262,7 +262,7 @@ else if (flags & PCI_RF_BWX) va = ALPHAPCI_CVT_BWX(bus, rv->r_start); else - va = (void *) rv->r_start; /* maybe NULL? */ + va = (void *)ALPHA_PHYS_TO_K0SEG(rv->r_start); rman_set_virtual(rv, va); break; ==== //depot/projects/nsched/sys/amd64/amd64/mp_machdep.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.243 2004/08/23 21:39:28 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.244 2004/08/28 00:49:54 obrien Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -708,7 +708,7 @@ ncpu = mp_ncpus - 1; /* does not shootdown self */ if (ncpu < 1) return; /* no other cpus */ - mtx_assert(&smp_rv_mtx, MA_OWNED); + mtx_assert(&smp_ipi_mtx, MA_OWNED); smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; atomic_store_rel_int(&smp_tlb_wait, 0); @@ -794,7 +794,7 @@ if (ncpu < 1) return; } - mtx_assert(&smp_rv_mtx, MA_OWNED); + mtx_assert(&smp_ipi_mtx, MA_OWNED); smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; atomic_store_rel_int(&smp_tlb_wait, 0); ==== //depot/projects/nsched/sys/amd64/amd64/pmap.c#17 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.494 2004/08/27 19:06:16 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.495 2004/08/28 00:49:54 obrien Exp $"); /* * Manages physical address maps. @@ -631,7 +631,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_rv_mtx); + mtx_lock_spin(&smp_ipi_mtx); } else critical_enter(); /* @@ -652,7 +652,7 @@ smp_masked_invlpg(pmap->pm_active & other_cpus, va); } if (smp_started) - mtx_unlock_spin(&smp_rv_mtx); + mtx_unlock_spin(&smp_ipi_mtx); else critical_exit(); } @@ -667,7 +667,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_rv_mtx); + mtx_lock_spin(&smp_ipi_mtx); } else critical_enter(); /* @@ -691,7 +691,7 @@ sva, eva); } if (smp_started) - mtx_unlock_spin(&smp_rv_mtx); + mtx_unlock_spin(&smp_ipi_mtx); else critical_exit(); } @@ -705,7 +705,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_rv_mtx); + mtx_lock_spin(&smp_ipi_mtx); } else critical_enter(); /* @@ -726,7 +726,7 @@ smp_masked_invltlb(pmap->pm_active & other_cpus); } if (smp_started) - mtx_unlock_spin(&smp_rv_mtx); + mtx_unlock_spin(&smp_ipi_mtx); else critical_exit(); } ==== //depot/projects/nsched/sys/boot/common/Makefile.inc#2 (text+ko) ==== @@ -1,17 +1,18 @@ -# $FreeBSD: src/sys/boot/common/Makefile.inc,v 1.17 2004/02/07 11:05:10 ru Exp $ +# $FreeBSD: src/sys/boot/common/Makefile.inc,v 1.19 2004/08/29 00:48:41 iedowse Exp $ SRCS+= bcache.c boot.c commands.c console.c devopen.c interp.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c SRCS+= module.c panic.c .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -SRCS+= load_elf32.c load_elf64.c +SRCS+= load_elf32.c load_elf32_obj.c load_elf64.c load_elf64_obj.c +SRCS+= reloc_elf32.c reloc_elf64.c .endif .if ${MACHINE_ARCH} == "powerpc" -SRCS+= load_elf32.c +SRCS+= load_elf32.c reloc_elf32.c .endif .if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "alpha" -SRCS+= load_elf64.c +SRCS+= load_elf64.c reloc_elf64.c .endif .if defined(LOADER_NET_SUPPORT) ==== //depot/projects/nsched/sys/boot/common/bootstrap.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.38 2003/05/01 03:56:29 peter Exp $ + * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.41 2004/08/29 00:48:41 iedowse Exp $ */ #include @@ -76,6 +76,9 @@ void hexdump(caddr_t region, size_t len); size_t strlenout(vm_offset_t str); char *strdupout(vm_offset_t str); +void kern_bzero(vm_offset_t dest, size_t len); +int kern_pread(int fd, vm_offset_t dest, size_t len, off_t off); +void *alloc_pread(int fd, off_t off, size_t len); /* bcache.c */ int bcache_init(u_int nblks, size_t bsize); @@ -232,7 +235,19 @@ /* MI module loaders */ #ifdef __elfN +/* Relocation types. */ +#define ELF_RELOC_REL 1 +#define ELF_RELOC_RELA 2 + +struct elf_file; +typedef Elf_Addr (symaddr_fn)(struct elf_file *ef, Elf_Word symidx); + int __elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result); +int __elfN(obj_loadfile)(char *filename, u_int64_t dest, + struct preloaded_file **result); +int __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, + const void *reldata, int reltype, Elf_Addr relbase, + Elf_Addr dataaddr, void *data, size_t len); #endif /* ==== //depot/projects/nsched/sys/boot/common/load_elf.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.30 2004/03/11 10:07:24 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.32 2004/08/28 23:03:05 iedowse Exp $"); #include #include @@ -58,6 +58,8 @@ Elf_Hashelt nchains; Elf_Hashelt *buckets; Elf_Hashelt *chains; + Elf_Rel *rel; + size_t relsz; Elf_Rela *rela; size_t relasz; char *strtab; @@ -71,11 +73,10 @@ static int __elfN(loadimage)(struct preloaded_file *mp, elf_file_t ef, u_int64_t loadaddr); static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const char* name, Elf_Sym* sym); -#ifdef __sparc__ -static void __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, - void *p, void *val, size_t len); -#endif +static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, + Elf_Addr p, void *val, size_t len); static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef); +static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); const char *__elfN(kerneltype) = "elf kernel"; @@ -241,10 +242,8 @@ int ret; vm_offset_t firstaddr; vm_offset_t lastaddr; - void *buf; - size_t resid, chunk; + size_t chunk; ssize_t result; - vm_offset_t dest; Elf_Addr ssym, esym; Elf_Dyn *dp; Elf_Addr adp; @@ -305,14 +304,10 @@ phdr[i].p_vaddr + off, fpcopy); } if (phdr[i].p_filesz > fpcopy) { - if (lseek(ef->fd, (off_t)(phdr[i].p_offset + fpcopy), - SEEK_SET) == -1) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadexec: cannot seek\n"); - goto out; - } - if (archsw.arch_readin(ef->fd, phdr[i].p_vaddr + off + fpcopy, - phdr[i].p_filesz - fpcopy) != (ssize_t)(phdr[i].p_filesz - fpcopy)) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadexec: archsw.readin failed\n"); + if (kern_pread(ef->fd, phdr[i].p_vaddr + off + fpcopy, + phdr[i].p_filesz - fpcopy, phdr[i].p_offset + fpcopy) != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "_loadimage: read failed\n"); goto out; } } @@ -324,22 +319,8 @@ (long)(phdr[i].p_vaddr + off + phdr[i].p_memsz - 1)); #endif - /* no archsw.arch_bzero */ - buf = malloc(PAGE_SIZE); - if (buf == NULL) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: malloc() failed\n"); - goto out; - } - bzero(buf, PAGE_SIZE); - resid = phdr[i].p_memsz - phdr[i].p_filesz; - dest = phdr[i].p_vaddr + off + phdr[i].p_filesz; - while (resid > 0) { - chunk = min(PAGE_SIZE, resid); - archsw.arch_copyin(buf, dest, chunk); - resid -= chunk; - dest += chunk; - } - free(buf); + kern_bzero(phdr[i].p_vaddr + off + phdr[i].p_filesz, + phdr[i].p_memsz - phdr[i].p_filesz); } #ifdef ELF_VERBOSE printf("\n"); @@ -361,16 +342,10 @@ chunk = ehdr->e_shnum * ehdr->e_shentsize; if (chunk == 0 || ehdr->e_shoff == 0) goto nosyms; - shdr = malloc(chunk); - if (shdr == NULL) - goto nosyms; - if (lseek(ef->fd, (off_t)ehdr->e_shoff, SEEK_SET) == -1) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: cannot lseek() to section headers"); - goto nosyms; - } - result = read(ef->fd, shdr, chunk); - if (result < 0 || (size_t)result != chunk) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: read section headers failed"); + shdr = alloc_pread(ef->fd, ehdr->e_shoff, chunk); + if (shdr == NULL) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "_loadimage: failed to read section headers"); goto nosyms; } symtabindex = -1; @@ -507,6 +482,12 @@ case DT_SYMTAB: ef->symtab = (Elf_Sym*)(uintptr_t)(dp[i].d_un.d_ptr + off); break; + case DT_REL: + ef->rel = (Elf_Rel *)(uintptr_t)(dp[i].d_un.d_ptr + off); + break; + case DT_RELSZ: + ef->relsz = dp[i].d_un.d_val; + break; case DT_RELA: ef->rela = (Elf_Rela *)(uintptr_t)(dp[i].d_un.d_ptr + off); break; @@ -589,7 +570,7 @@ struct mod_version mver; Elf_Sym sym; char *s; - int modcnt, minfolen; + int error, modcnt, minfolen; Elf_Addr v, p, p_stop; if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0) @@ -602,25 +583,31 @@ modcnt = 0; while (p < p_stop) { COPYOUT(p, &v, sizeof(v)); -#ifdef __sparc64__ - __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v)); -#else - v += ef->off; -#endif + error = __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v)); + if (error == EOPNOTSUPP) + v += ef->off; + else if (error != 0) + return (error); #if defined(__i386__) && __ELF_WORD_SIZE == 64 COPYOUT(v, &md64, sizeof(md64)); + error = __elfN(reloc_ptr)(fp, ef, v, &md64, sizeof(md64)); + if (error == EOPNOTSUPP) { + md64.md_cval += ef->off; + md64.md_data += ef->off; + } else if (error != 0) + return (error); md.md_version = md64.md_version; md.md_type = md64.md_type; - md.md_cval = (const char *)(uintptr_t)(md64.md_cval + ef->off); - md.md_data = (void *)(uintptr_t)(md64.md_data + ef->off); + md.md_cval = (const char *)(uintptr_t)md64.md_cval; + md.md_data = (void *)(uintptr_t)md64.md_data; #else COPYOUT(v, &md, sizeof(md)); -#ifdef __sparc64__ - __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md)); -#else - md.md_cval += ef->off; - md.md_data += ef->off; -#endif + error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md)); + if (error == EOPNOTSUPP) { + md.md_cval += ef->off; + md.md_data += ef->off; + } else if (error != 0) + return (error); #endif p += sizeof(Elf_Addr); switch(md.md_type) { @@ -713,29 +700,53 @@ return ENOENT; } -#ifdef __sparc__ /* - * Apply any intra-module relocations to the value. *p is the load address + * Apply any intra-module relocations to the value. p is the load address * of the value and val/len is the value to be modified. This does NOT modify * the image in-place, because this is done by kern_linker later on. + * + * Returns EOPNOTSUPP if no relocation method is supplied. */ -static void +static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, - void *p, void *val, size_t len) + Elf_Addr p, void *val, size_t len) { - Elf_Addr off = (Elf_Addr)p - ef->off, word; size_t n; - Elf_Rela r; + Elf_Rela a; + Elf_Rel r; + int error; + + /* + * The kernel is already relocated, but we still want to apply + * offset adjustments. + */ + if (ef->kernel) + return (EOPNOTSUPP); + + for (n = 0; n < ef->relsz / sizeof(r); n++) { + COPYOUT(ef->rel + n, &r, sizeof(r)); - for (n = 0; n < ef->relasz / sizeof(r); n++) { - COPYOUT(ef->rela + n, &r, sizeof(r)); + error = __elfN(reloc)(ef, __elfN(symaddr), &r, ELF_RELOC_REL, + ef->off, p, val, len); + if (error != 0) + return (error); + } + for (n = 0; n < ef->relasz / sizeof(a); n++) { + COPYOUT(ef->rela + n, &a, sizeof(a)); - if (r.r_offset >= off && r.r_offset < off + len && - ELF_R_TYPE(r.r_info) == R_SPARC_RELATIVE) { - word = ef->off + r.r_addend; - bcopy(&word, (char *)val + (r.r_offset - off), - sizeof(word)); - } + error = __elfN(reloc)(ef, __elfN(symaddr), &a, ELF_RELOC_RELA, + ef->off, p, val, len); + if (error != 0) + return (error); } + + return (0); } -#endif + +static Elf_Addr +__elfN(symaddr)(struct elf_file *ef, Elf_Word symidx) +{ + + /* Symbol lookup by index not required here. */ + return (0); +} ==== //depot/projects/nsched/sys/boot/common/misc.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/common/misc.c,v 1.8 2003/08/25 23:30:41 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/misc.c,v 1.9 2004/08/28 14:57:34 iedowse Exp $"); #include #include @@ -93,6 +93,74 @@ return(result); } +/* Zero a region in kernel space. */ +void +kern_bzero(vm_offset_t dest, size_t len) +{ + char buf[256]; + size_t chunk, resid; + + bzero(buf, sizeof(buf)); + resid = len; + while (resid > 0) { + chunk = min(sizeof(buf), resid); + archsw.arch_copyin(buf, dest, chunk); + resid -= chunk; + dest += chunk; + } +} + +/* + * Read the specified part of a file to kernel space. Unlike regular + * pread, the file pointer is advanced to the end of the read data, + * and it just returns 0 if successful. + */ +int +kern_pread(int fd, vm_offset_t dest, size_t len, off_t off) +{ + ssize_t nread; + + if (lseek(fd, off, SEEK_SET) == -1) { + printf("\nlseek failed\n"); + return (-1); + } + nread = archsw.arch_readin(fd, dest, len); + if (nread != len) { + printf("\nreadin failed\n"); + return (-1); + } + return (0); +} + +/* + * Read the specified part of a file to a malloced buffer. The file + * pointer is advanced to the end of the read data. + */ +void * +alloc_pread(int fd, off_t off, size_t len) +{ + void *buf; + ssize_t nread; + + buf = malloc(len); + if (buf == NULL) { + printf("\nmalloc(%d) failed\n", (int)len); + return (NULL); + } + if (lseek(fd, off, SEEK_SET) == -1) { + printf("\nlseek failed\n"); + free(buf); + return (NULL); + } + nread = read(fd, buf, len); + if (nread != len) { + printf("\nread failed\n"); + free(buf); + return (NULL); + } + return (buf); +} + /* * Display a region in traditional hexdump format. */ ==== //depot/projects/nsched/sys/boot/i386/boot2/boot1.S#6 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.29 2004/08/05 06:00:05 kan Exp $ + * $FreeBSD: src/sys/boot/i386/boot2/boot1.S,v 1.30 2004/08/28 08:32:23 yar Exp $ */ /* Memory Locations */ @@ -269,7 +269,25 @@ * %dl - byte - drive number * stack - 10 bytes - EDD Packet */ -read: push %dx # Save +read: testb $FL_PACKET,%cs:MEM_REL+flags-start # LBA support enabled? + jz read.1 # No, use CHS + cmpb $0x80,%dl # Hard drive? + jb read.1 # No, use CHS + mov $0x55aa,%bx # Magic + push %dx # Save + movb $0x41,%ah # BIOS: Check + int $0x13 # extensions present + pop %dx # Restore + jc read.1 # If error, use CHS + cmp $0xaa55,%bx # Magic? + jne read.1 # No, so use CHS + testb $0x1,%cl # Packet interface? + jz read.1 # No, so use CHS + mov %bp,%si # Disk packet + movb $0x42,%ah # BIOS: Extended + int $0x13 # read + retw # To caller +read.1: push %dx # Save movb $0x8,%ah # BIOS: Get drive int $0x13 # parameters movb %dh,%ch # Max head number @@ -292,7 +310,7 @@ pop %dx # Restore cmpl $0x3ff,%eax # Cylinder number supportable? sti # Enable interrupts - ja read.7 # No, try EDD + ja ereturn # No, return an error xchgb %al,%ah # Set up cylinder rorb $0x2,%al # number orb %ch,%al # Merge @@ -328,24 +346,8 @@ read.5: shlb %bl # buffer add %bl,0x5(%bp) # pointer, sub %al,0x2(%bp) # block count - ja read # If not done + ja read.1 # If not done read.6: retw # To caller -read.7: testb $FL_PACKET,%cs:MEM_REL+flags-start # LBA support enabled? - jz ereturn # No, so return an error - mov $0x55aa,%bx # Magic - push %dx # Save - movb $0x41,%ah # BIOS: Check - int $0x13 # extensions present - pop %dx # Restore - jc return # If error, return an error - cmp $0xaa55,%bx # Magic? - jne ereturn # No, so return an error - testb $0x1,%cl # Packet interface? - jz ereturn # No, so return an error - mov %bp,%si # Disk packet - movb $0x42,%ah # BIOS: Extended - int $0x13 # read - retw # To caller /* Messages */ ==== //depot/projects/nsched/sys/boot/i386/libi386/elf32_freebsd.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf32_freebsd.c,v 1.13 2003/08/25 23:28:31 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf32_freebsd.c,v 1.14 2004/08/29 00:48:41 iedowse Exp $"); #include #include @@ -40,8 +40,10 @@ #include "btxv86.h" static int elf32_exec(struct preloaded_file *amp); +static int elf32_obj_exec(struct preloaded_file *amp); struct file_format i386_elf = { elf32_loadfile, elf32_exec }; +struct file_format i386_elf_obj = { elf32_obj_loadfile, elf32_obj_exec }; /* * There is an a.out kernel and one or more a.out modules loaded. @@ -74,3 +76,9 @@ panic("exec returned"); } + +static int +elf32_obj_exec(struct preloaded_file *fp) +{ + return (EFTYPE); +} ==== //depot/projects/nsched/sys/boot/i386/libi386/elf64_freebsd.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf64_freebsd.c,v 1.14 2003/08/25 23:28:31 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf64_freebsd.c,v 1.15 2004/08/29 00:48:41 iedowse Exp $"); #define __ELF_WORD_SIZE 64 #include @@ -41,8 +41,10 @@ #include "btxv86.h" static int elf64_exec(struct preloaded_file *amp); +static int elf64_obj_exec(struct preloaded_file *amp); struct file_format amd64_elf = { elf64_loadfile, elf64_exec }; +struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec }; #define PG_V 0x001 #define PG_RW 0x002 @@ -116,3 +118,9 @@ panic("exec returned"); } + +static int +elf64_obj_exec(struct preloaded_file *fp) +{ + return (EFTYPE); +} ==== //depot/projects/nsched/sys/boot/i386/loader/conf.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/loader/conf.c,v 1.24 2003/08/25 23:28:32 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/loader/conf.c,v 1.25 2004/08/29 00:48:42 iedowse Exp $"); #include #include @@ -83,11 +83,15 @@ * rather than reading the file go first. */ extern struct file_format i386_elf; +extern struct file_format i386_elf_obj; extern struct file_format amd64_elf; +extern struct file_format amd64_elf_obj; struct file_format *file_formats[] = { &i386_elf, + &i386_elf_obj, &amd64_elf, + &amd64_elf_obj, NULL }; ==== //depot/projects/nsched/sys/boot/i386/mbr/Makefile#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/i386/mbr/Makefile,v 1.13 2004/04/28 21:31:21 ru Exp $ +# $FreeBSD: src/sys/boot/i386/mbr/Makefile,v 1.14 2004/08/28 08:39:35 yar Exp $ PROG= mbr STRIP= @@ -6,8 +6,12 @@ NOMAN= SRCS= ${PROG}.s +# MBR flags: 0x80 -- try packet interface (also known as EDD or LBA) +BOOT_MBR_FLAGS?= 0x80 + ORG= 0x600 +AFLAGS+=--defsym FLAGS=${BOOT_MBR_FLAGS} LDFLAGS=-N -e start -Ttext ${ORG} -Wl,-S,--oformat,binary .include ==== //depot/projects/nsched/sys/boot/i386/mbr/mbr.s#2 (text+ko) ==== @@ -13,7 +13,7 @@ # purpose. # -# $FreeBSD: src/sys/boot/i386/mbr/mbr.s,v 1.6 2000/06/27 20:04:10 jhb Exp $ +# $FreeBSD: src/sys/boot/i386/mbr/mbr.s,v 1.7 2004/08/28 08:39:35 yar Exp $ # A 512 byte MBR boot manager that simply boots the active partition. @@ -21,6 +21,7 @@ .set EXEC,0x600 # Execution address .set PT_OFF,0x1be # Partition table .set MAGIC,0xaa55 # Magic: bootable + .set FL_PACKET,0x80 # Flag: try EDD .set NHRDRV,0x475 # Number of hard drives @@ -88,10 +89,8 @@ movb 0x1(%si),%dh # Load head movw 0x2(%si),%cx # Load cylinder:sector movw $LOAD,%bx # Transfer buffer - cmpb $0xff,%dh # Might we need to use LBA? - jnz main.7 # No. - cmpw $0xffff,%cx # Do we need to use LBA? - jnz main.7 # No. + testb $FL_PACKET,flags # Try EDD? + jz main.7 # No. pushw %cx # Save %cx pushw %bx # Save %bx movw $0x55aa,%bx # Magic @@ -151,7 +150,8 @@ msg_rd: .asciz "Error loading operating system" msg_os: .asciz "Missing operating system" - .org PT_OFF + .org PT_OFF-1,0x90 +flags: .byte FLAGS # Flags partbl: .fill 0x10,0x4,0x0 # Partition table .word MAGIC # Magic number ==== //depot/projects/nsched/sys/cam/scsi/scsi_da.c#5 (text+ko) ==== @@ -27,11 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.171 2004/08/12 23:17:09 sanpei Exp $"); - -#ifdef _KERNEL -#include "opt_hw_wdog.h" -#endif /* _KERNEL */ +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.172 2004/08/29 11:10:09 des Exp $"); #include ==== //depot/projects/nsched/sys/conf/NOTES#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1265 2004/08/27 15:46:16 andre Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1269 2004/08/29 15:03:06 ru Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -2177,12 +2177,6 @@ options BOOTP_WIRED_TO=fxp0 # Use interface fxp0 for BOOTP # -# Add tie-ins for a hardware watchdog. This only enables the hooks; -# the user must still supply the actual driver. -# -options HW_WDOG - -# # Add software watchdog routines. # options SW_WATCHDOG ==== //depot/projects/nsched/sys/conf/files#20 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.945 2004/08/27 15:16:21 andre Exp $ +# $FreeBSD: src/sys/conf/files,v 1.947 2004/08/29 11:26:36 des Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and ==== //depot/projects/nsched/sys/conf/kmod.mk#9 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $FreeBSD: src/sys/conf/kmod.mk,v 1.166 2004/08/14 23:53:04 marius Exp $ +# $FreeBSD: src/sys/conf/kmod.mk,v 1.167 2004/08/29 02:00:50 iedowse Exp $ # # The include file handles installing Kernel Loadable Device # drivers (KLD's). @@ -126,6 +126,9 @@ LDFLAGS+= -d -warn-common CFLAGS+= ${DEBUG_FLAGS} +.if ${MACHINE_ARCH} == amd64 +CFLAGS+= -fno-omit-frame-pointer +.endif OBJS+= ${SRCS:N*.h:R:S/$/.o/g} ==== //depot/projects/nsched/sys/conf/options#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.477 2004/08/27 15:16:21 andre Exp $ +# $FreeBSD: src/sys/conf/options,v 1.479 2004/08/29 11:10:09 des Exp $ # # On the handling of kernel options # @@ -85,7 +85,6 @@ GEOM_SUNLABEL opt_geom.h GEOM_UZIP opt_geom.h GEOM_VOL opt_geom.h -HW_WDOG KSTACK_MAX_PAGES KSTACK_PAGES KTRACE @@ -361,6 +360,7 @@ MBUF_STRESS_TEST opt_mbuf_stress_test.h NCP NETATALK opt_atalk.h +NET_WITH_GIANT opt_net.h PPP_BSDCOMP opt_ppp.h PPP_DEFLATE opt_ppp.h PPP_FILTER opt_ppp.h ==== //depot/projects/nsched/sys/dev/drm/radeon_drv.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ * Authors: * Gareth Hughes * - * $FreeBSD: src/sys/dev/drm/radeon_drv.c,v 1.9 2003/10/24 01:48:17 anholt Exp $ + * $FreeBSD: src/sys/dev/drm/radeon_drv.c,v 1.10 2004/08/29 07:49:53 ru Exp $ */ #include "dev/drm/radeon.h" @@ -58,7 +58,7 @@ #endif #ifdef __FreeBSD__ -DRIVER_MODULE(DRIVER_NAME, pci, DRM(driver), DRM(devclass), 0, 0); +DRIVER_MODULE(radeon, pci, DRM(driver), DRM(devclass), 0, 0); #elif defined(__NetBSD__) CFDRIVER_DECL(radeon, DV_TTY, NULL); #endif /* __FreeBSD__ */ ==== //depot/projects/nsched/sys/dev/firewire/fwcrom.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/firewire/fwcrom.c,v 1.11 2004/05/22 16:14:17 dfr Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/firewire/fwcrom.c,v 1.12 2004/08/29 13:45:55 simokawa Exp $"); #endif #include @@ -294,7 +294,7 @@ { struct csrreg *reg; struct csrdirectory *dir; - char *desc, st; + char *desc; uint16_t crc; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 30 20:58:28 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 682FE16A691; Mon, 30 Aug 2004 20:58:28 +0000 (GMT) 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 2523716A52A for ; Mon, 30 Aug 2004 20:58:28 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id EECF743D39 for ; Mon, 30 Aug 2004 20:58:27 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 18157 invoked from network); 30 Aug 2004 20:58:27 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 30 Aug 2004 20:58:27 -0000 Received: from [10.50.41.228] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i7UKvvMq045297; Mon, 30 Aug 2004 16:58:23 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Robert Watson Date: Mon, 30 Aug 2004 16:18:34 -0400 User-Agent: KMail/1.6.2 References: <200408252025.i7PKP4tq082945@repoman.freebsd.org> In-Reply-To: <200408252025.i7PKP4tq082945@repoman.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408301618.34659.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Perforce Change Reviews Subject: Re: PERFORCE change 60423 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, 30 Aug 2004 20:58:28 -0000 On Wednesday 25 August 2004 04:25 pm, Robert Watson wrote: > http://perforce.freebsd.org/chv.cgi?CH=60423 > > Change 60423 by rwatson@rwatson_tislabs on 2004/08/25 20:24:33 > > Integrate netperf_socket: > > - dwhite's SMP stability fix of happiness. > - ACPIage. > - ATA tweaks, md tweaks, GEOM tweaks, storage tweaks, driver tweaks, > etc. > > Netperf-related: > > - Loop back in6_prefix removal from gnn. > - Loop back removal of conditional socket buffer locking for socket > kqueue filters. > - Style tweakage for if_sl. > - curthread vs. thread0 use in nfs_timer.c cleaned up (some). > - Giant lock -> unlock in nfsrv_link() to correct Giant leakage. > - if_dc marked IFF_NEEDSGIANT. > - jhb pushes Giant acquisition down into kern_fcntl(), making > fcntl() variations in various ABIs MPSAFE. You should be able to put back your assertion that Giant isn't held in kern_fcntl() now FWIW. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-p4-projects@FreeBSD.ORG Mon Aug 30 21:59:09 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4CDBF16A4D0; Mon, 30 Aug 2004 21:59:09 +0000 (GMT) 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 E779F16A4CE for ; Mon, 30 Aug 2004 21:59:08 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF18243D49 for ; Mon, 30 Aug 2004 21:59:08 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7ULx84g029888 for ; Mon, 30 Aug 2004 21:59:08 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7ULx8ux029885 for perforce@freebsd.org; Mon, 30 Aug 2004 21:59:08 GMT (envelope-from peter@freebsd.org) Date: Mon, 30 Aug 2004 21:59:08 GMT Message-Id: <200408302159.i7ULx8ux029885@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60725 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, 30 Aug 2004 21:59:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=60725 Change 60725 by peter@peter_hammer on 2004/08/30 21:58:53 IFC @60724 Affected files ... .. //depot/projects/hammer/UPDATING#51 integrate .. //depot/projects/hammer/contrib/cpio/tar.c#2 integrate .. //depot/projects/hammer/etc/mtree/BSD.usr.dist#27 integrate .. //depot/projects/hammer/etc/network.subr#7 integrate .. //depot/projects/hammer/etc/rc.d/routed#9 integrate .. //depot/projects/hammer/lib/Makefile#40 integrate .. //depot/projects/hammer/lib/libc/gen/fts.3#7 integrate .. //depot/projects/hammer/release/Makefile#55 integrate .. //depot/projects/hammer/release/Makefile.inc.docports#10 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml#13 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#57 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#7 integrate .. //depot/projects/hammer/release/doc/share/misc/dev.archlist.txt#6 integrate .. //depot/projects/hammer/release/ia64/mkisoimages.sh#7 integrate .. //depot/projects/hammer/release/scripts/compat1x-install.sh#2 delete .. //depot/projects/hammer/release/scripts/compat20-install.sh#2 delete .. //depot/projects/hammer/release/scripts/compat21-install.sh#2 delete .. //depot/projects/hammer/release/scripts/compat22-install.sh#2 delete .. //depot/projects/hammer/release/scripts/compat3x-install.sh#2 delete .. //depot/projects/hammer/release/scripts/compat4x-install.sh#2 delete .. //depot/projects/hammer/sbin/geom/class/raid3/geom_raid3.c#4 integrate .. //depot/projects/hammer/sbin/geom/class/stripe/geom_stripe.c#7 integrate .. //depot/projects/hammer/sbin/geom/core/geom.c#3 integrate .. //depot/projects/hammer/sbin/ipfw/ipfw2.c#29 integrate .. //depot/projects/hammer/share/colldef/Makefile#15 integrate .. //depot/projects/hammer/share/examples/kld/cdev/module/cdevmod.c#4 integrate .. //depot/projects/hammer/share/examples/kld/dyn_sysctl/dyn_sysctl.c#2 integrate .. //depot/projects/hammer/share/examples/kld/syscall/module/syscall.c#2 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/ichwd.4#2 integrate .. //depot/projects/hammer/share/man/man4/re.4#7 integrate .. //depot/projects/hammer/share/man/man9/mbuf.9#17 integrate .. //depot/projects/hammer/share/misc/pci_vendors#11 integrate .. //depot/projects/hammer/share/mklocale/Makefile#13 integrate .. //depot/projects/hammer/share/monetdef/Makefile#14 integrate .. //depot/projects/hammer/share/msgdef/Makefile#14 integrate .. //depot/projects/hammer/share/msgdef/eu_ES.ISO8859-1.src#1 branch .. //depot/projects/hammer/share/msgdef/ru_RU.UTF-8.src#2 integrate .. //depot/projects/hammer/share/numericdef/Makefile#13 integrate .. //depot/projects/hammer/share/numericdef/eu_ES.ISO8859-1.src#1 branch .. //depot/projects/hammer/share/timedef/Makefile#15 integrate .. //depot/projects/hammer/share/timedef/eu_ES.ISO8859-1.src#1 branch .. //depot/projects/hammer/sys/alpha/conf/GENERIC#21 integrate .. //depot/projects/hammer/sys/alpha/conf/NOTES#7 integrate .. //depot/projects/hammer/sys/alpha/pci/pcibus.c#5 integrate .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#69 integrate .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#103 integrate .. //depot/projects/hammer/sys/boot/common/Makefile.inc#9 integrate .. //depot/projects/hammer/sys/boot/common/bootstrap.h#6 integrate .. //depot/projects/hammer/sys/boot/common/load_elf.c#15 integrate .. //depot/projects/hammer/sys/boot/common/load_elf32_obj.c#1 branch .. //depot/projects/hammer/sys/boot/common/load_elf64_obj.c#1 branch .. //depot/projects/hammer/sys/boot/common/load_elf_obj.c#1 branch .. //depot/projects/hammer/sys/boot/common/misc.c#3 integrate .. //depot/projects/hammer/sys/boot/common/reloc_elf.c#1 branch .. //depot/projects/hammer/sys/boot/common/reloc_elf32.c#1 branch .. //depot/projects/hammer/sys/boot/common/reloc_elf64.c#1 branch .. //depot/projects/hammer/sys/boot/i386/boot2/boot1.S#6 integrate .. //depot/projects/hammer/sys/boot/i386/libi386/elf32_freebsd.c#7 integrate .. //depot/projects/hammer/sys/boot/i386/libi386/elf64_freebsd.c#18 integrate .. //depot/projects/hammer/sys/boot/i386/loader/conf.c#8 integrate .. //depot/projects/hammer/sys/boot/i386/mbr/Makefile#5 integrate .. //depot/projects/hammer/sys/boot/i386/mbr/mbr.s#2 integrate .. //depot/projects/hammer/sys/cam/cam_periph.c#14 integrate .. //depot/projects/hammer/sys/cam/scsi/scsi_da.c#24 integrate .. //depot/projects/hammer/sys/conf/NOTES#62 integrate .. //depot/projects/hammer/sys/conf/files#79 integrate .. //depot/projects/hammer/sys/conf/kmod.mk#33 integrate .. //depot/projects/hammer/sys/conf/options#55 integrate .. //depot/projects/hammer/sys/dev/aic7xxx/ahc_isa.c#3 integrate .. //depot/projects/hammer/sys/dev/drm/radeon_drv.c#6 integrate .. //depot/projects/hammer/sys/dev/fdc/fdc_acpi.c#4 integrate .. //depot/projects/hammer/sys/dev/firewire/fwcrom.c#9 integrate .. //depot/projects/hammer/sys/dev/md/md.c#36 integrate .. //depot/projects/hammer/sys/dev/re/if_re.c#17 integrate .. //depot/projects/hammer/sys/dev/tga/tga_pci.c#7 integrate .. //depot/projects/hammer/sys/dev/usb/usbdi.c#9 integrate .. //depot/projects/hammer/sys/geom/concat/g_concat.c#11 integrate .. //depot/projects/hammer/sys/geom/geom_io.c#26 integrate .. //depot/projects/hammer/sys/geom/label/g_label.c#6 integrate .. //depot/projects/hammer/sys/geom/mirror/g_mirror.c#5 integrate .. //depot/projects/hammer/sys/geom/raid3/g_raid3.c#5 integrate .. //depot/projects/hammer/sys/geom/raid3/g_raid3_ctl.c#3 integrate .. //depot/projects/hammer/sys/geom/stripe/g_stripe.c#6 integrate .. //depot/projects/hammer/sys/i386/conf/NOTES#53 integrate .. //depot/projects/hammer/sys/i386/i386/mp_machdep.c#32 integrate .. //depot/projects/hammer/sys/i386/i386/pmap.c#51 integrate .. //depot/projects/hammer/sys/ia64/ia64/exception.S#5 integrate .. //depot/projects/hammer/sys/ia64/ia64/locore.S#4 integrate .. //depot/projects/hammer/sys/ia64/ia64/pmap.c#35 integrate .. //depot/projects/hammer/sys/ia64/ia64/support.S#5 integrate .. //depot/projects/hammer/sys/ia64/ia64/syscall.S#8 integrate .. //depot/projects/hammer/sys/kern/kern_conf.c#19 integrate .. //depot/projects/hammer/sys/kern/kern_kse.c#9 integrate .. //depot/projects/hammer/sys/kern/kern_shutdown.c#24 integrate .. //depot/projects/hammer/sys/kern/kern_switch.c#23 integrate .. //depot/projects/hammer/sys/kern/kern_thread.c#62 integrate .. //depot/projects/hammer/sys/kern/link_elf_obj.c#47 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#45 integrate .. //depot/projects/hammer/sys/kern/subr_bus.c#26 integrate .. //depot/projects/hammer/sys/kern/subr_smp.c#21 integrate .. //depot/projects/hammer/sys/modules/Makefile#52 integrate .. //depot/projects/hammer/sys/modules/aac/Makefile#4 integrate .. //depot/projects/hammer/sys/modules/cam/Makefile#8 integrate .. //depot/projects/hammer/sys/net/if.c#26 integrate .. //depot/projects/hammer/sys/net/if.h#12 integrate .. //depot/projects/hammer/sys/net/if_sl.c#19 integrate .. //depot/projects/hammer/sys/net/netisr.c#8 integrate .. //depot/projects/hammer/sys/netgraph/ng_socket.c#9 integrate .. //depot/projects/hammer/sys/netgraph/ng_tty.c#7 integrate .. //depot/projects/hammer/sys/netinet6/ipsec.c#12 integrate .. //depot/projects/hammer/sys/netipx/ipx.c#4 integrate .. //depot/projects/hammer/sys/pc98/pc98/wd.c#12 integrate .. //depot/projects/hammer/sys/pci/if_pcn.c#21 integrate .. //depot/projects/hammer/sys/pci/if_rlreg.h#12 integrate .. //depot/projects/hammer/sys/pci/if_sf.c#23 integrate .. //depot/projects/hammer/sys/pci/if_ste.c#28 integrate .. //depot/projects/hammer/sys/pci/if_ti.c#23 integrate .. //depot/projects/hammer/sys/pci/if_tl.c#18 integrate .. //depot/projects/hammer/sys/pci/if_wb.c#21 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/pmap.c#29 integrate .. //depot/projects/hammer/sys/sys/bio.h#14 integrate .. //depot/projects/hammer/sys/sys/kernel.h#10 integrate .. //depot/projects/hammer/sys/sys/param.h#45 integrate .. //depot/projects/hammer/sys/sys/proc.h#61 integrate .. //depot/projects/hammer/sys/sys/smp.h#8 integrate .. //depot/projects/hammer/sys/sys/systm.h#23 integrate .. //depot/projects/hammer/sys/vm/vm_object.c#42 integrate .. //depot/projects/hammer/sys/vm/vm_zeroidle.c#13 integrate .. //depot/projects/hammer/tools/tools/README#9 integrate .. //depot/projects/hammer/tools/tools/genericize/Makefile#1 branch .. //depot/projects/hammer/tools/tools/genericize/genericize.pl#1 branch .. //depot/projects/hammer/usr.bin/tar/write.c#11 integrate .. //depot/projects/hammer/usr.sbin/Makefile#52 integrate .. //depot/projects/hammer/usr.sbin/adduser/adduser.sh#7 integrate .. //depot/projects/hammer/usr.sbin/kgmon/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/kgmon/kgmon.c#3 integrate .. //depot/projects/hammer/usr.sbin/kldxref/ef.c#4 integrate .. //depot/projects/hammer/usr.sbin/kldxref/ef.h#4 integrate .. //depot/projects/hammer/usr.sbin/kldxref/ef_amd64.c#2 integrate .. //depot/projects/hammer/usr.sbin/kldxref/ef_i386.c#2 integrate .. //depot/projects/hammer/usr.sbin/kldxref/ef_nop.c#3 integrate .. //depot/projects/hammer/usr.sbin/kldxref/ef_obj.c#2 integrate .. //depot/projects/hammer/usr.sbin/kldxref/ef_sparc64.c#3 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/config.c#15 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/dispatch.c#4 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/dist.c#18 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/dist.h#8 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/install.c#22 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/menus.c#27 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/sysinstall.8#7 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/sysinstall.h#17 integrate Differences ... ==== //depot/projects/hammer/UPDATING#51 (text+ko) ==== @@ -23,6 +23,24 @@ developers choose to disable these features on build machines to maximize performance. +20040830: + A new variable, ifi_epoch, has been added to struct if_data + which is part if struct ifnet. This means all network drivers + and network monitoring applications need to be recompiled. + +20040828: + The default configuration for the network stack has been changed + such that it now runs without the Giant lock unless configured + otherwise. If you experience network-related instability, you + may wish to try setting "debug.mpsafenet=0" or compiling the + kernel with "options NET_WITH_GIANT". Details on the netperf + project may be found at: + + http://www.watson.org/~robert/freebsd/netperf/ + + Including the 20040828 announcement of configuration change + details. + 20040827: PFIL_HOOKS are a fixed part of the network stack now and do not need to be specified in the kernel configuration file anymore. @@ -1803,4 +1821,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.350 2004/08/27 15:16:24 andre Exp $ +$FreeBSD: src/UPDATING,v 1.352 2004/08/30 06:29:25 brooks Exp $ ==== //depot/projects/hammer/contrib/cpio/tar.c#2 (text+ko) ==== @@ -15,6 +15,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* $FreeBSD: src/contrib/cpio/tar.c,v 1.2 2004/08/28 03:13:05 kientzle Exp $ */ + #include #include #include @@ -343,6 +345,19 @@ else file_hdr->c_mode |= CP_IFREG; break; + case 'x': case 'g': + /* Ignore pax 'x' and 'g' extension entries. */ + /* Skip body of this entry. */ + while (file_hdr->c_filesize > 0) { + tape_buffered_read(((char *) &tar_rec), in_des, TARRECORDSIZE); + if (file_hdr->c_filesize > TARRECORDSIZE) + file_hdr->c_filesize -= TARRECORDSIZE; + else + file_hdr->c_filesize = 0; + } + /* Read next header and return that instead. */ + read_in_tar_header(file_hdr, in_des); + break; } break; } ==== //depot/projects/hammer/etc/mtree/BSD.usr.dist#27 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.305 2004/08/24 19:03:55 ru Exp $ +# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.306 2004/08/28 12:52:30 tjr Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -441,6 +441,12 @@ .. et_EE.UTF-8 .. + eu_ES.ISO8859-1 + .. + eu_ES.ISO8859-15 + .. + eu_ES.UTF-8 + .. fi_FI.ISO8859-1 .. fi_FI.ISO8859-15 ==== //depot/projects/hammer/etc/network.subr#7 (text+ko) ==== @@ -22,7 +22,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/network.subr,v 1.155 2004/08/27 12:11:47 yar Exp $ +# $FreeBSD: src/etc/network.subr,v 1.156 2004/08/28 07:58:02 yar Exp $ # # @@ -258,7 +258,9 @@ # 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. +# Note that the list will include cloned interfaces if applicable. +# Cloned interfaces must already exist to have a chance to appear +# in the list if ${network_interfaces} is set to `auto'. # list_net_interfaces() { @@ -271,10 +273,9 @@ _tmplist="`ifconfig -l`" ;; *) - _tmplist="${network_interfaces}" + _tmplist="${network_interfaces} ${cloned_interfaces}" ;; esac - _tmplist="${_tmplist} ${cloned_interfaces}" if [ -z "$type" ]; then echo $_tmplist ==== //depot/projects/hammer/etc/rc.d/routed#9 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # # $NetBSD: routed,v 1.7 2002/03/22 04:34:00 thorpej Exp $ -# $FreeBSD: src/etc/rc.d/routed,v 1.10 2004/03/08 12:25:05 pjd Exp $ +# $FreeBSD: src/etc/rc.d/routed,v 1.11 2004/08/29 15:02:43 kensmith Exp $ # # PROVIDE: routed @@ -19,5 +19,5 @@ load_rc_config $name rcvar="router_enable" command="${router:-/sbin/${name}}" -eval ${name}_flags=${router_flags} +eval ${name}_flags=\"${router_flags}\" run_rc_command "$1" ==== //depot/projects/hammer/lib/Makefile#40 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/Makefile,v 1.190 2004/08/19 23:51:42 davidxu Exp $ +# $FreeBSD: src/lib/Makefile,v 1.191 2004/08/29 18:26:59 obrien Exp $ # To satisfy shared library or ELF linkage when only the libraries being # built are visible: @@ -24,7 +24,7 @@ SUBDIR= ${_csu} libcom_err libcrypt libkvm msun libmd libncurses \ libnetgraph libradius librpcsvc libsbuf libtacplus libutil \ - ${_libypclnt} ${_compat} libalias libarchive ${_libatm} ${_libbind} \ + ${_libypclnt} libalias libarchive ${_libatm} ${_libbind} \ ${_libbluetooth} libbsnmp libbz2 libc ${_libc_r} \ libcalendar libcam libcompat libdevinfo libdevstat ${_libdisk} \ libedit libexpat libfetch libform libftpio libgeom ${_libio} libipsec \ @@ -57,7 +57,6 @@ .endif .if ${MACHINE_ARCH} == "i386" -_compat= compat _libncp= libncp _libsmb= libsmb _libvgl= libvgl @@ -74,7 +73,6 @@ .if ${MACHINE_ARCH} == "alpha" _libio= libio -_compat= compat .endif .if !defined(NO_SENDMAIL) ==== //depot/projects/hammer/lib/libc/gen/fts.3#7 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)fts.3 8.5 (Berkeley) 4/16/94 -.\" $FreeBSD: src/lib/libc/gen/fts.3,v 1.20 2004/07/02 23:52:10 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/fts.3,v 1.21 2004/08/29 06:39:58 tjr Exp $ .\" .Dd September 15, 2002 .Dt FTS 3 @@ -778,6 +778,7 @@ .Xr find 1 , .Xr chdir 2 , .Xr stat 2 , +.Xr ftw 3 , .Xr qsort 3 .Sh HISTORY The ==== //depot/projects/hammer/release/Makefile#55 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/release/Makefile,v 1.856 2004/08/26 19:15:19 ru Exp $ +# $FreeBSD: src/release/Makefile,v 1.857 2004/08/29 18:26:59 obrien Exp $ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ # [RELEASETAG=tag] @@ -153,14 +153,9 @@ # Things which without too much trouble can be considered variables # BASE_DISTS are special in that they get full /etc installation sets. # -.if ${TARGET_ARCH} == "i386" -COMPAT_DISTS?= compat1x compat20 compat21 compat22 compat3x compat4x -.elif ${TARGET_ARCH} == "alpha" -COMPAT_DISTS?= compat4x -.endif OTHER_DISTS?= catpages manpages games proflibs dict info doc BASE_DISTS?= base -DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} +DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS} # mountpoint for filesystems. MNT= /mnt @@ -601,7 +596,7 @@ # Remove all the directories we don't need. -cd ${RD}/trees && \ - find ${OTHER_DISTS} ${COMPAT_DISTS} -depth -type d -print | xargs rmdir + find ${OTHER_DISTS} -depth -type d -print | xargs rmdir touch ${.TARGET} # ==== //depot/projects/hammer/release/Makefile.inc.docports#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/release/Makefile.inc.docports,v 1.24 2004/07/12 10:12:51 murray Exp $ +# $FreeBSD: src/release/Makefile.inc.docports,v 1.25 2004/08/30 06:19:34 ru Exp $ # # List of (dependent) ports that are minimally required to be # checked out from CVS in order to get ${DOCPORTS} built and @@ -45,6 +45,7 @@ ports/graphics/scr2png \ ports/graphics/tiff \ ports/lang/perl5 \ + ports/lang/perl5.8 \ ports/print/freetype2 \ ports/print/ghostscript-gnu \ ports/print/ghostscript-gnu-nox11 \ ==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/alpha/proc-alpha.sgml#13 (text+ko) ==== @@ -1,4 +1,4 @@ - + @@ -1075,10 +1075,12 @@ 164LX and 164SX with SRM firmware version 5.8 or later can boot from Adaptec 2940-series adapters. A test with an Adaptec 3940UW - showed that that one is not supported however. + showed that that one is not supported however. 164SX SRM recognises + Intel 8255x Ethernet cards which show up as eia. Using such a + NIC allows network booting. - In summary: this family of machines is blessed with a - challenging compatibility as far as SCSI adapters go. + In summary: this family of machines is blessed with + a challenging compatibility as far as SCSI adapters go. On 164SX you can have a maximum of 1 Gbyte of RAM. 4 regular (PC100 or PC133) 256MB DIMMs are reported to work just fine. Whether ==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#57 (text+ko) ==== @@ -29,7 +29,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.236 2004/08/27 19:59:28 simon Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.238 2004/08/28 15:14:03 simon Exp $ Supported Devices @@ -302,12 +302,6 @@ - Seagate ST01/02 SCSI controllers - - - Future Domain 8xx/950 series SCSI controllers - - WD7000 SCSI controller @@ -1114,6 +1108,10 @@ Audio Devices + &hwlist.snd.ad1816; + &hwlist.snd.cs4281; + &hwlist.snd.solo; + Advance (&man.sbc.4; driver) @@ -1125,13 +1123,7 @@ - CMedia sound chips - - - CMI8338/CMI8738 - - - + &hwlist.snd.cmi; Crystal Semiconductor (&man.csa.4; driver) @@ -1144,13 +1136,7 @@ - ENSONIQ (&man.pcm.4; driver) - - - AudioPCI ES1370/1371 - - - + &hwlist.snd.es137x; ESS @@ -1221,23 +1207,13 @@ - Creative Technologies Sound Blaster Live! series - (emu10k1 driver) + &hwlist.snd.emu10k1; Trident 4DWave DX/NX (&man.pcm.4; driver) VIA Technologies VT82C686A - Yamaha - - - DS1 - - - DS1e - - - + &hwlist.snd.ds1; NEC PC-9801-73, 86 and compatibles (nss driver) ==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/installation/common/trouble.sgml#7 (text+ko) ==== @@ -1,5 +1,5 @@ @@ -203,8 +203,10 @@ from working. - Use the UserConfig utility (see - HARDWARE.TXT) and disable the probing + Set the hints + hint.mcd.0.disabled="1" and + hint.mcd.1.disabled="1" + in the third stage boot loader to disable the probing of the mcd0 and mcd1 devices. Generally speaking, you should only leave the devices that you will be using @@ -218,16 +220,17 @@ Your card is probably on a different IRQ from what is - specified in the kernel configuration. The ed driver does + specified in the /boot/device.hints file. The ed driver does not use the `soft' configuration by default (values entered using EZSETUP in DOS), but it will use the software - configuration if you specify ? in the IRQ field of your - kernel config file. + configuration if you specify -1 in the hints + for the interface. Either move the jumper on the card to a hard configuration setting (altering the kernel settings if - necessary), or specify the IRQ as -1 in UserConfig or ? - in your kernel config file. This will tell the kernel to + necessary), or specify the IRQ as -1 + by setting the hint hint.ed.0.irq="-1" + This will tell the kernel to use the soft configuration. Another possibility is that your card is at IRQ 9, @@ -244,9 +247,9 @@ Older IBM laptops use a non-standard keyboard controller, so you must tell the keyboard driver (atkbd0) to - go into a special mode which works on the ThinkPads. Change - the atkbd0 'Flags' to 0x4 in UserConfig and it should work - fine. (Look in the Input Menu for 'Keyboard'.) + go into a special mode which works on the ThinkPads. Set the + hint hint.atkbd.0.flags="4" and it should work + fine. @@ -268,23 +271,8 @@ This is a known problem, and will hopefully be fixed in the future. In order to get your system installed at - all, boot with the option into - UserConfig, but don't use the pretty - visual mode but the plain old CLI mode. Type: - - eisa 12 -quit - - at the prompt. (Instead of `quit', you might also - type `visual', and continue the rest of the configuration - session in visual mode.) While it's recommended to compile - a custom kernel, dset now also understands to save - this value. - - Refer to the FAQ topic 5.3 for an explanation of the - problem, and for how to continue. Remember that you can - find the FAQ on your local system in /usr/share/doc/FAQ, - provided you have installed the `doc' distribution. + all, set the hint hw.eisa_slots="12" in the + third stage loader. @@ -297,16 +285,7 @@ Your machine doesn't like the new i586_copyout and i586_copyin code for some reason. To - disable this, boot the installation boot floppy and when it - comes to the very first menu (the choice to drop into kernel - UserConfig mode or not) choose the command-line interface - (expert mode) version and type the following - at it: - - flags npx0 1 - - Then proceed normally to boot. This will be saved - into your kernel, so you only need to do it once. + disable this, set the hint hint.npx.0.flags="1" @@ -328,8 +307,8 @@ With Compaq being always a little different from other systems, they do not announce their floppy drive in the CMOS RAM of an Aero notebook. Therefore, the floppy disk driver - assumes there is no drive configured. Go to the UserConfig - screen, and set the Flags value of the fdc0 device to 0x1. + assumes there is no drive configured. Set the hint + hint.fdc.0.flags="1" This pretends the existence of the first floppy drive (as a 1.44 MB drive) to the driver without asking the CMOS at all. ==== //depot/projects/hammer/release/doc/share/misc/dev.archlist.txt#6 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.14 2004/08/27 19:59:29 simon Exp $ +# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.15 2004/08/27 22:58:29 simon Exp $ # # @@ -79,6 +79,13 @@ rue i386,pc98,amd64 sf i386,pc98,alpha,amd64 sk i386,pc98,alpha,amd64 +snd_ad1816 i386,amd64 +snd_cmi i386,amd64 +snd_cs4281 i386,amd64 +snd_ds1 i386,amd64 +snd_emu10k1 i386,amd64 +snd_es137x i386,amd64 +snd_solo i386,amd64 stg i386,pc98 sym i386,pc98,alpha,sparc64,amd64 trm i386,amd64 ==== //depot/projects/hammer/release/ia64/mkisoimages.sh#7 (text+ko) ==== @@ -4,7 +4,7 @@ # Author: Jordan K Hubbard # Date: 22 June 2001 # -# $FreeBSD: src/release/ia64/mkisoimages.sh,v 1.9 2004/08/10 05:43:40 marcel Exp $ +# $FreeBSD: src/release/ia64/mkisoimages.sh,v 1.10 2004/08/29 19:52:33 marcel Exp $ # # This script is used by release/Makefile to build the (optional) ISO images # for a FreeBSD release. It is considered architecture dependent since each @@ -76,6 +76,7 @@ mkdir -p $MNT/efi/boot $MNT/boot $MNT/boot/kernel cp -R $BASE/boot/defaults $MNT/boot cp $BASE/boot/kernel/kernel $MNT/boot/kernel + cp $BASE/boot/kernel/ispfw.ko $MNT/boot/kernel cp $BASE/boot/device.hints $MNT/boot cp $BASE/boot/loader.* $MNT/boot cp $BASE/boot/mfsroot.gz $MNT/boot ==== //depot/projects/hammer/sbin/geom/class/raid3/geom_raid3.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/class/raid3/geom_raid3.c,v 1.4 2004/08/22 16:21:12 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/class/raid3/geom_raid3.c,v 1.5 2004/08/28 02:34:10 pjd Exp $"); #include #include @@ -149,8 +149,8 @@ char param[16]; int *hardcode, *nargs, *noautosync, *round_robin, *verify; int error, i; - unsigned sectorsize; - off_t mediasize; + unsigned sectorsize, ssize; + off_t mediasize, msize; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -222,9 +222,6 @@ mediasize = 0; sectorsize = 0; for (i = 1; i < *nargs; i++) { - unsigned ssize; - off_t msize; - snprintf(param, sizeof(param), "arg%u", i); str = gctl_get_asciiparam(req, param); @@ -268,6 +265,13 @@ snprintf(param, sizeof(param), "arg%u", i); str = gctl_get_asciiparam(req, param); + msize = g_get_mediasize(str) - g_get_sectorsize(str); + if (mediasize < msize) { + fprintf(stderr, + "warning: %s: only %jd bytes from %jd bytes used.\n", + str, (intmax_t)mediasize, (intmax_t)msize); + } + md.md_no = i - 1; if (!*hardcode) bzero(md.md_provider, sizeof(md.md_provider)); ==== //depot/projects/hammer/sbin/geom/class/stripe/geom_stripe.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/class/stripe/geom_stripe.c,v 1.6 2004/08/09 11:29:41 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/class/stripe/geom_stripe.c,v 1.7 2004/08/28 02:49:28 pjd Exp $"); #include #include @@ -127,10 +127,11 @@ { struct g_stripe_metadata md; intmax_t *stripesizep; + off_t compsize, msize; u_char sector[512]; + unsigned i, ssize; const char *name; char param[16]; - unsigned i; int *hardcode, *nargs, error; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); @@ -151,10 +152,22 @@ /* * Clear last sector first to spoil all components if device exists. */ + compsize = 0; for (i = 1; i < (unsigned)*nargs; i++) { snprintf(param, sizeof(param), "arg%u", i); name = gctl_get_asciiparam(req, param); + msize = g_get_mediasize(name); + ssize = g_get_sectorsize(name); + if (msize == 0 || ssize == 0) { + gctl_error(req, "Can't get informations about %s: %s.", + name, strerror(errno)); + return; + } + msize -= ssize; + if (compsize == 0 || (compsize > 0 && msize < compsize)) + compsize = msize; + error = g_metadata_clear(name, NULL); if (error != 0) { gctl_error(req, "Can't store metadata on %s: %s.", name, @@ -187,6 +200,13 @@ snprintf(param, sizeof(param), "arg%u", i); name = gctl_get_asciiparam(req, param); + msize = g_get_mediasize(name) - g_get_sectorsize(name); + if (compsize < msize) { + fprintf(stderr, + "warning: %s: only %jd bytes from %jd bytes used.\n", + name, (intmax_t)compsize, (intmax_t)msize); + } + md.md_no = i - 1; if (!*hardcode) bzero(md.md_provider, sizeof(md.md_provider)); ==== //depot/projects/hammer/sbin/geom/core/geom.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/core/geom.c,v 1.6 2004/08/02 09:05:29 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/core/geom.c,v 1.7 2004/08/28 02:29:40 pjd Exp $"); #include #include @@ -420,8 +420,10 @@ } if (errstr != NULL) { fprintf(stderr, "%s\n", errstr); - gctl_free(req); - exit(EXIT_FAILURE); + if (strncmp(errstr, "warning: ", strlen("warning: ")) != 0) { + gctl_free(req); + exit(EXIT_FAILURE); + } } if (*buf != '\0') printf("%s", buf); @@ -460,8 +462,8 @@ } if (*lib_version != G_LIB_VERSION) { dlclose(dlh); - errx(EXIT_FAILURE, "%s and %s are not synchronized.", comm, - path); + errx(EXIT_FAILURE, "%s and %s are not synchronized.", + getprogname(), path); } version = dlsym(dlh, "version"); if (version == NULL) { ==== //depot/projects/hammer/sbin/ipfw/ipfw2.c#29 (text+ko) ==== @@ -17,7 +17,7 @@ * * NEW command line interface for IP firewall facility * - * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.55 2004/08/23 19:20:27 pjd Exp $ + * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.56 2004/08/29 08:25:02 maxim Exp $ */ #include @@ -2781,6 +2781,7 @@ * various flags used to record that we entered some fields. */ ipfw_insn *have_state = NULL; /* check-state or keep-state */ + size_t len; int i; @@ -2962,6 +2963,12 @@ errx(EX_DATAERR, "logamount must be positive"); c->max_log = l; ac--; av++; + } else { + len = sizeof(c->max_log); + if (sysctlbyname("net.inet.ip.fw.verbose_limit", + &c->max_log, &len, NULL, 0) == -1) + errx(1, "sysctlbyname(\"%s\")", + "net.inet.ip.fw.verbose_limit"); } cmd = next_cmd(cmd); } ==== //depot/projects/hammer/share/colldef/Makefile#15 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/colldef/Makefile,v 1.66 2004/04/21 15:28:22 tjr Exp $ +# $FreeBSD: src/share/colldef/Makefile,v 1.67 2004/08/28 12:52:30 tjr Exp $ # NOMAN=YES @@ -50,14 +50,15 @@ DELINKS= de_AT de_CH ZHLINKS= zh_TW.Big5 -LATIN1LINKS= af_ZA da_DK en_AU en_CA en_GB en_NZ en_US fi_FI \ +LATIN1LINKS= af_ZA da_DK en_AU en_CA en_GB en_NZ en_US eu_ES fi_FI \ fr_BE fr_CA fr_CH fr_FR it_CH it_IT nl_BE nl_NL no_NO \ pt_PT LATIN2LINKS= hr_HR hu_HU ro_RO sr_YU UTF8LINKS= af_ZA be_BY bg_BG ca_ES cs_CZ da_DK de_AT de_CH de_DE el_GR \ - en_AU en_CA en_GB en_IE en_NZ en_US es_ES et_EE fi_FI fr_BE \ + en_AU en_CA en_GB en_IE en_NZ en_US es_ES et_EE eu_ES fi_FI \ + fr_BE \ fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM is_IS it_CH it_IT \ ja_JP kk_KZ ko_KR lt_LT nl_BE nl_NL no_NO pl_PL pt_BR pt_PT \ ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE tr_TR uk_UA zh_CN zh_HK \ ==== //depot/projects/hammer/share/examples/kld/cdev/module/cdevmod.c#4 (text+ko) ==== @@ -65,7 +65,7 @@ * SUCH DAMAGE. * * - * $FreeBSD: src/share/examples/kld/cdev/module/cdevmod.c,v 1.6 2004/07/16 06:55:34 tjr Exp $ + * $FreeBSD: src/share/examples/kld/cdev/module/cdevmod.c,v 1.7 2004/08/30 09:49:58 pjd Exp $ */ #include #include @@ -134,7 +134,7 @@ break; /* Success*/ default: /* we only understand load/unload*/ - err = EINVAL; + err = EOPNOTSUPP; break; } ==== //depot/projects/hammer/share/examples/kld/dyn_sysctl/dyn_sysctl.c#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/share/examples/kld/dyn_sysctl/dyn_sysctl.c,v 1.2 2001/02/10 22:36:05 abial Exp $ + * $FreeBSD: src/share/examples/kld/dyn_sysctl/dyn_sysctl.c,v 1.3 2004/08/30 09:49:58 pjd Exp $ */ #include @@ -153,7 +153,7 @@ printf("Ok\n"); break; default : - error = EINVAL; + error = EOPNOTSUPP; break; } return error; ==== //depot/projects/hammer/share/examples/kld/syscall/module/syscall.c#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/share/examples/kld/syscall/module/syscall.c,v 1.3 2001/11/13 07:42:30 arr Exp $ + * $FreeBSD: src/share/examples/kld/syscall/module/syscall.c,v 1.4 2004/08/30 09:49:59 pjd Exp $ */ #include @@ -77,7 +77,7 @@ printf ("syscall unloaded from %d\n", offset); break; default : - error = EINVAL; + error = EOPNOTSUPP; break; } return error; ==== //depot/projects/hammer/share/man/man4/man4.i386/ichwd.4#2 (text+ko) ==== @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/man4.i386/ichwd.4,v 1.2 2004/05/11 20:47:17 des Exp $ +.\" $FreeBSD: src/share/man/man4/man4.i386/ichwd.4,v 1.3 2004/08/29 11:19:35 des Exp $ .\" .Dd May 11, 2004 .Dt ICHWD 4 i386 @@ -59,6 +59,11 @@ .%R Intel Application Note AP-725 .%O Document Number 292273-001 .Re +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 5.3 . .Sh AUTHORS .An -nosplit The @@ -69,8 +74,3 @@ .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . This manual page was written by .An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . -.Sh HISTORY -The -.Nm -driver appeared in -.Fx 5.3 . ==== //depot/projects/hammer/share/man/man4/re.4#7 (text+ko) ==== @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/re.4,v 1.6 2004/07/08 12:21:51 ru Exp $ +.\" $FreeBSD: src/share/man/man4/re.4,v 1.7 2004/08/28 10:59:02 sanpei Exp $ .\" .Dd September 4, 2003 .Dt RE 4 @@ -52,6 +52,8 @@ .It Compaq Evo N1015v Integrated Ethernet (8139C+) >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Aug 30 22:45:06 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 156E116A4D0; Mon, 30 Aug 2004 22:45:06 +0000 (GMT) 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 DEF3816A4CE for ; Mon, 30 Aug 2004 22:45:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C091A43D49 for ; Mon, 30 Aug 2004 22:45:05 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7UMj5YP031360 for ; Mon, 30 Aug 2004 22:45:05 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7UMj5gr031357 for perforce@freebsd.org; Mon, 30 Aug 2004 22:45:05 GMT (envelope-from peter@freebsd.org) Date: Mon, 30 Aug 2004 22:45:05 GMT Message-Id: <200408302245.i7UMj5gr031357@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60729 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, 30 Aug 2004 22:45:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=60729 Change 60729 by peter@peter_daintree on 2004/08/30 22:44:21 fix mismerge Affected files ... .. //depot/projects/hammer/sys/amd64/conf/NOTES#45 edit Differences ... ==== //depot/projects/hammer/sys/amd64/conf/NOTES#45 (text+ko) ==== @@ -5,7 +5,7 @@ # machine independent notes, look in /sys/conf/NOTES. # # (XXX from i386:NOTES,v 1.1170) -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.18 2004/08/16 12:39:27 tjr Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.19 2004/08/27 21:29:20 arved Exp $ # # From owner-p4-projects@FreeBSD.ORG Mon Aug 30 23:10:40 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 607E016A4D0; Mon, 30 Aug 2004 23:10:40 +0000 (GMT) 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 072A616A4CE for ; Mon, 30 Aug 2004 23:10:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D426843D2D for ; Mon, 30 Aug 2004 23:10:39 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7UNAdiV032578 for ; Mon, 30 Aug 2004 23:10:39 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7UNAdih032575 for perforce@freebsd.org; Mon, 30 Aug 2004 23:10:39 GMT (envelope-from peter@freebsd.org) Date: Mon, 30 Aug 2004 23:10:39 GMT Message-Id: <200408302310.i7UNAdih032575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60735 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, 30 Aug 2004 23:10:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=60735 Change 60735 by peter@peter_daintree on 2004/08/30 23:09:52 IFC @60734 Affected files ... .. //depot/projects/hammer/sbin/geom/class/raid3/geom_raid3.c#5 integrate .. //depot/projects/hammer/sbin/sysctl/sysctl.c#13 integrate .. //depot/projects/hammer/sys/coda/coda_fbsd.c#12 integrate .. //depot/projects/hammer/sys/coda/coda_psdev.c#9 integrate .. //depot/projects/hammer/sys/coda/coda_vfsops.c#10 integrate .. //depot/projects/hammer/sys/conf/Makefile.alpha#7 integrate .. //depot/projects/hammer/sys/conf/Makefile.amd64#15 integrate .. //depot/projects/hammer/sys/conf/Makefile.arm#2 integrate .. //depot/projects/hammer/sys/conf/Makefile.i386#5 integrate .. //depot/projects/hammer/sys/conf/Makefile.ia64#7 integrate .. //depot/projects/hammer/sys/conf/Makefile.pc98#5 integrate .. //depot/projects/hammer/sys/conf/Makefile.powerpc#8 integrate .. //depot/projects/hammer/sys/conf/Makefile.sparc64#6 integrate .. //depot/projects/hammer/sys/conf/NOTES#63 integrate .. //depot/projects/hammer/sys/conf/files#80 integrate .. //depot/projects/hammer/sys/conf/files.pc98#35 integrate .. //depot/projects/hammer/sys/conf/options#56 integrate .. //depot/projects/hammer/sys/conf/options.pc98#26 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_thermal.c#18 integrate .. //depot/projects/hammer/sys/i386/conf/NOTES#54 integrate .. //depot/projects/hammer/sys/i4b/driver/i4b_ing.c#9 integrate .. //depot/projects/hammer/sys/i4b/driver/i4b_ipr.c#11 integrate .. //depot/projects/hammer/sys/i4b/driver/i4b_isppp.c#9 integrate .. //depot/projects/hammer/sys/i4b/driver/i4b_rbch.c#9 integrate .. //depot/projects/hammer/sys/i4b/driver/i4b_tel.c#9 integrate .. //depot/projects/hammer/sys/i4b/driver/i4b_trace.c#10 integrate .. //depot/projects/hammer/sys/i4b/layer4/i4b_i4bdrv.c#9 integrate .. //depot/projects/hammer/sys/i4b/layer4/i4b_l4.c#5 integrate .. //depot/projects/hammer/sys/pc98/conf/GENERIC#24 integrate .. //depot/projects/hammer/sys/pc98/pc98/atapi.c#4 integrate .. //depot/projects/hammer/sys/pc98/pc98/wd.c#13 integrate .. //depot/projects/hammer/usr.sbin/config/config.h#6 integrate .. //depot/projects/hammer/usr.sbin/config/config.y#7 integrate .. //depot/projects/hammer/usr.sbin/config/configvers.h#4 integrate .. //depot/projects/hammer/usr.sbin/config/lang.l#6 integrate .. //depot/projects/hammer/usr.sbin/config/mkheaders.c#6 integrate .. //depot/projects/hammer/usr.sbin/config/mkmakefile.c#9 integrate Differences ... ==== //depot/projects/hammer/sbin/geom/class/raid3/geom_raid3.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/class/raid3/geom_raid3.c,v 1.5 2004/08/28 02:34:10 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/class/raid3/geom_raid3.c,v 1.6 2004/08/30 22:08:00 pjd Exp $"); #include #include @@ -280,6 +280,13 @@ str += strlen(_PATH_DEV); strlcpy(md.md_provider, str, sizeof(md.md_provider)); } + if (*verify && md.md_no == md.md_all - 1) { + /* + * In "verify" mode, force synchronization of parity + * component on start. + */ + md.md_syncid = 0; + } raid3_metadata_encode(&md, sector); error = g_metadata_store(str, sector, sizeof(sector)); if (error != 0) { ==== //depot/projects/hammer/sbin/sysctl/sysctl.c#13 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)from: sysctl.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/sysctl/sysctl.c,v 1.61 2004/04/09 19:58:39 markm Exp $"; + "$FreeBSD: src/sbin/sysctl/sysctl.c,v 1.62 2004/08/30 22:42:10 peter Exp $"; #endif /* not lint */ #ifdef __i386__ ==== //depot/projects/hammer/sys/coda/coda_fbsd.c#12 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_fbsd.c,v 1.36 2004/07/15 08:25:59 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_fbsd.c,v 1.37 2004/08/30 23:03:56 peter Exp $"); #include "opt_coda.h" ==== //depot/projects/hammer/sys/coda/coda_psdev.c#9 (text+ko) ==== @@ -49,7 +49,7 @@ /* These routines are the device entry points for Venus. */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_psdev.c,v 1.30 2004/06/16 09:46:32 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_psdev.c,v 1.31 2004/08/30 23:03:56 peter Exp $"); extern int coda_nc_initialized; /* Set if cache has been initialized */ ==== //depot/projects/hammer/sys/coda/coda_vfsops.c#10 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_vfsops.c,v 1.51 2004/07/30 22:08:49 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_vfsops.c,v 1.52 2004/08/30 23:03:56 peter Exp $"); #include "opt_coda.h" ==== //depot/projects/hammer/sys/conf/Makefile.alpha#7 (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.130 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.131 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 .if !defined(S) .if exists(./@/.) ==== //depot/projects/hammer/sys/conf/Makefile.amd64#15 (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.amd64,v 1.11 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.amd64,v 1.12 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/hammer/sys/conf/Makefile.arm#2 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.arm -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.arm,v 1.1 2004/05/14 11:49:40 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.arm,v 1.2 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/hammer/sys/conf/Makefile.i386#5 (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.260 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.i386,v 1.261 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/hammer/sys/conf/Makefile.ia64#7 (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.57 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.58 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ GCC3= you bet # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/hammer/sys/conf/Makefile.pc98#5 (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.161 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.162 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 .if !defined(S) .if exists(./@/.) ==== //depot/projects/hammer/sys/conf/Makefile.powerpc#8 (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.270 2004/08/13 14:30:26 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.271 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/hammer/sys/conf/Makefile.sparc64#6 (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.28 2004/05/09 22:29:38 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.29 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/hammer/sys/conf/NOTES#63 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1269 2004/08/29 15:03:06 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1270 2004/08/30 23:03:56 peter Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # ==== //depot/projects/hammer/sys/conf/files#80 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.947 2004/08/29 11:26:36 des Exp $ +# $FreeBSD: src/sys/conf/files,v 1.948 2004/08/30 23:03:56 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and ==== //depot/projects/hammer/sys/conf/files.pc98#35 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.305 2004/08/16 13:59:01 rwatson Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.306 2004/08/30 23:03:56 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and ==== //depot/projects/hammer/sys/conf/options#56 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.479 2004/08/29 11:10:09 des Exp $ +# $FreeBSD: src/sys/conf/options,v 1.480 2004/08/30 23:03:56 peter Exp $ # # On the handling of kernel options # ==== //depot/projects/hammer/sys/conf/options.pc98#26 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.pc98,v 1.179 2004/08/22 15:13:08 nyan Exp $ +# $FreeBSD: src/sys/conf/options.pc98,v 1.180 2004/08/30 23:03:57 peter Exp $ # Options specific to the pc98 platform kernels AUTO_EOI_1 opt_auto_eoi.h ==== //depot/projects/hammer/sys/dev/acpica/acpi_thermal.c#18 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.48 2004/08/13 06:22:17 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.49 2004/08/30 22:42:10 peter Exp $"); #include "opt_acpi.h" #include ==== //depot/projects/hammer/sys/i386/conf/NOTES#54 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1171 2004/08/29 11:11:31 des Exp $ +# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1172 2004/08/30 23:03:57 peter Exp $ # # ==== //depot/projects/hammer/sys/i4b/driver/i4b_ing.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ *---------------------------------------------------------------------------*/ #include -__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_ing.c,v 1.22 2004/07/06 06:43:45 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_ing.c,v 1.23 2004/08/30 23:03:57 peter Exp $"); #include "opt_i4b.h" ==== //depot/projects/hammer/sys/i4b/driver/i4b_ipr.c#11 (text+ko) ==== @@ -54,7 +54,7 @@ *---------------------------------------------------------------------------*/ #include -__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_ipr.c,v 1.28 2004/08/27 18:33:06 andre Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_ipr.c,v 1.29 2004/08/30 23:03:57 peter Exp $"); #include "opt_i4b.h" ==== //depot/projects/hammer/sys/i4b/driver/i4b_isppp.c#9 (text+ko) ==== @@ -39,7 +39,7 @@ *---------------------------------------------------------------------------*/ #include -__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_isppp.c,v 1.25 2003/10/31 18:32:07 brooks Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_isppp.c,v 1.26 2004/08/30 23:03:57 peter Exp $"); #include "opt_i4b.h" ==== //depot/projects/hammer/sys/i4b/driver/i4b_rbch.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ *---------------------------------------------------------------------------*/ #include -__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_rbch.c,v 1.33 2004/06/16 09:47:10 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_rbch.c,v 1.34 2004/08/30 23:03:57 peter Exp $"); #include "opt_i4b.h" ==== //depot/projects/hammer/sys/i4b/driver/i4b_tel.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ *---------------------------------------------------------------------------*/ #include -__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_tel.c,v 1.34 2004/06/16 09:47:10 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_tel.c,v 1.35 2004/08/30 23:03:57 peter Exp $"); #include "opt_i4b.h" ==== //depot/projects/hammer/sys/i4b/driver/i4b_trace.c#10 (text+ko) ==== @@ -33,7 +33,7 @@ *---------------------------------------------------------------------------*/ #include -__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_trace.c,v 1.30 2004/06/16 09:47:10 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/driver/i4b_trace.c,v 1.31 2004/08/30 23:03:57 peter Exp $"); #include "opt_i4b.h" ==== //depot/projects/hammer/sys/i4b/layer4/i4b_i4bdrv.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ *---------------------------------------------------------------------------*/ #include -__FBSDID("$FreeBSD: src/sys/i4b/layer4/i4b_i4bdrv.c,v 1.41 2004/06/16 09:47:10 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/layer4/i4b_i4bdrv.c,v 1.42 2004/08/30 23:03:58 peter Exp $"); #include "opt_i4b.h" ==== //depot/projects/hammer/sys/i4b/layer4/i4b_l4.c#5 (text+ko) ==== @@ -31,7 +31,7 @@ *---------------------------------------------------------------------------*/ #include -__FBSDID("$FreeBSD: src/sys/i4b/layer4/i4b_l4.c,v 1.17 2003/06/11 00:01:05 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/layer4/i4b_l4.c,v 1.18 2004/08/30 23:03:58 peter Exp $"); #include "opt_i4b.h" ==== //depot/projects/hammer/sys/pc98/conf/GENERIC#24 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/pc98/conf/GENERIC,v 1.256 2004/08/27 15:16:23 andre Exp $ +# $FreeBSD: src/sys/pc98/conf/GENERIC,v 1.257 2004/08/30 23:03:58 peter Exp $ machine pc98 #cpu I386_CPU # Do not enable with other cpu types ==== //depot/projects/hammer/sys/pc98/pc98/atapi.c#4 (text+ko) ==== @@ -13,7 +13,7 @@ * * Version 1.9, Mon Oct 9 22:34:47 MSK 1995 * - * $FreeBSD: src/sys/pc98/pc98/atapi.c,v 1.10 2003/03/02 16:54:39 des Exp $ + * $FreeBSD: src/sys/pc98/pc98/atapi.c,v 1.11 2004/08/30 23:03:58 peter Exp $ */ /* ==== //depot/projects/hammer/sys/pc98/pc98/wd.c#13 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/pc98/pc98/wd.c,v 1.138 2004/08/29 11:10:09 des Exp $ + * $FreeBSD: src/sys/pc98/pc98/wd.c,v 1.139 2004/08/30 23:03:58 peter Exp $ */ /* TODO: ==== //depot/projects/hammer/usr.sbin/config/config.h#6 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)config.h 8.1 (Berkeley) 6/6/93 - * $FreeBSD: src/usr.sbin/config/config.h,v 1.54 2004/08/07 04:19:37 imp Exp $ + * $FreeBSD: src/usr.sbin/config/config.h,v 1.55 2004/08/30 23:03:56 peter Exp $ */ /* ==== //depot/projects/hammer/usr.sbin/config/config.y#7 (text+ko) ==== @@ -66,7 +66,7 @@ * SUCH DAMAGE. * * @(#)config.y 8.1 (Berkeley) 6/6/93 - * $FreeBSD: src/usr.sbin/config/config.y,v 1.63 2004/05/09 22:29:00 cognet Exp $ + * $FreeBSD: src/usr.sbin/config/config.y,v 1.64 2004/08/30 23:03:56 peter Exp $ */ #include ==== //depot/projects/hammer/usr.sbin/config/configvers.h#4 (text+ko) ==== @@ -6,6 +6,6 @@ * The numbering scheme is inspired by the sys/conf/newvers.sh RELDATE * and system. * - * $FreeBSD: src/usr.sbin/config/configvers.h,v 1.32 2004/05/09 22:29:00 cognet Exp $ + * $FreeBSD: src/usr.sbin/config/configvers.h,v 1.33 2004/08/30 23:03:56 peter Exp $ */ -#define CONFIGVERS 500013 +#define CONFIGVERS 600000 ==== //depot/projects/hammer/usr.sbin/config/lang.l#6 (text+ko) ==== @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * @(#)lang.l 8.1 (Berkeley) 6/6/93 - * $FreeBSD: src/usr.sbin/config/lang.l,v 1.37 2004/08/07 04:19:37 imp Exp $ + * $FreeBSD: src/usr.sbin/config/lang.l,v 1.38 2004/08/30 23:03:56 peter Exp $ */ #include ==== //depot/projects/hammer/usr.sbin/config/mkheaders.c#6 (text+ko) ==== @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)mkheaders.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$FreeBSD: src/usr.sbin/config/mkheaders.c,v 1.29 2004/08/07 04:19:37 imp Exp $"; + "$FreeBSD: src/usr.sbin/config/mkheaders.c,v 1.30 2004/08/30 23:03:56 peter Exp $"; #endif /* not lint */ /* ==== //depot/projects/hammer/usr.sbin/config/mkmakefile.c#9 (text+ko) ==== @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)mkmakefile.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$FreeBSD: src/usr.sbin/config/mkmakefile.c,v 1.80 2004/08/07 04:19:37 imp Exp $"; + "$FreeBSD: src/usr.sbin/config/mkmakefile.c,v 1.81 2004/08/30 23:03:56 peter Exp $"; #endif /* not lint */ /* From owner-p4-projects@FreeBSD.ORG Mon Aug 30 23:19:52 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D55116A4D0; Mon, 30 Aug 2004 23:19:52 +0000 (GMT) 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 F422916A4CE for ; Mon, 30 Aug 2004 23:19:51 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4AFB43D2D for ; Mon, 30 Aug 2004 23:19:51 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7UNJpnh032934 for ; Mon, 30 Aug 2004 23:19:51 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7UNJpbG032931 for perforce@freebsd.org; Mon, 30 Aug 2004 23:19:51 GMT (envelope-from peter@freebsd.org) Date: Mon, 30 Aug 2004 23:19:51 GMT Message-Id: <200408302319.i7UNJpbG032931@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60737 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, 30 Aug 2004 23:19:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=60737 Change 60737 by peter@peter_daintree on 2004/08/30 23:19:00 IFC @60736 Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/mp_watchdog.c#2 integrate .. //depot/projects/hammer/sys/amd64/include/mp_watchdog.h#2 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/mp_watchdog.c#2 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/include/mp_watchdog.h#2 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Mon Aug 30 23:35:11 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EEEBC16A4D0; Mon, 30 Aug 2004 23:35:10 +0000 (GMT) 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 AFB5F16A4CE for ; Mon, 30 Aug 2004 23:35:10 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A62DC43D45 for ; Mon, 30 Aug 2004 23:35:10 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7UNZAua033573 for ; Mon, 30 Aug 2004 23:35:10 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7UNZA7W033569 for perforce@freebsd.org; Mon, 30 Aug 2004 23:35:10 GMT (envelope-from peter@freebsd.org) Date: Mon, 30 Aug 2004 23:35:10 GMT Message-Id: <200408302335.i7UNZA7W033569@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60738 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, 30 Aug 2004 23:35:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=60738 Change 60738 by peter@peter_daintree on 2004/08/30 23:34:28 compensate for underlying repocopy Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/mp_watchdog.c#3 edit .. //depot/projects/hammer/sys/amd64/include/mp_watchdog.h#3 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/mp_watchdog.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/i386/i386/mp_watchdog.c,v 1.2 2004/08/15 20:32:40 rwatson Exp $ + * $FreeBSD: src/sys/amd64/amd64/mp_watchdog.c,v 1.2 2004/08/15 20:32:40 rwatson Exp $ */ #include "opt_mp_watchdog.h" ==== //depot/projects/hammer/sys/amd64/include/mp_watchdog.h#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/i386/include/mp_watchdog.h,v 1.1 2004/08/15 18:02:09 rwatson Exp $ + * $FreeBSD: src/sys/amd64/include/mp_watchdog.h,v 1.1 2004/08/15 18:02:09 rwatson Exp $ */ #ifndef _MACHINE_MP_WATCHDOG_H_ From owner-p4-projects@FreeBSD.ORG Mon Aug 30 23:42:20 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7446216A4D1; Mon, 30 Aug 2004 23:42:20 +0000 (GMT) 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 4D0EE16A4CE for ; Mon, 30 Aug 2004 23:42:20 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41D1043D1F for ; Mon, 30 Aug 2004 23:42:20 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7UNgK6W033904 for ; Mon, 30 Aug 2004 23:42:20 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7UNgJI0033901 for perforce@freebsd.org; Mon, 30 Aug 2004 23:42:19 GMT (envelope-from peter@freebsd.org) Date: Mon, 30 Aug 2004 23:42:19 GMT Message-Id: <200408302342.i7UNgJI0033901@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60740 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, 30 Aug 2004 23:42:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=60740 Change 60740 by peter@peter_daintree on 2004/08/30 23:41:47 IFC @60739 (death by 1000 ifc-cuts) Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#70 integrate .. //depot/projects/hammer/sys/conf/files.amd64#55 integrate .. //depot/projects/hammer/sys/conf/options.amd64#32 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#70 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.244 2004/08/28 00:49:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.245 2004/08/30 23:33:33 peter Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" ==== //depot/projects/hammer/sys/conf/files.amd64#55 (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.amd64,v 1.47 2004/08/16 12:51:33 obrien Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.48 2004/08/30 23:33:33 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and ==== //depot/projects/hammer/sys/conf/options.amd64#32 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.amd64,v 1.16 2004/08/16 11:09:59 obrien Exp $ +# $FreeBSD: src/sys/conf/options.amd64,v 1.17 2004/08/30 23:33:33 peter Exp $ # Options specific to AMD64 platform kernels AUTO_EOI_1 opt_auto_eoi.h From owner-p4-projects@FreeBSD.ORG Wed Sep 1 01:19:23 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0C3B616A4D0; Wed, 1 Sep 2004 01:19:23 +0000 (GMT) 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 BF00516A4CE for ; Wed, 1 Sep 2004 01:19:22 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A26C743D54 for ; Wed, 1 Sep 2004 01:19:22 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i811JMYZ083516 for ; Wed, 1 Sep 2004 01:19:22 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i811JMDZ083513 for perforce@freebsd.org; Wed, 1 Sep 2004 01:19:22 GMT (envelope-from wsalamon@computer.org) Date: Wed, 1 Sep 2004 01:19:22 GMT Message-Id: <200409010119.i811JMDZ083513@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Subject: PERFORCE change 60776 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, 01 Sep 2004 01:19:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=60776 Change 60776 by wsalamon@wsalamon_epi on 2004/09/01 01:18:29 Save the path into the audit record during lookup when a namei audit flags is on. Audit the chdir, chmod, chown, chflags, lchflags, lchown, and lchmod system calls to test the path auditing. (This needs more testing of the edge cases). Add the new l* audit events to audit_event. Affected files ... .. //depot/projects/trustedbsd/audit3/contrib/bsm/etc/audit_event#2 edit .. //depot/projects/trustedbsd/audit3/sys/kern/vfs_lookup.c#2 edit .. //depot/projects/trustedbsd/audit3/sys/kern/vfs_syscalls.c#4 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_bsm_audit.c#5 edit .. //depot/projects/trustedbsd/audit3/sys/sys/namei.h#2 edit Differences ... ==== //depot/projects/trustedbsd/audit3/contrib/bsm/etc/audit_event#2 (text+ko) ==== @@ -8,7 +8,7 @@ 7:AUE_EXEC:exec(2):pc,ex 8:AUE_CHDIR:chdir(2):pc 9:AUE_MKNOD:mknod(2):ad -10:AUE_CHMOD:chmod(2):ad +10:AUE_CHMOD:chmod(2):fm 11:AUE_CHOWN:chown(2):fm 12:AUE_UMOUNT:umount(2) - old version:ad 13:AUE_JUNK:junk:no @@ -241,6 +241,7 @@ 313:AUE_SETTIMEOFDAY:settimeofday(2):ad 314:AUE_FLOCK:flock(2):fm 315:AUE_MKFIFO:mkfifo(2):fc +316:AUE_POLL:poll(2):fa 317:AUE_SOCKETPAIR:socketpair(2):nt 318:AUE_FUTIMES:futimes(2):fm 319:AUE_SETSID:setsid(2):pc @@ -277,13 +278,16 @@ 350:AUE_PTHREADKILL:pthread_kill(2):pc 351:AUE_PTHREADSIGMASK:pthread_sigmask(2):pc 352:AUE_AUDITCTL:auditctl(2):ad +353:AUE_RFORK:rfork(2):pc +354:AUE_LCHMOD:lchmod():fm 355:AUE_SWAPOFF:swapoff():ad 356:AUE_INITPROCESS:init_process():pc 357:AUE_MAPFD:map_fd():fa -358:AUE_TASKFORPID:task_for_pid():pc +358:AUE_LCHFLAGS:lchflags():fm 359:AUE_PIDFORTASK:pid_for_task():pc 360:AUE_SYSCTL_NONADMIN:sysctl() - non-admin:ot 361:AUE_COPYFILE:copyfile():fr,fw +362:AUE_LUTIMES:lutimes(2):fm 6152:AUE_login:login - local:lo 6153:AUE_logout:logout - local:lo 6159:AUE_su:su(1):lo ==== //depot/projects/trustedbsd/audit3/sys/kern/vfs_lookup.c#2 (text+ko) ==== @@ -40,6 +40,8 @@ #include "opt_ktrace.h" #include "opt_mac.h" +#include + #include #include #include @@ -126,6 +128,12 @@ error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, (size_t *)&ndp->ni_pathlen); + /* If we are auditing the kernel pathname, save the user pathname */ + if (cnp->cn_flags & AUDITVNPATH1) + AUDIT_ARG(upath, td, cnp->cn_pnbuf, ARG_UPATH1); + if (cnp->cn_flags & AUDITVNPATH2) + AUDIT_ARG(upath, td, cnp->cn_pnbuf, ARG_UPATH2); + /* * Don't allow empty pathnames. */ @@ -422,6 +430,12 @@ VREF(dp); } ndp->ni_vp = dp; + + if (cnp->cn_flags & AUDITVNPATH1) + AUDIT_ARG(vnpath, dp, ARG_VNODE1); + else if (cnp->cn_flags & AUDITVNPATH2) + AUDIT_ARG(vnpath, dp, ARG_VNODE2); + if (!(cnp->cn_flags & (LOCKPARENT | LOCKLEAF))) VOP_UNLOCK(dp, 0, td); /* XXX This should probably move to the top of function. */ @@ -624,6 +638,11 @@ if (!wantparent) vrele(ndp->ni_dvp); + if (cnp->cn_flags & AUDITVNPATH1) + AUDIT_ARG(vnpath, dp, ARG_VNODE1); + else if (cnp->cn_flags & AUDITVNPATH2) + AUDIT_ARG(vnpath, dp, ARG_VNODE2); + if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp, 0, td); return (0); ==== //depot/projects/trustedbsd/audit3/sys/kern/vfs_syscalls.c#4 (text+ko) ==== @@ -747,7 +747,8 @@ struct nameidata nd; struct vnode *vp; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, pathseg, path, td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNPATH1, pathseg, + path, td); if ((error = namei(&nd)) != 0) return (error); if ((error = change_dir(nd.ni_vp, td)) != 0) { @@ -2345,7 +2346,9 @@ int error; struct nameidata nd; - NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, uap->path, td); + AUDIT_ARG(fflags, uap->flags); + NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNPATH1, UIO_USERSPACE, + uap->path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -2368,7 +2371,9 @@ int error; struct nameidata nd; - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, uap->path, td); + AUDIT_ARG(fflags, uap->flags); + NDINIT(&nd, LOOKUP, NOFOLLOW | AUDITVNPATH1, UIO_USERSPACE, + uap->path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -2465,7 +2470,8 @@ int error; struct nameidata nd; - NDINIT(&nd, LOOKUP, FOLLOW, pathseg, path, td); + AUDIT_ARG(mode, mode); + NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNPATH1, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -2494,7 +2500,9 @@ int error; struct nameidata nd; - NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, uap->path, td); + AUDIT_ARG(mode, (mode_t)uap->mode); + NDINIT(&nd, LOOKUP, NOFOLLOW | AUDITVNPATH1, UIO_USERSPACE, + uap->path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -2597,7 +2605,8 @@ int error; struct nameidata nd; - NDINIT(&nd, LOOKUP, FOLLOW, pathseg, path, td); + AUDIT_ARG(owner, uid, gid); + NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNPATH1, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -2636,7 +2645,8 @@ int error; struct nameidata nd; - NDINIT(&nd, LOOKUP, NOFOLLOW, pathseg, path, td); + AUDIT_ARG(owner, uid, gid); + NDINIT(&nd, LOOKUP, NOFOLLOW | AUDITVNPATH1, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); ==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_bsm_audit.c#5 (text+ko) ==== @@ -593,18 +593,21 @@ break; case AUE_CHFLAGS: + case AUE_LCHFLAGS: tok = au_to_arg32(2, "flags", ar->ar_arg_fflags); kau_write(rec, tok); KPATH1_VNODE1_OR_UPATH1_TOKENS; break; case AUE_CHMOD: + case AUE_LCHMOD: tok = au_to_arg32(2, "new file mode", ar->ar_arg_mode); kau_write(rec, tok); KPATH1_VNODE1_OR_UPATH1_TOKENS; break; case AUE_CHOWN: + case AUE_LCHOWN: tok = au_to_arg32(2, "new file uid", ar->ar_arg_uid); kau_write(rec, tok); tok = au_to_arg32(3, "new file gid", ar->ar_arg_gid); ==== //depot/projects/trustedbsd/audit3/sys/sys/namei.h#2 (text+ko) ==== @@ -122,22 +122,24 @@ * name being sought. The caller is responsible for releasing the * buffer and for vrele'ing ni_startdir. */ -#define RDONLY 0x000200 /* lookup with read-only semantics */ -#define HASBUF 0x000400 /* has allocated pathname buffer */ -#define SAVENAME 0x000800 /* save pathname buffer */ -#define SAVESTART 0x001000 /* save starting directory */ -#define ISDOTDOT 0x002000 /* current component name is .. */ -#define MAKEENTRY 0x004000 /* entry is to be added to name cache */ -#define ISLASTCN 0x008000 /* this is last component of pathname */ -#define ISSYMLINK 0x010000 /* symlink needs interpretation */ -#define ISWHITEOUT 0x020000 /* found whiteout */ -#define DOWHITEOUT 0x040000 /* do whiteouts */ -#define WILLBEDIR 0x080000 /* new files will be dirs; allow trailing / */ -#define ISUNICODE 0x100000 /* current component name is unicode*/ -#define PDIRUNLOCK 0x200000 /* filesystem lookup() unlocked parent dir */ -#define NOCROSSMOUNT 0x400000 /* do not cross mount points */ -#define NOMACCHECK 0x800000 /* do not perform MAC checks */ -#define PARAMASK 0xfffe00 /* mask of parameter descriptors */ +#define RDONLY 0x00000200 /* lookup with read-only semantics */ +#define HASBUF 0x00000400 /* has allocated pathname buffer */ +#define SAVENAME 0x00000800 /* save pathname buffer */ +#define SAVESTART 0x00001000 /* save starting directory */ +#define ISDOTDOT 0x00002000 /* current component name is .. */ +#define MAKEENTRY 0x00004000 /* entry is to be added to name cache */ +#define ISLASTCN 0x00008000 /* this is last component of pathname */ +#define ISSYMLINK 0x00010000 /* symlink needs interpretation */ +#define ISWHITEOUT 0x00020000 /* found whiteout */ +#define DOWHITEOUT 0x00040000 /* do whiteouts */ +#define WILLBEDIR 0x00080000 /* new files will be dirs;allow trailing / */ +#define ISUNICODE 0x00100000 /* current component name is unicode*/ +#define PDIRUNLOCK 0x00200000 /* filesystem lookup() unlocked parent dir */ +#define NOCROSSMOUNT 0x00400000 /* do not cross mount points */ +#define NOMACCHECK 0x00800000 /* do not perform MAC checks */ +#define AUDITVNPATH1 0x01000000 /* audit the path/vnode information */ +#define AUDITVNPATH2 0x02000000 /* audit the path/vnode information */ +#define PARAMASK 0x03fffe00 /* mask of parameter descriptors */ /* * Initialization of a nameidata structure. From owner-p4-projects@FreeBSD.ORG Wed Sep 1 02:13:29 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB8F016A4D1; Wed, 1 Sep 2004 02:13:28 +0000 (GMT) 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 7F4FD16A4CE for ; Wed, 1 Sep 2004 02:13:28 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7424843D31 for ; Wed, 1 Sep 2004 02:13:28 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i812DS5D085532 for ; Wed, 1 Sep 2004 02:13:28 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i812DSdk085529 for perforce@freebsd.org; Wed, 1 Sep 2004 02:13:28 GMT (envelope-from peter@freebsd.org) Date: Wed, 1 Sep 2004 02:13:28 GMT Message-Id: <200409010213.i812DSdk085529@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60778 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, 01 Sep 2004 02:13:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=60778 Change 60778 by peter@peter_melody on 2004/09/01 02:12:27 belated workaround for routing socket abi break. Affected files ... .. //depot/projects/hammer/sbin/ifconfig/ifconfig.c#19 edit .. //depot/projects/hammer/sys/net/if.c#27 edit .. //depot/projects/hammer/sys/net/if.h#13 edit Differences ... ==== //depot/projects/hammer/sbin/ifconfig/ifconfig.c#19 (text+ko) ==== @@ -585,7 +585,10 @@ ifm = (struct if_msghdr *)next; if (ifm->ifm_type == RTM_IFINFO) { - sdl = (struct sockaddr_dl *)(ifm + 1); + if (ifm->ifm_data.ifi_datalen == 0) + ifm->ifm_data.ifi_datalen = sizeof(struct if_data); + sdl = (struct sockaddr_dl *)((char *)ifm + sizeof(struct if_msghdr) - + sizeof(struct if_data) + ifm->ifm_data.ifi_datalen); flags = ifm->ifm_flags; } else { fprintf(stderr, "out of sync parsing NET_RT_IFLIST\n"); ==== //depot/projects/hammer/sys/net/if.c#27 (text+ko) ==== @@ -399,6 +399,7 @@ if_index = ifp->if_index; if (if_index >= if_indexlim) if_grow(); + ifp->if_data.ifi_datalen = sizeof(struct if_data); ifnet_byindex(ifp->if_index) = ifp; ifdev_byindex(ifp->if_index) = make_dev(&net_cdevsw, ==== //depot/projects/hammer/sys/net/if.h#13 (text+ko) ==== @@ -85,6 +85,7 @@ u_char ifi_link_state; /* current link state */ u_char ifi_recvquota; /* polling quota for receive intrs */ u_char ifi_xmitquota; /* polling quota for xmit intrs */ + u_char ifi_datalen; /* length of this data struct */ u_long ifi_mtu; /* maximum transmission unit */ u_long ifi_metric; /* routing metric (external only) */ u_long ifi_baudrate; /* linespeed */ From owner-p4-projects@FreeBSD.ORG Wed Sep 1 09:14:09 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 782BB16A4D0; Wed, 1 Sep 2004 09:14:09 +0000 (GMT) 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 3923B16A4CE for ; Wed, 1 Sep 2004 09:14:09 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F46943D54 for ; Wed, 1 Sep 2004 09:14:09 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i819E9tL099672 for ; Wed, 1 Sep 2004 09:14:09 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i819E8tj099669 for perforce@freebsd.org; Wed, 1 Sep 2004 09:14:08 GMT (envelope-from julian@freebsd.org) Date: Wed, 1 Sep 2004 09:14:08 GMT Message-Id: <200409010914.i819E8tj099669@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 60809 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, 01 Sep 2004 09:14:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=60809 Change 60809 by julian@julian_ref on 2004/09/01 09:13:41 IFC @60805 Affected files ... .. //depot/projects/nsched/sys/alpha/alpha/trap.c#3 integrate .. //depot/projects/nsched/sys/alpha/conf/GENERIC#7 integrate .. //depot/projects/nsched/sys/alpha/linux/linux_machdep.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/mp_machdep.c#7 integrate .. //depot/projects/nsched/sys/amd64/amd64/mp_watchdog.c#1 branch .. //depot/projects/nsched/sys/amd64/amd64/pmap.c#18 integrate .. //depot/projects/nsched/sys/amd64/amd64/trap.c#5 integrate .. //depot/projects/nsched/sys/amd64/ia32/ia32_syscall.c#2 integrate .. //depot/projects/nsched/sys/amd64/include/mp_watchdog.h#1 branch .. //depot/projects/nsched/sys/amd64/linux32/linux32_machdep.c#3 integrate .. //depot/projects/nsched/sys/cam/cam_periph.c#2 integrate .. //depot/projects/nsched/sys/coda/cnode.h#3 integrate .. //depot/projects/nsched/sys/coda/coda_fbsd.c#6 integrate .. //depot/projects/nsched/sys/coda/coda_psdev.c#3 integrate .. //depot/projects/nsched/sys/coda/coda_vfsops.c#5 integrate .. //depot/projects/nsched/sys/conf/Makefile.alpha#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.amd64#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.arm#2 integrate .. //depot/projects/nsched/sys/conf/Makefile.i386#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.ia64#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.pc98#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.powerpc#4 integrate .. //depot/projects/nsched/sys/conf/Makefile.sparc64#3 integrate .. //depot/projects/nsched/sys/conf/NOTES#14 integrate .. //depot/projects/nsched/sys/conf/files#21 integrate .. //depot/projects/nsched/sys/conf/files.amd64#8 integrate .. //depot/projects/nsched/sys/conf/files.pc98#8 integrate .. //depot/projects/nsched/sys/conf/majors#3 integrate .. //depot/projects/nsched/sys/conf/options#15 integrate .. //depot/projects/nsched/sys/conf/options.amd64#3 integrate .. //depot/projects/nsched/sys/conf/options.pc98#5 integrate .. //depot/projects/nsched/sys/dev/acpica/acpi_thermal.c#6 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/ahc_isa.c#2 integrate .. //depot/projects/nsched/sys/dev/bfe/if_bfe.c#5 integrate .. //depot/projects/nsched/sys/dev/bfe/if_bfereg.h#4 integrate .. //depot/projects/nsched/sys/dev/fdc/fdc_acpi.c#3 integrate .. //depot/projects/nsched/sys/dev/fdc/fdc_isa.c#3 integrate .. //depot/projects/nsched/sys/dev/md/md.c#9 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs.h#1 branch .. //depot/projects/nsched/sys/fs/autofs/autofs_util.c#1 branch .. //depot/projects/nsched/sys/fs/autofs/autofs_vfsops.c#1 branch .. //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#1 branch .. //depot/projects/nsched/sys/geom/concat/g_concat.c#8 integrate .. //depot/projects/nsched/sys/geom/geom_io.c#7 integrate .. //depot/projects/nsched/sys/geom/label/g_label.c#6 integrate .. //depot/projects/nsched/sys/geom/mirror/g_mirror.c#5 integrate .. //depot/projects/nsched/sys/geom/raid3/g_raid3.c#6 integrate .. //depot/projects/nsched/sys/geom/stripe/g_stripe.c#7 integrate .. //depot/projects/nsched/sys/i386/bios/mca_machdep.c#3 integrate .. //depot/projects/nsched/sys/i386/bios/vpd.c#3 integrate .. //depot/projects/nsched/sys/i386/conf/NOTES#12 integrate .. //depot/projects/nsched/sys/i386/i386/mp_machdep.c#7 integrate .. //depot/projects/nsched/sys/i386/i386/pmap.c#16 integrate .. //depot/projects/nsched/sys/i386/i386/trap.c#5 integrate .. //depot/projects/nsched/sys/i386/include/param.h#5 integrate .. //depot/projects/nsched/sys/i386/linux/linux_machdep.c#3 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_ing.c#5 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_ipr.c#4 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_isppp.c#2 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_rbch.c#3 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_tel.c#3 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_trace.c#3 integrate .. //depot/projects/nsched/sys/i4b/layer4/i4b_i4bdrv.c#3 integrate .. //depot/projects/nsched/sys/i4b/layer4/i4b_l4.c#2 integrate .. //depot/projects/nsched/sys/ia64/ia64/exception.S#2 integrate .. //depot/projects/nsched/sys/ia64/ia64/locore.S#3 integrate .. //depot/projects/nsched/sys/ia64/ia64/pmap.c#11 integrate .. //depot/projects/nsched/sys/ia64/ia64/support.S#3 integrate .. //depot/projects/nsched/sys/ia64/ia64/syscall.S#3 integrate .. //depot/projects/nsched/sys/ia64/ia64/trap.c#5 integrate .. //depot/projects/nsched/sys/kern/init_main.c#12 integrate .. //depot/projects/nsched/sys/kern/kern_conf.c#8 integrate .. //depot/projects/nsched/sys/kern/kern_fork.c#10 integrate .. //depot/projects/nsched/sys/kern/kern_idle.c#4 integrate .. //depot/projects/nsched/sys/kern/kern_intr.c#7 integrate .. //depot/projects/nsched/sys/kern/kern_kse.c#26 integrate .. //depot/projects/nsched/sys/kern/kern_kthread.c#2 integrate .. //depot/projects/nsched/sys/kern/kern_prot.c#7 integrate .. //depot/projects/nsched/sys/kern/kern_sig.c#10 integrate .. //depot/projects/nsched/sys/kern/kern_switch.c#7 integrate .. //depot/projects/nsched/sys/kern/kern_thr.c#13 integrate .. //depot/projects/nsched/sys/kern/kern_thread.c#33 integrate .. //depot/projects/nsched/sys/kern/sched_4bsd.c#32 integrate .. //depot/projects/nsched/sys/kern/sched_ule.c#21 integrate .. //depot/projects/nsched/sys/kern/subr_bus.c#9 integrate .. //depot/projects/nsched/sys/kern/subr_smp.c#6 integrate .. //depot/projects/nsched/sys/kern/subr_trap.c#5 integrate .. //depot/projects/nsched/sys/kern/subr_turnstile.c#5 integrate .. //depot/projects/nsched/sys/modules/Makefile#9 integrate .. //depot/projects/nsched/sys/modules/aac/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/autofs/Makefile#1 branch .. //depot/projects/nsched/sys/modules/coda/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/coda5/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/cp/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/ctau/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/cx/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/if_ppp/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/if_tap/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/pf/Makefile#5 integrate .. //depot/projects/nsched/sys/net/if.c#9 integrate .. //depot/projects/nsched/sys/net/if.h#6 integrate .. //depot/projects/nsched/sys/net/if_sl.c#10 integrate .. //depot/projects/nsched/sys/netgraph/ng_socket.c#5 integrate .. //depot/projects/nsched/sys/pc98/conf/GENERIC#7 integrate .. //depot/projects/nsched/sys/pc98/pc98/atapi.c#2 integrate .. //depot/projects/nsched/sys/pc98/pc98/wd.c#4 integrate .. //depot/projects/nsched/sys/powerpc/powerpc/pmap.c#10 integrate .. //depot/projects/nsched/sys/powerpc/powerpc/trap.c#5 integrate .. //depot/projects/nsched/sys/sparc64/sparc64/trap.c#3 integrate .. //depot/projects/nsched/sys/sys/bio.h#5 integrate .. //depot/projects/nsched/sys/sys/param.h#12 integrate .. //depot/projects/nsched/sys/sys/proc.h#24 integrate .. //depot/projects/nsched/sys/sys/sched.h#12 integrate .. //depot/projects/nsched/sys/sys/smp.h#4 integrate .. //depot/projects/nsched/sys/sys/ucred.h#3 integrate .. //depot/projects/nsched/sys/vm/vm_zeroidle.c#4 integrate Differences ... ==== //depot/projects/nsched/sys/alpha/alpha/trap.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.118 2004/07/10 22:35:05 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.120 2004/08/31 07:34:53 julian Exp $"); /* #include "opt_fix_unaligned_vax_fp.h" */ #include "opt_ddb.h" @@ -591,9 +591,6 @@ framep->tf_regs[FRAME_SP] = alpha_pal_rdusp(); userret(td, framep, sticks); mtx_assert(&Giant, MA_NOTOWNED); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif } return; @@ -665,7 +662,7 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); if (p->p_flag & P_SA) - thread_user_enter(p, td); + thread_user_enter(td); #ifdef DIAGNOSTIC alpha_fpstate_check(td); #endif @@ -785,9 +782,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/nsched/sys/alpha/conf/GENERIC#7 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.176 2004/08/28 21:42:15 wilko Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.177 2004/08/30 18:40:00 wilko Exp $ machine alpha cpu EV4 @@ -153,6 +153,7 @@ # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') +device em # Intel PRO/1000 adapter Gigabit Ethernet Card device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') ==== //depot/projects/nsched/sys/alpha/linux/linux_machdep.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.33 2004/02/04 21:52:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.34 2004/09/01 02:11:27 julian Exp $"); #include #include @@ -180,7 +180,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2); + setrunqueue(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/nsched/sys/amd64/amd64/mp_machdep.c#7 (text+ko) ==== @@ -25,10 +25,11 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.244 2004/08/28 00:49:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.246 2004/09/01 06:42:01 julian Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" +#include "opt_mp_watchdog.h" #include #include @@ -56,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -111,7 +113,6 @@ */ static u_int logical_cpus; -static u_int logical_cpus_mask; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -136,7 +137,6 @@ static int start_ap(int apic_id); static void release_aps(void *dummy); -static int hlt_cpus_mask; static int hlt_logical_cpus; static struct sysctl_ctx_list logical_cpu_clist; static u_int bootMP_size; @@ -1067,8 +1067,15 @@ mp_grab_cpu_hlt(void) { u_int mask = PCPU_GET(cpumask); +#ifdef MP_WATCHDOG + u_int cpuid = PCPU_GET(cpuid); +#endif int retval; +#ifdef MP_WATCHDOG + ap_watchdog(cpuid); +#endif + retval = mask & hlt_cpus_mask; while (mask & hlt_cpus_mask) __asm __volatile("sti; hlt" : : : "memory"); ==== //depot/projects/nsched/sys/amd64/amd64/pmap.c#18 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.495 2004/08/28 00:49:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.496 2004/08/30 03:52:04 alc Exp $"); /* * Manages physical address maps. @@ -2451,7 +2451,7 @@ pv_entry_t pv, npv; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY - if (!curthread || (pmap != vmspace_pmap(curthread->td_proc->p_vmspace))) { + if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } ==== //depot/projects/nsched/sys/amd64/amd64/trap.c#5 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.279 2004/08/16 22:56:20 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.281 2004/08/31 07:34:53 julian Exp $"); /* * AMD64 Trap and System call handling @@ -259,7 +259,7 @@ case T_PAGEFLT: /* page fault */ if (td->td_pflags & TDP_SA) - thread_user_enter(p, td); + thread_user_enter(td); i = trap_pfault(&frame, TRUE); if (i == -1) goto userout; @@ -471,9 +471,6 @@ userret(td, &frame, sticks); mtx_assert(&Giant, MA_NOTOWNED); userout: -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif out: return; } @@ -698,7 +695,7 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); if (p->p_flag & P_SA) - thread_user_enter(p, td); + thread_user_enter(td); params = (caddr_t)frame.tf_rsp + sizeof(register_t); code = frame.tf_rax; orig_tf_rflags = frame.tf_rflags; @@ -830,9 +827,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/nsched/sys/amd64/ia32/ia32_syscall.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.6 2003/11/17 08:58:14 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.7 2004/08/31 06:12:12 julian Exp $"); /* * 386 Trap and System call handling @@ -247,9 +247,6 @@ */ STOPEVENT(p, S_SCX, code); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/nsched/sys/amd64/linux32/linux32_machdep.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.3 2004/08/24 20:52:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.4 2004/09/01 02:11:27 julian Exp $"); #include #include @@ -503,7 +503,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2); + setrunqueue(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/nsched/sys/cam/cam_periph.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.56 2003/11/08 10:56:57 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.57 2004/08/30 20:14:21 gibbs Exp $"); #include #include @@ -126,7 +126,7 @@ * of our type assigned to this path, we are likely waiting for * final close on an old, invalidated, peripheral. If this is * the case, queue up a deferred call to the peripheral's async - * handler. If it looks like a mistaken re-alloation, complain. + * handler. If it looks like a mistaken re-allocation, complain. */ if ((periph = cam_periph_find(path, name)) != NULL) { ==== //depot/projects/nsched/sys/coda/cnode.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * Mellon the rights to redistribute these changes without encumbrance. * * @(#) src/sys/coda/cnode.h,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ - * $FreeBSD: src/sys/coda/cnode.h,v 1.14 2004/06/16 09:46:32 phk Exp $ + * $FreeBSD: src/sys/coda/cnode.h,v 1.15 2004/09/01 01:19:51 brooks Exp $ * */ @@ -109,7 +109,7 @@ struct vattr c_vattr; /* attributes */ char *c_symlink; /* pointer to symbolic link */ u_short c_symlen; /* length of symbolic link */ - struct cdev *c_device; /* associated vnode device */ + struct cdev *c_device; /* associated vnode device */ ino_t c_inode; /* associated vnode inode */ struct cnode *c_next; /* links if on NetBSD machine */ }; @@ -153,10 +153,11 @@ struct vnode *mi_rootvp; struct mount *mi_vfsp; struct vcomm mi_vcomm; - struct cdev *dev; + struct cdev *dev; int mi_started; + LIST_ENTRY(coda_mntinfo) mi_list; }; -extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */ +struct coda_mntinfo *dev2coda_mntinfo(struct cdev *dev); /* * vfs pointer to mount info @@ -188,20 +189,20 @@ }; /* cfs_psdev.h */ -extern int coda_call(struct coda_mntinfo *mntinfo, int inSize, int *outSize, caddr_t buffer); +int coda_call(struct coda_mntinfo *mntinfo, int inSize, int *outSize, caddr_t buffer); extern int coda_kernel_version; /* cfs_subr.h */ -extern int handleDownCall(int opcode, union outputArgs *out); -extern void coda_unmounting(struct mount *whoIam); -extern int coda_vmflush(struct cnode *cp); +int handleDownCall(int opcode, union outputArgs *out); +void coda_unmounting(struct mount *whoIam); +int coda_vmflush(struct cnode *cp); /* cfs_vnodeops.h */ -extern struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type); -extern int coda_vnodeopstats_init(void); +struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type); +int coda_vnodeopstats_init(void); /* coda_vfsops.h */ -extern struct mount *devtomp(struct cdev *dev); +struct mount *devtomp(struct cdev *dev); /* sigh */ #define CODA_RDWR ((u_long) 31) ==== //depot/projects/nsched/sys/coda/coda_fbsd.c#6 (text+ko) ==== @@ -29,9 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_fbsd.c,v 1.36 2004/07/15 08:25:59 phk Exp $"); - -#include "vcoda.h" +__FBSDID("$FreeBSD: src/sys/coda/coda_fbsd.c,v 1.38 2004/09/01 01:19:51 brooks Exp $"); #include #include @@ -52,20 +50,6 @@ #include #include -/* - From: "Jordan K. Hubbard" - Subject: Re: New 3.0 SNAPshot CDROM about ready for production.. - To: "Robert.V.Baron" - Date: Fri, 20 Feb 1998 15:57:01 -0800 - - > Also I need a character device major number. (and might want to reserve - > a block of 10 syscalls.) - - Just one char device number? No block devices? Very well, cdev 93 is yours! -*/ - -#define VC_DEV_NO 93 - static struct cdevsw codadevsw = { .d_version = D_VERSION, .d_flags = D_NEEDGIANT, @@ -76,21 +60,39 @@ .d_ioctl = vc_nb_ioctl, .d_poll = vc_nb_poll, .d_name = "Coda", - .d_maj = VC_DEV_NO, }; +static eventhandler_tag clonetag; + +static LIST_HEAD(, coda_mntinfo) coda_mnttbl; + int vcdebug = 1; #define VCDEBUG if (vcdebug) printf +/* for DEVFS, using bpf & tun drivers as examples*/ +static void coda_fbsd_clone(void *arg, char *name, int namelen, + struct cdev **dev); + static int codadev_modevent(module_t mod, int type, void *data) { + struct coda_mntinfo *mnt; switch (type) { case MOD_LOAD: + LIST_INIT(&coda_mnttbl); + clonetag = EVENTHANDLER_REGISTER(dev_clone, coda_fbsd_clone, + 0, 1000); break; case MOD_UNLOAD: - return (EBUSY); + EVENTHANDLER_DEREGISTER(dev_clone, clonetag); + while ((mnt = LIST_FIRST(&coda_mnttbl)) != NULL) { + LIST_REMOVE(mnt, mi_list); + destroy_dev(mnt->dev); + free(mnt, M_CODA); + } + break; + default: return (EOPNOTSUPP); } @@ -101,7 +103,7 @@ codadev_modevent, NULL }; -DECLARE_MODULE(codadev, codadev_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+VC_DEV_NO); +DECLARE_MODULE(codadev, codadev_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); int coda_fbsd_getpages(v) @@ -170,14 +172,6 @@ #endif } - -/* for DEVFS, using bpf & tun drivers as examples*/ -static void coda_fbsd_drvinit(void *unused); -static void coda_fbsd_drvuninit(void *unused); -static void coda_fbsd_clone(void *arg, char *name, int namelen, struct cdev **dev); - -static eventhandler_tag clonetag; - static void coda_fbsd_clone(arg, name, namelen, dev) void *arg; char *name; @@ -185,6 +179,7 @@ struct cdev **dev; { int u; + struct coda_mntinfo *mnt; if (*dev != NULL) return; @@ -192,31 +187,19 @@ return; *dev = make_dev(&codadevsw,unit2minor(u),UID_ROOT,GID_WHEEL,0600,"cfs%d",u); - coda_mnttbl[unit2minor(u)].dev = *dev; - + mnt = malloc(sizeof(struct coda_mntinfo), M_CODA, M_WAITOK|M_ZERO); + LIST_INSERT_HEAD(&coda_mnttbl, mnt, mi_list); } -static void coda_fbsd_drvinit(unused) - void *unused; +struct coda_mntinfo * +dev2coda_mntinfo(struct cdev *dev) { - int i; + struct coda_mntinfo *mnt; - clonetag = EVENTHANDLER_REGISTER(dev_clone,coda_fbsd_clone,0,1000); - for(i=0;idev == dev) + break; + } -static void coda_fbsd_drvuninit(unused) - void *unused; -{ - int i; - - EVENTHANDLER_DEREGISTER(dev_clone,clonetag); - for(i=0;i -__FBSDID("$FreeBSD: src/sys/coda/coda_psdev.c,v 1.30 2004/06/16 09:46:32 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_psdev.c,v 1.32 2004/09/01 01:19:51 brooks Exp $"); extern int coda_nc_initialized; /* Set if cache has been initialized */ -#include - #include #include #include @@ -122,17 +120,16 @@ int mode; struct thread *td; /* NetBSD only */ { - register struct vcomm *vcp; + struct vcomm *vcp; + struct coda_mntinfo *mnt; ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); - if (!coda_nc_initialized) coda_nc_init(); - vcp = &coda_mnttbl[minor(dev)].mi_vcomm; + mnt = dev2coda_mntinfo(dev); + vcp = &mnt->mi_vcomm; if (VC_OPEN(vcp)) return(EBUSY); @@ -141,8 +138,8 @@ INIT_QUEUE(vcp->vc_replys); MARK_VC_OPEN(vcp); - coda_mnttbl[minor(dev)].mi_vfsp = NULL; - coda_mnttbl[minor(dev)].mi_rootvp = NULL; + mnt->mi_vfsp = NULL; + mnt->mi_rootvp = NULL; return(0); } @@ -161,10 +158,7 @@ ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); - - mi = &coda_mnttbl[minor(dev)]; + mi = dev2coda_mntinfo(dev); vcp = &(mi->mi_vcomm); if (!VC_OPEN(vcp)) @@ -243,10 +237,7 @@ ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); - - vcp = &coda_mnttbl[minor(dev)].mi_vcomm; + vcp = &dev2coda_mntinfo(dev)->mi_vcomm; /* Get message at head of request queue. */ if (EMPTY(vcp->vc_requests)) return(0); /* Nothing to read */ @@ -301,11 +292,8 @@ ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); + vcp = &dev2coda_mntinfo(dev)->mi_vcomm; - vcp = &coda_mnttbl[minor(dev)].mi_vcomm; - /* Peek at the opcode, unique without transfering the data. */ uiop->uio_rw = UIO_WRITE; error = uiomove((caddr_t)buf, sizeof(int) * 2, uiop); @@ -450,10 +438,7 @@ ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); - - vcp = &coda_mnttbl[minor(dev)].mi_vcomm; + vcp = &dev2coda_mntinfo(dev)->mi_vcomm; event_msk = events & (POLLIN|POLLRDNORM); if (!event_msk) ==== //depot/projects/nsched/sys/coda/coda_vfsops.c#5 (text+ko) ==== @@ -41,9 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_vfsops.c,v 1.51 2004/07/30 22:08:49 phk Exp $"); - -#include +__FBSDID("$FreeBSD: src/sys/coda/coda_vfsops.c,v 1.53 2004/09/01 01:19:51 brooks Exp $"); #include #include @@ -69,7 +67,6 @@ #define ENTRY if(coda_vfsop_print_entry) myprintf(("Entered %s\n",__func__)) struct vnode *coda_ctlvp; -struct coda_mntinfo coda_mnttbl[NVCODA]; /* indexed by minor device number */ /* structure to keep statistics of internally generated/satisfied calls */ @@ -161,15 +158,10 @@ return(ENXIO); } - if (minor(dev) >= NVCODA || minor(dev) < 0) { - MARK_INT_FAIL(CODA_MOUNT_STATS); - return(ENXIO); - } - /* * Initialize the mount record and link it to the vfs struct */ - mi = &coda_mnttbl[minor(dev)]; + mi = dev2coda_mntinfo(dev); if (!VC_OPEN(&mi->mi_vcomm)) { MARK_INT_FAIL(CODA_MOUNT_STATS); ==== //depot/projects/nsched/sys/conf/Makefile.alpha#3 (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.130 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.131 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 .if !defined(S) .if exists(./@/.) ==== //depot/projects/nsched/sys/conf/Makefile.amd64#3 (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.amd64,v 1.11 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.amd64,v 1.12 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/nsched/sys/conf/Makefile.arm#2 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.arm -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.arm,v 1.1 2004/05/14 11:49:40 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.arm,v 1.2 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/nsched/sys/conf/Makefile.i386#3 (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.260 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.i386,v 1.261 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/nsched/sys/conf/Makefile.ia64#3 (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.57 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.58 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ GCC3= you bet # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/nsched/sys/conf/Makefile.pc98#3 (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.161 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.162 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 .if !defined(S) .if exists(./@/.) ==== //depot/projects/nsched/sys/conf/Makefile.powerpc#4 (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.270 2004/08/13 14:30:26 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.271 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/nsched/sys/conf/Makefile.sparc64#3 (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.28 2004/05/09 22:29:38 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.29 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/nsched/sys/conf/NOTES#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1269 2004/08/29 15:03:06 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1271 2004/09/01 01:19:51 brooks Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -817,7 +817,7 @@ # Coda stuff: options CODA #CODA filesystem. -device vcoda 4 #coda minicache <-> venus comm. +device vcoda #coda minicache <-> venus comm. # Use the old Coda 5.x venus<->kernel interface instead of the new # realms-aware 6.x protocol. #options CODA_COMPAT_5 @@ -1869,32 +1869,32 @@ # snd_vibes: S3 Sonicvibes PCI. # snd_uaudio: USB audio. -device "snd_ad1816" -device "snd_als4000" -#device "snd_au88x0" +device snd_ad1816 +device snd_als4000 +#device snd_au88x0 device snd_cmi -device "snd_cs4281" +device snd_cs4281 device snd_csa -device "snd_ds1" -device "snd_emu10k1" -device "snd_es137x" +device snd_ds1 +device snd_emu10k1 +device snd_es137x device snd_ess -device "snd_fm801" +device snd_fm801 device snd_gusc device snd_ich device snd_maestro -device "snd_maestro3" +device snd_maestro3 device snd_mss device snd_neomagic -device "snd_sb16" -device "snd_sb8" +device snd_sb16 +device snd_sb8 device snd_sbc device snd_solo -device "snd_t4dwave" -device "snd_via8233" -device "snd_via82c686" +device snd_t4dwave +device snd_via8233 +device snd_via82c686 device snd_vibes -#device "snd_vortex1" +#device snd_vortex1 device snd_uaudio # For non-pnp sound cards: ==== //depot/projects/nsched/sys/conf/files#21 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.947 2004/08/29 11:26:36 des Exp $ +# $FreeBSD: src/sys/conf/files,v 1.948 2004/08/30 23:03:56 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -82,7 +82,7 @@ cam/scsi/scsi_ses.c optional ses cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ -coda/coda_fbsd.c count vcoda +coda/coda_fbsd.c optional vcoda coda/coda_namecache.c optional vcoda >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Sep 2 04:06:08 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6837216A4EC; Thu, 2 Sep 2004 04:06:03 +0000 (GMT) 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 5DDFD16A560 for ; Thu, 2 Sep 2004 04:06:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E371E43D48 for ; Thu, 2 Sep 2004 04:06:02 +0000 (GMT) (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.11/8.12.11) with ESMTP id i82462hE035517 for ; Thu, 2 Sep 2004 04:06:02 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i82462dU035514 for perforce@freebsd.org; Thu, 2 Sep 2004 04:06:02 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 2 Sep 2004 04:06:02 GMT Message-Id: <200409020406.i82462dU035514@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 60846 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, 02 Sep 2004 04:06:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=60846 Change 60846 by rwatson@rwatson_paprika on 2004/09/02 04:05:57 Integrate netperf_socket from CVS HEAD: - Scheduler now given more information about run queue change requests; cleanup, bug fixes, preemption likes 4bsd! ipi wakeup also in base tree for 4bsd. - mp_watchdog ported to amd64. - thread_user_enter() no longer takes p and td - loader now speaks some elf, getting amd64 modules to work - device numbers and counts removed from a few more devices - if_em fixes - powerpc pmap locking. - VM lock pushed down in several VM bits, etc. Related to netperf: - Looped back NET_WITH_GIANT, NET_NEEDS_GIANT, boot time warnings and adaptation, mpsafenet now the default in CVS! - ifi_epoch added (ABI oops, but good idea otherwise) - slstart added so if_sl has if_start defined. - Looped back ng_socket.c Giant around call into linker. - Looped back if_pcn, if_sf, if_ste, if_ti, if_tl, if_wb use of IFF_NEEDSGIANT. Affected files ... .. //depot/projects/netperf_socket/sys/alpha/alpha/trap.c#3 integrate .. //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#9 integrate .. //depot/projects/netperf_socket/sys/alpha/conf/NOTES#3 integrate .. //depot/projects/netperf_socket/sys/alpha/linux/linux_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/alpha/pci/pcibus.c#3 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/mp_machdep.c#12 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/mp_watchdog.c#1 branch .. //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#27 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/trap.c#10 integrate .. //depot/projects/netperf_socket/sys/amd64/ia32/ia32_syscall.c#2 integrate .. //depot/projects/netperf_socket/sys/amd64/include/mp_watchdog.h#1 branch .. //depot/projects/netperf_socket/sys/amd64/linux32/linux32_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/boot/common/Makefile.inc#3 integrate .. //depot/projects/netperf_socket/sys/boot/common/bootstrap.h#2 integrate .. //depot/projects/netperf_socket/sys/boot/common/load_elf.c#3 integrate .. //depot/projects/netperf_socket/sys/boot/common/load_elf32_obj.c#1 branch .. //depot/projects/netperf_socket/sys/boot/common/load_elf64_obj.c#1 branch .. //depot/projects/netperf_socket/sys/boot/common/load_elf_obj.c#1 branch .. //depot/projects/netperf_socket/sys/boot/common/misc.c#2 integrate .. //depot/projects/netperf_socket/sys/boot/common/reloc_elf.c#1 branch .. //depot/projects/netperf_socket/sys/boot/common/reloc_elf32.c#1 branch .. //depot/projects/netperf_socket/sys/boot/common/reloc_elf64.c#1 branch .. //depot/projects/netperf_socket/sys/boot/i386/libi386/elf32_freebsd.c#2 integrate .. //depot/projects/netperf_socket/sys/boot/i386/libi386/elf64_freebsd.c#2 integrate .. //depot/projects/netperf_socket/sys/boot/i386/loader/conf.c#2 integrate .. //depot/projects/netperf_socket/sys/cam/cam_periph.c#2 integrate .. //depot/projects/netperf_socket/sys/cam/scsi/scsi_da.c#8 integrate .. //depot/projects/netperf_socket/sys/coda/cnode.h#3 integrate .. //depot/projects/netperf_socket/sys/coda/coda_fbsd.c#6 integrate .. //depot/projects/netperf_socket/sys/coda/coda_psdev.c#3 integrate .. //depot/projects/netperf_socket/sys/coda/coda_vfsops.c#5 integrate .. //depot/projects/netperf_socket/sys/conf/Makefile.alpha#4 integrate .. //depot/projects/netperf_socket/sys/conf/Makefile.amd64#3 integrate .. //depot/projects/netperf_socket/sys/conf/Makefile.arm#2 integrate .. //depot/projects/netperf_socket/sys/conf/Makefile.i386#3 integrate .. //depot/projects/netperf_socket/sys/conf/Makefile.ia64#3 integrate .. //depot/projects/netperf_socket/sys/conf/Makefile.pc98#3 integrate .. //depot/projects/netperf_socket/sys/conf/Makefile.powerpc#4 integrate .. //depot/projects/netperf_socket/sys/conf/Makefile.sparc64#3 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#40 integrate .. //depot/projects/netperf_socket/sys/conf/files#51 integrate .. //depot/projects/netperf_socket/sys/conf/files.amd64#16 integrate .. //depot/projects/netperf_socket/sys/conf/files.pc98#16 integrate .. //depot/projects/netperf_socket/sys/conf/kmod.mk#14 integrate .. //depot/projects/netperf_socket/sys/conf/majors#6 integrate .. //depot/projects/netperf_socket/sys/conf/options#29 integrate .. //depot/projects/netperf_socket/sys/conf/options.amd64#7 integrate .. //depot/projects/netperf_socket/sys/conf/options.pc98#8 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pci_link.c#13 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_thermal.c#12 integrate .. //depot/projects/netperf_socket/sys/dev/aic7xxx/ahc_isa.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/ata/ata-chipset.c#19 integrate .. //depot/projects/netperf_socket/sys/dev/ata/ata-disk.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/bfe/if_bfe.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/bfe/if_bfereg.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/drm/radeon_drv.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/em/if_em.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/em/if_em.h#3 integrate .. //depot/projects/netperf_socket/sys/dev/em/if_em_hw.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/em/if_em_hw.h#3 integrate .. //depot/projects/netperf_socket/sys/dev/fdc/fdc_acpi.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/fdc/fdc_isa.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/firewire/fwcrom.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/md/md.c#19 integrate .. //depot/projects/netperf_socket/sys/dev/tga/tga_pci.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/usb/usbdi.c#4 integrate .. //depot/projects/netperf_socket/sys/fs/autofs/autofs.h#1 branch .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_util.c#1 branch .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_vfsops.c#1 branch .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_vnops.c#1 branch .. //depot/projects/netperf_socket/sys/geom/concat/g_concat.c#14 integrate .. //depot/projects/netperf_socket/sys/geom/geom_io.c#8 integrate .. //depot/projects/netperf_socket/sys/geom/label/g_label.c#6 integrate .. //depot/projects/netperf_socket/sys/geom/mirror/g_mirror.c#10 integrate .. //depot/projects/netperf_socket/sys/geom/raid3/g_raid3.c#6 integrate .. //depot/projects/netperf_socket/sys/geom/stripe/g_stripe.c#11 integrate .. //depot/projects/netperf_socket/sys/i386/bios/mca_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/i386/bios/vpd.c#4 integrate .. //depot/projects/netperf_socket/sys/i386/conf/NOTES#28 integrate .. //depot/projects/netperf_socket/sys/i386/i386/mp_machdep.c#9 integrate .. //depot/projects/netperf_socket/sys/i386/i386/pmap.c#27 integrate .. //depot/projects/netperf_socket/sys/i386/i386/trap.c#7 integrate .. //depot/projects/netperf_socket/sys/i386/include/param.h#5 integrate .. //depot/projects/netperf_socket/sys/i386/linux/linux_machdep.c#4 integrate .. //depot/projects/netperf_socket/sys/i4b/driver/i4b_ing.c#5 integrate .. //depot/projects/netperf_socket/sys/i4b/driver/i4b_ipr.c#4 integrate .. //depot/projects/netperf_socket/sys/i4b/driver/i4b_isppp.c#2 integrate .. //depot/projects/netperf_socket/sys/i4b/driver/i4b_rbch.c#4 integrate .. //depot/projects/netperf_socket/sys/i4b/driver/i4b_tel.c#4 integrate .. //depot/projects/netperf_socket/sys/i4b/driver/i4b_trace.c#4 integrate .. //depot/projects/netperf_socket/sys/i4b/layer4/i4b_i4bdrv.c#4 integrate .. //depot/projects/netperf_socket/sys/i4b/layer4/i4b_l4.c#2 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/exception.S#2 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/locore.S#4 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/pmap.c#18 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/support.S#3 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/syscall.S#3 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/trap.c#8 integrate .. //depot/projects/netperf_socket/sys/kern/init_main.c#8 integrate .. //depot/projects/netperf_socket/sys/kern/kern_conf.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/kern_fork.c#17 integrate .. //depot/projects/netperf_socket/sys/kern/kern_idle.c#6 integrate .. //depot/projects/netperf_socket/sys/kern/kern_intr.c#10 integrate .. //depot/projects/netperf_socket/sys/kern/kern_kse.c#13 integrate .. //depot/projects/netperf_socket/sys/kern/kern_kthread.c#2 integrate .. //depot/projects/netperf_socket/sys/kern/kern_prot.c#10 integrate .. //depot/projects/netperf_socket/sys/kern/kern_shutdown.c#15 integrate .. //depot/projects/netperf_socket/sys/kern/kern_sig.c#20 integrate .. //depot/projects/netperf_socket/sys/kern/kern_switch.c#12 integrate .. //depot/projects/netperf_socket/sys/kern/kern_thr.c#11 integrate .. //depot/projects/netperf_socket/sys/kern/kern_thread.c#25 integrate .. //depot/projects/netperf_socket/sys/kern/link_elf_obj.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/sched_4bsd.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/sched_ule.c#20 integrate .. //depot/projects/netperf_socket/sys/kern/subr_bus.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/subr_smp.c#11 integrate .. //depot/projects/netperf_socket/sys/kern/subr_trap.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/subr_turnstile.c#7 integrate .. //depot/projects/netperf_socket/sys/modules/Makefile#19 integrate .. //depot/projects/netperf_socket/sys/modules/aac/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/autofs/Makefile#1 branch .. //depot/projects/netperf_socket/sys/modules/cam/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/modules/coda/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/coda5/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/cp/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/ctau/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/modules/cx/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/modules/if_ppp/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/if_tap/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/pf/Makefile#5 integrate .. //depot/projects/netperf_socket/sys/net/if.c#18 integrate .. //depot/projects/netperf_socket/sys/net/if.h#7 integrate .. //depot/projects/netperf_socket/sys/net/if_sl.c#13 integrate .. //depot/projects/netperf_socket/sys/net/netisr.c#4 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_socket.c#7 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_tty.c#6 integrate .. //depot/projects/netperf_socket/sys/netinet6/ipsec.c#4 integrate .. //depot/projects/netperf_socket/sys/netipx/ipx.c#2 integrate .. //depot/projects/netperf_socket/sys/pc98/conf/GENERIC#14 integrate .. //depot/projects/netperf_socket/sys/pc98/pc98/atapi.c#2 integrate .. //depot/projects/netperf_socket/sys/pc98/pc98/wd.c#4 integrate .. //depot/projects/netperf_socket/sys/pci/if_pcn.c#8 integrate .. //depot/projects/netperf_socket/sys/pci/if_sf.c#9 integrate .. //depot/projects/netperf_socket/sys/pci/if_ste.c#17 integrate .. //depot/projects/netperf_socket/sys/pci/if_ti.c#9 integrate .. //depot/projects/netperf_socket/sys/pci/if_tl.c#6 integrate .. //depot/projects/netperf_socket/sys/pci/if_wb.c#8 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/pmap.c#17 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/trap.c#6 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/trap.c#3 integrate .. //depot/projects/netperf_socket/sys/sys/bio.h#7 integrate .. //depot/projects/netperf_socket/sys/sys/kernel.h#6 integrate .. //depot/projects/netperf_socket/sys/sys/param.h#28 integrate .. //depot/projects/netperf_socket/sys/sys/proc.h#25 integrate .. //depot/projects/netperf_socket/sys/sys/sched.h#6 integrate .. //depot/projects/netperf_socket/sys/sys/smp.h#5 integrate .. //depot/projects/netperf_socket/sys/sys/systm.h#10 integrate .. //depot/projects/netperf_socket/sys/sys/ucred.h#3 integrate .. //depot/projects/netperf_socket/sys/vm/vm_fault.c#9 integrate .. //depot/projects/netperf_socket/sys/vm/vm_mmap.c#12 integrate .. //depot/projects/netperf_socket/sys/vm/vm_object.c#11 integrate .. //depot/projects/netperf_socket/sys/vm/vm_zeroidle.c#5 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/alpha/trap.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.118 2004/07/10 22:35:05 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.120 2004/08/31 07:34:53 julian Exp $"); /* #include "opt_fix_unaligned_vax_fp.h" */ #include "opt_ddb.h" @@ -591,9 +591,6 @@ framep->tf_regs[FRAME_SP] = alpha_pal_rdusp(); userret(td, framep, sticks); mtx_assert(&Giant, MA_NOTOWNED); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif } return; @@ -665,7 +662,7 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); if (p->p_flag & P_SA) - thread_user_enter(p, td); + thread_user_enter(td); #ifdef DIAGNOSTIC alpha_fpstate_check(td); #endif @@ -785,9 +782,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#9 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.175 2004/08/27 15:16:21 andre Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.177 2004/08/30 18:40:00 wilko Exp $ machine alpha cpu EV4 @@ -41,7 +41,8 @@ options DEC_ST550 # Personal Workstation 433, 500, 600 options DEC_ST6600 # XP1000, DP264, DS20, DS10, family options DEC_1000A # AlphaServer 1000, 1000A, 800 -options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) +# TurboLaser support is broken +# options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) @@ -152,6 +153,7 @@ # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') +device em # Intel PRO/1000 adapter Gigabit Ethernet Card device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') ==== //depot/projects/netperf_socket/sys/alpha/conf/NOTES#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.154 2004/07/10 22:29:40 marcel Exp $ +# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.155 2004/08/28 21:47:24 wilko Exp $ # # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. @@ -36,7 +36,8 @@ options DEC_ST550 # Personal Workstation 433, 500, 600 options DEC_ST6600 # XP1000, DP264, DS20, DS10, family options DEC_1000A # AlphaServer 1000, 1000A, 800 -options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) +# TurboLaser support is broken +# options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) ==== //depot/projects/netperf_socket/sys/alpha/linux/linux_machdep.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.33 2004/02/04 21:52:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.34 2004/09/01 02:11:27 julian Exp $"); #include #include @@ -180,7 +180,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2); + setrunqueue(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/netperf_socket/sys/alpha/pci/pcibus.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.34 2004/07/01 15:07:27 gallatin Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.35 2004/08/29 19:07:14 marcel Exp $"); #include "opt_isa.h" @@ -262,7 +262,7 @@ else if (flags & PCI_RF_BWX) va = ALPHAPCI_CVT_BWX(bus, rv->r_start); else - va = (void *) rv->r_start; /* maybe NULL? */ + va = (void *)ALPHA_PHYS_TO_K0SEG(rv->r_start); rman_set_virtual(rv, va); break; ==== //depot/projects/netperf_socket/sys/amd64/amd64/mp_machdep.c#12 (text+ko) ==== @@ -25,10 +25,11 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.244 2004/08/28 00:49:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.246 2004/09/01 06:42:01 julian Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" +#include "opt_mp_watchdog.h" #include #include @@ -56,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -111,7 +113,6 @@ */ static u_int logical_cpus; -static u_int logical_cpus_mask; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -136,7 +137,6 @@ static int start_ap(int apic_id); static void release_aps(void *dummy); -static int hlt_cpus_mask; static int hlt_logical_cpus; static struct sysctl_ctx_list logical_cpu_clist; static u_int bootMP_size; @@ -1067,8 +1067,15 @@ mp_grab_cpu_hlt(void) { u_int mask = PCPU_GET(cpumask); +#ifdef MP_WATCHDOG + u_int cpuid = PCPU_GET(cpuid); +#endif int retval; +#ifdef MP_WATCHDOG + ap_watchdog(cpuid); +#endif + retval = mask & hlt_cpus_mask; while (mask & hlt_cpus_mask) __asm __volatile("sti; hlt" : : : "memory"); ==== //depot/projects/netperf_socket/sys/amd64/amd64/pmap.c#27 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.495 2004/08/28 00:49:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.496 2004/08/30 03:52:04 alc Exp $"); /* * Manages physical address maps. @@ -2451,7 +2451,7 @@ pv_entry_t pv, npv; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY - if (!curthread || (pmap != vmspace_pmap(curthread->td_proc->p_vmspace))) { + if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } ==== //depot/projects/netperf_socket/sys/amd64/amd64/trap.c#10 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.279 2004/08/16 22:56:20 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.281 2004/08/31 07:34:53 julian Exp $"); /* * AMD64 Trap and System call handling @@ -259,7 +259,7 @@ case T_PAGEFLT: /* page fault */ if (td->td_pflags & TDP_SA) - thread_user_enter(p, td); + thread_user_enter(td); i = trap_pfault(&frame, TRUE); if (i == -1) goto userout; @@ -471,9 +471,6 @@ userret(td, &frame, sticks); mtx_assert(&Giant, MA_NOTOWNED); userout: -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif out: return; } @@ -698,7 +695,7 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); if (p->p_flag & P_SA) - thread_user_enter(p, td); + thread_user_enter(td); params = (caddr_t)frame.tf_rsp + sizeof(register_t); code = frame.tf_rax; orig_tf_rflags = frame.tf_rflags; @@ -830,9 +827,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/netperf_socket/sys/amd64/ia32/ia32_syscall.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.6 2003/11/17 08:58:14 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.7 2004/08/31 06:12:12 julian Exp $"); /* * 386 Trap and System call handling @@ -247,9 +247,6 @@ */ STOPEVENT(p, S_SCX, code); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/netperf_socket/sys/amd64/linux32/linux32_machdep.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.3 2004/08/24 20:52:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.4 2004/09/01 02:11:27 julian Exp $"); #include #include @@ -503,7 +503,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2); + setrunqueue(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/netperf_socket/sys/boot/common/Makefile.inc#3 (text+ko) ==== @@ -1,17 +1,18 @@ -# $FreeBSD: src/sys/boot/common/Makefile.inc,v 1.17 2004/02/07 11:05:10 ru Exp $ +# $FreeBSD: src/sys/boot/common/Makefile.inc,v 1.19 2004/08/29 00:48:41 iedowse Exp $ SRCS+= bcache.c boot.c commands.c console.c devopen.c interp.c SRCS+= interp_backslash.c interp_parse.c ls.c misc.c SRCS+= module.c panic.c .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -SRCS+= load_elf32.c load_elf64.c +SRCS+= load_elf32.c load_elf32_obj.c load_elf64.c load_elf64_obj.c +SRCS+= reloc_elf32.c reloc_elf64.c .endif .if ${MACHINE_ARCH} == "powerpc" -SRCS+= load_elf32.c +SRCS+= load_elf32.c reloc_elf32.c .endif .if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "alpha" -SRCS+= load_elf64.c +SRCS+= load_elf64.c reloc_elf64.c .endif .if defined(LOADER_NET_SUPPORT) ==== //depot/projects/netperf_socket/sys/boot/common/bootstrap.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.38 2003/05/01 03:56:29 peter Exp $ + * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.41 2004/08/29 00:48:41 iedowse Exp $ */ #include @@ -76,6 +76,9 @@ void hexdump(caddr_t region, size_t len); size_t strlenout(vm_offset_t str); char *strdupout(vm_offset_t str); +void kern_bzero(vm_offset_t dest, size_t len); +int kern_pread(int fd, vm_offset_t dest, size_t len, off_t off); +void *alloc_pread(int fd, off_t off, size_t len); /* bcache.c */ int bcache_init(u_int nblks, size_t bsize); @@ -232,7 +235,19 @@ /* MI module loaders */ #ifdef __elfN +/* Relocation types. */ +#define ELF_RELOC_REL 1 +#define ELF_RELOC_RELA 2 + +struct elf_file; +typedef Elf_Addr (symaddr_fn)(struct elf_file *ef, Elf_Word symidx); + int __elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result); +int __elfN(obj_loadfile)(char *filename, u_int64_t dest, + struct preloaded_file **result); +int __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, + const void *reldata, int reltype, Elf_Addr relbase, + Elf_Addr dataaddr, void *data, size_t len); #endif /* ==== //depot/projects/netperf_socket/sys/boot/common/load_elf.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.30 2004/03/11 10:07:24 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.32 2004/08/28 23:03:05 iedowse Exp $"); #include #include @@ -58,6 +58,8 @@ Elf_Hashelt nchains; Elf_Hashelt *buckets; Elf_Hashelt *chains; + Elf_Rel *rel; + size_t relsz; Elf_Rela *rela; size_t relasz; char *strtab; @@ -71,11 +73,10 @@ static int __elfN(loadimage)(struct preloaded_file *mp, elf_file_t ef, u_int64_t loadaddr); static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const char* name, Elf_Sym* sym); -#ifdef __sparc__ -static void __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, - void *p, void *val, size_t len); -#endif +static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, + Elf_Addr p, void *val, size_t len); static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef); +static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); const char *__elfN(kerneltype) = "elf kernel"; @@ -241,10 +242,8 @@ int ret; vm_offset_t firstaddr; vm_offset_t lastaddr; - void *buf; - size_t resid, chunk; + size_t chunk; ssize_t result; - vm_offset_t dest; Elf_Addr ssym, esym; Elf_Dyn *dp; Elf_Addr adp; @@ -305,14 +304,10 @@ phdr[i].p_vaddr + off, fpcopy); } if (phdr[i].p_filesz > fpcopy) { - if (lseek(ef->fd, (off_t)(phdr[i].p_offset + fpcopy), - SEEK_SET) == -1) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadexec: cannot seek\n"); - goto out; - } - if (archsw.arch_readin(ef->fd, phdr[i].p_vaddr + off + fpcopy, - phdr[i].p_filesz - fpcopy) != (ssize_t)(phdr[i].p_filesz - fpcopy)) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadexec: archsw.readin failed\n"); + if (kern_pread(ef->fd, phdr[i].p_vaddr + off + fpcopy, + phdr[i].p_filesz - fpcopy, phdr[i].p_offset + fpcopy) != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "_loadimage: read failed\n"); goto out; } } @@ -324,22 +319,8 @@ (long)(phdr[i].p_vaddr + off + phdr[i].p_memsz - 1)); #endif - /* no archsw.arch_bzero */ - buf = malloc(PAGE_SIZE); - if (buf == NULL) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: malloc() failed\n"); - goto out; - } - bzero(buf, PAGE_SIZE); - resid = phdr[i].p_memsz - phdr[i].p_filesz; - dest = phdr[i].p_vaddr + off + phdr[i].p_filesz; - while (resid > 0) { - chunk = min(PAGE_SIZE, resid); - archsw.arch_copyin(buf, dest, chunk); - resid -= chunk; - dest += chunk; - } - free(buf); + kern_bzero(phdr[i].p_vaddr + off + phdr[i].p_filesz, + phdr[i].p_memsz - phdr[i].p_filesz); } #ifdef ELF_VERBOSE printf("\n"); @@ -361,16 +342,10 @@ chunk = ehdr->e_shnum * ehdr->e_shentsize; if (chunk == 0 || ehdr->e_shoff == 0) goto nosyms; - shdr = malloc(chunk); - if (shdr == NULL) - goto nosyms; - if (lseek(ef->fd, (off_t)ehdr->e_shoff, SEEK_SET) == -1) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: cannot lseek() to section headers"); - goto nosyms; - } - result = read(ef->fd, shdr, chunk); - if (result < 0 || (size_t)result != chunk) { - printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: read section headers failed"); + shdr = alloc_pread(ef->fd, ehdr->e_shoff, chunk); + if (shdr == NULL) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "_loadimage: failed to read section headers"); goto nosyms; } symtabindex = -1; @@ -507,6 +482,12 @@ case DT_SYMTAB: ef->symtab = (Elf_Sym*)(uintptr_t)(dp[i].d_un.d_ptr + off); break; + case DT_REL: + ef->rel = (Elf_Rel *)(uintptr_t)(dp[i].d_un.d_ptr + off); + break; + case DT_RELSZ: + ef->relsz = dp[i].d_un.d_val; + break; case DT_RELA: ef->rela = (Elf_Rela *)(uintptr_t)(dp[i].d_un.d_ptr + off); break; @@ -589,7 +570,7 @@ struct mod_version mver; Elf_Sym sym; char *s; - int modcnt, minfolen; + int error, modcnt, minfolen; Elf_Addr v, p, p_stop; if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0) @@ -602,25 +583,31 @@ modcnt = 0; while (p < p_stop) { COPYOUT(p, &v, sizeof(v)); -#ifdef __sparc64__ - __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v)); -#else - v += ef->off; -#endif + error = __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v)); + if (error == EOPNOTSUPP) + v += ef->off; + else if (error != 0) + return (error); #if defined(__i386__) && __ELF_WORD_SIZE == 64 COPYOUT(v, &md64, sizeof(md64)); + error = __elfN(reloc_ptr)(fp, ef, v, &md64, sizeof(md64)); + if (error == EOPNOTSUPP) { + md64.md_cval += ef->off; + md64.md_data += ef->off; + } else if (error != 0) + return (error); md.md_version = md64.md_version; md.md_type = md64.md_type; - md.md_cval = (const char *)(uintptr_t)(md64.md_cval + ef->off); - md.md_data = (void *)(uintptr_t)(md64.md_data + ef->off); + md.md_cval = (const char *)(uintptr_t)md64.md_cval; + md.md_data = (void *)(uintptr_t)md64.md_data; #else COPYOUT(v, &md, sizeof(md)); -#ifdef __sparc64__ - __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md)); -#else - md.md_cval += ef->off; - md.md_data += ef->off; -#endif + error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md)); + if (error == EOPNOTSUPP) { + md.md_cval += ef->off; + md.md_data += ef->off; + } else if (error != 0) + return (error); #endif p += sizeof(Elf_Addr); switch(md.md_type) { @@ -713,29 +700,53 @@ return ENOENT; } -#ifdef __sparc__ /* - * Apply any intra-module relocations to the value. *p is the load address + * Apply any intra-module relocations to the value. p is the load address * of the value and val/len is the value to be modified. This does NOT modify * the image in-place, because this is done by kern_linker later on. + * + * Returns EOPNOTSUPP if no relocation method is supplied. */ -static void +static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, - void *p, void *val, size_t len) + Elf_Addr p, void *val, size_t len) { - Elf_Addr off = (Elf_Addr)p - ef->off, word; size_t n; - Elf_Rela r; + Elf_Rela a; + Elf_Rel r; + int error; + + /* + * The kernel is already relocated, but we still want to apply + * offset adjustments. + */ + if (ef->kernel) + return (EOPNOTSUPP); + + for (n = 0; n < ef->relsz / sizeof(r); n++) { + COPYOUT(ef->rel + n, &r, sizeof(r)); - for (n = 0; n < ef->relasz / sizeof(r); n++) { - COPYOUT(ef->rela + n, &r, sizeof(r)); + error = __elfN(reloc)(ef, __elfN(symaddr), &r, ELF_RELOC_REL, + ef->off, p, val, len); + if (error != 0) + return (error); + } + for (n = 0; n < ef->relasz / sizeof(a); n++) { + COPYOUT(ef->rela + n, &a, sizeof(a)); - if (r.r_offset >= off && r.r_offset < off + len && - ELF_R_TYPE(r.r_info) == R_SPARC_RELATIVE) { - word = ef->off + r.r_addend; - bcopy(&word, (char *)val + (r.r_offset - off), - sizeof(word)); - } + error = __elfN(reloc)(ef, __elfN(symaddr), &a, ELF_RELOC_RELA, + ef->off, p, val, len); + if (error != 0) + return (error); } + + return (0); } -#endif + +static Elf_Addr +__elfN(symaddr)(struct elf_file *ef, Elf_Word symidx) +{ + + /* Symbol lookup by index not required here. */ + return (0); +} ==== //depot/projects/netperf_socket/sys/boot/common/misc.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/common/misc.c,v 1.8 2003/08/25 23:30:41 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/misc.c,v 1.9 2004/08/28 14:57:34 iedowse Exp $"); #include #include @@ -93,6 +93,74 @@ return(result); } +/* Zero a region in kernel space. */ +void +kern_bzero(vm_offset_t dest, size_t len) +{ + char buf[256]; + size_t chunk, resid; + + bzero(buf, sizeof(buf)); + resid = len; + while (resid > 0) { + chunk = min(sizeof(buf), resid); + archsw.arch_copyin(buf, dest, chunk); + resid -= chunk; + dest += chunk; + } +} + +/* + * Read the specified part of a file to kernel space. Unlike regular + * pread, the file pointer is advanced to the end of the read data, + * and it just returns 0 if successful. + */ +int +kern_pread(int fd, vm_offset_t dest, size_t len, off_t off) +{ + ssize_t nread; + + if (lseek(fd, off, SEEK_SET) == -1) { + printf("\nlseek failed\n"); + return (-1); + } + nread = archsw.arch_readin(fd, dest, len); + if (nread != len) { + printf("\nreadin failed\n"); + return (-1); + } + return (0); +} + +/* + * Read the specified part of a file to a malloced buffer. The file + * pointer is advanced to the end of the read data. + */ +void * +alloc_pread(int fd, off_t off, size_t len) +{ + void *buf; + ssize_t nread; + + buf = malloc(len); + if (buf == NULL) { + printf("\nmalloc(%d) failed\n", (int)len); + return (NULL); + } + if (lseek(fd, off, SEEK_SET) == -1) { + printf("\nlseek failed\n"); + free(buf); + return (NULL); + } + nread = read(fd, buf, len); + if (nread != len) { + printf("\nread failed\n"); + free(buf); + return (NULL); + } + return (buf); +} + /* * Display a region in traditional hexdump format. */ ==== //depot/projects/netperf_socket/sys/boot/i386/libi386/elf32_freebsd.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf32_freebsd.c,v 1.13 2003/08/25 23:28:31 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf32_freebsd.c,v 1.14 2004/08/29 00:48:41 iedowse Exp $"); #include #include @@ -40,8 +40,10 @@ #include "btxv86.h" static int elf32_exec(struct preloaded_file *amp); +static int elf32_obj_exec(struct preloaded_file *amp); struct file_format i386_elf = { elf32_loadfile, elf32_exec }; +struct file_format i386_elf_obj = { elf32_obj_loadfile, elf32_obj_exec }; /* * There is an a.out kernel and one or more a.out modules loaded. @@ -74,3 +76,9 @@ panic("exec returned"); } + +static int +elf32_obj_exec(struct preloaded_file *fp) +{ + return (EFTYPE); +} ==== //depot/projects/netperf_socket/sys/boot/i386/libi386/elf64_freebsd.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf64_freebsd.c,v 1.14 2003/08/25 23:28:31 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/elf64_freebsd.c,v 1.15 2004/08/29 00:48:41 iedowse Exp $"); #define __ELF_WORD_SIZE 64 #include @@ -41,8 +41,10 @@ #include "btxv86.h" static int elf64_exec(struct preloaded_file *amp); +static int elf64_obj_exec(struct preloaded_file *amp); struct file_format amd64_elf = { elf64_loadfile, elf64_exec }; +struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec }; #define PG_V 0x001 #define PG_RW 0x002 @@ -116,3 +118,9 @@ panic("exec returned"); } + +static int +elf64_obj_exec(struct preloaded_file *fp) +{ + return (EFTYPE); +} ==== //depot/projects/netperf_socket/sys/boot/i386/loader/conf.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/loader/conf.c,v 1.24 2003/08/25 23:28:32 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/loader/conf.c,v 1.25 2004/08/29 00:48:42 iedowse Exp $"); #include #include @@ -83,11 +83,15 @@ * rather than reading the file go first. */ extern struct file_format i386_elf; +extern struct file_format i386_elf_obj; extern struct file_format amd64_elf; +extern struct file_format amd64_elf_obj; struct file_format *file_formats[] = { &i386_elf, + &i386_elf_obj, &amd64_elf, + &amd64_elf_obj, NULL }; ==== //depot/projects/netperf_socket/sys/cam/cam_periph.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.56 2003/11/08 10:56:57 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.57 2004/08/30 20:14:21 gibbs Exp $"); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Sep 2 19:43:00 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5119A16A4D0; Thu, 2 Sep 2004 19:43:00 +0000 (GMT) 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 29DCA16A4CE for ; Thu, 2 Sep 2004 19:43:00 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00F6A43D46 for ; Thu, 2 Sep 2004 19:43:00 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i82JgxkB096759 for ; Thu, 2 Sep 2004 19:42:59 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i82Jgxcx096756 for perforce@freebsd.org; Thu, 2 Sep 2004 19:42:59 GMT (envelope-from peter@freebsd.org) Date: Thu, 2 Sep 2004 19:42:59 GMT Message-Id: <200409021942.i82Jgxcx096756@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60873 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, 02 Sep 2004 19:43:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=60873 Change 60873 by peter@peter_daintree on 2004/09/02 19:42:05 IFC @60871 Affected files ... .. //depot/projects/hammer/UPDATING#52 integrate .. //depot/projects/hammer/contrib/pf/pflogd/pflogd.c#4 integrate .. //depot/projects/hammer/etc/devd.conf#12 integrate .. //depot/projects/hammer/etc/rc.d/pflog#2 integrate .. //depot/projects/hammer/gnu/lib/libstdc++/Makefile#20 integrate .. //depot/projects/hammer/lib/libarchive/Makefile#12 integrate .. //depot/projects/hammer/lib/libautofs/Makefile#1 branch .. //depot/projects/hammer/lib/libautofs/libautofs.3#1 branch .. //depot/projects/hammer/lib/libautofs/libautofs.c#1 branch .. //depot/projects/hammer/lib/libautofs/libautofs.h#1 branch .. //depot/projects/hammer/lib/libc/gen/glob.3#7 integrate .. //depot/projects/hammer/release/Makefile.inc.docports#11 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/sparc64/proc-sparc64.sgml#3 integrate .. //depot/projects/hammer/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml#3 integrate .. //depot/projects/hammer/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.sgml#2 integrate .. //depot/projects/hammer/release/doc/ru_RU.KOI8-R/installation/common/install.sgml#4 integrate .. //depot/projects/hammer/release/doc/ru_RU.KOI8-R/installation/common/layout.sgml#3 integrate .. //depot/projects/hammer/release/doc/ru_RU.KOI8-R/installation/common/trouble.sgml#2 integrate .. //depot/projects/hammer/release/doc/ru_RU.KOI8-R/readme/article.sgml#4 integrate .. //depot/projects/hammer/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml#4 integrate .. //depot/projects/hammer/release/doc/ru_RU.KOI8-R/relnotes/i386/Makefile#2 integrate .. //depot/projects/hammer/release/fixit.profile#2 integrate .. //depot/projects/hammer/sbin/fsck_ffs/Makefile#6 integrate .. //depot/projects/hammer/sbin/fsck_ffs/dir.c#6 integrate .. //depot/projects/hammer/sbin/fsck_ffs/fsck.h#7 integrate .. //depot/projects/hammer/sbin/fsck_ffs/inode.c#4 integrate .. //depot/projects/hammer/sbin/fsck_ffs/pass1.c#9 integrate .. //depot/projects/hammer/sbin/fsck_ffs/pass2.c#6 integrate .. //depot/projects/hammer/sbin/ifconfig/ifconfig.c#20 integrate .. //depot/projects/hammer/sbin/mount_autofs/Makefile#1 branch .. //depot/projects/hammer/sbin/mount_autofs/mount_autofs.8#1 branch .. //depot/projects/hammer/sbin/mount_autofs/mount_autofs.c#1 branch .. //depot/projects/hammer/sbin/mount_msdosfs/mount_msdosfs.c#7 integrate .. //depot/projects/hammer/share/examples/autofs/driver/Makefile#1 branch .. //depot/projects/hammer/share/examples/autofs/driver/autodriver.c#1 branch .. //depot/projects/hammer/share/examples/autofs/driver/autotab#1 branch .. //depot/projects/hammer/share/man/man5/autofs.5#1 branch .. //depot/projects/hammer/sys/alpha/alpha/trap.c#13 integrate .. //depot/projects/hammer/sys/alpha/include/param.h#9 integrate .. //depot/projects/hammer/sys/alpha/linux/linux_machdep.c#9 integrate .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#71 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#53 integrate .. //depot/projects/hammer/sys/amd64/ia32/ia32_syscall.c#10 integrate .. //depot/projects/hammer/sys/amd64/include/param.h#24 integrate .. //depot/projects/hammer/sys/amd64/linux32/linux32_machdep.c#3 integrate .. //depot/projects/hammer/sys/coda/cnode.h#5 integrate .. //depot/projects/hammer/sys/coda/coda_fbsd.c#13 integrate .. //depot/projects/hammer/sys/coda/coda_psdev.c#10 integrate .. //depot/projects/hammer/sys/coda/coda_vfsops.c#11 integrate .. //depot/projects/hammer/sys/conf/NOTES#64 integrate .. //depot/projects/hammer/sys/conf/majors#24 integrate .. //depot/projects/hammer/sys/conf/options#57 integrate .. //depot/projects/hammer/sys/dev/acpica/Osd/OsdDebug.c#6 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi_pci_link.c#19 integrate .. //depot/projects/hammer/sys/dev/ata/ata-chipset.c#42 integrate .. //depot/projects/hammer/sys/dev/ata/ata-disk.c#22 integrate .. //depot/projects/hammer/sys/dev/bfe/if_bfe.c#10 integrate .. //depot/projects/hammer/sys/dev/bfe/if_bfereg.h#4 integrate .. //depot/projects/hammer/sys/dev/em/if_em.c#28 integrate .. //depot/projects/hammer/sys/dev/em/if_em.h#18 integrate .. //depot/projects/hammer/sys/dev/em/if_em_hw.c#12 integrate .. //depot/projects/hammer/sys/dev/em/if_em_hw.h#12 integrate .. //depot/projects/hammer/sys/dev/fdc/fdc_isa.c#7 integrate .. //depot/projects/hammer/sys/dev/tga/tga_pci.c#8 integrate .. //depot/projects/hammer/sys/fs/autofs/autofs.h#1 branch .. //depot/projects/hammer/sys/fs/autofs/autofs_util.c#1 branch .. //depot/projects/hammer/sys/fs/autofs/autofs_vfsops.c#1 branch .. //depot/projects/hammer/sys/fs/autofs/autofs_vnops.c#1 branch .. //depot/projects/hammer/sys/fs/pseudofs/pseudofs_vnops.c#12 integrate .. //depot/projects/hammer/sys/i386/bios/mca_machdep.c#4 integrate .. //depot/projects/hammer/sys/i386/bios/vpd.c#5 integrate .. //depot/projects/hammer/sys/i386/i386/mp_machdep.c#33 integrate .. //depot/projects/hammer/sys/i386/i386/pmap.c#52 integrate .. //depot/projects/hammer/sys/i386/i386/trap.c#28 integrate .. //depot/projects/hammer/sys/i386/include/param.h#10 integrate .. //depot/projects/hammer/sys/i386/linux/linux_machdep.c#13 integrate .. //depot/projects/hammer/sys/ia64/conf/GENERIC#18 integrate .. //depot/projects/hammer/sys/ia64/ia64/trap.c#27 integrate .. //depot/projects/hammer/sys/kern/init_main.c#26 integrate .. //depot/projects/hammer/sys/kern/kern_fork.c#39 integrate .. //depot/projects/hammer/sys/kern/kern_idle.c#14 integrate .. //depot/projects/hammer/sys/kern/kern_intr.c#29 integrate .. //depot/projects/hammer/sys/kern/kern_kse.c#10 integrate .. //depot/projects/hammer/sys/kern/kern_kthread.c#8 integrate .. //depot/projects/hammer/sys/kern/kern_mutex.c#25 integrate .. //depot/projects/hammer/sys/kern/kern_prot.c#18 integrate .. //depot/projects/hammer/sys/kern/kern_shutdown.c#25 integrate .. //depot/projects/hammer/sys/kern/kern_sig.c#47 integrate .. //depot/projects/hammer/sys/kern/kern_switch.c#24 integrate .. //depot/projects/hammer/sys/kern/kern_thr.c#21 integrate .. //depot/projects/hammer/sys/kern/sched_4bsd.c#26 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#46 integrate .. //depot/projects/hammer/sys/kern/subr_smp.c#22 integrate .. //depot/projects/hammer/sys/kern/subr_trap.c#25 integrate .. //depot/projects/hammer/sys/kern/subr_turnstile.c#12 integrate .. //depot/projects/hammer/sys/modules/autofs/Makefile#1 branch .. //depot/projects/hammer/sys/modules/coda/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/coda5/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/cp/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/ctau/Makefile#3 integrate .. //depot/projects/hammer/sys/modules/cx/Makefile#4 integrate .. //depot/projects/hammer/sys/modules/if_ppp/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/if_tap/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/pf/Makefile#5 integrate .. //depot/projects/hammer/sys/net/if.c#28 integrate .. //depot/projects/hammer/sys/net/if.h#14 integrate .. //depot/projects/hammer/sys/pc98/conf/NOTES#33 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/trap.c#11 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/trap.c#15 integrate .. //depot/projects/hammer/sys/sys/proc.h#62 integrate .. //depot/projects/hammer/sys/sys/sched.h#12 integrate .. //depot/projects/hammer/sys/sys/smp.h#9 integrate .. //depot/projects/hammer/sys/sys/ucred.h#6 integrate .. //depot/projects/hammer/sys/vm/vm_fault.c#23 integrate .. //depot/projects/hammer/sys/vm/vm_mmap.c#26 integrate .. //depot/projects/hammer/sys/vm/vm_zeroidle.c#14 integrate .. //depot/projects/hammer/usr.sbin/kgzip/kgzcmp.c#4 integrate Differences ... ==== //depot/projects/hammer/UPDATING#52 (text+ko) ==== @@ -23,11 +23,28 @@ developers choose to disable these features on build machines to maximize performance. +20040902: + The ifi_epoch change has been reverted because the ABI breakage + was too extensive. If you are running with a kernel/userland + containing the initial change (20040830), you should heed the + warning about ifconfig incompatibility when upgrading again. + With this change, 5.3 and 6.0 ifconfigs and kernels are once + again interoperable. + 20040830: A new variable, ifi_epoch, has been added to struct if_data which is part if struct ifnet. This means all network drivers and network monitoring applications need to be recompiled. + WARNING WARNING WARNING WARNING WARNING WARNING WARNING + + This also breaks ifconfig compatibility. An old ifconfig will + not work with the new kernel and a new ifconfig will not work + with the old. It is strongly recommended that you make a copy + of your old ifconfig before installworld. If you are installing + remotely, you must copy over a new ifconfig before rebooting in + to the new kernel. + 20040828: The default configuration for the network stack has been changed such that it now runs without the Giant lock unless configured @@ -1821,4 +1838,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.352 2004/08/30 06:29:25 brooks Exp $ +$FreeBSD: src/UPDATING,v 1.354 2004/09/02 05:07:29 brooks Exp $ ==== //depot/projects/hammer/contrib/pf/pflogd/pflogd.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/contrib/pf/pflogd/pflogd.c,v 1.5 2004/06/16 23:39:32 mlaier Exp $"); +__FBSDID("$FreeBSD: src/contrib/pf/pflogd/pflogd.c,v 1.6 2004/08/31 18:04:34 mlaier Exp $"); #include #include @@ -325,7 +325,11 @@ scan_dump(FILE *fp, off_t size) { struct pcap_file_header hdr; +#ifdef __FreeBSD__ + struct pcap_sf_pkthdr ph; +#else struct pcap_pkthdr ph; +#endif off_t pos; /* @@ -395,17 +399,34 @@ dump_packet_nobuf(u_char *user, const struct pcap_pkthdr *h, const u_char *sp) { FILE *f = (FILE *)user; +#ifdef __FreeBSD__ + struct pcap_sf_pkthdr sh; +#endif if (suspended) { packets_dropped++; return; } +#ifdef __FreeBSD__ + sh.ts.tv_sec = (bpf_int32)h->ts.tv_sec; + sh.ts.tv_usec = (bpf_int32)h->ts.tv_usec; + sh.caplen = h->caplen; + sh.len = h->len; + + if (fwrite((char *)&sh, sizeof(sh), 1, f) != 1) { +#else if (fwrite((char *)h, sizeof(*h), 1, f) != 1) { +#endif /* try to undo header to prevent corruption */ off_t pos = ftello(f); +#ifdef __FreeBSD__ + if (pos < sizeof(sh) || + ftruncate(fileno(f), pos - sizeof(sh))) { +#else if (pos < sizeof(*h) || ftruncate(fileno(f), pos - sizeof(*h))) { +#endif logmsg(LOG_ERR, "Write failed, corrupted logfile!"); set_suspended(1); gotsig_close = 1; @@ -474,7 +495,12 @@ dump_packet(u_char *user, const struct pcap_pkthdr *h, const u_char *sp) { FILE *f = (FILE *)user; +#ifdef __FreeBSD__ + struct pcap_sf_pkthdr sh; + size_t len = sizeof(sh) + h->caplen; +#else size_t len = sizeof(*h) + h->caplen; +#endif if (len < sizeof(*h) || h->caplen > (size_t)cur_snaplen) { logmsg(LOG_NOTICE, "invalid size %u (%u/%u), packet dropped", @@ -502,8 +528,18 @@ } append: +#ifdef __FreeBSD__ + sh.ts.tv_sec = (bpf_int32)h->ts.tv_sec; + sh.ts.tv_usec = (bpf_int32)h->ts.tv_usec; + sh.caplen = h->caplen; + sh.len = h->len; + + memcpy(bufpos, &sh, sizeof(sh)); + memcpy(bufpos + sizeof(sh), sp, h->caplen); +#else memcpy(bufpos, h, sizeof(*h)); memcpy(bufpos + sizeof(*h), sp, h->caplen); +#endif bufpos += len; bufleft -= len; ==== //depot/projects/hammer/etc/devd.conf#12 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/devd.conf,v 1.14 2004/07/05 20:16:30 imp Exp $ +# $FreeBSD: src/etc/devd.conf,v 1.15 2004/09/01 00:08:15 brooks Exp $ # # Refer to devd.conf(5) and devd(8) man pages for the details on how to # run and configure devd. @@ -55,6 +55,16 @@ device-name "ed50"; }; +# When a USB keyboard arrives, attach it as the console keyboard +attach 100 { + device-name "ukbd0"; + action "test -c /dev/kbd1 && kbdcontrol -k /dev/kbd1 < /dev/console"; +}; +detach 100 { + device-name "ukbd0"; + action "kbdcontrol -k /dev/kbd0 < /dev/console"; +}; + # # Rescan scsi device-names on attach, but not detach. # ==== //depot/projects/hammer/etc/rc.d/pflog#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/pflog,v 1.1 2004/04/02 19:25:27 mlaier Exp $ +# $FreeBSD: src/etc/rc.d/pflog,v 1.2 2004/08/31 14:23:51 mlaier Exp $ # # PROVIDE: pflog @@ -27,7 +27,7 @@ { # load pflog kernel module if needed if ! kldstat -v | grep -q pflog\$; then - if kldload pflog; then + if kldload pf; then info 'pflog module loaded.' else err 1 'pflog module failed to load.' @@ -39,7 +39,7 @@ warn 'pflog: COULD NOT SET UP pflog0' fi - # check for pf rules + # check for pflogd binary if [ ! -x "${pflog_program:-/sbin/pflogd}" ] then warn 'pflog: NO PFLOGD BINARY FOUND' ==== //depot/projects/hammer/gnu/lib/libstdc++/Makefile#20 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.51 2004/07/28 05:27:18 kan Exp $ +# $FreeBSD: src/gnu/lib/libstdc++/Makefile,v 1.52 2004/09/01 08:17:20 ru Exp $ GCCDIR= ${.CURDIR}/../../../contrib/gcc SRCDIR= ${.CURDIR}/../../../contrib/libstdc++ @@ -71,6 +71,7 @@ atomicity.cc: ${ATOMICITY_H} ln -sf ${.ALLSRC} ${.TARGET} +CLEANFILES+= atomicity.cc INCSGROUPS= BITSHDRS BKWHDRS EXTHDRS BASEHDRS BASEXHDRS STDHDRS \ TARGETHDRS THRHDRS DEBUGHDRS ==== //depot/projects/hammer/lib/libarchive/Makefile#12 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libarchive/Makefile,v 1.20 2004/08/14 03:45:45 kientzle Exp $ +# $FreeBSD: src/lib/libarchive/Makefile,v 1.22 2004/09/01 05:07:17 kientzle Exp $ # # Use "make distfile" to build a conventional tar.gz archive @@ -27,7 +27,9 @@ INCS= archive.h archive_entry.h -SRCS= archive_check_magic.c \ +# Note: archive.h does need to be listed here, since it's built +SRCS= archive.h \ + archive_check_magic.c \ archive_entry.c \ archive_read.c \ archive_read_data_into_buffer.c \ @@ -166,20 +168,6 @@ MLINKS+= archive_write.3 archive_write_set_format_ustar.3 MLINKS+= libarchive.3 archive.3 -# -# archive.h is built dynamically, which has a number of implications... -# - -# Ensure archive.h gets built before we compute dependencies. -beforedepend: archive.h -afterdepend: - echo "archive.h: Makefile" >> ${DEPENDFILE} -# Ensure archive.h gets built before we compile anything. -${SRCS:S/.c$/.o/}: archive.h - -# archive.h needs to be cleaned -CLEANFILES+= archive.h - # Build archive.h from archive.h.in archive.h: archive.h.in Makefile cat ${.CURDIR}/archive.h.in | \ @@ -187,8 +175,16 @@ sed 's/@ARCHIVE_API_FEATURE@/${ARCHIVE_API_FEATURE}/' | \ cat > archive.h +# archive.h needs to be cleaned +CLEANFILES+= archive.h + +# +# Voodoo for building a distfile that uses autoconf/automake/etc. +# + # Files that just get copied to the distfile build directory DIST_WORK_DIR= ${.OBJDIR}/lib${LIB}-${VERSION} +CLEANDIRS+= ${DIST_WORK_DIR} DISTFILE= lib${LIB}-${VERSION}.tar.gz DIST_FILES= ${SRCS} DIST_FILES+= ${MAN} @@ -197,8 +193,6 @@ DIST_FILES+= archive_private.h archive_string.h DIST_FILES+= Makefile.am -CLEANDIRS+= ${DIST_WORK_DIR} - distfile: rm -rf ${DIST_WORK_DIR} mkdir ${DIST_WORK_DIR} ==== //depot/projects/hammer/lib/libc/gen/glob.3#7 (text+ko) ==== @@ -32,9 +32,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 -.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.28 2004/08/23 12:10:44 tjr Exp $ +.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.30 2004/09/01 23:28:27 tjr Exp $ .\" -.Dd August 23, 2004 +.Dd September 1, 2004 .Dt GLOB 3 .Os .Sh NAME @@ -197,9 +197,9 @@ .Dv GLOB_NOESCAPE is set, backslash escaping is disabled. .It Dv GLOB_NOSORT -By default, the pathnames are sorted in ascending order -according to the current setting of -.Ev LC_COLLATE ; +By default, the pathnames are sorted in ascending +.Tn ASCII +order; this flag prevents that sorting (speeding up .Fn glob ) . .El ==== //depot/projects/hammer/release/Makefile.inc.docports#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/release/Makefile.inc.docports,v 1.25 2004/08/30 06:19:34 ru Exp $ +# $FreeBSD: src/release/Makefile.inc.docports,v 1.26 2004/09/01 14:36:48 ru Exp $ # # List of (dependent) ports that are minimally required to be # checked out from CVS in order to get ${DOCPORTS} built and @@ -15,46 +15,33 @@ # Get __FreeBSD_version .if !defined(OSVERSION) -.if exists(/sbin/sysctl) OSVERSION!= /sbin/sysctl -n kern.osreldate -.else -OSVERSION!= /usr/sbin/sysctl -n kern.osreldate -.endif .endif MINIMALDOCPORTS= \ ports/Mk \ ports/Templates \ - ports/Tools \ + ports/Tools + +MINIMALDOCPORTS+= \ ports/archivers/unzip \ ports/converters/libiconv \ ports/devel/gettext \ ports/devel/gmake \ - ports/devel/imake-4 \ ports/devel/libtool13 \ ports/devel/libtool15 \ - ports/devel/p5-File-Spec \ - ports/devel/p5-File-Temp \ ports/devel/pkgconfig \ ports/graphics/gd \ ports/graphics/jbigkit \ ports/graphics/jpeg \ ports/graphics/netpbm \ - ports/graphics/peps \ ports/graphics/png \ ports/graphics/scr2png \ ports/graphics/tiff \ - ports/lang/perl5 \ - ports/lang/perl5.8 \ ports/print/freetype2 \ ports/print/ghostscript-gnu \ ports/print/ghostscript-gnu-nox11 \ ports/print/gsfonts \ - ports/textproc/docbook \ - ports/textproc/docbook-241 \ - ports/textproc/docbook-300 \ - ports/textproc/docbook-310 \ - ports/textproc/docbook-400 \ ports/textproc/docbook-410 \ ports/textproc/docbook-xml \ ports/textproc/docbook-xsl \ @@ -68,17 +55,29 @@ ports/textproc/linuxdoc \ ports/textproc/scr2txt \ ports/textproc/sdocbook-xml \ - ports/textproc/sgmlformat \ ports/textproc/xhtml \ ports/textproc/xmlcatmgr \ ports/www/links1 \ ports/www/tidy -.if ${OSVERSION} < 460101 || ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500036 ) -MINIMALDOCPORTS+= ports/textproc/sed_inplace -.endif + .if ${MACHINE_ARCH} != "i386" MINIMALDOCPORTS+= ports/textproc/openjade \ ports/textproc/opensp .else MINIMALDOCPORTS+= ports/textproc/jade .endif + +.if ${OSVERSION} < 500000 +MINIMALDOCPORTS+= \ + ports/converters/p5-MIME-Base64 \ + ports/devel/p5-File-Spec \ + ports/devel/p5-File-Temp \ + ports/devel/p5-Test-Harness \ + ports/devel/p5-Test-Simple \ + ports/security/p5-Digest \ + ports/security/p5-Digest-MD5 \ + ports/textproc/p5-PodParser +.else +MINIMALDOCPORTS+= \ + ports/lang/perl5.8 +.endif ==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/sparc64/proc-sparc64.sgml#3 (text+ko) ==== @@ -1,5 +1,5 @@ Supported Systems @@ -76,6 +76,12 @@ SPARCEngine Ultra AXmp + Ultra 1E + + + Ultra 2 + + Ultra 5 @@ -106,12 +112,6 @@ Enterprise 4500 - - Ultra 1 Enterprise (1E for short) - - - Ultra 2 - ==== //depot/projects/hammer/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml#3 (text+ko) ==== @@ -1,10 +1,10 @@ @@ -84,6 +84,12 @@ SPARCEngine Ultra AXmp + Ultra 1E + + + Ultra 2 + + Ultra 5 @@ -114,12 +120,6 @@ Enterprise 4500 - - Ultra 1 Enterprise (1E ÄÌÑ ËÒÁÔËÏÓÔÉ) - - - Ultra 2 - ==== //depot/projects/hammer/release/doc/ru_RU.KOI8-R/installation/common/install.sgml#4 (text+ko) ==== @@ -1,10 +1,10 @@ - &os; ÄÌÑ &arch.print; ÄÌÑ ÒÁÂÏÔÙ ÔÒÅÂÕÅÔÓÑ - 386 ÐÒÏÃÅÓÓÏÒ ÉÌÉ ×ÙÛÅ (Ë ÓÏÖÁÌÅÎÉÀ, ÐÏÄÄÅÒÖËÉ 286 ÐÒÏÃÅÓÓÏÒÏ× ÎÅÔ), - ËÁË ÍÉÎÉÍÕÍ 5 ÍÅÇÁÂÁÊÔ ÏÐÅÒÁÔÉ×ÎÏÊ ÐÁÍÑÔÉ ÄÌÑ ÕÓÔÁÎÏ×ËÉ É - 4 ÍÅÇÁÂÁÊÔÁ ÏÐÅÒÁÔÉ×ÎÏÊ ÐÁÍÑÔÉ ÄÌÑ ÚÁÐÕÓËÁ. ÷ÁÍ ÐÏÔÒÅÂÕÅÔÓÑ ËÁË - ÍÉÎÉÍÕÍ 100MB Ó×ÏÂÏÄÎÏÇÏ ÍÅÓÔÁ ÎÁ ÖÅÓÔËÏÍ ÄÉÓËÅ ÄÌÑ ÍÉÎÉÍÁÌØÎÏÊ + &os; ÄÌÑ &arch.print; ÄÌÑ ÕÓÔÁÎÏ×ËÉ É ÒÁÂÏÔÙ + ÔÒÅÂÕÅÔÓÑ 486 ÐÒÏÃÅÓÓÏÒ ÉÌÉ ×ÙÛÅ (ÈÏÔÑ Ó ÄÒÕÇÉÍ ÑÄÒÏÍ &os; ÍÏÖÅÔ + ÒÁÂÏÔÁÔØ ÎÁ ÐÒÏÃÅÓÓÏÒÁÈ 386), ËÁË ÍÉÎÉÍÕÍ 8 ÍÅÇÁÂÁÊÔ ÏÐÅÒÁÔÉ×ÎÏÊ + ÐÁÍÑÔÉ ÄÌÑ ÕÓÔÁÎÏ×ËÉ É + 7 ÍÅÇÁÂÁÊÔÁ ÄÌÑ ÚÁÐÕÓËÁ. ÷ÁÍ ÐÏÔÒÅÂÕÅÔÓÑ ËÁË + ÍÉÎÉÍÕÍ 150MB Ó×ÏÂÏÄÎÏÇÏ ÍÅÓÔÁ ÎÁ ÖÅÓÔËÏÍ ÄÉÓËÅ ÄÌÑ ÍÉÎÉÍÁÌØÎÏÊ ÕÓÔÁÎÏ×ËÉ. îÉÖÅ ÄÁÎÁ ÉÎÆÏÒÍÁÃÉÑ ÐÏ ÕÒÅÚÁÎÉÀ ÓÕÝÅÓÔ×ÕÀÝÅÇÏ ÒÁÚÄÅÌÁ DOS ÄÌÑ ÕÓÔÁÎÏ×ËÉ &os;. @@ -134,7 +135,7 @@ éÎÓÔÒÕËÃÉÉ ÐÏ ÓÏÚÄÁÎÉÀ ÄÉÓËÅÔ ÷ ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÓÐÏÓÏÂÁ ÕÓÔÁÎÏ×ËÉ &os;, - ×ÁÍ ÍÏÖÅÔ ÐÏÔÒÅÂÏ×ÁÔØÓÑ ÓÏÚÄÁÎÉÅ ÎÁÂÏÒÁ ÄÉÓËÅÔ (ÏÂÙÞÎÏ Ä×ÕÈ) + ×ÁÍ ÍÏÖÅÔ ÐÏÔÒÅÂÏ×ÁÔØÓÑ ÓÏÚÄÁÎÉÅ ÎÁÂÏÒÁ ÄÉÓËÅÔ (ÏÂÙÞÎÏ ÔÒÅÈ) ÄÌÑ ÎÁÞÁÌÁ ÐÒÏÃÅÓÓÁ ÕÓÔÁÎÏ×ËÉ. üÔÏÔ ÒÁÚÄÅÌ ËÒÁÔËÏ ÏÐÉÓÙ×ÁÅÔ ËÁË ÓÏÚÄÁÔØ ÜÔÉ ÄÉÓËÉ Ó ÕÓÔÁÎÏ×ÏÞÎÏÇÏ CDROM ÉÌÉ ÉÚ ÉÎÔÅÒÎÅÔ. ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ, ÞÔÏ × ÏÂÝÅÍ ÓÌÕÞÁÅ ÕÓÔÁÎÏ×ËÉ &os; Ó CDROM @@ -143,34 +144,31 @@ äÌÑ ÂÏÌØÛÉÎÓÔ×Á ÕÓÔÁÎÏ×ÏË Ó CDROM ÉÌÉ ÐÏ ÓÅÔÉ, ×ÁÍ ÐÏÔÒÅÂÕÀÔÓÑ ÓËÏÐÉÒÏ×ÁÔØ ÏÂÒÁÚÙ ÄÉÓËÅÔ - kern.flp É mfsroot.flp - ÉÚ ËÁÔÁÌÏÇÁ floppies/ (ÄÌÑ 1.44MB ÄÉÓËÅÔ). - ÷ ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÉÍÅÀÝÅÇÏÓÑ ÏÂÏÒÕÄÏ×ÁÎÉÑ, ×ÁÍ ÍÏÖÅÔ ÔÁËÖÅ ÐÏÔÒÅÂÏ×ÁÔØÓÑ - ÔÒÅÔØÑ ÄÉÓËÅÔÁ, drivers.flp, ÎÁ ËÏÔÏÒÏÊ - ÎÁÈÏÄÑÔÓÑ ÄÒÁÊ×ÅÒÁ ÕÓÔÒÏÊÓÔ×. + boot.flp É kernX.flp + ÉÚ ËÁÔÁÌÏÇÁ floppies/ (ÄÌÑ 1.44MB ÄÉÓËÅÔ). äÌÑ ÏÂÙÞÎÏÊ ÕÓÔÁÎÏ×ËÉ Ó CDROM ÉÌÉ ÐÏ ÓÅÔÉ, ×ÁÍ - ÐÏÔÒÅÂÕÅÔÓÑ ÓËÏÐÉÒÏ×ÁÔØ ÏÂÒÁÚÙ ÄÉÓËÅÔ kern.flp - É mfsroot.flp ÉÚ ËÁÔÁÌÏÇÁ + ÐÏÔÒÅÂÕÅÔÓÑ ÓËÏÐÉÒÏ×ÁÔØ ÏÂÒÁÚÙ ÄÉÓËÅÔ boot.flp + É kernX.flp ÉÚ ËÁÔÁÌÏÇÁ floppies/ (ÄÌÑ 1.44MB ÄÉÓËÅÔ) ÉÌÉ - kern-small.flp É - mfsroot-small.flp (ÄÌÑ 1.2MB ÄÉÓËÅÔ). + boot-small.flp É + kern-small.flp (ÄÌÑ 1.2MB ÄÉÓËÅÔ). ðÏÌÕÞÉÔØ ÜÔÉ ÏÂÒÁÚÙ ÐÏ ÓÅÔÉ ÐÒÏÓÔÏ. úÁÇÒÕÚÉÔÅ - release/floppies/kern.flp, - release/floppies/mfsroot.flp, - É - release/floppies/drivers.flp + release/floppies/boot.flp + É ×ÓÅ + release/floppies/kernX.flp Ó ÉÌÉ Ó ÏÄÎÏÇÏ ÉÚ ÚÅÒËÁÌ, ÐÅÒÅÞÉÓÌÅÎÎÙÈ × ÒÁÚÄÅÌÅ FTP ÚÅÒËÁÌÁ òÕËÏ×ÏÄÓÔ×Á ÉÌÉ, ÉÌÉ ÎÁ ÓÔÒÁÎÉÃÁÈ . - ÷ÏÚØÍÉÔÅ Ä×Å ÞÉÓÔÙÅ, ÔÏÌØËÏ ÞÔÏ ÏÔÆÏÒÍÁÔÉÒÏ×ÁÎÎÙÅ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Sep 2 21:04:32 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4958316A4D1; Thu, 2 Sep 2004 21:04:32 +0000 (GMT) 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 2435816A4CE for ; Thu, 2 Sep 2004 21:04:32 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0482C43D3F for ; Thu, 2 Sep 2004 21:04:32 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i82L4VL9099998 for ; Thu, 2 Sep 2004 21:04:31 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i82L4V4R099995 for perforce@freebsd.org; Thu, 2 Sep 2004 21:04:31 GMT (envelope-from peter@freebsd.org) Date: Thu, 2 Sep 2004 21:04:31 GMT Message-Id: <200409022104.i82L4V4R099995@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60883 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, 02 Sep 2004 21:04:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=60883 Change 60883 by peter@peter_daintree on 2004/09/02 21:03:41 revert local change - this is an option now. Affected files ... .. //depot/projects/hammer/sys/amd64/include/param.h#25 edit Differences ... ==== //depot/projects/hammer/sys/amd64/include/param.h#25 (text+ko) ==== @@ -119,8 +119,6 @@ #define NBPML4 (1ul< Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 80BF116A4D1; Thu, 2 Sep 2004 21:11:42 +0000 (GMT) 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 3D06916A4CE for ; Thu, 2 Sep 2004 21:11:41 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC90A43D2F for ; Thu, 2 Sep 2004 21:11:41 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i82LBf4o000467 for ; Thu, 2 Sep 2004 21:11:41 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i82LBfXL000464 for perforce@freebsd.org; Thu, 2 Sep 2004 21:11:41 GMT (envelope-from julian@freebsd.org) Date: Thu, 2 Sep 2004 21:11:41 GMT Message-Id: <200409022111.i82LBfXL000464@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 60885 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, 02 Sep 2004 21:11:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=60885 Change 60885 by julian@julian_ref on 2004/09/02 21:11:11 IFC @60880 Affected files ... .. //depot/projects/nsched/sys/alpha/include/param.h#5 integrate .. //depot/projects/nsched/sys/amd64/include/param.h#5 integrate .. //depot/projects/nsched/sys/conf/NOTES#15 integrate .. //depot/projects/nsched/sys/conf/files#22 integrate .. //depot/projects/nsched/sys/conf/options#16 integrate .. //depot/projects/nsched/sys/dev/acpica/Osd/OsdDebug.c#4 integrate .. //depot/projects/nsched/sys/dev/acpica/acpi_pci_link.c#7 integrate .. //depot/projects/nsched/sys/dev/ata/ata-chipset.c#10 integrate .. //depot/projects/nsched/sys/dev/ata/ata-disk.c#7 integrate .. //depot/projects/nsched/sys/dev/em/if_em.c#6 integrate .. //depot/projects/nsched/sys/dev/em/if_em.h#3 integrate .. //depot/projects/nsched/sys/dev/em/if_em_hw.c#2 integrate .. //depot/projects/nsched/sys/dev/em/if_em_hw.h#2 integrate .. //depot/projects/nsched/sys/dev/tga/tga_pci.c#4 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_util.c#2 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_vfsops.c#2 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#2 integrate .. //depot/projects/nsched/sys/fs/pseudofs/pseudofs_vnops.c#4 integrate .. //depot/projects/nsched/sys/i386/i386/pmap.c#17 integrate .. //depot/projects/nsched/sys/i386/include/param.h#6 integrate .. //depot/projects/nsched/sys/ia64/conf/GENERIC#7 integrate .. //depot/projects/nsched/sys/kern/kern_mutex.c#6 integrate .. //depot/projects/nsched/sys/kern/kern_shutdown.c#9 integrate .. //depot/projects/nsched/sys/kern/kern_switch.c#8 integrate .. //depot/projects/nsched/sys/kern/sched_ule.c#22 integrate .. //depot/projects/nsched/sys/kern/subr_smp.c#7 integrate .. //depot/projects/nsched/sys/modules/Makefile#10 integrate .. //depot/projects/nsched/sys/net/if.c#10 integrate .. //depot/projects/nsched/sys/net/if.h#7 integrate .. //depot/projects/nsched/sys/netgraph/ng_ksocket.c#7 integrate .. //depot/projects/nsched/sys/netinet6/raw_ip6.c#4 integrate .. //depot/projects/nsched/sys/netkey/key.c#3 integrate .. //depot/projects/nsched/sys/pc98/conf/NOTES#9 integrate .. //depot/projects/nsched/sys/vm/vm_fault.c#5 integrate .. //depot/projects/nsched/sys/vm/vm_mmap.c#6 integrate .. //depot/projects/nsched/sys/vm/vm_zeroidle.c#5 integrate Differences ... ==== //depot/projects/nsched/sys/alpha/include/param.h#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/param.h,v 1.35 2004/08/01 14:31:45 scottl Exp $ */ +/* $FreeBSD: src/sys/alpha/include/param.h,v 1.36 2004/09/02 18:59:14 scottl Exp $ */ /* From: NetBSD: param.h,v 1.20 1997/09/19 13:52:53 leo Exp */ /* @@ -113,11 +113,6 @@ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ -/* PREEMPTION exposes scheduler bugs that need to be fixed. */ -#if 0 -#define PREEMPTION -#endif - #ifndef KSTACK_PAGES #define KSTACK_PAGES 2 /* pages of kstack (with pcb) */ #endif ==== //depot/projects/nsched/sys/amd64/include/param.h#5 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/amd64/include/param.h,v 1.13 2004/08/01 14:31:45 scottl Exp $ + * $FreeBSD: src/sys/amd64/include/param.h,v 1.14 2004/09/02 18:59:14 scottl Exp $ */ /* @@ -119,11 +119,6 @@ #define NBPML4 (1ul<Type, fatal->Code, fatal->Argument); kdb_enter("AcpiOsSignal"); break; - + case ACPI_SIGNAL_BREAKPOINT: - message = (char *)Info; - kdb_enter(message); +#ifdef ACPI_DEBUG + kdb_enter((char *)Info); +#endif break; default: ==== //depot/projects/nsched/sys/dev/acpica/acpi_pci_link.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.28 2004/08/27 00:53:11 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.29 2004/09/01 17:59:29 njl Exp $"); #include "opt_acpi.h" #include @@ -373,18 +373,6 @@ link->initial_irq = 0; } - /* - * Try to disable this link. If successful, set the current IRQ to - * zero and flags to indicate this link is not routed. If we can't - * run _DIS (i.e., the method doesn't exist), assume the initial - * IRQ was routed by the BIOS. - */ - if (ACPI_SUCCESS(AcpiEvaluateObject(handle, "_DIS", NULL, NULL))) { - link->current_irq = 0; - link->flags = ACPI_LINK_NONE; - } else - link->flags = ACPI_LINK_ROUTED; - error = AcpiGetPossibleResources(handle, &buf); if (ACPI_FAILURE(error)) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, @@ -426,6 +414,18 @@ } /* + * Try to disable this link. If successful, set the current IRQ to + * zero and flags to indicate this link is not routed. If we can't + * run _DIS (i.e., the method doesn't exist), assume the initial + * IRQ was routed by the BIOS. + */ + if (ACPI_SUCCESS(AcpiEvaluateObject(handle, "_DIS", NULL, NULL))) { + link->current_irq = 0; + link->flags = ACPI_LINK_NONE; + } else + link->flags = ACPI_LINK_ROUTED; + + /* * If the initial IRQ is invalid (not in _PRS), set it to 0 and * mark this link as not routed. We won't use it as the preferred * interrupt later when we route. ==== //depot/projects/nsched/sys/dev/ata/ata-chipset.c#10 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.83 2004/08/27 12:54:58 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.84 2004/09/01 12:15:44 sos Exp $"); #include "opt_ata.h" #include @@ -188,13 +188,16 @@ * Marvell 88SX8030 SATA->PATA converters and UDMA6/ATA133. */ if (atadev->param->satacapabilities != 0x0000 && - atadev->param->satacapabilities != 0xffff) - mode = ata_limit_mode(atadev, mode, ATA_UDMA6); - else + atadev->param->satacapabilities != 0xffff) { + if (!ata_controlcmd(atadev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, + ata_limit_mode(atadev, mode, ATA_UDMA6))) + atadev->mode = ATA_SA150; + } + else { mode = ata_limit_mode(atadev, mode, ATA_UDMA5); - - if (!ata_controlcmd(atadev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode)) - atadev->mode = mode; + if (!ata_controlcmd(atadev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode)) + atadev->mode = mode; + } } /* ==== //depot/projects/nsched/sys/dev/ata/ata-disk.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.176 2004/08/27 12:03:18 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.177 2004/09/01 12:15:44 sos Exp $"); #include "opt_ata.h" #include @@ -393,7 +393,7 @@ } else { ata_prtdev(adp->device, - "%lluMB <%.40s/%.8s> [%lld/%d/%d] at ata%d-%s %s", + "%lluMB <%.40s/%.8s> [%lld/%d/%d] at ata%d-%s %s%s\n", (unsigned long long)(adp->total_secs / ((1024L * 1024L) / DEV_BSIZE)), adp->device->param->model, adp->device->param->revision, @@ -402,13 +402,8 @@ adp->heads, adp->sectors, device_get_unit(adp->device->channel->dev), (adp->device->unit == ATA_MASTER) ? "master" : "slave", - (adp->flags & AD_F_TAG_ENABLED) ? "tagged " : ""); - - if (adp->device->param->satacapabilities != 0x0000 && - adp->device->param->satacapabilities != 0xffff) - printf("SATA150\n"); - else - printf("%s\n", ata_mode2str(adp->device->mode)); + (adp->flags & AD_F_TAG_ENABLED) ? "tagged " : "", + ata_mode2str(adp->device->mode)); } } ==== //depot/projects/nsched/sys/dev/em/if_em.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.44 2004/07/02 12:16:01 mlaier Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.45 2004/09/01 23:22:41 pdeuskar Exp $*/ #include @@ -51,7 +51,7 @@ * Driver version *********************************************************************/ -char em_driver_version[] = "1.7.25"; +char em_driver_version[] = "1.7.35"; /********************************************************************* @@ -80,7 +80,6 @@ { 0x8086, 0x1011, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, 0x1012, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, 0x1013, PCI_ANY_ID, PCI_ANY_ID, 0}, - { 0x8086, 0x1014, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, 0x1015, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, 0x1016, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, 0x1017, PCI_ANY_ID, PCI_ANY_ID, 0}, @@ -99,6 +98,7 @@ { 0x8086, 0x1079, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, 0x107A, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, 0x107B, PCI_ANY_ID, PCI_ANY_ID, 0}, + { 0x8086, 0x107C, PCI_ANY_ID, PCI_ANY_ID, 0}, /* required last entry */ { 0, 0, 0, 0, 0} }; @@ -742,7 +742,7 @@ em_init(adapter); break; default: - IOCTL_DEBUGOUT1("ioctl received: UNKNOWN (0x%x)\n", (int)command); + IOCTL_DEBUGOUT1("ioctl received: UNKNOWN (0x%x)", (int)command); error = EINVAL; } @@ -797,6 +797,7 @@ { struct ifnet *ifp; + uint32_t pba; ifp = &adapter->interface_data.ac_if; INIT_DEBUGOUT("em_init: begin"); @@ -805,6 +806,36 @@ em_stop(adapter); + /* Packet Buffer Allocation (PBA) + * Writing PBA sets the receive portion of the buffer + * the remainder is used for the transmit buffer. + * + * Devices before the 82547 had a Packet Buffer of 64K. + * Default allocation: PBA=48K for Rx, leaving 16K for Tx. + * After the 82547 the buffer was reduced to 40K. + * Default allocation: PBA=30K for Rx, leaving 10K for Tx. + * Note: default does not leave enough room for Jumbo Frame >10k. + */ + if(adapter->hw.mac_type < em_82547) { + /* Total FIFO is 64K */ + if(adapter->rx_buffer_len > EM_RXBUFFER_8192) + pba = E1000_PBA_40K; /* 40K for Rx, 24K for Tx */ + else + pba = E1000_PBA_48K; /* 48K for Rx, 16K for Tx */ + } else { + /* Total FIFO is 40K */ + if(adapter->hw.max_frame_size > EM_RXBUFFER_8192) { + pba = E1000_PBA_22K; /* 22K for Rx, 18K for Tx */ + } else { + pba = E1000_PBA_30K; /* 30K for Rx, 10K for Tx */ + } + adapter->tx_fifo_head = 0; + adapter->tx_head_addr = pba << EM_TX_HEAD_ADDR_SHIFT; + adapter->tx_fifo_size = (E1000_PBA_40K - pba) << EM_PBA_BYTES_SHIFT; + } + INIT_DEBUGOUT1("em_init: pba=%dK",pba); + E1000_WRITE_REG(&adapter->hw, PBA, pba); + /* Get the latest mac address, User can use a LAA */ bcopy(adapter->interface_data.ac_enaddr, adapter->hw.mac_addr, ETHER_ADDR_LEN); @@ -1138,10 +1169,6 @@ bcopy(seg, q->segs, nsegs * sizeof(seg[0])); } -#define EM_FIFO_HDR 0x10 -#define EM_82547_PKT_THRESH 0x3e0 -#define EM_82547_TX_FIFO_SIZE 0x2800 -#define EM_82547_TX_FIFO_BEGIN 0xf00 /********************************************************************* * * This routine maps the mbufs to tx descriptors. @@ -1356,7 +1383,7 @@ if(eop) { if (em_82547_fifo_workaround(adapter, length)) { - adapter->tx_fifo_wrk++; + adapter->tx_fifo_wrk_cnt++; callout_reset(&adapter->tx_fifo_timer, 1, em_82547_move_tail, adapter); break; @@ -1387,7 +1414,7 @@ fifo_pkt_len = EM_ROUNDUP(len + EM_FIFO_HDR, EM_FIFO_HDR); if (adapter->link_duplex == HALF_DUPLEX) { - fifo_space = EM_82547_TX_FIFO_SIZE - adapter->tx_fifo_head; + fifo_space = adapter->tx_fifo_size - adapter->tx_fifo_head; if (fifo_pkt_len >= (EM_82547_PKT_THRESH + fifo_space)) { if (em_82547_tx_fifo_reset(adapter)) { @@ -1409,8 +1436,8 @@ /* tx_fifo_head is always 16 byte aligned */ adapter->tx_fifo_head += fifo_pkt_len; - if (adapter->tx_fifo_head >= EM_82547_TX_FIFO_SIZE) { - adapter->tx_fifo_head -= EM_82547_TX_FIFO_SIZE; + if (adapter->tx_fifo_head >= adapter->tx_fifo_size) { + adapter->tx_fifo_head -= adapter->tx_fifo_size; } return; @@ -1435,17 +1462,17 @@ E1000_WRITE_REG(&adapter->hw, TCTL, tctl & ~E1000_TCTL_EN); /* Reset FIFO pointers */ - E1000_WRITE_REG(&adapter->hw, TDFT, EM_82547_TX_FIFO_BEGIN); - E1000_WRITE_REG(&adapter->hw, TDFH, EM_82547_TX_FIFO_BEGIN); - E1000_WRITE_REG(&adapter->hw, TDFTS, EM_82547_TX_FIFO_BEGIN); - E1000_WRITE_REG(&adapter->hw, TDFHS, EM_82547_TX_FIFO_BEGIN); + E1000_WRITE_REG(&adapter->hw, TDFT, adapter->tx_head_addr); + E1000_WRITE_REG(&adapter->hw, TDFH, adapter->tx_head_addr); + E1000_WRITE_REG(&adapter->hw, TDFTS, adapter->tx_head_addr); + E1000_WRITE_REG(&adapter->hw, TDFHS, adapter->tx_head_addr); /* Re-enable TX unit */ E1000_WRITE_REG(&adapter->hw, TCTL, tctl); E1000_WRITE_FLUSH(&adapter->hw); adapter->tx_fifo_head = 0; - adapter->tx_fifo_reset++; + adapter->tx_fifo_reset_cnt++; return(TRUE); } @@ -1459,13 +1486,23 @@ { u_int32_t reg_rctl; + u_int32_t ctrl; struct ifnet *ifp = &adapter->interface_data.ac_if; reg_rctl = E1000_READ_REG(&adapter->hw, RCTL); + ctrl = E1000_READ_REG(&adapter->hw, CTRL); if (ifp->if_flags & IFF_PROMISC) { reg_rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE); E1000_WRITE_REG(&adapter->hw, RCTL, reg_rctl); + + /* Disable VLAN stripping in promiscous mode + * This enables bridging of vlan tagged frames to occur + * and also allows vlan tags to be seen in tcpdump + */ + ctrl &= ~E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, CTRL, ctrl); + } else if (ifp->if_flags & IFF_ALLMULTI) { reg_rctl |= E1000_RCTL_MPE; reg_rctl &= ~E1000_RCTL_UPE; @@ -1486,6 +1523,7 @@ reg_rctl &= (~E1000_RCTL_MPE); E1000_WRITE_REG(&adapter->hw, RCTL, reg_rctl); + em_enable_vlans(adapter); return; } @@ -3169,6 +3207,10 @@ uint8_t *hw_addr = adapter->hw.hw_addr; printf("em%d: Adapter hardware address = %p \n", unit, hw_addr); + printf("em%d:CTRL = 0x%x\n", unit, + E1000_READ_REG(&adapter->hw, CTRL)); + printf("em%d:RCTL = 0x%x PS=(0x8402)\n", unit, + E1000_READ_REG(&adapter->hw, RCTL)); printf("em%d:tx_int_delay = %d, tx_abs_int_delay = %d\n", unit, E1000_READ_REG(&adapter->hw, TIDV), E1000_READ_REG(&adapter->hw, TADV)); @@ -3183,8 +3225,8 @@ adapter->clean_tx_interrupts); #endif printf("em%d: fifo workaround = %lld, fifo_reset = %lld\n", unit, - (long long)adapter->tx_fifo_wrk, - (long long)adapter->tx_fifo_reset); + (long long)adapter->tx_fifo_wrk_cnt, + (long long)adapter->tx_fifo_reset_cnt); printf("em%d: hw tdh = %d, hw tdt = %d\n", unit, E1000_READ_REG(&adapter->hw, TDH), E1000_READ_REG(&adapter->hw, TDT)); ==== //depot/projects/nsched/sys/dev/em/if_em.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.25 2004/05/30 20:08:30 phk Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.26 2004/09/01 23:22:41 pdeuskar Exp $*/ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -399,8 +399,6 @@ struct mbuf *fmp; struct mbuf *lmp; - u_int16_t tx_fifo_head; - struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -412,8 +410,21 @@ unsigned long no_tx_desc_avail2; unsigned long no_tx_map_avail; unsigned long no_tx_dma_setup; - u_int64_t tx_fifo_reset; - u_int64_t tx_fifo_wrk; + + /* Used in for 82547 10Mb Half workaround */ + #define EM_PBA_BYTES_SHIFT 0xA + #define EM_TX_HEAD_ADDR_SHIFT 7 + #define EM_PBA_TX_MASK 0xFFFF0000 + #define EM_FIFO_HDR 0x10 + + #define EM_82547_PKT_THRESH 0x3e0 + + u_int32_t tx_fifo_size; + u_int32_t tx_fifo_head; + u_int32_t tx_fifo_head_addr; + u_int64_t tx_fifo_reset_cnt; + u_int64_t tx_fifo_wrk_cnt; + u_int32_t tx_head_addr; /* For 82544 PCIX Workaround */ boolean_t pcix_82544; ==== //depot/projects/nsched/sys/dev/em/if_em_hw.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/em/if_em_hw.c,v 1.13 2004/02/10 21:31:09 pdeuskar Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/em/if_em_hw.c,v 1.14 2004/09/01 23:22:41 pdeuskar Exp $"); #include @@ -73,6 +73,7 @@ static void em_standby_eeprom(struct em_hw *hw); static int32_t em_id_led_init(struct em_hw * hw); static int32_t em_set_vco_speed(struct em_hw *hw); +static int32_t em_set_phy_mode(struct em_hw *hw); /* IGP cable length table */ static const @@ -258,6 +259,7 @@ break; case E1000_DEV_ID_82541ER: case E1000_DEV_ID_82541GI: + case E1000_DEV_ID_82541GI_LF: case E1000_DEV_ID_82541GI_MOBILE: hw->mac_type = em_82541_rev_2; break; @@ -477,11 +479,11 @@ uint16_t pcix_stat_hi_word; uint16_t cmd_mmrbc; uint16_t stat_mmrbc; - DEBUGFUNC("em_init_hw"); /* Initialize Identification LED */ - if((ret_val = em_id_led_init(hw))) { + ret_val = em_id_led_init(hw); + if(ret_val) { DEBUGOUT("Error Initializing Identification LED\n"); return ret_val; } @@ -602,16 +604,16 @@ return E1000_SUCCESS; } - if ((ret_val = em_read_eeprom(hw, EEPROM_SERDES_AMPLITUDE, 1, - &eeprom_data))) { + ret_val = em_read_eeprom(hw, EEPROM_SERDES_AMPLITUDE, 1, &eeprom_data); + if (ret_val) { return ret_val; } if(eeprom_data != EEPROM_RESERVED_WORD) { /* Adjust SERDES output amplitude only. */ eeprom_data &= EEPROM_SERDES_AMPLITUDE_MASK; - if((ret_val = em_write_phy_reg(hw, M88E1000_PHY_EXT_CTRL, - eeprom_data))) + ret_val = em_write_phy_reg(hw, M88E1000_PHY_EXT_CTRL, eeprom_data); + if(ret_val) return ret_val; } @@ -760,14 +762,16 @@ if(hw->media_type == em_media_type_fiber) signal = (hw->mac_type > em_82544) ? E1000_CTRL_SWDPIN1 : 0; - if((ret_val = em_adjust_serdes_amplitude(hw))) + ret_val = em_adjust_serdes_amplitude(hw); + if(ret_val) return ret_val; /* Take the link out of reset */ ctrl &= ~(E1000_CTRL_LRST); /* Adjust VCO speed to improve BER performance */ - if((ret_val = em_set_vco_speed(hw))) + ret_val = em_set_vco_speed(hw); + if(ret_val) return ret_val; em_config_collision_dist(hw); @@ -854,7 +858,8 @@ * we detect a signal. This will allow us to communicate with * non-autonegotiating link partners. */ - if((ret_val = em_check_for_link(hw))) { + ret_val = em_check_for_link(hw); + if(ret_val) { DEBUGOUT("Error while checking for link\n"); return ret_val; } @@ -901,12 +906,25 @@ } /* Make sure we have a valid PHY */ - if((ret_val = em_detect_gig_phy(hw))) { + ret_val = em_detect_gig_phy(hw); + if(ret_val) { DEBUGOUT("Error, did not detect valid phy.\n"); return ret_val; } DEBUGOUT1("Phy ID = %x \n", hw->phy_id); + /* Set PHY to class A mode (if necessary) */ + ret_val = em_set_phy_mode(hw); + if(ret_val) + return ret_val; + + if((hw->mac_type == em_82545_rev_3) || + (hw->mac_type == em_82546_rev_3)) { + ret_val = em_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); + phy_data |= 0x00000008; + ret_val = em_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); + } + if(hw->mac_type <= em_82543 || hw->mac_type == em_82541 || hw->mac_type == em_82547 || hw->mac_type == em_82541_rev_2 || hw->mac_type == em_82547_rev_2) @@ -915,7 +933,8 @@ if(!hw->phy_reset_disable) { if (hw->phy_type == em_phy_igp) { - if((ret_val = em_phy_reset(hw))) { + ret_val = em_phy_reset(hw); + if(ret_val) { DEBUGOUT("Error Resetting the PHY\n"); return ret_val; } @@ -930,14 +949,16 @@ E1000_WRITE_REG(hw, LEDCTL, led_ctrl); /* disable lplu d3 during driver init */ - if((ret_val = em_set_d3_lplu_state(hw, FALSE))) { + ret_val = em_set_d3_lplu_state(hw, FALSE); + if(ret_val) { DEBUGOUT("Error Disabling LPLU D3\n"); return ret_val; } /* Configure mdi-mdix settings */ - if((ret_val = em_read_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, - &phy_data))) + ret_val = em_read_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, + &phy_data); + if(ret_val) return ret_val; if((hw->mac_type == em_82541) || (hw->mac_type == em_82547)) { @@ -964,8 +985,9 @@ break; } } - if((ret_val = em_write_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, - phy_data))) + ret_val = em_write_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, + phy_data); + if(ret_val) return ret_val; /* set auto-master slave resolution settings */ @@ -983,27 +1005,28 @@ * resolution as hardware default. */ if(hw->autoneg_advertised == ADVERTISE_1000_FULL) { /* Disable SmartSpeed */ - if((ret_val = em_read_phy_reg(hw, - IGP01E1000_PHY_PORT_CONFIG, - &phy_data))) + ret_val = em_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, + &phy_data); + if(ret_val) return ret_val; phy_data &= ~IGP01E1000_PSCFR_SMART_SPEED; - if((ret_val = em_write_phy_reg(hw, - IGP01E1000_PHY_PORT_CONFIG, - phy_data))) + ret_val = em_write_phy_reg(hw, + IGP01E1000_PHY_PORT_CONFIG, + phy_data); + if(ret_val) return ret_val; /* Set auto Master/Slave resolution process */ - if((ret_val = em_read_phy_reg(hw, PHY_1000T_CTRL, - &phy_data))) + ret_val = em_read_phy_reg(hw, PHY_1000T_CTRL, &phy_data); + if(ret_val) return ret_val; phy_data &= ~CR_1000T_MS_ENABLE; - if((ret_val = em_write_phy_reg(hw, PHY_1000T_CTRL, - phy_data))) + ret_val = em_write_phy_reg(hw, PHY_1000T_CTRL, phy_data); + if(ret_val) return ret_val; } - if((ret_val = em_read_phy_reg(hw, PHY_1000T_CTRL, - &phy_data))) + ret_val = em_read_phy_reg(hw, PHY_1000T_CTRL, &phy_data); + if(ret_val) return ret_val; /* load defaults for future use */ @@ -1026,14 +1049,15 @@ default: break; } - if((ret_val = em_write_phy_reg(hw, PHY_1000T_CTRL, - phy_data))) + ret_val = em_write_phy_reg(hw, PHY_1000T_CTRL, phy_data); + if(ret_val) return ret_val; } } else { /* Enable CRS on TX. This must be set for half-duplex operation. */ - if((ret_val = em_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, - &phy_data))) + ret_val = em_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, + &phy_data); + if(ret_val) return ret_val; phy_data |= M88E1000_PSCR_ASSERT_CRS_ON_TX; @@ -1072,15 +1096,17 @@ phy_data &= ~M88E1000_PSCR_POLARITY_REVERSAL; if(hw->disable_polarity_correction == 1) phy_data |= M88E1000_PSCR_POLARITY_REVERSAL; - if((ret_val = em_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, - phy_data))) + ret_val = em_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, + phy_data); + if(ret_val) return ret_val; /* Force TX_CLK in the Extended PHY Specific Control Register * to 25MHz clock. */ - if((ret_val = em_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, - &phy_data))) + ret_val = em_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, + &phy_data); + if(ret_val) return ret_val; phy_data |= M88E1000_EPSCR_TX_CLK_25; @@ -1091,14 +1117,15 @@ M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK); phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X | M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X); - if((ret_val = em_write_phy_reg(hw, - M88E1000_EXT_PHY_SPEC_CTRL, - phy_data))) + ret_val = em_write_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, + phy_data); + if(ret_val) return ret_val; } /* SW Reset the PHY so all changes take effect */ - if((ret_val = em_phy_reset(hw))) { + ret_val = em_phy_reset(hw); + if(ret_val) { DEBUGOUT("Error Resetting the PHY\n"); return ret_val; } @@ -1132,7 +1159,8 @@ hw->autoneg_advertised = AUTONEG_ADVERTISE_SPEED_DEFAULT; DEBUGOUT("Reconfiguring auto-neg advertisement params\n"); - if((ret_val = em_phy_setup_autoneg(hw))) { + ret_val = em_phy_setup_autoneg(hw); + if(ret_val) { DEBUGOUT("Error Setting up Auto-Negotiation\n"); return ret_val; } @@ -1141,18 +1169,21 @@ /* Restart auto-negotiation by setting the Auto Neg Enable bit and * the Auto Neg Restart bit in the PHY control register. */ - if((ret_val = em_read_phy_reg(hw, PHY_CTRL, &phy_data))) + ret_val = em_read_phy_reg(hw, PHY_CTRL, &phy_data); + if(ret_val) return ret_val; phy_data |= (MII_CR_AUTO_NEG_EN | MII_CR_RESTART_AUTO_NEG); - if((ret_val = em_write_phy_reg(hw, PHY_CTRL, phy_data))) + ret_val = em_write_phy_reg(hw, PHY_CTRL, phy_data); + if(ret_val) return ret_val; /* Does the user want to wait for Auto-Neg to complete here, or * check at a later time (for example, callback routine). */ if(hw->wait_autoneg_complete) { - if((ret_val = em_wait_autoneg(hw))) { + ret_val = em_wait_autoneg(hw); + if(ret_val) { DEBUGOUT("Error while waiting for autoneg to complete\n"); return ret_val; } @@ -1160,7 +1191,8 @@ hw->get_link_status = TRUE; } else { DEBUGOUT("Forcing speed and duplex\n"); - if((ret_val = em_phy_force_speed_duplex(hw))) { + ret_val = em_phy_force_speed_duplex(hw); + if(ret_val) { DEBUGOUT("Error Forcing Speed and Duplex\n"); return ret_val; } @@ -1171,9 +1203,11 @@ * valid. */ for(i = 0; i < 10; i++) { - if((ret_val = em_read_phy_reg(hw, PHY_STATUS, &phy_data))) + ret_val = em_read_phy_reg(hw, PHY_STATUS, &phy_data); + if(ret_val) return ret_val; - if((ret_val = em_read_phy_reg(hw, PHY_STATUS, &phy_data))) + ret_val = em_read_phy_reg(hw, PHY_STATUS, &phy_data); + if(ret_val) return ret_val; if(phy_data & MII_SR_LINK_STATUS) { @@ -1188,19 +1222,22 @@ if(hw->mac_type >= em_82544) { em_config_collision_dist(hw); } else { - if((ret_val = em_config_mac_to_phy(hw))) { + ret_val = em_config_mac_to_phy(hw); + if(ret_val) { DEBUGOUT("Error configuring MAC to PHY settings\n"); return ret_val; } } - if((ret_val = em_config_fc_after_link_up(hw))) { + ret_val = em_config_fc_after_link_up(hw); + if(ret_val) { DEBUGOUT("Error Configuring Flow Control\n"); return ret_val; } DEBUGOUT("Valid link established!!!\n"); if(hw->phy_type == em_phy_igp) { - if((ret_val = em_config_dsp_after_link_change(hw, TRUE))) { + ret_val = em_config_dsp_after_link_change(hw, TRUE); + if(ret_val) { DEBUGOUT("Error Configuring DSP after link up\n"); return ret_val; } @@ -1230,12 +1267,13 @@ DEBUGFUNC("em_phy_setup_autoneg"); /* Read the MII Auto-Neg Advertisement Register (Address 4). */ - if((ret_val = em_read_phy_reg(hw, PHY_AUTONEG_ADV, - &mii_autoneg_adv_reg))) + ret_val = em_read_phy_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg); + if(ret_val) return ret_val; /* Read the MII 1000Base-T Control Register (Address 9). */ - if((ret_val = em_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg))) + ret_val = em_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg); + if(ret_val) return ret_val; /* Need to parse both autoneg_advertised and fc and set up @@ -1342,13 +1380,14 @@ return -E1000_ERR_CONFIG; } - if((ret_val = em_write_phy_reg(hw, PHY_AUTONEG_ADV, - mii_autoneg_adv_reg))) + ret_val = em_write_phy_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg); + if(ret_val) return ret_val; DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); - if((ret_val = em_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg))) + ret_val = em_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); + if(ret_val) return ret_val; return E1000_SUCCESS; @@ -1387,7 +1426,8 @@ ctrl &= ~E1000_CTRL_ASDE; /* Read the MII Control Register. */ - if((ret_val = em_read_phy_reg(hw, PHY_CTRL, &mii_ctrl_reg))) + ret_val = em_read_phy_reg(hw, PHY_CTRL, &mii_ctrl_reg); + if(ret_val) return ret_val; /* We need to disable autoneg in order to force link and duplex. */ @@ -1489,10 +1529,12 @@ /* Read the MII Status Register and wait for Auto-Neg Complete bit * to be set. */ - if((ret_val = em_read_phy_reg(hw, PHY_STATUS, &mii_status_reg))) + ret_val = em_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) return ret_val; - if((ret_val = em_read_phy_reg(hw, PHY_STATUS, &mii_status_reg))) + ret_val = em_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) return ret_val; if(mii_status_reg & MII_SR_LINK_STATUS) break; @@ -1500,7 +1542,8 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Sep 2 22:19:07 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9432816A4D3; Thu, 2 Sep 2004 22:19:07 +0000 (GMT) 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 70AF316A4CE for ; Thu, 2 Sep 2004 22:19:07 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6530943D39 for ; Thu, 2 Sep 2004 22:19:07 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i82MJ7ee002904 for ; Thu, 2 Sep 2004 22:19:07 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i82MJ7rM002901 for perforce@freebsd.org; Thu, 2 Sep 2004 22:19:07 GMT (envelope-from peter@freebsd.org) Date: Thu, 2 Sep 2004 22:19:07 GMT Message-Id: <200409022219.i82MJ7rM002901@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60894 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, 02 Sep 2004 22:19:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=60894 Change 60894 by peter@peter_daintree on 2004/09/02 22:18:31 Argh! remove some (presumably) debugging printfs from vendor code. These are Damn Annoying. They dont even consistently go to the same stream - one is stdout, the other is stderr. Affected files ... .. //depot/projects/hammer/contrib/ntp/ntpdate/ntpdate.c#4 edit Differences ... ==== //depot/projects/hammer/contrib/ntp/ntpdate/ntpdate.c#4 (text+ko) ==== @@ -1339,17 +1339,12 @@ hints.ai_family = ai_fam_templ; hints.ai_socktype = SOCK_DGRAM; - printf("Looking for host %s and service %s\n", serv, service); - error = getaddrinfo(serv, service, &hints, &addrResult); if (error != 0) { fprintf(stderr, "Error : %s\n", gai_strerror(error)); msyslog(LOG_ERR, "can't find host %s\n", serv); return; } - else { - fprintf(stderr, "host found : %s\n", stohost((struct sockaddr_storage*)addrResult->ai_addr)); - } server = (struct server *)emalloc(sizeof(struct server)); memset((char *)server, 0, sizeof(struct server)); From owner-p4-projects@FreeBSD.ORG Fri Sep 3 00:08:23 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD97816A4D0; Fri, 3 Sep 2004 00:08:22 +0000 (GMT) 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 8399C16A4CE for ; Fri, 3 Sep 2004 00:08:22 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6687B43D5E for ; Fri, 3 Sep 2004 00:08:22 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8308Mmo007507 for ; Fri, 3 Sep 2004 00:08:22 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8308MxG007504 for perforce@freebsd.org; Fri, 3 Sep 2004 00:08:22 GMT (envelope-from julian@freebsd.org) Date: Fri, 3 Sep 2004 00:08:22 GMT Message-Id: <200409030008.i8308MxG007504@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 60903 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, 03 Sep 2004 00:08:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=60903 Change 60903 by julian@julian_ref on 2004/09/03 00:07:42 loop back stuff Affected files ... .. //depot/projects/nsched/sys/conf/NOTES#16 integrate .. //depot/projects/nsched/sys/kern/kern_switch.c#9 integrate Differences ... ==== //depot/projects/nsched/sys/conf/NOTES#16 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1273 2004/09/02 20:44:56 alfred Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1274 2004/09/02 22:21:51 scottl Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -217,7 +217,7 @@ # a lock hierarchy violation occurs or if locks are held when going to # sleep. # WITNESS_SKIPSPIN disables the witness checks on spin mutexes. -options PREEMPTION +options PREEMPTION options FULL_PREEMPTION options MUTEX_DEBUG options WITNESS ==== //depot/projects/nsched/sys/kern/kern_switch.c#9 (text+ko) ==== @@ -86,7 +86,7 @@ ***/ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.84 2004/09/02 18:59:15 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.85 2004/09/02 23:37:41 julian Exp $"); #include "opt_sched.h" @@ -118,11 +118,6 @@ CTASSERT((RQB_BPW * RQB_LEN) == RQ_NQS); -void panc(char *string1, char *string2); - -#if 0 -static void runq_readjust(struct runq *rq, struct kse *ke); -#endif /************************************************************************ * Functions that manipulate runnability from a thread perspective. * ************************************************************************/ @@ -774,110 +769,6 @@ } } -#if 0 -void -panc(char *string1, char *string2) -{ - printf("%s", string1); - kdb_enter(string2); -} - -void -thread_sanity_check(struct thread *td, char *string) -{ - struct proc *p; - struct ksegrp *kg; - struct kse *ke; - struct thread *td2 = NULL; - unsigned int prevpri; - int saw_lastassigned = 0; - int unassigned = 0; - int assigned = 0; - - p = td->td_proc; - kg = td->td_ksegrp; - ke = td->td_kse; - - - if (ke) { - if (p != ke->ke_proc) { - panc(string, "wrong proc"); - } - if (ke->ke_thread != td) { - panc(string, "wrong thread"); - } - } - - if ((p->p_flag & P_SA) == 0) { - if (ke == NULL) { - panc(string, "non KSE thread lost kse"); - } - } else { - prevpri = 0; - saw_lastassigned = 0; - unassigned = 0; - assigned = 0; - TAILQ_FOREACH(td2, &kg->kg_runq, td_runq) { - if (td2->td_priority < prevpri) { - panc(string, "thread runqueue unosorted"); - } - if ((td2->td_state == TDS_RUNQ) && - td2->td_kse && - (td2->td_kse->ke_state != KES_ONRUNQ)) { - panc(string, "KSE wrong state"); - } - prevpri = td2->td_priority; - if (td2->td_kse) { - assigned++; - if (unassigned) { - panc(string, "unassigned before assigned"); - } - if (kg->kg_last_assigned == NULL) { - panc(string, "lastassigned corrupt"); - } - if (saw_lastassigned) { - panc(string, "last assigned not last"); - } - if (td2->td_kse->ke_thread != td2) { - panc(string, "mismatched kse/thread"); - } - } else { - unassigned++; - } - if (td2 == kg->kg_last_assigned) { - saw_lastassigned = 1; - if (td2->td_kse == NULL) { - panc(string, "last assigned not assigned"); - } - } - } - if (kg->kg_last_assigned && (saw_lastassigned == 0)) { - panc(string, "where on earth does lastassigned point?"); - } -#if 0 - FOREACH_THREAD_IN_GROUP(kg, td2) { - if (((td2->td_flags & TDF_UNBOUND) == 0) && - (TD_ON_RUNQ(td2))) { - assigned++; - if (td2->td_kse == NULL) { - panc(string, "BOUND thread with no KSE"); - } - } - } -#endif -#if 0 - if ((unassigned + assigned) != kg->kg_runnable) { - panc(string, "wrong number in runnable"); - } -#endif - } - if (assigned == 12345) { - printf("%p %p %p %p %p %d, %d", - td, td2, ke, kg, p, assigned, saw_lastassigned); - } -} -#endif - /****** functions that are temporarily here ***********/ #include #define RANGEOF(type, start, end) (offsetof(type, end) - offsetof(type, start)) From owner-p4-projects@FreeBSD.ORG Fri Sep 3 07:56:55 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 86B0416A4D0; Fri, 3 Sep 2004 07:56:55 +0000 (GMT) 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 4275B16A4CE for ; Fri, 3 Sep 2004 07:56:55 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C56743D5C for ; Fri, 3 Sep 2004 07:56:55 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i837utEg022117 for ; Fri, 3 Sep 2004 07:56:55 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i837us28022114 for perforce@freebsd.org; Fri, 3 Sep 2004 07:56:54 GMT (envelope-from julian@freebsd.org) Date: Fri, 3 Sep 2004 07:56:54 GMT Message-Id: <200409030756.i837us28022114@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 60924 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, 03 Sep 2004 07:56:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=60924 Change 60924 by julian@julian_ref on 2004/09/03 07:56:28 IFC@60923 Affected files ... .. //depot/projects/nsched/sys/conf/NOTES#17 integrate .. //depot/projects/nsched/sys/dev/ata/ata-chipset.c#11 integrate .. //depot/projects/nsched/sys/dev/ata/ata-pci.h#4 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#3 integrate .. //depot/projects/nsched/sys/kern/kern_fork.c#11 integrate .. //depot/projects/nsched/sys/kern/sched_4bsd.c#33 integrate .. //depot/projects/nsched/sys/kern/subr_smp.c#8 integrate .. //depot/projects/nsched/sys/kern/sysv_shm.c#6 integrate .. //depot/projects/nsched/sys/kern/vfs_aio.c#5 integrate .. //depot/projects/nsched/sys/net/netisr.c#5 integrate .. //depot/projects/nsched/sys/sys/smp.h#5 integrate .. //depot/projects/nsched/sys/vm/vm_fault.c#6 integrate .. //depot/projects/nsched/sys/vm/vm_glue.c#7 integrate .. //depot/projects/nsched/sys/vm/vm_map.c#9 integrate Differences ... ==== //depot/projects/nsched/sys/conf/NOTES#17 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1274 2004/09/02 22:21:51 scottl Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1275 2004/09/03 06:32:11 ru Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -229,8 +229,8 @@ options MUTEX_PROFILING # Set the number of buffers and the hash size. The hash size MUST be larger # than the number of buffers. Hash size should be prime. -options MPROF_BUFFERS="1536" -options MPROF_HASH_SIZE="1543" +options MPROF_BUFFERS="1536" +options MPROF_HASH_SIZE="1543" # Profiling for internal hash tables. options SLEEPQUEUE_PROFILING @@ -639,7 +639,7 @@ options IPFIREWALL_VERBOSE #enable logging to syslogd(8) options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default -options IPFIREWALL_FORWARD #packet destination changes +options IPFIREWALL_FORWARD #packet destination changes options IPV6FIREWALL #firewall for IPv6 options IPV6FIREWALL_VERBOSE options IPV6FIREWALL_VERBOSE_LIMIT=100 @@ -744,7 +744,7 @@ options NFSCLIENT #Network File System client # The rest are optional: -options AUTOFS #Auto File System +options AUTOFS #Auto File System options CD9660 #ISO 9660 filesystem options FDESCFS #File descriptor filesystem options HPFS #OS/2 File system @@ -1333,14 +1333,14 @@ options AHC_TMODE_ENABLE # Compile in Aic7xxx Debugging code. -options AHC_DEBUG +options AHC_DEBUG # Aic7xxx driver debugging options. See sys/dev/aic7xxx/aic7xxx.h -options AHC_DEBUG_OPTS +options AHC_DEBUG_OPTS # Print register bitfields in debug output. Adds ~128k to driver # See ahc(4). -options AHC_REG_PRETTY_PRINT +options AHC_REG_PRETTY_PRINT # Compile in aic79xx debugging code. options AHD_DEBUG @@ -1352,7 +1352,7 @@ options AHD_REG_PRETTY_PRINT # Bitmap of units to enable targetmode operations. -options AHD_TMODE_ENABLE +options AHD_TMODE_ENABLE # The adw driver will attempt to use memory mapped I/O for all PCI # controllers that have it configured only if this option is set. @@ -2480,7 +2480,7 @@ options KSTACK_MAX_PAGES=32 # Maximum pages to give the kernel stack # Adaptec Array Controller driver options -options AAC_DEBUG # Debugging levels: +options AAC_DEBUG # Debugging levels: # 0 - quiet, only emit warnings # 1 - noisy, emit major function # points and things done ==== //depot/projects/nsched/sys/dev/ata/ata-chipset.c#11 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.84 2004/09/01 12:15:44 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.85 2004/09/03 07:37:53 sos Exp $"); #include "opt_ata.h" #include @@ -493,7 +493,7 @@ if (ata_setup_interrupt(dev)) return ENXIO; - /* set prefetch, postwrite */ + /* disable/set prefetch, postwrite */ if (ctlr->chip->cfg2 & AMDBUG) pci_write_config(dev, 0x41, pci_read_config(dev, 0x41, 1) & 0x0f, 1); else @@ -828,11 +828,11 @@ { ATA_I82801DB, 0, 0, 0x00, ATA_UDMA5, "Intel ICH4" }, { ATA_I82801DB_1, 0, 0, 0x00, ATA_UDMA5, "Intel ICH4" }, { ATA_I82801EB, 0, 0, 0x00, ATA_UDMA5, "Intel ICH5" }, - { ATA_I82801EB_1, 0, 0, 0x00, ATA_SA150, "Intel ICH5" }, - { ATA_I82801EB_2, 0, 0, 0x00, ATA_SA150, "Intel ICH5" }, + { ATA_I82801EB_S1,0, 0, 0x00, ATA_SA150, "Intel ICH5" }, + { ATA_I82801EB_R1,0, 0, 0x00, ATA_SA150, "Intel ICH5" }, { ATA_I6300ESB, 0, 0, 0x00, ATA_UDMA5, "Intel 6300ESB" }, - { ATA_I6300ESB_1, 0, 0, 0x00, ATA_SA150, "Intel 6300ESB" }, - { ATA_I6300ESB_2, 0, 0, 0x00, ATA_SA150, "Intel 6300ESB" }, + { ATA_I6300ESB_S1,0, 0, 0x00, ATA_SA150, "Intel 6300ESB" }, + { ATA_I6300ESB_R1,0, 0, 0x00, ATA_SA150, "Intel 6300ESB" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; @@ -1105,9 +1105,13 @@ struct ata_pci_controller *ctlr = device_get_softc(dev); struct ata_chip_id *idx; static struct ata_chip_id ids[] = - {{ ATA_NFORCE1, 0, AMDNVIDIA, NVIDIA|AMDBUG, ATA_UDMA5, "nVidia nForce" }, - { ATA_NFORCE2, 0, AMDNVIDIA, NVIDIA|AMDBUG, ATA_UDMA6, "nVidia nForce2" }, - { ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3" }, + {{ ATA_NFORCE1, 0, AMDNVIDIA, NVIDIA, ATA_UDMA5, "nVidia nForce" }, + { ATA_NFORCE2, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2" }, + { ATA_NFORCE2_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia MCP" }, + { ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3" }, + { ATA_NFORCE3_PRO, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 Pro" }, + { ATA_NFORCE3_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 MCP" }, + { ATA_NFORCE4, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce4" }, { 0, 0, 0, 0, 0, 0}}; char buffer[64]; @@ -1129,11 +1133,8 @@ if (ata_setup_interrupt(dev)) return ENXIO; - /* set prefetch, postwrite */ - if (ctlr->chip->cfg2 & AMDBUG) - pci_write_config(dev, 0x51, pci_read_config(dev, 0x51, 1) & 0x0f, 1); - else - pci_write_config(dev, 0x51, pci_read_config(dev, 0x51, 1) | 0xf0, 1); + /* disable prefetch, postwrite */ + pci_write_config(dev, 0x51, pci_read_config(dev, 0x51, 1) & 0x0f, 1); ctlr->setmode = ata_via_family_setmode; return 0; @@ -2373,7 +2374,7 @@ struct ata_pci_controller *ctlr = device_get_softc(dev); struct ata_chip_id *idx; static struct ata_chip_id ids[] = - {{ ATA_SIS964_1,0x00, SISSATA, 0, ATA_SA150, "SiS 964" }, /* south */ + {{ ATA_SIS964_S,0x00, SISSATA, 0, ATA_SA150, "SiS 964" }, /* south */ { ATA_SIS964, 0x00, SIS133NEW, 0, ATA_UDMA6, "SiS 964" }, /* south */ { ATA_SIS963, 0x00, SIS133NEW, 0, ATA_UDMA6, "SiS 963" }, /* south */ { ATA_SIS962, 0x00, SIS133NEW, 0, ATA_UDMA6, "SiS 962" }, /* south */ ==== //depot/projects/nsched/sys/dev/ata/ata-pci.h#4 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.32 2004/06/15 11:02:09 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.33 2004/09/03 07:37:53 sos Exp $ */ /* structure holding chipset config info */ @@ -117,11 +117,11 @@ #define ATA_I82801DB 0x24cb8086 #define ATA_I82801DB_1 0x24ca8086 #define ATA_I82801EB 0x24db8086 -#define ATA_I82801EB_1 0x24d18086 -#define ATA_I82801EB_2 0x24df8086 +#define ATA_I82801EB_S1 0x24d18086 +#define ATA_I82801EB_R1 0x24df8086 #define ATA_I6300ESB 0x25a28086 -#define ATA_I6300ESB_1 0x25a38086 -#define ATA_I6300ESB_2 0x25b08086 +#define ATA_I6300ESB_S1 0x25a38086 +#define ATA_I6300ESB_R1 0x25b08086 #define ATA_NATIONAL_ID 0x100b #define ATA_SC1100 0x0502100b @@ -129,7 +129,18 @@ #define ATA_NVIDIA_ID 0x10de #define ATA_NFORCE1 0x01bc10de #define ATA_NFORCE2 0x006510de +#define ATA_NFORCE2_MCP 0x008510de #define ATA_NFORCE3 0x00d510de +#define ATA_NFORCE3_PRO 0x00e510de +#define ATA_NFORCE3_PRO_S1 0x00e310de +#define ATA_NFORCE3_PRO_S2 0x00ee10de +#define ATA_NFORCE3_MCP 0x003510de +#define ATA_NFORCE3_MCP_S1 0x003610de +#define ATA_NFORCE3_MCP_S2 0x003e10de +#define ATA_NFORCE4 0x005310de +#define ATA_NFORCE4_S1 0x005410de +#define ATA_NFORCE4_S2 0x005510de + #define ATA_PROMISE_ID 0x105a #define ATA_PDC20246 0x4d33105a @@ -220,7 +231,7 @@ #define ATA_SIS962 0x09621039 #define ATA_SIS963 0x09631039 #define ATA_SIS964 0x09641039 -#define ATA_SIS964_1 0x01801039 +#define ATA_SIS964_S 0x01801039 #define ATA_VIA_ID 0x1106 #define ATA_VIA82C571 0x05711106 ==== //depot/projects/nsched/sys/fs/autofs/autofs_vnops.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/fs/autofs/autofs_vnops.c,v 1.2 2004/09/02 20:44:55 alfred Exp $ + * $FreeBSD: src/sys/fs/autofs/autofs_vnops.c,v 1.3 2004/09/03 02:45:36 scottl Exp $ * $Id: autofs_vnops.c,v 1.21 2004/08/31 08:49:56 bright Exp $ */ #include @@ -590,7 +590,7 @@ while ((char *)dp < ((char *)dents) + dlen) { len = _GENERIC_DIRSIZ(dp); reclen = dp->d_reclen; - DP(("dp->d_reclen %d _GENERIC_DIRSIZ %d drem %d dlen %d\n", + DP(("dp->d_reclen %d _GENERIC_DIRSIZ %zd drem %zd dlen %zd\n", dp->d_reclen, len, drem, dlen)); DP(("entry: %s\n", dp->d_name)); /* record past the end of our buffer? */ @@ -622,7 +622,7 @@ drem -= reclen; /* less data remaining */ } - DP(("drem %d dlen %d\n", drem, dlen)); + DP(("drem %zd dlen %zd\n", drem, dlen)); *dlenp = dlen; *dentsp = dents; return (error); ==== //depot/projects/nsched/sys/kern/kern_fork.c#11 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.236 2004/09/01 02:11:27 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.237 2004/09/03 05:11:32 alc Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -218,9 +218,7 @@ * certain parts of a process from itself. */ if ((flags & RFPROC) == 0) { - mtx_lock(&Giant); vm_forkproc(td, NULL, NULL, flags); - mtx_unlock(&Giant); /* * Close all file descriptors. @@ -659,27 +657,25 @@ * Finish creating the child process. It will return via a different * execution path later. (ie: directly into user mode) */ - mtx_lock(&Giant); vm_forkproc(td, p2, td2, flags); if (flags == (RFFDG | RFPROC)) { - cnt.v_forks++; - cnt.v_forkpages += p2->p_vmspace->vm_dsize + - p2->p_vmspace->vm_ssize; + atomic_add_int(&cnt.v_forks, 1); + atomic_add_int(&cnt.v_forkpages, p2->p_vmspace->vm_dsize + + p2->p_vmspace->vm_ssize); } else if (flags == (RFFDG | RFPROC | RFPPWAIT | RFMEM)) { - cnt.v_vforks++; - cnt.v_vforkpages += p2->p_vmspace->vm_dsize + - p2->p_vmspace->vm_ssize; + atomic_add_int(&cnt.v_vforks, 1); + atomic_add_int(&cnt.v_vforkpages, p2->p_vmspace->vm_dsize + + p2->p_vmspace->vm_ssize); } else if (p1 == &proc0) { - cnt.v_kthreads++; - cnt.v_kthreadpages += p2->p_vmspace->vm_dsize + - p2->p_vmspace->vm_ssize; + atomic_add_int(&cnt.v_kthreads, 1); + atomic_add_int(&cnt.v_kthreadpages, p2->p_vmspace->vm_dsize + + p2->p_vmspace->vm_ssize); } else { - cnt.v_rforks++; - cnt.v_rforkpages += p2->p_vmspace->vm_dsize + - p2->p_vmspace->vm_ssize; + atomic_add_int(&cnt.v_rforks, 1); + atomic_add_int(&cnt.v_rforkpages, p2->p_vmspace->vm_dsize + + p2->p_vmspace->vm_ssize); } - mtx_unlock(&Giant); /* * Both processes are set up, now check if any loadable modules want ==== //depot/projects/nsched/sys/kern/sched_4bsd.c#33 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.52 2004/09/01 06:42:01 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.53 2004/09/03 07:42:31 julian Exp $"); #include #include @@ -151,6 +151,7 @@ static void maybe_resched(struct thread *td); static void updatepri(struct ksegrp *kg); static void resetpriority(struct ksegrp *kg); +static int forward_wakeup(int cpunum); static struct kproc_desc sched_kp = { "schedcpu", @@ -210,6 +211,44 @@ 0, sizeof sched_quantum, sysctl_kern_quantum, "I", "Roundrobin scheduling quantum in microseconds"); +/* Enable forwarding of wakeups to all other cpus */ +SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); + +static int forward_wakeup_enabled = 0; +SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, enabled, CTLFLAG_RW, + &forward_wakeup_enabled, 0, + "Forwarding of wakeup to idle CPUs"); + +static int forward_wakeups_requested = 0; +SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, requested, CTLFLAG_RD, + &forward_wakeups_requested, 0, + "Requests for Forwarding of wakeup to idle CPUs"); + +static int forward_wakeups_delivered = 0; +SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, delivered, CTLFLAG_RD, + &forward_wakeups_delivered, 0, + "Completed Forwarding of wakeup to idle CPUs"); + +static int forward_wakeup_use_mask = 0; +SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, usemask, CTLFLAG_RW, + &forward_wakeup_use_mask, 0, + "Use the mask of idle cpus"); + +static int forward_wakeup_use_loop = 0; +SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, useloop, CTLFLAG_RW, + &forward_wakeup_use_loop, 0, + "Use a loop to find idle cpus"); + +static int forward_wakeup_use_single = 0; +SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, onecpu, CTLFLAG_RW, + &forward_wakeup_use_single, 0, + "Only signal one idle cpu"); + +static int forward_wakeup_use_htt = 0; +SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, htt2, CTLFLAG_RW, + &forward_wakeup_use_htt, 0, + "account for htt"); + /* * Arrange to reschedule if necessary, taking the priorities and * schedulers into account. @@ -762,6 +801,93 @@ setrunqueue(td, SRQ_BORING); } +/* enable HTT_2 if you have a 2-way HTT cpu.*/ +static int +forward_wakeup(int cpunum) +{ + cpumask_t map, me, dontuse; + cpumask_t map2; + struct pcpu *pc; + cpumask_t id, map3; + + mtx_assert(&sched_lock, MA_OWNED); + + CTR0(KTR_SMP, "forward_wakeup()"); + + if ((!forward_wakeup_enabled) || + (forward_wakeup_use_mask == 0 && forward_wakeup_use_loop == 0)) + return (0); + if (!smp_started || cold || panicstr) + return (0); + + forward_wakeups_requested++; + +/* + * check the idle mask we received against what we calculated before + * in the old version. + */ + me = PCPU_GET(cpumask); + /* + * don't bother if we should be doing it ourself.. + */ + if ((me & idle_cpus_mask) && (cpunum == NOCPU || me == (1 << cpunum))) + return (0); + + dontuse = me | stopped_cpus | hlt_cpus_mask; + map3 = 0; + if (forward_wakeup_use_loop) { + SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { + id = pc->pc_cpumask; + if ( (id & dontuse) == 0 && + pc->pc_curthread == pc->pc_idlethread) { + map3 |= id; + } + } + } + + if (forward_wakeup_use_mask) { + map = 0; + map = idle_cpus_mask & ~dontuse; + + /* If they are both on, compare and use loop if different */ + if (forward_wakeup_use_loop) { + if (map != map3) { + printf("map (%02X) != map3 (%02X)\n", + map, map3); + map = map3; + } + } + } else { + map = map3; + } + /* If we only allow a specific CPU, then mask off all the others */ + if (cpunum != NOCPU) { + KASSERT((cpunum <= mp_maxcpus),("forward_wakeup: bad cpunum.")); + map &= (1 << cpunum); + } else { + /* Try choose an idle die. */ + if (forward_wakeup_use_htt) { + map2 = (map & (map >> 1)) & 0x5555; + if (map2) { + map = map2; + } + } + + /* set only one bit */ + if (forward_wakeup_use_single) { + map = map & ((~map) + 1); + } + } + if (map) { + forward_wakeups_delivered++; + ipi_selected(map, IPI_AST); + return (1); + } + if (cpunum == NOCPU) + printf("forward_wakeup: Idle processor not found\n"); + return (0); +} + void sched_add(struct thread *td, int flags) { ==== //depot/projects/nsched/sys/kern/subr_smp.c#8 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_smp.c,v 1.192 2004/09/01 18:05:43 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_smp.c,v 1.193 2004/09/03 07:42:31 julian Exp $"); #include #include @@ -60,7 +60,7 @@ void (*cpustop_restartfunc)(void); #endif -/* amazingly enough this is used in non SMP code XXX BUG! */ +/* This is used in modules that need to work in both SMP and UP. */ cpumask_t all_cpus; int mp_ncpus; @@ -102,46 +102,6 @@ &forward_roundrobin_enabled, 0, "Forwarding of roundrobin to all other CPUs"); -#ifdef SCHED_4BSD -/* Enable forwarding of wakeups to all other cpus */ -SYSCTL_NODE(_kern_smp, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); - -static int forward_wakeup_enabled = 0; -SYSCTL_INT(_kern_smp_ipiwakeup, OID_AUTO, enabled, CTLFLAG_RW, - &forward_wakeup_enabled, 0, - "Forwarding of wakeup to idle CPUs"); - -static int forward_wakeups_requested = 0; -SYSCTL_INT(_kern_smp_ipiwakeup, OID_AUTO, requested, CTLFLAG_RD, - &forward_wakeups_requested, 0, - "Requests for Forwarding of wakeup to idle CPUs"); - -static int forward_wakeups_delivered = 0; -SYSCTL_INT(_kern_smp_ipiwakeup, OID_AUTO, delivered, CTLFLAG_RD, - &forward_wakeups_delivered, 0, - "Completed Forwarding of wakeup to idle CPUs"); - -static int forward_wakeup_use_mask = 0; -SYSCTL_INT(_kern_smp_ipiwakeup, OID_AUTO, usemask, CTLFLAG_RW, - &forward_wakeup_use_mask, 0, - "Use the mask of idle cpus"); - -static int forward_wakeup_use_loop = 0; -SYSCTL_INT(_kern_smp_ipiwakeup, OID_AUTO, useloop, CTLFLAG_RW, - &forward_wakeup_use_loop, 0, - "Use a loop to find idle cpus"); - -static int forward_wakeup_use_single = 0; -SYSCTL_INT(_kern_smp_ipiwakeup, OID_AUTO, onecpu, CTLFLAG_RW, - &forward_wakeup_use_single, 0, - "Only signal one idle cpu"); - -static int forward_wakeup_use_htt = 0; -SYSCTL_INT(_kern_smp_ipiwakeup, OID_AUTO, htt2, CTLFLAG_RW, - &forward_wakeup_use_htt, 0, - "account for htt"); - -#endif /* SCHED_4BSD */ /* Variables needed for SMP rendezvous. */ static void (*smp_rv_setup_func)(void *arg); static void (*smp_rv_action_func)(void *arg); @@ -249,95 +209,6 @@ ipi_selected(map, IPI_AST); } -#ifdef SCHED_4BSD -/* enable HTT_2 if you have a 2-way HTT cpu.*/ -int -forward_wakeup(int cpunum) -{ - cpumask_t map, me, dontuse; - cpumask_t map2; - struct pcpu *pc; - cpumask_t id, map3; - - mtx_assert(&sched_lock, MA_OWNED); - - CTR0(KTR_SMP, "forward_wakeup()"); - - if ((!forward_wakeup_enabled) || - (forward_wakeup_use_mask == 0 && forward_wakeup_use_loop == 0)) - return (0); - if (!smp_started || cold || panicstr) - return (0); - - forward_wakeups_requested++; - -/* - * check the idle mask we received against what we calculated before - * in the old version. - */ - me = PCPU_GET(cpumask); - /* - * don't bother if we should be doing it ourself.. - */ - if ((me & idle_cpus_mask) && (cpunum == NOCPU || me == (1 << cpunum))) - return (0); - - dontuse = me | stopped_cpus | hlt_cpus_mask; - map3 = 0; - if (forward_wakeup_use_loop) { - SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { - id = pc->pc_cpumask; - if ( (id & dontuse) == 0 && - pc->pc_curthread == pc->pc_idlethread) { - map3 |= id; - } - } - } - - if (forward_wakeup_use_mask) { - map = 0; - map = idle_cpus_mask & ~dontuse; - - /* If they are both on, compare and use loop if different */ - if (forward_wakeup_use_loop) { - if (map != map3) { - printf("map (%02X) != map3 (%02X)\n", - map, map3); - map = map3; - } - } - } else { - map = map3; - } - /* If we only allow a specific CPU, then mask off all the others */ - if (cpunum != NOCPU) { - KASSERT((cpunum <= mp_maxcpus),("forward_wakeup: bad cpunum.")); - map &= (1 << cpunum); - } else { - /* Try choose an idle die. */ - if (forward_wakeup_use_htt) { - map2 = (map & (map >> 1)) & 0x5555; - if (map2) { - map = map2; - } - } - - /* set only one bit */ - if (forward_wakeup_use_single) { - map = map & ((~map) + 1); - } - } - if (map) { - forward_wakeups_delivered++; - ipi_selected(map, IPI_AST); - return (1); - } - if (cpunum == NOCPU) - printf("forward_wakeup: Idle processor not found\n"); - return (0); -} -#endif /* SCHED_4BSD */ - /* * When called the executing CPU will send an IPI to all other CPUs * requesting that they halt execution. ==== //depot/projects/nsched/sys/kern/sysv_shm.c#6 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sysv_shm.c,v 1.96 2004/07/28 06:45:13 kan Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sysv_shm.c,v 1.97 2004/09/03 05:11:32 alc Exp $"); #include "opt_compat.h" #include "opt_sysvipc.h" @@ -806,6 +806,7 @@ size_t size; int i; + mtx_lock(&Giant); size = shminfo.shmseg * sizeof(struct shmmap_state); shmmap_s = malloc(size, M_SHM, M_WAITOK); bcopy(p1->p_vmspace->vm_shm, shmmap_s, size); @@ -813,6 +814,7 @@ for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) if (shmmap_s->shmid != -1) shmsegs[IPCID_TO_IX(shmmap_s->shmid)].shm_nattch++; + mtx_unlock(&Giant); } static void ==== //depot/projects/nsched/sys/kern/vfs_aio.c#5 (text+ko) ==== @@ -19,7 +19,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.174 2004/08/15 06:24:41 jmg Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.175 2004/09/03 03:19:14 rwatson Exp $"); #include #include @@ -61,6 +61,8 @@ #include "opt_vfs_aio.h" +NET_NEEDS_GIANT("aio"); + /* * Counter for allocating reference ids to new jobs. Wrapped to 1 on * overflow. ==== //depot/projects/nsched/sys/net/netisr.c#5 (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/net/netisr.c,v 1.13 2004/08/28 19:27:25 rwatson Exp $ + * $FreeBSD: src/sys/net/netisr.c,v 1.14 2004/09/03 01:37:02 rwatson Exp $ */ #include "opt_net.h" @@ -84,7 +84,7 @@ static void *net_ih; /* - * Note all network code is currently capable of running MPSAFE; however, + * Not all network code is currently capable of running MPSAFE; however, * most of it is. Since those sections that are not are generally optional * components not shipped with default kernels, we provide a basic way to * determine whether MPSAFE operation is permitted: based on a default of ==== //depot/projects/nsched/sys/sys/smp.h#5 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/sys/smp.h,v 1.80 2004/09/01 06:42:02 julian Exp $ + * $FreeBSD: src/sys/sys/smp.h,v 1.81 2004/09/03 07:42:31 julian Exp $ */ #ifndef _SYS_SMP_H_ @@ -96,7 +96,6 @@ void forward_signal(struct thread *); void forward_roundrobin(void); -int forward_wakeup(int cpunum); int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); void smp_rendezvous_action(void); ==== //depot/projects/nsched/sys/vm/vm_fault.c#6 (text+ko) ==== @@ -72,7 +72,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.195 2004/09/01 19:18:59 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.196 2004/09/03 05:11:32 alc Exp $"); #include #include @@ -1026,9 +1026,13 @@ * read-only sections. */ for (va = start; va < end; va += PAGE_SIZE) { + if (map->system_map) + mtx_lock(&Giant); rv = vm_fault(map, va, user_wire ? VM_PROT_READ : VM_PROT_READ | VM_PROT_WRITE, user_wire ? VM_FAULT_USER_WIRE : VM_FAULT_CHANGE_WIRING); + if (map->system_map) + mtx_unlock(&Giant); if (rv) { if (va != start) vm_fault_unwire(map, start, va, fictitious); ==== //depot/projects/nsched/sys/vm/vm_glue.c#7 (text+ko) ==== @@ -57,7 +57,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_glue.c,v 1.202 2004/07/30 20:31:02 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_glue.c,v 1.203 2004/09/03 05:11:32 alc Exp $"); #include "opt_vm.h" #include "opt_kstack_pages.h" @@ -619,8 +619,6 @@ { struct proc *p1 = td->td_proc; - GIANT_REQUIRED; - if ((flags & RFPROC) == 0) { /* * Divorce the memory, if it is shared, essentially ==== //depot/projects/nsched/sys/vm/vm_map.c#9 (text+ko) ==== @@ -63,7 +63,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.360 2004/08/16 06:16:12 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.361 2004/09/03 05:11:32 alc Exp $"); #include #include @@ -2482,8 +2482,6 @@ vm_map_entry_t new_entry; vm_object_t object; - GIANT_REQUIRED; - vm_map_lock(old_map); vm2 = vmspace_alloc(old_map->min_offset, old_map->max_offset); @@ -2942,7 +2940,6 @@ struct vmspace *oldvmspace = p->p_vmspace; struct vmspace *newvmspace; - GIANT_REQUIRED; if (oldvmspace->vm_refcnt == 1) return; newvmspace = vmspace_fork(oldvmspace); From owner-p4-projects@FreeBSD.ORG Fri Sep 3 08:25:33 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9FAAF16A4D0; Fri, 3 Sep 2004 08:25:33 +0000 (GMT) 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 7A05916A4CE for ; Fri, 3 Sep 2004 08:25:33 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CC5E43D39 for ; Fri, 3 Sep 2004 08:25:33 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i838PXXj023514 for ; Fri, 3 Sep 2004 08:25:33 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i838PXIw023511 for perforce@freebsd.org; Fri, 3 Sep 2004 08:25:33 GMT (envelope-from julian@freebsd.org) Date: Fri, 3 Sep 2004 08:25:33 GMT Message-Id: <200409030825.i838PXIw023511@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 60931 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, 03 Sep 2004 08:25:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=60931 Change 60931 by julian@julian_ref on 2004/09/03 08:25:16 IFC@60929 Affected files ... .. //depot/projects/nsched/sys/kern/sched_4bsd.c#34 integrate .. //depot/projects/nsched/sys/sys/smp.h#6 integrate Differences ... ==== //depot/projects/nsched/sys/kern/sched_4bsd.c#34 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.53 2004/09/03 07:42:31 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.54 2004/09/03 08:19:31 julian Exp $"); #include #include @@ -48,6 +48,7 @@ #include #include #include +#include /* * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in ==== //depot/projects/nsched/sys/sys/smp.h#6 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/sys/smp.h,v 1.81 2004/09/03 07:42:31 julian Exp $ + * $FreeBSD: src/sys/sys/smp.h,v 1.82 2004/09/03 08:19:31 julian Exp $ */ #ifndef _SYS_SMP_H_ @@ -49,16 +49,17 @@ extern int smp_cpus; extern volatile cpumask_t started_cpus; extern volatile cpumask_t stopped_cpus; +extern cpumask_t idle_cpus_mask; +extern cpumask_t hlt_cpus_mask; +extern cpumask_t logical_cpus_mask; #endif /* SMP */ extern u_int mp_maxid; +extern int mp_maxcpus; extern int mp_ncpus; extern volatile int smp_started; extern cpumask_t all_cpus; -extern cpumask_t idle_cpus_mask; -extern cpumask_t hlt_cpus_mask; -extern cpumask_t logical_cpus_mask; /* * Macro allowing us to determine whether a CPU is absent at any given From owner-p4-projects@FreeBSD.ORG Fri Sep 3 09:24:13 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D419B16A4D0; Fri, 3 Sep 2004 09:24:12 +0000 (GMT) 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 98FBE16A4CE for ; Fri, 3 Sep 2004 09:24:12 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7984943D55 for ; Fri, 3 Sep 2004 09:24:12 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i839OCBh025391 for ; Fri, 3 Sep 2004 09:24:12 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i839OClf025388 for perforce@freebsd.org; Fri, 3 Sep 2004 09:24:12 GMT (envelope-from julian@freebsd.org) Date: Fri, 3 Sep 2004 09:24:12 GMT Message-Id: <200409030924.i839OClf025388@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 60937 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, 03 Sep 2004 09:24:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=60937 Change 60937 by julian@julian_ref on 2004/09/03 09:23:33 IFC@60936 Affected files ... .. //depot/projects/nsched/sys/dev/ata/ata-chipset.c#12 integrate .. //depot/projects/nsched/sys/dev/iir/iir.c#3 integrate .. //depot/projects/nsched/sys/kern/sched_4bsd.c#35 integrate Differences ... ==== //depot/projects/nsched/sys/dev/ata/ata-chipset.c#12 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.85 2004/09/03 07:37:53 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.86 2004/09/03 08:23:04 sos Exp $"); #include "opt_ata.h" #include @@ -1515,14 +1515,19 @@ ATA_OUTL(ctlr->r_res2, (atadev->channel->unit + 1) << 2, 0x00000001); - if (command != ATA_READ_DMA && command != ATA_WRITE_DMA) + switch (command) { + default: return ata_generic_command(atadev, command, lba, count, feature); - if (command == ATA_READ_DMA) + case ATA_READ_DMA: wordp[0] = htole32(0x04 | ((atadev->channel->unit+1)<<16) | (0x00<<24)); - if (command == ATA_WRITE_DMA) + break; + + case ATA_WRITE_DMA: wordp[0] = htole32(0x00 | ((atadev->channel->unit+1)<<16) | (0x00<<24)); - wordp[1] = atadev->channel->dma->mdmatab; + break; + } + wordp[1] = htole32(atadev->channel->dma->mdmatab); wordp[2] = 0; ata_promise_apkt((u_int8_t*)wordp, atadev, command, lba, count, feature); ==== //depot/projects/nsched/sys/dev/iir/iir.c#3 (text+ko) ==== @@ -43,7 +43,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/iir/iir.c,v 1.10 2004/05/19 17:46:34 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iir/iir.c,v 1.11 2004/09/03 08:44:23 scottl Exp $"); #define _IIR_C_ @@ -874,13 +874,7 @@ } splx(s); } else { - struct bus_dma_segment seg; - - /* Pointer to physical buffer */ - seg.ds_addr = - (bus_addr_t)ccb->csio.data_ptr; - seg.ds_len = ccb->csio.dxfer_len; - gdtexecuteccb(gccb, &seg, 1, 0); + panic("iir: CAM_DATA_PHYS not supported"); } } else { struct bus_dma_segment *segs; @@ -989,13 +983,7 @@ } splx(s); } else { - struct bus_dma_segment seg; - - /* Pointer to physical buffer */ - seg.ds_addr = - (bus_addr_t)ccb->csio.data_ptr; - seg.ds_len = ccb->csio.dxfer_len; - gdtexecuteccb(gccb, &seg, 1, 0); + panic("iir: CAM_DATA_PHYS not supported"); } } else { struct bus_dma_segment *segs; ==== //depot/projects/nsched/sys/kern/sched_4bsd.c#35 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.54 2004/09/03 08:19:31 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.56 2004/09/03 09:19:49 julian Exp $"); #include #include @@ -152,7 +152,9 @@ static void maybe_resched(struct thread *td); static void updatepri(struct ksegrp *kg); static void resetpriority(struct ksegrp *kg); +#ifdef SMP static int forward_wakeup(int cpunum); +#endif static struct kproc_desc sched_kp = { "schedcpu", @@ -212,6 +214,7 @@ 0, sizeof sched_quantum, sysctl_kern_quantum, "I", "Roundrobin scheduling quantum in microseconds"); +#ifdef SMP /* Enable forwarding of wakeups to all other cpus */ SYSCTL_NODE(_kern_sched, OID_AUTO, ipiwakeup, CTLFLAG_RD, NULL, "Kernel SMP"); @@ -249,6 +252,7 @@ SYSCTL_INT(_kern_sched_ipiwakeup, OID_AUTO, htt2, CTLFLAG_RW, &forward_wakeup_use_htt, 0, "account for htt"); +#endif /* * Arrange to reschedule if necessary, taking the priorities and @@ -802,6 +806,7 @@ setrunqueue(td, SRQ_BORING); } +#ifdef SMP /* enable HTT_2 if you have a 2-way HTT cpu.*/ static int forward_wakeup(int cpunum) @@ -888,6 +893,7 @@ printf("forward_wakeup: Idle processor not found\n"); return (0); } +#endif void sched_add(struct thread *td, int flags) From owner-p4-projects@FreeBSD.ORG Fri Sep 3 14:14:41 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A188516A4D0; Fri, 3 Sep 2004 14:14:40 +0000 (GMT) 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 4529316A4CE for ; Fri, 3 Sep 2004 14:14:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A3CE43D41 for ; Fri, 3 Sep 2004 14:14:40 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i83EEdm2039206 for ; Fri, 3 Sep 2004 14:14:40 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i83EEca9039202 for perforce@freebsd.org; Fri, 3 Sep 2004 14:14:38 GMT (envelope-from jhb@freebsd.org) Date: Fri, 3 Sep 2004 14:14:38 GMT Message-Id: <200409031414.i83EEca9039202@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 60953 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, 03 Sep 2004 14:14:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=60953 Change 60953 by jhb@jhb_slimer on 2004/09/03 14:14:21 IFC @60947. Affected files ... .. //depot/projects/smpng/sys/alpha/alpha/pmap.c#63 integrate .. //depot/projects/smpng/sys/alpha/alpha/trap.c#54 integrate .. //depot/projects/smpng/sys/alpha/conf/GENERIC#40 integrate .. //depot/projects/smpng/sys/alpha/conf/NOTES#9 integrate .. //depot/projects/smpng/sys/alpha/include/cpu.h#12 integrate .. //depot/projects/smpng/sys/alpha/include/param.h#11 integrate .. //depot/projects/smpng/sys/alpha/include/profile.h#4 integrate .. //depot/projects/smpng/sys/alpha/linux/linux_machdep.c#17 integrate .. //depot/projects/smpng/sys/alpha/pci/pcibus.c#6 integrate .. //depot/projects/smpng/sys/amd64/amd64/mp_machdep.c#13 integrate .. //depot/projects/smpng/sys/amd64/amd64/mp_watchdog.c#1 branch .. //depot/projects/smpng/sys/amd64/amd64/pmap.c#31 integrate .. //depot/projects/smpng/sys/amd64/amd64/trap.c#22 integrate .. //depot/projects/smpng/sys/amd64/conf/GENERIC#22 integrate .. //depot/projects/smpng/sys/amd64/conf/NOTES#9 integrate .. //depot/projects/smpng/sys/amd64/ia32/ia32_syscall.c#7 integrate .. //depot/projects/smpng/sys/amd64/include/mp_watchdog.h#1 branch .. //depot/projects/smpng/sys/amd64/include/param.h#11 integrate .. //depot/projects/smpng/sys/amd64/include/profile.h#7 integrate .. //depot/projects/smpng/sys/amd64/linux32/linux32_machdep.c#3 integrate .. //depot/projects/smpng/sys/arm/include/profile.h#4 integrate .. //depot/projects/smpng/sys/boot/common/Makefile.inc#7 integrate .. //depot/projects/smpng/sys/boot/common/bootstrap.h#8 integrate .. //depot/projects/smpng/sys/boot/common/load_elf.c#12 integrate .. //depot/projects/smpng/sys/boot/common/load_elf32_obj.c#1 branch .. //depot/projects/smpng/sys/boot/common/load_elf64_obj.c#1 branch .. //depot/projects/smpng/sys/boot/common/load_elf_obj.c#1 branch .. //depot/projects/smpng/sys/boot/common/misc.c#3 integrate .. //depot/projects/smpng/sys/boot/common/reloc_elf.c#1 branch .. //depot/projects/smpng/sys/boot/common/reloc_elf32.c#1 branch .. //depot/projects/smpng/sys/boot/common/reloc_elf64.c#1 branch .. //depot/projects/smpng/sys/boot/i386/boot0/Makefile#10 integrate .. //depot/projects/smpng/sys/boot/i386/boot2/Makefile#16 integrate .. //depot/projects/smpng/sys/boot/i386/boot2/boot1.S#5 integrate .. //depot/projects/smpng/sys/boot/i386/libi386/elf32_freebsd.c#3 integrate .. //depot/projects/smpng/sys/boot/i386/libi386/elf64_freebsd.c#4 integrate .. //depot/projects/smpng/sys/boot/i386/loader/conf.c#9 integrate .. //depot/projects/smpng/sys/boot/i386/mbr/Makefile#7 integrate .. //depot/projects/smpng/sys/boot/i386/mbr/mbr.s#2 integrate .. //depot/projects/smpng/sys/cam/cam_periph.c#16 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_da.c#55 integrate .. //depot/projects/smpng/sys/coda/cnode.h#7 integrate .. //depot/projects/smpng/sys/coda/coda_fbsd.c#10 integrate .. //depot/projects/smpng/sys/coda/coda_psdev.c#14 integrate .. //depot/projects/smpng/sys/coda/coda_vfsops.c#17 integrate .. //depot/projects/smpng/sys/conf/Makefile.alpha#21 integrate .. //depot/projects/smpng/sys/conf/Makefile.amd64#7 integrate .. //depot/projects/smpng/sys/conf/Makefile.arm#2 integrate .. //depot/projects/smpng/sys/conf/Makefile.i386#19 integrate .. //depot/projects/smpng/sys/conf/Makefile.ia64#26 integrate .. //depot/projects/smpng/sys/conf/Makefile.pc98#18 integrate .. //depot/projects/smpng/sys/conf/Makefile.powerpc#24 integrate .. //depot/projects/smpng/sys/conf/Makefile.sparc64#22 integrate .. //depot/projects/smpng/sys/conf/NOTES#78 integrate .. //depot/projects/smpng/sys/conf/files#119 integrate .. //depot/projects/smpng/sys/conf/files.amd64#22 integrate .. //depot/projects/smpng/sys/conf/files.pc98#64 integrate .. //depot/projects/smpng/sys/conf/kmod.mk#34 integrate .. //depot/projects/smpng/sys/conf/ldscript.alpha#5 integrate .. //depot/projects/smpng/sys/conf/ldscript.ia64#8 integrate .. //depot/projects/smpng/sys/conf/majors#40 integrate .. //depot/projects/smpng/sys/conf/options#85 integrate .. //depot/projects/smpng/sys/conf/options.amd64#9 integrate .. //depot/projects/smpng/sys/conf/options.pc98#42 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.c#16 integrate .. //depot/projects/smpng/sys/contrib/ipfilter/netinet/ip_fil.h#9 integrate .. //depot/projects/smpng/sys/dev/acpica/Osd/OsdDebug.c#8 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_lid.c#15 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#19 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_thermal.c#28 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/ahc_isa.c#2 integrate .. //depot/projects/smpng/sys/dev/ata/ata-all.c#58 integrate .. //depot/projects/smpng/sys/dev/ata/ata-all.h#30 integrate .. //depot/projects/smpng/sys/dev/ata/ata-chipset.c#42 integrate .. //depot/projects/smpng/sys/dev/ata/ata-disk.c#43 integrate .. //depot/projects/smpng/sys/dev/ata/ata-lowlevel.c#19 integrate .. //depot/projects/smpng/sys/dev/ata/ata-pci.h#24 integrate .. //depot/projects/smpng/sys/dev/ata/ata-queue.c#18 integrate .. //depot/projects/smpng/sys/dev/bfe/if_bfe.c#10 integrate .. //depot/projects/smpng/sys/dev/bfe/if_bfereg.h#4 integrate .. //depot/projects/smpng/sys/dev/ctau/if_ct.c#8 integrate .. //depot/projects/smpng/sys/dev/cx/if_cx.c#12 integrate .. //depot/projects/smpng/sys/dev/drm/radeon_drv.c#7 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#35 integrate .. //depot/projects/smpng/sys/dev/em/if_em.h#22 integrate .. //depot/projects/smpng/sys/dev/em/if_em_hw.c#13 integrate .. //depot/projects/smpng/sys/dev/em/if_em_hw.h#13 integrate .. //depot/projects/smpng/sys/dev/fdc/fdc.c#7 integrate .. //depot/projects/smpng/sys/dev/fdc/fdc_acpi.c#4 integrate .. //depot/projects/smpng/sys/dev/fdc/fdc_isa.c#5 integrate .. //depot/projects/smpng/sys/dev/firewire/fwcrom.c#10 integrate .. //depot/projects/smpng/sys/dev/hfa/fore_receive.c#9 integrate .. //depot/projects/smpng/sys/dev/idt/idt_harp.c#5 integrate .. //depot/projects/smpng/sys/dev/iir/iir.c#11 integrate .. //depot/projects/smpng/sys/dev/md/md.c#54 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_freebsd.c#11 integrate .. //depot/projects/smpng/sys/dev/ppbus/if_plip.c#13 integrate .. //depot/projects/smpng/sys/dev/re/if_re.c#13 integrate .. //depot/projects/smpng/sys/dev/tga/tga_pci.c#8 integrate .. //depot/projects/smpng/sys/dev/uart/uart_bus_isa.c#4 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#60 integrate .. //depot/projects/smpng/sys/dev/usb/usbdi.c#18 integrate .. //depot/projects/smpng/sys/fs/autofs/autofs.h#1 branch .. //depot/projects/smpng/sys/fs/autofs/autofs_util.c#1 branch .. //depot/projects/smpng/sys/fs/autofs/autofs_vfsops.c#1 branch .. //depot/projects/smpng/sys/fs/autofs/autofs_vnops.c#1 branch .. //depot/projects/smpng/sys/fs/msdosfs/msdosfs_vfsops.c#33 integrate .. //depot/projects/smpng/sys/fs/pseudofs/pseudofs_vnops.c#32 integrate .. //depot/projects/smpng/sys/geom/concat/g_concat.c#9 integrate .. //depot/projects/smpng/sys/geom/geom.h#39 integrate .. //depot/projects/smpng/sys/geom/geom_io.c#32 integrate .. //depot/projects/smpng/sys/geom/label/g_label.c#5 integrate .. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#4 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#3 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3_ctl.c#3 integrate .. //depot/projects/smpng/sys/geom/stripe/g_stripe.c#7 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum.c#6 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum.h#3 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_drive.c#5 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_volume.c#3 integrate .. //depot/projects/smpng/sys/i386/bios/mca_machdep.c#4 integrate .. //depot/projects/smpng/sys/i386/bios/vpd.c#5 integrate .. //depot/projects/smpng/sys/i386/conf/GENERIC#55 integrate .. //depot/projects/smpng/sys/i386/conf/NOTES#89 integrate .. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#68 integrate .. //depot/projects/smpng/sys/i386/i386/pmap.c#69 integrate .. //depot/projects/smpng/sys/i386/i386/trap.c#72 integrate .. //depot/projects/smpng/sys/i386/include/in_cksum.h#7 integrate .. //depot/projects/smpng/sys/i386/include/param.h#14 integrate .. //depot/projects/smpng/sys/i386/include/profile.h#12 integrate .. //depot/projects/smpng/sys/i386/linux/linux_machdep.c#26 integrate .. //depot/projects/smpng/sys/i4b/driver/i4b_ing.c#11 integrate .. //depot/projects/smpng/sys/i4b/driver/i4b_ipr.c#18 integrate .. //depot/projects/smpng/sys/i4b/driver/i4b_isppp.c#10 integrate .. //depot/projects/smpng/sys/i4b/driver/i4b_rbch.c#15 integrate .. //depot/projects/smpng/sys/i4b/driver/i4b_tel.c#13 integrate .. //depot/projects/smpng/sys/i4b/driver/i4b_trace.c#14 integrate .. //depot/projects/smpng/sys/i4b/layer4/i4b_i4bdrv.c#19 integrate .. //depot/projects/smpng/sys/i4b/layer4/i4b_l4.c#8 integrate .. //depot/projects/smpng/sys/ia64/conf/GENERIC#41 integrate .. //depot/projects/smpng/sys/ia64/conf/NOTES#4 integrate .. //depot/projects/smpng/sys/ia64/conf/SKI#18 integrate .. //depot/projects/smpng/sys/ia64/ia64/exception.S#7 integrate .. //depot/projects/smpng/sys/ia64/ia64/locore.S#4 integrate .. //depot/projects/smpng/sys/ia64/ia64/pmap.c#61 integrate .. //depot/projects/smpng/sys/ia64/ia64/support.S#4 integrate .. //depot/projects/smpng/sys/ia64/ia64/syscall.S#9 integrate .. //depot/projects/smpng/sys/ia64/ia64/trap.c#67 integrate .. //depot/projects/smpng/sys/ia64/include/asm.h#8 integrate .. //depot/projects/smpng/sys/ia64/include/cpu.h#23 integrate .. //depot/projects/smpng/sys/ia64/include/profile.h#8 integrate .. //depot/projects/smpng/sys/isa/psm.c#29 integrate .. //depot/projects/smpng/sys/kern/init_main.c#47 integrate .. //depot/projects/smpng/sys/kern/kern_conf.c#29 integrate .. //depot/projects/smpng/sys/kern/kern_fork.c#82 integrate .. //depot/projects/smpng/sys/kern/kern_idle.c#23 integrate .. //depot/projects/smpng/sys/kern/kern_intr.c#51 integrate .. //depot/projects/smpng/sys/kern/kern_kse.c#8 integrate .. //depot/projects/smpng/sys/kern/kern_kthread.c#14 integrate .. //depot/projects/smpng/sys/kern/kern_linker.c#38 integrate .. //depot/projects/smpng/sys/kern/kern_lock.c#34 integrate .. //depot/projects/smpng/sys/kern/kern_mutex.c#86 integrate .. //depot/projects/smpng/sys/kern/kern_prot.c#84 integrate .. //depot/projects/smpng/sys/kern/kern_shutdown.c#49 integrate .. //depot/projects/smpng/sys/kern/kern_sig.c#96 integrate .. //depot/projects/smpng/sys/kern/kern_switch.c#43 integrate .. //depot/projects/smpng/sys/kern/kern_thr.c#19 integrate .. //depot/projects/smpng/sys/kern/kern_thread.c#65 integrate .. //depot/projects/smpng/sys/kern/link_elf_obj.c#5 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#35 integrate .. //depot/projects/smpng/sys/kern/sched_ule.c#39 integrate .. //depot/projects/smpng/sys/kern/subr_bus.c#40 integrate .. //depot/projects/smpng/sys/kern/subr_smp.c#37 integrate .. //depot/projects/smpng/sys/kern/subr_trap.c#69 integrate .. //depot/projects/smpng/sys/kern/subr_turnstile.c#15 integrate .. //depot/projects/smpng/sys/kern/sys_generic.c#35 integrate .. //depot/projects/smpng/sys/kern/sysv_shm.c#25 integrate .. //depot/projects/smpng/sys/kern/uipc_usrreq.c#40 integrate .. //depot/projects/smpng/sys/kern/vfs_aio.c#49 integrate .. //depot/projects/smpng/sys/libkern/mcount.c#6 integrate .. //depot/projects/smpng/sys/modules/Makefile#81 integrate .. //depot/projects/smpng/sys/modules/aac/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/autofs/Makefile#1 branch .. //depot/projects/smpng/sys/modules/bridge/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/cam/Makefile#9 integrate .. //depot/projects/smpng/sys/modules/coda/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/coda5/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/cp/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/ctau/Makefile#3 integrate .. //depot/projects/smpng/sys/modules/cx/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/if_ppp/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/if_tap/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/ipfw/Makefile#6 integrate .. //depot/projects/smpng/sys/modules/pf/Makefile#5 integrate .. //depot/projects/smpng/sys/net/bridge.c#29 integrate .. //depot/projects/smpng/sys/net/if.c#53 integrate .. //depot/projects/smpng/sys/net/if.h#20 integrate .. //depot/projects/smpng/sys/net/if_loop.c#33 integrate .. //depot/projects/smpng/sys/net/if_ppp.c#29 integrate .. //depot/projects/smpng/sys/net/if_sl.c#25 integrate .. //depot/projects/smpng/sys/net/if_spppsubr.c#21 integrate .. //depot/projects/smpng/sys/net/netisr.c#8 integrate .. //depot/projects/smpng/sys/net/rtsock.c#39 integrate .. //depot/projects/smpng/sys/netgraph/atm/atmpif/ng_atmpif_harp.c#2 integrate .. //depot/projects/smpng/sys/netgraph/ng_ksocket.c#23 integrate .. //depot/projects/smpng/sys/netgraph/ng_socket.c#24 integrate .. //depot/projects/smpng/sys/netgraph/ng_tty.c#12 integrate .. //depot/projects/smpng/sys/netinet/ip_dummynet.c#33 integrate .. //depot/projects/smpng/sys/netinet/ip_fastfwd.c#9 integrate .. //depot/projects/smpng/sys/netinet/ip_fw2.c#38 integrate .. //depot/projects/smpng/sys/netinet/ip_fw_pfil.c#2 integrate .. //depot/projects/smpng/sys/netinet/ip_input.c#57 integrate .. //depot/projects/smpng/sys/netinet/ip_mroute.c#37 integrate .. //depot/projects/smpng/sys/netinet/ip_output.c#63 integrate .. //depot/projects/smpng/sys/netinet/ip_var.h#24 integrate .. //depot/projects/smpng/sys/netinet6/ah_input.c#12 integrate .. //depot/projects/smpng/sys/netinet6/esp_input.c#17 integrate .. //depot/projects/smpng/sys/netinet6/ip6_forward.c#11 integrate .. //depot/projects/smpng/sys/netinet6/ip6_input.c#35 integrate .. //depot/projects/smpng/sys/netinet6/ip6_output.c#34 integrate .. //depot/projects/smpng/sys/netinet6/ip6_var.h#13 integrate .. //depot/projects/smpng/sys/netinet6/ipsec.c#17 integrate .. //depot/projects/smpng/sys/netinet6/raw_ip6.c#29 integrate .. //depot/projects/smpng/sys/netipsec/ipsec_input.c#8 integrate .. //depot/projects/smpng/sys/netipsec/xform_ipip.c#9 integrate .. //depot/projects/smpng/sys/netipx/ipx.c#8 integrate .. //depot/projects/smpng/sys/netkey/key.c#25 integrate .. //depot/projects/smpng/sys/netkey/keysock.c#20 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_socket.c#28 integrate .. //depot/projects/smpng/sys/nfsserver/nfs_serv.c#34 integrate .. //depot/projects/smpng/sys/pc98/conf/GENERIC#47 integrate .. //depot/projects/smpng/sys/pc98/conf/NOTES#31 integrate .. //depot/projects/smpng/sys/pc98/pc98/atapi.c#5 integrate .. //depot/projects/smpng/sys/pc98/pc98/wd.c#16 integrate .. //depot/projects/smpng/sys/pci/if_dc.c#59 integrate .. //depot/projects/smpng/sys/pci/if_pcn.c#27 integrate .. //depot/projects/smpng/sys/pci/if_rlreg.h#19 integrate .. //depot/projects/smpng/sys/pci/if_sf.c#30 integrate .. //depot/projects/smpng/sys/pci/if_ste.c#32 integrate .. //depot/projects/smpng/sys/pci/if_ti.c#39 integrate .. //depot/projects/smpng/sys/pci/if_tl.c#23 integrate .. //depot/projects/smpng/sys/pci/if_wb.c#26 integrate .. //depot/projects/smpng/sys/powerpc/conf/GENERIC#24 integrate .. //depot/projects/smpng/sys/powerpc/include/pmap.h#15 integrate .. //depot/projects/smpng/sys/powerpc/include/profile.h#3 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/pmap.c#46 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/trap.c#39 integrate .. //depot/projects/smpng/sys/sparc64/conf/GENERIC#45 integrate .. //depot/projects/smpng/sys/sparc64/include/profile.h#5 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/trap.c#58 integrate .. //depot/projects/smpng/sys/sys/bio.h#22 integrate .. //depot/projects/smpng/sys/sys/kernel.h#25 integrate .. //depot/projects/smpng/sys/sys/linker.h#14 integrate .. //depot/projects/smpng/sys/sys/param.h#70 integrate .. //depot/projects/smpng/sys/sys/proc.h#124 integrate .. //depot/projects/smpng/sys/sys/sched.h#13 integrate .. //depot/projects/smpng/sys/sys/smp.h#12 integrate .. //depot/projects/smpng/sys/sys/systm.h#55 integrate .. //depot/projects/smpng/sys/sys/ucred.h#24 integrate .. //depot/projects/smpng/sys/vm/vm_fault.c#40 integrate .. //depot/projects/smpng/sys/vm/vm_glue.c#48 integrate .. //depot/projects/smpng/sys/vm/vm_map.c#67 integrate .. //depot/projects/smpng/sys/vm/vm_mmap.c#48 integrate .. //depot/projects/smpng/sys/vm/vm_object.c#58 integrate .. //depot/projects/smpng/sys/vm/vm_zeroidle.c#18 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/alpha/pmap.c#63 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.166 2004/08/15 20:54:25 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.168 2004/08/27 19:06:16 alc Exp $"); #include #include @@ -747,8 +747,6 @@ vm_paddr_t pa; pa = 0; - if (pmap == NULL) - return (pa); PMAP_LOCK(pmap); pte = pmap_lev3pte(pmap, va); if (pte != NULL && pmap_pte_v(pte)) @@ -771,8 +769,6 @@ vm_page_t m; m = NULL; - if (pmap == NULL) - return (m); vm_page_lock_queues(); PMAP_LOCK(pmap); pte = pmap_lev3pte(pmap, va); @@ -1468,9 +1464,6 @@ { vm_offset_t va, nva; - if (pmap == NULL) - return; - /* * Perform an unsynchronized read. This is, however, safe. */ @@ -1586,9 +1579,6 @@ pt_entry_t* pte; int newprot; - if (pmap == NULL) - return; - if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); return; @@ -1681,9 +1671,6 @@ vm_page_t mpte; int managed; - if (pmap == NULL) - return; - va &= ~PAGE_MASK; #ifdef PMAP_DIAGNOSTIC if (va > VM_MAX_KERNEL_ADDRESS) @@ -1965,9 +1952,6 @@ { pt_entry_t *pte; - if (pmap == NULL) - return; - PMAP_LOCK(pmap); pte = pmap_lev3pte(pmap, va); @@ -2110,7 +2094,7 @@ pv_entry_t pv, npv; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY - if (!curthread || (pmap != vmspace_pmap(curthread->td_proc->p_vmspace))) { + if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } ==== //depot/projects/smpng/sys/alpha/alpha/trap.c#54 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.118 2004/07/10 22:35:05 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.120 2004/08/31 07:34:53 julian Exp $"); /* #include "opt_fix_unaligned_vax_fp.h" */ #include "opt_ddb.h" @@ -591,9 +591,6 @@ framep->tf_regs[FRAME_SP] = alpha_pal_rdusp(); userret(td, framep, sticks); mtx_assert(&Giant, MA_NOTOWNED); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif } return; @@ -665,7 +662,7 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); if (p->p_flag & P_SA) - thread_user_enter(p, td); + thread_user_enter(td); #ifdef DIAGNOSTIC alpha_fpstate_check(td); #endif @@ -785,9 +782,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/smpng/sys/alpha/conf/GENERIC#40 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.174 2004/08/03 19:24:52 markm Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.177 2004/08/30 18:40:00 wilko Exp $ machine alpha cpu EV4 @@ -41,7 +41,8 @@ options DEC_ST550 # Personal Workstation 433, 500, 600 options DEC_ST6600 # XP1000, DP264, DS20, DS10, family options DEC_1000A # AlphaServer 1000, 1000A, 800 -options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) +# TurboLaser support is broken +# options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) @@ -69,7 +70,6 @@ options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions -options PFIL_HOOKS # pfil(9) framework # Debugging for use in -current options KDB #Enable kernel debugger support @@ -153,6 +153,7 @@ # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') +device em # Intel PRO/1000 adapter Gigabit Ethernet Card device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') ==== //depot/projects/smpng/sys/alpha/conf/NOTES#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.154 2004/07/10 22:29:40 marcel Exp $ +# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.155 2004/08/28 21:47:24 wilko Exp $ # # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. @@ -36,7 +36,8 @@ options DEC_ST550 # Personal Workstation 433, 500, 600 options DEC_ST6600 # XP1000, DP264, DS20, DS10, family options DEC_1000A # AlphaServer 1000, 1000A, 800 -options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) +# TurboLaser support is broken +# options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) ==== //depot/projects/smpng/sys/alpha/include/cpu.h#12 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.40 2004/08/03 18:44:26 mux Exp $ */ +/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.41 2004/08/27 19:20:42 marcel Exp $ */ /* From: NetBSD: cpu.h,v 1.18 1997/09/23 23:17:49 mjacob Exp */ /* @@ -92,6 +92,11 @@ #ifdef _KERNEL +#ifdef GPROF +extern char btext[]; +extern char etext[]; +#endif + #define cpu_getstack(td) (alpha_pal_rdusp()) #define cpu_spinwait() /* nothing */ #define get_cyclecount alpha_rpcc ==== //depot/projects/smpng/sys/alpha/include/param.h#11 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/param.h,v 1.35 2004/08/01 14:31:45 scottl Exp $ */ +/* $FreeBSD: src/sys/alpha/include/param.h,v 1.36 2004/09/02 18:59:14 scottl Exp $ */ /* From: NetBSD: param.h,v 1.20 1997/09/19 13:52:53 leo Exp */ /* @@ -113,11 +113,6 @@ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ -/* PREEMPTION exposes scheduler bugs that need to be fixed. */ -#if 0 -#define PREEMPTION -#endif - #ifndef KSTACK_PAGES #define KSTACK_PAGES 2 /* pages of kstack (with pcb) */ #endif ==== //depot/projects/smpng/sys/alpha/include/profile.h#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/profile.h,v 1.6 2004/05/19 15:41:25 bde Exp $ */ +/* $FreeBSD: src/sys/alpha/include/profile.h,v 1.7 2004/08/27 19:42:34 marcel Exp $ */ /* From: NetBSD: profile.h,v 1.9 1997/04/06 08:47:37 cgd Exp */ /* @@ -215,11 +215,27 @@ * * XXX These macros should probably use inline assembly. */ -#define MCOUNT_ENTER(s) \ - s = _alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH) -#define MCOUNT_EXIT(s) \ - (void)_alpha_pal_swpipl(s); -#define MCOUNT_DECL(s) u_long s; +u_long _alpha_pal_swpipl(u_long); + +#define MCOUNT_ENTER(s) s = _alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH) +#define MCOUNT_EXIT(s) (void)_alpha_pal_swpipl(s) +#define MCOUNT_DECL(s) u_long s; + +void bintr(void); +void btrap(void); +void eintr(void); +void user(void); + +#define MCOUNT_FROMPC_USER(pc) \ + ((pc < (uintfptr_t)VM_MAXUSER_ADDRESS) ? (uintfptr_t)user : pc) + +#define MCOUNT_FROMPC_INTR(pc) \ + ((pc >= (uintfptr_t)btrap && pc < (uintfptr_t)eintr) ? \ + ((pc >= (uintfptr_t)bintr) ? (uintfptr_t)bintr : \ + (uintfptr_t)btrap) : ~0UL) + +_MCOUNT_DECL(uintfptr_t, uintfptr_t); + #else /* !_KERNEL */ typedef u_long uintfptr_t; #endif ==== //depot/projects/smpng/sys/alpha/linux/linux_machdep.c#17 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.33 2004/02/04 21:52:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.34 2004/09/01 02:11:27 julian Exp $"); #include #include @@ -180,7 +180,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2); + setrunqueue(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/smpng/sys/alpha/pci/pcibus.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.34 2004/07/01 15:07:27 gallatin Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/pci/pcibus.c,v 1.35 2004/08/29 19:07:14 marcel Exp $"); #include "opt_isa.h" @@ -262,7 +262,7 @@ else if (flags & PCI_RF_BWX) va = ALPHAPCI_CVT_BWX(bus, rv->r_start); else - va = (void *) rv->r_start; /* maybe NULL? */ + va = (void *)ALPHA_PHYS_TO_K0SEG(rv->r_start); rman_set_virtual(rv, va); break; ==== //depot/projects/smpng/sys/amd64/amd64/mp_machdep.c#13 (text+ko) ==== @@ -25,10 +25,11 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.243 2004/08/23 21:39:28 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.246 2004/09/01 06:42:01 julian Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" +#include "opt_mp_watchdog.h" #include #include @@ -56,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -111,7 +113,6 @@ */ static u_int logical_cpus; -static u_int logical_cpus_mask; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -136,7 +137,6 @@ static int start_ap(int apic_id); static void release_aps(void *dummy); -static int hlt_cpus_mask; static int hlt_logical_cpus; static struct sysctl_ctx_list logical_cpu_clist; static u_int bootMP_size; @@ -708,7 +708,7 @@ ncpu = mp_ncpus - 1; /* does not shootdown self */ if (ncpu < 1) return; /* no other cpus */ - mtx_assert(&smp_rv_mtx, MA_OWNED); + mtx_assert(&smp_ipi_mtx, MA_OWNED); smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; atomic_store_rel_int(&smp_tlb_wait, 0); @@ -794,7 +794,7 @@ if (ncpu < 1) return; } - mtx_assert(&smp_rv_mtx, MA_OWNED); + mtx_assert(&smp_ipi_mtx, MA_OWNED); smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; atomic_store_rel_int(&smp_tlb_wait, 0); @@ -1067,8 +1067,15 @@ mp_grab_cpu_hlt(void) { u_int mask = PCPU_GET(cpumask); +#ifdef MP_WATCHDOG + u_int cpuid = PCPU_GET(cpuid); +#endif int retval; +#ifdef MP_WATCHDOG + ap_watchdog(cpuid); +#endif + retval = mask & hlt_cpus_mask; while (mask & hlt_cpus_mask) __asm __volatile("sti; hlt" : : : "memory"); ==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#31 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.493 2004/08/24 00:17:52 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.496 2004/08/30 03:52:04 alc Exp $"); /* * Manages physical address maps. @@ -631,7 +631,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_rv_mtx); + mtx_lock_spin(&smp_ipi_mtx); } else critical_enter(); /* @@ -652,7 +652,7 @@ smp_masked_invlpg(pmap->pm_active & other_cpus, va); } if (smp_started) - mtx_unlock_spin(&smp_rv_mtx); + mtx_unlock_spin(&smp_ipi_mtx); else critical_exit(); } @@ -667,7 +667,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_rv_mtx); + mtx_lock_spin(&smp_ipi_mtx); } else critical_enter(); /* @@ -691,7 +691,7 @@ sva, eva); } if (smp_started) - mtx_unlock_spin(&smp_rv_mtx); + mtx_unlock_spin(&smp_ipi_mtx); else critical_exit(); } @@ -705,7 +705,7 @@ if (smp_started) { if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_rv_mtx); + mtx_lock_spin(&smp_ipi_mtx); } else critical_enter(); /* @@ -726,7 +726,7 @@ smp_masked_invltlb(pmap->pm_active & other_cpus); } if (smp_started) - mtx_unlock_spin(&smp_rv_mtx); + mtx_unlock_spin(&smp_ipi_mtx); else critical_exit(); } @@ -786,8 +786,6 @@ pd_entry_t pde, *pdep; rtval = 0; - if (pmap == NULL) - return (rtval); PMAP_LOCK(pmap); pdep = pmap_pde(pmap, va); if (pdep != NULL) { @@ -821,8 +819,6 @@ vm_page_t m; m = NULL; - if (pmap == NULL) - return (m); vm_page_lock_queues(); PMAP_LOCK(pmap); pdep = pmap_pde(pmap, va); @@ -1563,9 +1559,6 @@ pt_entry_t *pte; int anyvalid; - if (pmap == NULL) - return; - /* * Perform an unsynchronized read. This is, however, safe. */ @@ -1737,9 +1730,6 @@ pd_entry_t ptpaddr, *pde; int anychanged; - if (pmap == NULL) - return; - if ((prot & VM_PROT_READ) == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); return; @@ -1856,9 +1846,6 @@ pt_entry_t origpte, newpte; vm_page_t mpte; - if (pmap == NULL) - return; - va = trunc_page(va); #ifdef PMAP_DIAGNOSTIC if (va > VM_MAX_KERNEL_ADDRESS) @@ -2211,9 +2198,6 @@ { register pt_entry_t *pte; - if (pmap == NULL) - return; - /* * Wiring is not a hardware characteristic so there is no need to * invalidate TLB. @@ -2467,7 +2451,7 @@ pv_entry_t pv, npv; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY - if (!curthread || (pmap != vmspace_pmap(curthread->td_proc->p_vmspace))) { + if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } ==== //depot/projects/smpng/sys/amd64/amd64/trap.c#22 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.279 2004/08/16 22:56:20 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.281 2004/08/31 07:34:53 julian Exp $"); /* * AMD64 Trap and System call handling @@ -259,7 +259,7 @@ case T_PAGEFLT: /* page fault */ if (td->td_pflags & TDP_SA) - thread_user_enter(p, td); + thread_user_enter(td); i = trap_pfault(&frame, TRUE); if (i == -1) goto userout; @@ -471,9 +471,6 @@ userret(td, &frame, sticks); mtx_assert(&Giant, MA_NOTOWNED); userout: -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif out: return; } @@ -698,7 +695,7 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); if (p->p_flag & P_SA) - thread_user_enter(p, td); + thread_user_enter(td); params = (caddr_t)frame.tf_rsp + sizeof(register_t); code = frame.tf_rax; orig_tf_rflags = frame.tf_rflags; @@ -830,9 +827,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/smpng/sys/amd64/conf/GENERIC#22 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.421 2004/08/16 22:59:24 peter Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.422 2004/08/27 15:16:21 andre Exp $ machine amd64 cpu HAMMER @@ -57,7 +57,6 @@ # output. Adds ~128k to driver. options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. -options PFIL_HOOKS # pfil(9) framework options ADAPTIVE_GIANT # Giant mutex is adaptive. # Debugging for use in -current ==== //depot/projects/smpng/sys/amd64/conf/NOTES#9 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.18 2004/08/16 12:39:27 tjr Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.19 2004/08/27 21:29:20 arved Exp $ # # @@ -468,7 +468,7 @@ # Enable Linux ABI emulation #XXX#options COMPAT_LINUX -# Enable 32-bit Linux ABI emulation (requires COMPAT_43 and IA32) +# Enable 32-bit Linux ABI emulation (requires COMPAT_43 and COMPAT_IA32) options COMPAT_LINUX32 # Enable the linux-like proc filesystem support (requires COMPAT_LINUX32 ==== //depot/projects/smpng/sys/amd64/ia32/ia32_syscall.c#7 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.6 2003/11/17 08:58:14 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.7 2004/08/31 06:12:12 julian Exp $"); /* * 386 Trap and System call handling @@ -247,9 +247,6 @@ */ STOPEVENT(p, S_SCX, code); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/smpng/sys/amd64/include/param.h#11 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/amd64/include/param.h,v 1.13 2004/08/01 14:31:45 scottl Exp $ + * $FreeBSD: src/sys/amd64/include/param.h,v 1.14 2004/09/02 18:59:14 scottl Exp $ */ /* @@ -119,11 +119,6 @@ #define NBPML4 (1ul<= (uintfptr_t)btrap && pc < (uintfptr_t)eintr) ? \ + ((pc >= (uintfptr_t)bintr) ? (uintfptr_t)bintr : \ + (uintfptr_t)btrap) : ~0UL) + #else /* !_KERNEL */ #define FUNCTION_ALIGNMENT 4 ==== //depot/projects/smpng/sys/amd64/linux32/linux32_machdep.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.3 2004/08/24 20:52:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.4 2004/09/01 02:11:27 julian Exp $"); #include #include @@ -503,7 +503,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2); + setrunqueue(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/smpng/sys/arm/include/profile.h#4 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)profile.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD: src/sys/arm/include/profile.h,v 1.3 2004/07/20 22:38:46 cognet Exp $ + * $FreeBSD: src/sys/arm/include/profile.h,v 1.4 2004/08/27 19:42:34 marcel Exp $ */ #ifndef _MACHINE_PROFILE_H_ @@ -72,6 +72,19 @@ #endif #endif /* GUPROF */ +void bintr(void); +void btrap(void); +void eintr(void); +void user(void); + +#define MCOUNT_FROMPC_USER(pc) \ + ((pc < (uintfptr_t)VM_MAXUSER_ADDRESS) ? (uintfptr_t)user : pc) + +#define MCOUNT_FROMPC_INTR(pc) \ + ((pc >= (uintfptr_t)btrap && pc < (uintfptr_t)eintr) ? \ + ((pc >= (uintfptr_t)bintr) ? (uintfptr_t)bintr : \ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Sep 3 14:21:49 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 45C4C16A4D0; Fri, 3 Sep 2004 14:21:49 +0000 (GMT) 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 2244416A4CE for ; Fri, 3 Sep 2004 14:21:49 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1532A43D2F for ; Fri, 3 Sep 2004 14:21:49 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i83ELmml039420 for ; Fri, 3 Sep 2004 14:21:48 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i83ELmY4039417 for perforce@freebsd.org; Fri, 3 Sep 2004 14:21:48 GMT (envelope-from jhb@freebsd.org) Date: Fri, 3 Sep 2004 14:21:48 GMT Message-Id: <200409031421.i83ELmY4039417@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 60954 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, 03 Sep 2004 14:21:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=60954 Change 60954 by jhb@jhb_slimer on 2004/09/03 14:21:38 Revert jeff's last hack to this file and restore the previous behavior but in a more optimal fashion. Previously (as in 4.x and 5.2) we waited to return from lapic_ipi_wait() until the IPI was delivered. Jeff changed it to just return immediately and only wait for a short time on the next IPI. While spinwait IPIs like TLB shootdowns and rendezvous ensure that the IPI is delivered before another one is sent, one-shot IPI's like roundrobin, signal, hardclock, and statclock forwards do not wait. So instead, change this code to just wait as long as it needs to until the previous IPI is cleared. My quad xeon can't do a -j4 kernel build without triggering this panic right now, so hopefully this will fix that. Affected files ... .. //depot/projects/smpng/sys/i386/i386/local_apic.c#10 edit Differences ... ==== //depot/projects/smpng/sys/i386/i386/local_apic.c#10 (text+ko) ==== @@ -693,8 +693,8 @@ intr_restore(eflags); } +#ifdef DETECT_DEADLOCK #define BEFORE_SPIN 1000000 -#ifdef DETECT_DEADLOCK #define AFTER_SPIN 1000 #endif @@ -725,9 +725,16 @@ destfield = dest; } +#ifdef DETECT_DEADLOCK + /* Check for an earlier stuck IPI. */ /* Wait for an earlier IPI to finish. */ if (!lapic_ipi_wait(BEFORE_SPIN)) panic("APIC: Previous IPI is stuck"); +#else + /* Wait for an earlier IPI to finish. */ + if (!lapic_ipi_wait(-1)) + panic("APIC: Previous IPI is stuck"); +#endif lapic_ipi_raw(icrlo, destfield); From owner-p4-projects@FreeBSD.ORG Fri Sep 3 15:09:48 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1E71C16A4D1; Fri, 3 Sep 2004 15:09:48 +0000 (GMT) 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 D692F16A4CE for ; Fri, 3 Sep 2004 15:09:47 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C62D343D2F for ; Fri, 3 Sep 2004 15:09:47 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i83F9lbu040903 for ; Fri, 3 Sep 2004 15:09:47 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i83F9lw3040900 for perforce@freebsd.org; Fri, 3 Sep 2004 15:09:47 GMT (envelope-from jhb@freebsd.org) Date: Fri, 3 Sep 2004 15:09:47 GMT Message-Id: <200409031509.i83F9lw3040900@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 60957 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, 03 Sep 2004 15:09:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=60957 Change 60957 by jhb@jhb_slimer on 2004/09/03 15:09:00 - Remove extra line. - Merge change to amd64. Suggested by: scottl (2) Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/local_apic.c#7 edit .. //depot/projects/smpng/sys/i386/i386/local_apic.c#11 edit Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/local_apic.c#7 (text+ko) ==== @@ -725,9 +725,15 @@ destfield = dest; } +#ifdef DETECT_DEADLOCK + /* Check for an earlier stuck IPI. */ + if (!lapic_ipi_wait(BEFORE_SPIN)) + panic("APIC: Previous IPI is stuck"); +#else /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) + if (!lapic_ipi_wait(-1)) panic("APIC: Previous IPI is stuck"); +#endif lapic_ipi_raw(icrlo, destfield); ==== //depot/projects/smpng/sys/i386/i386/local_apic.c#11 (text+ko) ==== @@ -727,7 +727,6 @@ #ifdef DETECT_DEADLOCK /* Check for an earlier stuck IPI. */ - /* Wait for an earlier IPI to finish. */ if (!lapic_ipi_wait(BEFORE_SPIN)) panic("APIC: Previous IPI is stuck"); #else From owner-p4-projects@FreeBSD.ORG Sat Sep 4 18:07:07 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 431D616A4D0; Sat, 4 Sep 2004 18:07:07 +0000 (GMT) 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 00F6416A4CE for ; Sat, 4 Sep 2004 18:07:07 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D316A43D1F for ; Sat, 4 Sep 2004 18:07:06 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i84I76uC090606 for ; Sat, 4 Sep 2004 18:07:06 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i84I76v3090603 for perforce@freebsd.org; Sat, 4 Sep 2004 18:07:06 GMT (envelope-from julian@freebsd.org) Date: Sat, 4 Sep 2004 18:07:06 GMT Message-Id: <200409041807.i84I76v3090603@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 61004 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, 04 Sep 2004 18:07:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=61004 Change 61004 by julian@julian_ref on 2004/09/04 18:06:17 IFC@61002 Affected files ... .. //depot/projects/nsched/sys/dev/ata/ata-all.c#10 integrate .. //depot/projects/nsched/sys/dev/ata/ata-all.h#5 integrate .. //depot/projects/nsched/sys/dev/ata/ata-chipset.c#13 integrate .. //depot/projects/nsched/sys/dev/ata/ata-lowlevel.c#8 integrate .. //depot/projects/nsched/sys/dev/re/if_re.c#8 integrate .. //depot/projects/nsched/sys/dev/usb/umass.c#6 integrate .. //depot/projects/nsched/sys/dev/usb/uplcom.c#5 integrate .. //depot/projects/nsched/sys/dev/usb/usb_quirks.c#5 integrate .. //depot/projects/nsched/sys/dev/usb/usbdevs#12 integrate .. //depot/projects/nsched/sys/dev/usb/uscanner.c#5 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_vfsops.c#3 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#4 integrate .. //depot/projects/nsched/sys/modules/cs/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/fdc/Makefile#5 integrate .. //depot/projects/nsched/sys/modules/linprocfs/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/msdosfs/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/nfs4client/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/nfsclient/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/owi/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/smbfs/Makefile#2 integrate .. //depot/projects/nsched/sys/vm/vm_meter.c#4 integrate Differences ... ==== //depot/projects/nsched/sys/dev/ata/ata-all.c#10 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.224 2004/08/27 14:48:32 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.225 2004/09/03 12:10:44 sos Exp $"); #include "opt_ata.h" #include @@ -734,6 +734,15 @@ /* * misc support functions */ +void +ata_udelay(int interval) +{ + if (interval < (1000000/hz) || ata_delayed_attach) + DELAY(interval); + else + tsleep(&interval, PRIBIO, "ataslp", interval/(1000000/hz)); +} + static void bswap(int8_t *buf, int len) { ==== //depot/projects/nsched/sys/dev/ata/ata-all.h#5 (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-all.h,v 1.82 2004/08/27 14:48:32 sos Exp $ + * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.83 2004/09/03 12:10:44 sos Exp $ */ /* ATA register defines */ @@ -390,6 +390,7 @@ int ata_detach(device_t dev); int ata_suspend(device_t dev); int ata_resume(device_t dev); +void ata_udelay(int interval); int ata_printf(struct ata_channel *ch, int device, const char *fmt, ...) __printflike(3, 4); int ata_prtdev(struct ata_device *atadev, const char *fmt, ...) __printflike(2, 3); void ata_set_name(struct ata_device *atadev, char *name, int lun); ==== //depot/projects/nsched/sys/dev/ata/ata-chipset.c#13 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.86 2004/09/03 08:23:04 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.87 2004/09/03 12:10:44 sos Exp $"); #include "opt_ata.h" #include @@ -926,9 +926,9 @@ pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) | mask, 2); while (timeout--) { - DELAY(10000); + ata_udelay(10000); if ((pci_read_config(parent, 0x92, 2) & (mask << 4)) == (mask << 4)) { - DELAY(10000); + ata_udelay(10000); return; } } @@ -1107,7 +1107,7 @@ static struct ata_chip_id ids[] = {{ ATA_NFORCE1, 0, AMDNVIDIA, NVIDIA, ATA_UDMA5, "nVidia nForce" }, { ATA_NFORCE2, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2" }, - { ATA_NFORCE2_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia MCP" }, + { ATA_NFORCE2_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2 MCP" }, { ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3" }, { ATA_NFORCE3_PRO, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 Pro" }, { ATA_NFORCE3_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 MCP" }, @@ -2171,7 +2171,7 @@ ATA_IDX_OUTL(ch, ATA_BMDEVSPEC_1, 0x00000001); DELAY(25000); ATA_IDX_OUTL(ch, ATA_BMDEVSPEC_1, 0x00000000); - tsleep(ch, PRIBIO, "siirst", hz); + ata_udelay(1000000); } static void ==== //depot/projects/nsched/sys/dev/ata/ata-lowlevel.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.46 2004/08/27 22:14:45 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.47 2004/09/03 12:10:44 sos Exp $"); #include "opt_ata.h" #include @@ -48,6 +48,7 @@ static void ata_generic_interrupt(void *); static void ata_generic_reset(struct ata_channel *); static int ata_wait(struct ata_device *, u_int8_t); +/*static int ata_command(struct ata_device *, u_int8_t, u_int64_t, u_int16_t, u_int16_t);*/ static void ata_pio_read(struct ata_request *, int); static void ata_pio_write(struct ata_request *, int); @@ -585,9 +586,9 @@ ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_MASTER); DELAY(10); ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_IDS | ATA_A_RESET); - DELAY(10000); + ata_udelay(10000); ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_IDS); - DELAY(100000); + ata_udelay(100000); ATA_IDX_INB(ch, ATA_ERROR); /* wait for BUSY to go inactive */ @@ -656,7 +657,7 @@ if (stat1 == 0xff && timeout > 5) mask &= ~0x02; } - DELAY(100000); + ata_udelay(100000); } if (bootverbose) ==== //depot/projects/nsched/sys/dev/re/if_re.c#8 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.29 2004/08/28 10:59:02 sanpei Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $"); /* * RealTek 8139C+/8169/8169S/8110S PCI NIC driver @@ -205,11 +205,18 @@ static int re_tx_list_init (struct rl_softc *); static void re_rxeof (struct rl_softc *); static void re_txeof (struct rl_softc *); +#ifdef DEVICE_POLLING +static void re_poll (struct ifnet *, enum poll_cmd, int); +static void re_poll_locked (struct ifnet *, enum poll_cmd, int); +#endif static void re_intr (void *); static void re_tick (void *); +static void re_tick_locked (struct rl_softc *); static void re_start (struct ifnet *); +static void re_start_locked (struct ifnet *); static int re_ioctl (struct ifnet *, u_long, caddr_t); static void re_init (void *); +static void re_init_locked (struct rl_softc *); static void re_stop (struct rl_softc *); static void re_watchdog (struct ifnet *); static int re_suspend (device_t); @@ -454,17 +461,14 @@ u_int16_t re8139_reg = 0; sc = device_get_softc(dev); - RL_LOCK(sc); if (sc->rl_type == RL_8169) { rval = re_gmii_readreg(dev, phy, reg); - RL_UNLOCK(sc); return (rval); } /* Pretend the internal PHY is only at address 0 */ if (phy) { - RL_UNLOCK(sc); return (0); } switch (reg) { @@ -485,7 +489,6 @@ break; case MII_PHYIDR1: case MII_PHYIDR2: - RL_UNLOCK(sc); return (0); /* * Allow the rlphy driver to read the media status @@ -495,15 +498,12 @@ */ case RL_MEDIASTAT: rval = CSR_READ_1(sc, RL_MEDIASTAT); - RL_UNLOCK(sc); return (rval); default: printf("re%d: bad phy register\n", sc->rl_unit); - RL_UNLOCK(sc); return (0); } rval = CSR_READ_2(sc, re8139_reg); - RL_UNLOCK(sc); return (rval); } @@ -517,19 +517,16 @@ int rval = 0; sc = device_get_softc(dev); - RL_LOCK(sc); if (sc->rl_type == RL_8169) { rval = re_gmii_writereg(dev, phy, reg, data); - RL_UNLOCK(sc); return (rval); } /* Pretend the internal PHY is only at address 0 */ - if (phy) { - RL_UNLOCK(sc); + if (phy) return (0); - } + switch (reg) { case MII_BMCR: re8139_reg = RL_BMCR; @@ -548,16 +545,13 @@ break; case MII_PHYIDR1: case MII_PHYIDR2: - RL_UNLOCK(sc); return (0); break; default: printf("re%d: bad phy register\n", sc->rl_unit); - RL_UNLOCK(sc); return (0); } CSR_WRITE_2(sc, re8139_reg, data); - RL_UNLOCK(sc); return (0); } @@ -582,6 +576,8 @@ u_int32_t rxfilt; int mcnt = 0; + RL_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; rxfilt = CSR_READ_4(sc, RL_RXCFG); @@ -627,6 +623,8 @@ { register int i; + RL_LOCK_ASSERT(sc); + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_RESET); for (i = 0; i < RL_TIMEOUT; i++) { @@ -675,11 +673,12 @@ u_int8_t src[] = { 0x00, 'w', 'o', 'r', 'l', 'd' }; /* Allocate a single mbuf */ - MGETHDR(m0, M_DONTWAIT, MT_DATA); if (m0 == NULL) return (ENOBUFS); + RL_LOCK(sc); + /* * Initialize the NIC in test mode. This sets the chip up * so that it can send and receive frames, but performs the @@ -691,10 +690,10 @@ ifp->if_flags |= IFF_PROMISC; sc->rl_testmode = 1; - re_init(sc); + re_init_locked(sc); re_stop(sc); DELAY(100000); - re_init(sc); + re_init_locked(sc); /* Put some data in the mbuf */ @@ -710,7 +709,9 @@ */ CSR_WRITE_2(sc, RL_ISR, 0xFFFF); + RL_UNLOCK(sc); IF_HANDOFF(&ifp->if_snd, m0, ifp); + RL_LOCK(sc); m0 = NULL; /* Wait for it to propagate through the chip */ @@ -789,6 +790,8 @@ if (m0 != NULL) m_freem(m0); + RL_UNLOCK(sc); + return (error); } @@ -826,15 +829,9 @@ } sc->rl_btag = rman_get_bustag(sc->rl_res); sc->rl_bhandle = rman_get_bushandle(sc->rl_res); - mtx_init(&sc->rl_mtx, - device_get_nameunit(dev), - MTX_NETWORK_LOCK, MTX_DEF); - RL_LOCK(sc); hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res); - RL_UNLOCK(sc); - mtx_destroy(&sc->rl_mtx); if (t->rl_basetype == hwrev) { device_set_desc(dev, t->rl_name); return (0); @@ -1065,7 +1062,7 @@ unit = device_get_unit(dev); mtx_init(&sc->rl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, - MTX_DEF | MTX_RECURSE); + MTX_DEF); /* * Map control/status registers. */ @@ -1096,7 +1093,9 @@ } /* Reset the adapter. */ + RL_LOCK(sc); re_reset(sc); + RL_UNLOCK(sc); hw_rev = re_hwrevs; hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; @@ -1221,13 +1220,11 @@ } /* Hook interrupt last to avoid having to lock softc */ - error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET, + error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET | INTR_MPSAFE, re_intr, sc, &sc->rl_intrhand); - if (error) { printf("re%d: couldn't set up irq\n", unit); ether_ifdetach(ifp); - goto fail; } fail: @@ -1251,19 +1248,29 @@ struct rl_softc *sc; struct ifnet *ifp; int i; + int attached; sc = device_get_softc(dev); + ifp = &sc->arpcom.ac_if; KASSERT(mtx_initialized(&sc->rl_mtx), ("rl mutex not initialized")); + + attached = device_is_attached(dev); + /* These should only be active if attach succeeded */ + if (attached) + ether_ifdetach(ifp); + RL_LOCK(sc); - ifp = &sc->arpcom.ac_if; +#if 0 + sc->suspended = 1; +#endif /* These should only be active if attach succeeded */ - if (device_is_attached(dev)) { + if (attached) { re_stop(sc); /* * Force off the IFF_UP flag here, in case someone * still had a BPF descriptor attached to this - * interface. If they do, ether_ifattach() will cause + * interface. If they do, ether_ifdetach() will cause * the BPF code to try and clear the promisc mode * flag, which will bubble down to re_ioctl(), * which will try to call re_init() again. This will @@ -1279,6 +1286,12 @@ device_delete_child(dev, sc->rl_miibus); bus_generic_detach(dev); + /* + * The rest is resource deallocation, so we should already be + * stopped here. + */ + RL_UNLOCK(sc); + if (sc->rl_intrhand) bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand); if (sc->rl_irq) @@ -1335,7 +1348,6 @@ if (sc->rl_parent_tag) bus_dma_tag_destroy(sc->rl_parent_tag); - RL_UNLOCK(sc); mtx_destroy(&sc->rl_mtx); return (0); @@ -1396,6 +1408,9 @@ re_tx_list_init(sc) struct rl_softc *sc; { + + RL_LOCK_ASSERT(sc); + bzero ((char *)sc->rl_ldata.rl_tx_list, RL_TX_LIST_SZ); bzero ((char *)&sc->rl_ldata.rl_tx_mbuf, (RL_TX_DESC_CNT * sizeof(struct mbuf *))); @@ -1679,32 +1694,53 @@ void *xsc; { struct rl_softc *sc; - struct mii_data *mii; sc = xsc; RL_LOCK(sc); + re_tick_locked(sc); + RL_UNLOCK(sc); +} + +static void +re_tick_locked(sc) + struct rl_softc *sc; +{ + struct mii_data *mii; + + RL_LOCK_ASSERT(sc); + mii = device_get_softc(sc->rl_miibus); mii_tick(mii); sc->rl_stat_ch = timeout(re_tick, sc, hz); - RL_UNLOCK(sc); } #ifdef DEVICE_POLLING static void -re_poll (struct ifnet *ifp, enum poll_cmd cmd, int count) +re_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct rl_softc *sc = ifp->if_softc; RL_LOCK(sc); + re_poll_locked(ifp, cmd, count); + RL_UNLOCK(sc); +} + +static void +re_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct rl_softc *sc = ifp->if_softc; + + RL_LOCK_ASSERT(sc); + if (!(ifp->if_capenable & IFCAP_POLLING)) { ether_poll_deregister(ifp); cmd = POLL_DEREGISTER; } if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ CSR_WRITE_2(sc, RL_IMR, RL_INTRS_CPLUS); - goto done; + return; } sc->rxcycles = count; @@ -1712,14 +1748,14 @@ re_txeof(sc); if (ifp->if_snd.ifq_head != NULL) - (*ifp->if_start)(ifp); + re_start_locked(ifp); if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */ u_int16_t status; status = CSR_READ_2(sc, RL_ISR); if (status == 0xffff) - goto done; + return; if (status) CSR_WRITE_2(sc, RL_ISR, status); @@ -1729,11 +1765,9 @@ if (status & RL_ISR_SYSTEM_ERR) { re_reset(sc); - re_init(sc); + re_init_locked(sc); } } -done: - RL_UNLOCK(sc); } #endif /* DEVICE_POLLING */ @@ -1747,26 +1781,21 @@ sc = arg; - if (sc->suspended) { - return; - } + RL_LOCK(sc); - RL_LOCK(sc); ifp = &sc->arpcom.ac_if; - if (!(ifp->if_flags & IFF_UP)) { - RL_UNLOCK(sc); - return; - } + if (sc->suspended || !(ifp->if_flags & IFF_UP)) + goto done_locked; #ifdef DEVICE_POLLING if (ifp->if_flags & IFF_POLLING) - goto done; + goto done_locked; if ((ifp->if_capenable & IFCAP_POLLING) && ether_poll_register(re_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_2(sc, RL_IMR, 0x0000); - re_poll(ifp, 0, 1); - goto done; + re_poll_locked(ifp, 0, 1); + goto done_locked; } #endif /* DEVICE_POLLING */ @@ -1795,21 +1824,19 @@ if (status & RL_ISR_SYSTEM_ERR) { re_reset(sc); - re_init(sc); + re_init_locked(sc); } if (status & RL_ISR_LINKCHG) { untimeout(re_tick, sc, sc->rl_stat_ch); - re_tick(sc); + re_tick_locked(sc); } } if (ifp->if_snd.ifq_head != NULL) - (*ifp->if_start)(ifp); + re_start_locked(ifp); -#ifdef DEVICE_POLLING -done: -#endif +done_locked: RL_UNLOCK(sc); } @@ -1825,6 +1852,8 @@ int error; struct m_tag *mtag; + RL_LOCK_ASSERT(sc); + if (sc->rl_ldata.rl_tx_free <= 4) return (EFBIG); @@ -1920,12 +1949,23 @@ return (0); } +static void +re_start(ifp) + struct ifnet *ifp; +{ + struct rl_softc *sc; + + sc = ifp->if_softc; + RL_LOCK(sc); + re_start_locked(ifp); + RL_UNLOCK(sc); +} + /* * Main transmit routine for C+ and gigE NICs. */ - static void -re_start(ifp) +re_start_locked(ifp) struct ifnet *ifp; { struct rl_softc *sc; @@ -1933,7 +1973,8 @@ int idx; sc = ifp->if_softc; - RL_LOCK(sc); + + RL_LOCK_ASSERT(sc); idx = sc->rl_ldata.rl_tx_prodidx; @@ -1983,8 +2024,6 @@ */ CSR_WRITE_4(sc, RL_TIMERCNT, 1); - RL_UNLOCK(sc); - /* * Set a timeout in case the chip goes out to lunch. */ @@ -1996,11 +2035,22 @@ void *xsc; { struct rl_softc *sc = xsc; + + RL_LOCK(sc); + re_init_locked(sc); + RL_UNLOCK(sc); +} + +static void +re_init_locked(sc) + struct rl_softc *sc; +{ struct ifnet *ifp = &sc->arpcom.ac_if; struct mii_data *mii; u_int32_t rxcfg = 0; - RL_LOCK(sc); + RL_LOCK_ASSERT(sc); + mii = device_get_softc(sc->rl_miibus); /* @@ -2146,10 +2196,8 @@ if (sc->rl_type == RL_8169) CSR_WRITE_2(sc, RL_MAXRXPKTLEN, 16383); - if (sc->rl_testmode) { - RL_UNLOCK(sc); + if (sc->rl_testmode) return; - } mii_mediachg(mii); @@ -2159,7 +2207,6 @@ ifp->if_flags &= ~IFF_OACTIVE; sc->rl_stat_ch = timeout(re_tick, sc, hz); - RL_UNLOCK(sc); } /* @@ -2209,8 +2256,6 @@ struct mii_data *mii; int error = 0; - RL_LOCK(sc); - switch (command) { case SIOCSIFMTU: if (ifr->ifr_mtu > RL_JUMBO_MTU) @@ -2218,17 +2263,19 @@ ifp->if_mtu = ifr->ifr_mtu; break; case SIOCSIFFLAGS: - if (ifp->if_flags & IFF_UP) { - re_init(sc); - } else { - if (ifp->if_flags & IFF_RUNNING) - re_stop(sc); - } + RL_LOCK(sc); + if (ifp->if_flags & IFF_UP) + re_init_locked(sc); + else if (ifp->if_flags & IFF_RUNNING) + re_stop(sc); + RL_UNLOCK(sc); error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: + RL_LOCK(sc); re_setmulti(sc); + RL_UNLOCK(sc); error = 0; break; case SIOCGIFMEDIA: @@ -2252,8 +2299,6 @@ break; } - RL_UNLOCK(sc); - return (error); } @@ -2270,9 +2315,8 @@ re_txeof(sc); re_rxeof(sc); + re_init_locked(sc); - re_init(sc); - RL_UNLOCK(sc); } @@ -2287,7 +2331,8 @@ register int i; struct ifnet *ifp; - RL_LOCK(sc); + RL_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; @@ -2326,8 +2371,6 @@ sc->rl_ldata.rl_rx_mbuf[i] = NULL; } } - - RL_UNLOCK(sc); } /* @@ -2343,8 +2386,10 @@ sc = device_get_softc(dev); + RL_LOCK(sc); re_stop(sc); sc->suspended = 1; + RL_UNLOCK(sc); return (0); } @@ -2362,13 +2407,17 @@ struct ifnet *ifp; sc = device_get_softc(dev); + + RL_LOCK(sc); + ifp = &sc->arpcom.ac_if; /* reinitialize interface if necessary */ if (ifp->if_flags & IFF_UP) - re_init(sc); + re_init_locked(sc); sc->suspended = 0; + RL_UNLOCK(sc); return (0); } @@ -2385,5 +2434,7 @@ sc = device_get_softc(dev); + RL_LOCK(sc); re_stop(sc); + RL_UNLOCK(sc); } ==== //depot/projects/nsched/sys/dev/usb/umass.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/usb/umass.c,v 1.112 2004/08/15 23:39:18 imp Exp $ + * $FreeBSD: src/sys/dev/usb/umass.c,v 1.113 2004/09/04 07:07:35 sanpei Exp $ * $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $ */ @@ -449,6 +449,10 @@ UMASS_PROTO_ATAPI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, + { USB_VENDOR_WESTERN, USB_PRODUCT_WESTERN_EXTHDD, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE + }, { USB_VENDOR_YANO, USB_PRODUCT_YANO_U640MO, RID_WILDCARD, UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I, FORCE_SHORT_INQUIRY ==== //depot/projects/nsched/sys/dev/usb/uplcom.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/uplcom.c,v 1.20 2004/08/08 05:21:56 sanpei Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/uplcom.c,v 1.21 2004/09/03 22:41:37 sanpei Exp $"); /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -211,6 +211,7 @@ { USB_VENDOR_RATOC, USB_PRODUCT_RATOC_REXUSB60 }, /* ELECOM UC-SGT */ { USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_UCSGT }, + { USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_UCSGT0 }, /* Sony Ericsson USB Cable */ { USB_VENDOR_SONYERICSSON, USB_PRODUCT_SONYERICSSON_DCU10 }, /* SOURCENEXT KeikaiDenwa 8 */ ==== //depot/projects/nsched/sys/dev/usb/usb_quirks.c#5 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.39 2004/08/19 19:21:14 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.40 2004/09/03 23:19:27 sanpei Exp $"); #include #include @@ -95,6 +95,8 @@ ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_YAMAHA, USB_PRODUCT_YAMAHA_RTW65I, ANY, { UQ_ASSUME_CM_OVER_DATA }}, + { USB_VENDOR_QUALCOMM, USB_PRODUCT_QUALCOMM_CDMA_MSM, + ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_QUALCOMM2, USB_PRODUCT_QUALCOMM2_CDMA_MSM, ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS64LX, ==== //depot/projects/nsched/sys/dev/usb/usbdevs#12 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.197 2004/08/26 16:59:50 des Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.201 2004/09/04 07:07:35 sanpei Exp $ /* * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -339,9 +339,9 @@ vendor MICROTECH 0x07af Microtech vendor GENERALINSTMNTS 0x07b2 General Instruments (Motorola) vendor OLYMPUS 0x07b4 Olympus -vendor ONSPEC 0x07c4 OnSpec Electronic vendor ABOCOM 0x07b8 AboCom Systems vendor KEISOKUGIKEN 0x07c1 Keisokugiken +vendor ONSPEC 0x07c4 OnSpec Electronic vendor APG 0x07c5 APG Cash Drawer vendor BUG 0x07c8 B.U.G. vendor ALLIEDTELESYN 0x07c9 Allied Telesyn International @@ -429,6 +429,7 @@ vendor HAWKING 0x0e66 Hawking Technologies vendor MICROTUNE 0x0f4d Microtune, Inc. vendor QUALCOMM2 0x1004 Qualcomm +vendor WESTERN 0x1058 Western Digital vendor MOTOROLA 0x1063 Motorola vendor PLX 0x10b5 PLX vendor ASANTE 0x10bd Asante @@ -709,6 +710,7 @@ product ELECOM LDUSBLTX 0x4005 LD-USBL/TX product ELECOM LDUSBTX2 0x400b LD-USB/TX product ELECOM UCSGT 0x5003 UC-SGT +product ELECOM UCSGT0 0x5004 UC-SGT product ELECOM LDUSBTX3 0xabc1 LD-USB/TX /* Elsa products */ @@ -784,6 +786,7 @@ product FUJITSU AH_F401U 0x105b AH-F401U Air H device /* Qualcomm products */ +product QUALCOMM CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMM2 CDMA_MSM 0x6000 CDMA Technologies MSM phone /* General Instruments (Motorola) products */ @@ -1116,6 +1119,7 @@ /* Nikon products */ product NIKON E990 0x0102 Digital Camera E990 +product NIKON LS40 0x4000 CoolScan LS40 ED /* Olympus products */ product OLYMPUS C1 0x0102 C-1 Digital Camera @@ -1141,7 +1145,6 @@ product PALM ZIRE31 0x0061 Palm Zire 31 product PALM ZIRE 0x0070 Palm Zire -/* Panasonic products */ product PANASONIC KXLRW32AN 0x0d09 CD-R Drive KXL-RW32AN product PANASONIC KXLCB20AN 0x0d0a CD-R Drive KXL-CB20AN product PANASONIC KXLCB35AN 0x0d0e DVD-ROM & CD-R/RW @@ -1410,6 +1413,10 @@ product WACOM INTUOSA5 0x0021 Intuos A5 product WACOM GD0912U 0x0022 Intuos 9x12 Graphics Tablet +/* Western Digital products */ +product WESTERN EXTHDD 0x0400 External HDD +product WESTERN HUB 0x0500 USB HUB + /* Xirlink products */ product XIRLINK PCCAM 0x8080 IBM PC Camera ==== //depot/projects/nsched/sys/dev/usb/uscanner.c#5 (text+ko) ==== @@ -5,7 +5,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/uscanner.c,v 1.57 2004/08/15 23:39:18 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/uscanner.c,v 1.58 2004/09/03 23:29:01 sanpei Exp $"); /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -170,6 +170,9 @@ {{ USB_VENDOR_NATIONAL, USB_PRODUCT_NATIONAL_BEARPAW1200 }, 0 }, {{ USB_VENDOR_NATIONAL, USB_PRODUCT_NATIONAL_BEARPAW2400 }, 0 }, + /* Nikon */ + {{ USB_VENDOR_NIKON, USB_PRODUCT_NIKON_LS40 }, 0 }, + /* Primax */ {{ USB_VENDOR_PRIMAX, USB_PRODUCT_PRIMAX_G2X300 }, 0 }, {{ USB_VENDOR_PRIMAX, USB_PRODUCT_PRIMAX_G2E300 }, 0 }, ==== //depot/projects/nsched/sys/fs/autofs/autofs_vfsops.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/fs/autofs/autofs_vfsops.c,v 1.2 2004/09/02 20:44:55 alfred Exp $ + * $FreeBSD: src/sys/fs/autofs/autofs_vfsops.c,v 1.4 2004/09/03 16:05:44 des Exp $ * $Id: autofs_vfsops.c,v 1.21 2004/08/31 08:49:56 bright Exp $ */ #include @@ -444,7 +444,7 @@ stkreq.ar_xid = userreq->au_xid; if (userreq->au_op == AREQ_READDIR && userreq->au_auxlen > 0) { if (userreq->au_auxlen > AUTOFS_MAXAUX) { - DP(("EINVAL auxlen %d...\n", + DP(("EINVAL auxlen %zu...\n", userreq->au_auxlen)); error = EINVAL; break; @@ -610,7 +610,7 @@ } /* and... same name? */ if (r1->ar_namelen != r2->ar_namelen) { - DP(("dlen1 %zd dlen2 %zd\n", r1->ar_namelen, r2->ar_namelen)); + DP(("dlen1 %zu dlen2 %zu\n", r1->ar_namelen, r2->ar_namelen)); return (0); } if (strncmp(r1->ar_name, r2->ar_name, r1->ar_namelen) != 0) { ==== //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#4 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. >>> TRUNCATED FOR MAIL (1000 lines) <<<