Date: Sat, 13 Mar 2004 18:12:24 -0800 (PST) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 48937 for review Message-ID: <200403140212.i2E2COEr024357@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=48937 Change 48937 by peter@peter_overcee on 2004/03/13 18:11:37 IFC @48936 Affected files ... .. //depot/projects/hammer/share/mk/bsd.cpu.mk#14 integrate .. //depot/projects/hammer/share/mk/bsd.lib.mk#15 integrate .. //depot/projects/hammer/sys/conf/kern.pre.mk#19 integrate .. //depot/projects/hammer/sys/conf/kmod.mk#22 integrate .. //depot/projects/hammer/sys/dev/md/md.c#25 integrate .. //depot/projects/hammer/sys/kern/kern_exec.c#23 integrate .. //depot/projects/hammer/sys/kern/kern_exit.c#22 integrate .. //depot/projects/hammer/sys/kern/kern_fork.c#33 integrate .. //depot/projects/hammer/sys/kern/vfs_aio.c#17 integrate .. //depot/projects/hammer/sys/net/if_spppsubr.c#10 integrate .. //depot/projects/hammer/sys/netinet/if_ether.c#8 integrate .. //depot/projects/hammer/sys/netncp/ncp_subr.c#5 integrate .. //depot/projects/hammer/sys/sys/eventhandler.h#5 integrate .. //depot/projects/hammer/sys/sys/socket.h#9 integrate .. //depot/projects/hammer/tools/tools/nanobsd/i386.diskimage#2 integrate Differences ... ==== //depot/projects/hammer/share/mk/bsd.cpu.mk#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.34 2004/03/12 21:36:12 trhodes Exp $ +# $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.35 2004/03/14 01:29:05 trhodes Exp $ # Set default CPU compile flags and baseline CPUTYPE for each arch. The # compile flags must support the minimum CPU type for each architecture but @@ -44,7 +44,7 @@ . if ${MACHINE_ARCH} == "i386" . if ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \ - ${CPUTYPE} == "athlon-4" || ${CPUTYPE} == "athlon-tbird" + ${CPUTYPE} == "athlon-4" _ICC_CPUCFLAGS = -tpp6 -xiMK _CPUCFLAGS = -march=${CPUTYPE} . elif ${CPUTYPE} == "athlon-tbird" || ${CPUTYPE} == "athlon" ==== //depot/projects/hammer/share/mk/bsd.lib.mk#15 (text+ko) ==== @@ -1,5 +1,5 @@ # from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 -# $FreeBSD: src/share/mk/bsd.lib.mk,v 1.157 2004/03/12 21:36:12 trhodes Exp $ +# $FreeBSD: src/share/mk/bsd.lib.mk,v 1.158 2004/03/14 01:29:05 trhodes Exp $ # .include <bsd.init.mk> @@ -60,9 +60,6 @@ PO_FLAG=-pg .endif -.c.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} - .c.po: ${CC} ${PO_FLAG} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} @@ -172,7 +169,7 @@ ${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} .endif -.endif #!defined(INTERNALLIB) +.endif !defined(INTERNALLIB) all: ${_LIBS} ==== //depot/projects/hammer/sys/conf/kern.pre.mk#19 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.43 2004/03/12 21:36:12 trhodes Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.44 2004/03/14 01:29:05 trhodes Exp $ # Part of a unified Makefile for building kernels. This part contains all # of the definitions that need to be before %BEFORE_DEPEND. @@ -39,7 +39,7 @@ INCLUDES= ${NOSTDINC} -I- ${INCLMAGIC} -I. -I$S -# This hack lets us use the Intel ACPICA code without spamming a new +# This hack lets us use the Intel ACPICA code without spamming a new # include path into 100+ source files. INCLUDES+= -I$S/contrib/dev/acpica @@ -66,11 +66,11 @@ ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 -. if ${CC} == "icc" -CFLAGS+= -DGPROF -. else +.if ${CC} == "icc" +.error Profiling doesn't work with ICC yet. +.else CFLAGS+= -DGPROF -falign-functions=16 -. endif +.endif .if ${PROFLEVEL} >= 2 CFLAGS+= -DGPROF4 -DGUPROF . if ${CC} == "icc" ==== //depot/projects/hammer/sys/conf/kmod.mk#22 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $FreeBSD: src/sys/conf/kmod.mk,v 1.155 2004/03/12 21:36:12 trhodes Exp $ +# $FreeBSD: src/sys/conf/kmod.mk,v 1.156 2004/03/14 01:29:05 trhodes Exp $ # # The include file <bsd.kmod.mk> handles installing Kernel Loadable Device # drivers (KLD's). @@ -71,8 +71,7 @@ .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .if ${CC} == "icc" -_ICC_CFLAGS:= ${CFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/} -CFLAGS= ${_ICC_CFLAGS} +CFLAGS:= ${CFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/} .endif CFLAGS+= ${COPTS} -D_KERNEL CFLAGS+= -DKLD_MODULE ==== //depot/projects/hammer/sys/dev/md/md.c#25 (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/dev/md/md.c,v 1.115 2004/03/10 20:41:08 phk Exp $ + * $FreeBSD: src/sys/dev/md/md.c,v 1.116 2004/03/14 00:24:30 alc Exp $ * */ @@ -542,7 +542,6 @@ lastp = (bp->bio_offset + bp->bio_length - 1) / PAGE_SIZE; lastend = (bp->bio_offset + bp->bio_length - 1) % PAGE_SIZE + 1; - mtx_lock(&Giant); kva = kmem_alloc_nofault(kernel_map, PAGE_SIZE); VM_OBJECT_LOCK(sc->object); @@ -602,7 +601,6 @@ vm_object_set_writeable_dirty(sc->object); VM_OBJECT_UNLOCK(sc->object); kmem_free(kernel_map, kva, sc->secsize); - mtx_unlock(&Giant); return (0); } } @@ -618,13 +616,13 @@ curthread->td_base_pri = PRIBIO; switch (sc->type) { - case MD_SWAP: case MD_VNODE: mtx_lock(&Giant); hasgiant = 1; break; case MD_MALLOC: case MD_PRELOAD: + case MD_SWAP: default: hasgiant = 0; break; ==== //depot/projects/hammer/sys/kern/kern_exec.c#23 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_exec.c,v 1.239 2004/03/13 22:31:38 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_exec.c,v 1.240 2004/03/14 02:06:27 peter Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -843,6 +843,7 @@ imgp->vmspace_destroyed = 1; + /* Called with Giant held, do not depend on it! */ EVENTHANDLER_INVOKE(process_exec, p); /* ==== //depot/projects/hammer/sys/kern/kern_exit.c#22 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.225 2004/03/13 22:31:39 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.226 2004/03/14 02:06:27 peter Exp $"); #include "opt_compat.h" #include "opt_ktrace.h" @@ -214,9 +214,7 @@ * e.g. SYSV IPC stuff * XXX what if one of these generates an error? */ - mtx_lock(&Giant); EVENTHANDLER_INVOKE(process_exit, p); - mtx_unlock(&Giant); MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage), M_ZOMBIE, M_WAITOK); ==== //depot/projects/hammer/sys/kern/kern_fork.c#33 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.222 2004/03/13 22:31:39 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.224 2004/03/14 02:06:27 peter Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -689,6 +689,7 @@ 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 @@ -696,7 +697,6 @@ * What if they have an error? XXX */ EVENTHANDLER_INVOKE(process_fork, p1, p2, flags); - mtx_unlock(&Giant); /* * Set the child start time and mark the process as being complete. ==== //depot/projects/hammer/sys/kern/vfs_aio.c#17 (text+ko) ==== @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.168 2003/11/15 09:28:08 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_aio.c,v 1.169 2004/03/14 02:06:27 peter Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -543,6 +543,7 @@ if (ki == NULL) return; + mtx_lock(&Giant); ki->kaio_flags |= LIOJ_SIGNAL_POSTED; while ((ki->kaio_active_count > 0) || (ki->kaio_buffer_count > ki->kaio_buffer_finished_count)) { @@ -643,6 +644,7 @@ uma_zfree(kaio_zone, ki); p->p_aioinfo = NULL; + mtx_unlock(&Giant); } /* ==== //depot/projects/hammer/sys/net/if_spppsubr.c#10 (text+ko) ==== @@ -17,7 +17,7 @@ * * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997 * - * $FreeBSD: src/sys/net/if_spppsubr.c,v 1.106 2004/03/13 06:16:59 rwatson Exp $ + * $FreeBSD: src/sys/net/if_spppsubr.c,v 1.107 2004/03/14 01:32:44 rwatson Exp $ */ #include <sys/param.h> @@ -961,7 +961,7 @@ struct sppp *sp = (struct sppp*) ifp; /* Initialize keepalive handler. */ - if (! spppq) + if (spppq != NULL) TIMEOUT(sppp_keepalive, 0, hz * 10, keepalive_ch); /* Insert new entry into the keepalive list. */ @@ -1020,7 +1020,7 @@ } /* Stop keepalive handler. */ - if (! spppq) + if (spppq != NULL) UNTIMEOUT(sppp_keepalive, 0, keepalive_ch); for (i = 0; i < IDX_COUNT; i++) ==== //depot/projects/hammer/sys/netinet/if_ether.c#8 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/netinet/if_ether.c,v 1.117 2003/12/23 14:08:50 ru Exp $ + * $FreeBSD: src/sys/netinet/if_ether.c,v 1.118 2004/03/14 00:44:11 mdodd Exp $ */ /* @@ -163,11 +163,11 @@ static void arp_rtrequest(req, rt, info) int req; - register struct rtentry *rt; + struct rtentry *rt; struct rt_addrinfo *info; { - register struct sockaddr *gate; - register struct llinfo_arp *la; + struct sockaddr *gate; + struct llinfo_arp *la; static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; RT_LOCK_ASSERT(rt); @@ -302,14 +302,14 @@ */ static void arprequest(ifp, sip, tip, enaddr) - register struct ifnet *ifp; - register struct in_addr *sip, *tip; - register u_char *enaddr; + struct ifnet *ifp; + struct in_addr *sip, *tip; + u_char *enaddr; { - register struct mbuf *m; - register struct ether_header *eh; - register struct arc_header *arh; - register struct arphdr *ah; + struct mbuf *m; + struct ether_header *eh; + struct arc_header *arh; + struct arphdr *ah; struct sockaddr sa; static u_char llcx[] = { 0x82, 0x40, LLC_SNAP_LSAP, LLC_SNAP_LSAP, LLC_UI, 0x00, 0x00, 0x00, 0x08, 0x06 }; @@ -403,11 +403,11 @@ */ int arpresolve(ifp, rt, m, dst, desten, rt0) - register struct ifnet *ifp; - register struct rtentry *rt; + struct ifnet *ifp; + struct rtentry *rt; struct mbuf *m; - register struct sockaddr *dst; - register u_char *desten; + struct sockaddr *dst; + u_char *desten; struct rtentry *rt0; { struct llinfo_arp *la = 0; @@ -579,14 +579,14 @@ in_arpinput(m) struct mbuf *m; { - register struct arphdr *ah; - register struct ifnet *ifp = m->m_pkthdr.rcvif; + struct arphdr *ah; + struct ifnet *ifp = m->m_pkthdr.rcvif; struct ether_header *eh; struct arc_header *arh; struct iso88025_header *th = (struct iso88025_header *)0; struct iso88025_sockaddr_dl_data *trld; - register struct llinfo_arp *la = 0; - register struct rtentry *rt; + struct llinfo_arp *la = 0; + struct rtentry *rt; struct ifaddr *ifa; struct in_ifaddr *ia; struct sockaddr_dl *sdl; @@ -890,10 +890,10 @@ */ static void arptfree(la) - register struct llinfo_arp *la; + struct llinfo_arp *la; { - register struct rtentry *rt = la->la_rt; - register struct sockaddr_dl *sdl; + struct rtentry *rt = la->la_rt; + struct sockaddr_dl *sdl; if (rt == 0) panic("arptfree"); @@ -917,7 +917,7 @@ u_long addr; int create, proxy; { - register struct rtentry *rt; + struct rtentry *rt; struct sockaddr_inarp sin; const char *why = 0; ==== //depot/projects/hammer/sys/netncp/ncp_subr.c#5 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netncp/ncp_subr.c,v 1.12 2003/06/11 05:30:35 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/netncp/ncp_subr.c,v 1.13 2004/03/14 02:06:28 peter Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -85,6 +85,7 @@ struct ncp_conn *ncp, *nncp; struct thread *td; + mtx_lock(&Giant); FOREACH_THREAD_IN_PROC(p, td) { if (ncp_conn_putprochandles(td) == 0) continue; @@ -100,6 +101,7 @@ } ncp_conn_unlocklist(td); } + mtx_unlock(&Giant); } int ==== //depot/projects/hammer/sys/sys/eventhandler.h#5 (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/sys/eventhandler.h,v 1.30 2004/03/01 22:36:58 phk Exp $ + * $FreeBSD: src/sys/sys/eventhandler.h,v 1.32 2004/03/14 02:06:28 peter Exp $ */ #ifndef SYS_EVENTHANDLER_H @@ -156,7 +156,11 @@ #define LOWMEM_PRI_DEFAULT EVENTHANDLER_PRI_FIRST EVENTHANDLER_DECLARE(vm_lowmem, vm_lowmem_handler_t); -/* Process events */ +/* + * Process events + * process_fork and exit handlers are called without Giant. + * exec handlers are called with Giant, but that is by accident. + */ struct proc; typedef void (*exitlist_fn)(void *, struct proc *); ==== //depot/projects/hammer/sys/sys/socket.h#9 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)socket.h 8.4 (Berkeley) 2/21/94 - * $FreeBSD: src/sys/sys/socket.h,v 1.76 2004/02/08 07:35:48 silby Exp $ + * $FreeBSD: src/sys/sys/socket.h,v 1.77 2004/03/14 00:49:09 mdodd Exp $ */ #ifndef _SYS_SOCKET_H_ @@ -207,7 +207,8 @@ #define AF_NETGRAPH 32 /* Netgraph sockets */ #define AF_SLOW 33 /* 802.3ad slow protocol */ #define AF_SCLUSTER 34 /* Sitara cluster protocol */ -#define AF_MAX 35 +#define AF_ARP 35 +#define AF_MAX 36 #endif /* @@ -290,6 +291,7 @@ #define PF_NETGRAPH AF_NETGRAPH #define PF_SLOW AF_SLOW #define PF_SCLUSTER AF_SCLUSTER +#define PF_ARP AF_ARP #define PF_MAX AF_MAX ==== //depot/projects/hammer/tools/tools/nanobsd/i386.diskimage#2 (text+ko) ==== @@ -4,7 +4,7 @@ # # See /usr/share/examples/etc/bsd-style-copyright for license terms. # -# $FreeBSD: src/tools/tools/nanobsd/i386.diskimage,v 1.2 2004/03/11 18:12:48 simon Exp $ +# $FreeBSD: src/tools/tools/nanobsd/i386.diskimage,v 1.3 2004/03/13 23:01:08 phk Exp $ # # Called as: # @@ -23,7 +23,7 @@ TMPFILE0=`mktemp -t nanobsd` TMPFILE1=`mktemp -t nanobsd` -TMPDIR=`mktemp -d -t nanobsd` +TMPMNT=`mktemp -d -t nanobsd` dd if=/dev/zero of=${TMPFILE0} count=${SECTS} MD=`mdconfig -a -t vnode -f ${TMPFILE0} -x ${SC} -y ${HD}` @@ -42,10 +42,10 @@ bsdlabel -w -B ${MD}s1 newfs -O1 -U ${MD}s1a newfs -O1 -U ${MD}s3 -mount /dev/${MD}s1a ${TMPDIR} -(cd ${WD} && find . -print | cpio -dump ${TMPDIR}) || true -df ${TMPDIR} -umount ${TMPDIR} +mount /dev/${MD}s1a ${TMPMNT} +(cd ${WD} && find . -print | cpio -dump ${TMPMNT}) || true +df ${TMPMNT} +umount ${TMPMNT} dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k dd if=/dev/${MD} of=${IMG} bs=64k dd if=/dev/${MD}s1 of=${6}.s1 bs=64k
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403140212.i2E2COEr024357>