Re: svn commit: r194672 - in head/sys: kern netinet sys
On Mon, 22 Jun 2009, Andre Oppermann wrote: Add soreceive_stream(), an optimized version of soreceive() for stream (TCP) sockets. While this sounds like very interesting work, I was struck by the lack of: Reviewed by: ? Tested by:? Have you tested this change with some of our TCP conumer edge cases, especially in-kernel consumers: - Accept filters - NFS client - NFS server - smbfs - iscsi initiator I also assume that the plan is that this will not be enabled by default in 8.0? With soreceive_dgram, it took three months to shake out the nits, and the datagram case is far simpler than the stream case. Given that experience, I'd guess it will take longer for the new stream code to shake out, and probably involve painfully tracking subtle bugs in blocking code, data corruption in NFS, etc. I've identified one such possible bug for iscsi. To provide easier access for early adopters, we shipped with soreceive_dgram available for UDP, but optionally enabled by a loader tunable, for at least one minor rev. I would recommend doing something similar here. A few inline comments below, including one serious bug (assuming my reading is right). This doesn't consistute a full review because it's too early in the morning to reason fully about the socket buffer code. Robert N M Watson Computer Laboratory University of Cambridge It is functionally identical to generic soreceive() but has a number stream specific optimizations: o does only one sockbuf unlock/lock per receive independent of the length of data to be moved into the uio compared to soreceive() which unlocks/locks per *mbuf*. Hmm. I count four locks and unlocks per receive, assuming no blocking and a I/O to user memory: - sblock/sbunlock to stabilize sb_mb and prevent I/O interlacing. - start/stop socket buffer mutex lock/unlock at beginning/end of function - unlock/relock around m_mbuftouio() - unlock/relock around pru_rcvd One idea I've futzed with a little is whether or not we could drop sblock() in certain cases for receive and transmit. As far as I'm aware, it is used for at least four purposes in receive: - Prevent I/O interlacing from concurrent system calls - Provide consistency for blocking logic during concurrent system calls - Stabilize non-NULL sb_mb while the socket buffer mutex is dropped - Minimize contention on the socket buffer mutex during concurrent system calls Some of these are more important than others -- in particular, the function of preventing I/O interlacing for stream system calls seems something we might drop, as it's not a guarantee provided by other OS's, so no portable application should depend on it. Have you looked at all at this? o uses m_mbuftouio() instead of its own copy(out) variant. o much more compact code flow as a large number of special cases is removed. o much improved reability. It offers significantly reduced CPU usage and lock contention when receiving fast TCP streams. Additional gains are obtained when the receiving application is using SO_RCVLOWAT to batch up some data before a read (and wakeup) is done. This function was written by "reverse engineering" and is not just a stripped down variant of soreceive(). It is not yet enabled by default on TCP sockets. Instead it is commented out in the protocol initialization in tcp_usrreq.c until more widespread testing has been done. Have you looked at using this with SCTP and UNIX domain sockets? UNIX domain socket performance is quite important for database workloads, and SCTP is going to be increasingly important for Internet applications. In the UNIX domain socket case, not supporting control mbuf will be a potential problem (see comments below about either implementing it or falling back, and if falling back m_mbuftouio needs to know how to properly free them). Testers, especially with 10GigE gear, are welcome. MFP4: r164817 //depot/user/andre/soreceive_stream/ Modified: head/sys/kern/uipc_socket.c head/sys/netinet/tcp_usrreq.c head/sys/sys/socketvar.h Modified: head/sys/kern/uipc_socket.c == --- head/sys/kern/uipc_socket.c Mon Jun 22 22:54:44 2009(r194671) +++ head/sys/kern/uipc_socket.c Mon Jun 22 23:08:05 2009(r194672) @@ -1857,6 +1857,202 @@ release: } /* + * Optimized version of soreceive() for stream (TCP) sockets. + */ +int +soreceive_stream(struct socket *so, struct sockaddr **psa, struct uio *uio, +struct mbuf **mp0, struct mbuf **controlp, int *flagsp) +{ + int len = 0, error = 0, flags, oresid; + struct sockbuf *sb; + struct mbuf *m, *n = NULL; + + /* We only do stream sockets. */ + if (so->so_type != SOCK_STREAM) + return (EINVAL); This should be a KASSERT(). You should also assert !PR_ADDR and !PR_ATOMIC, and possibly a few other things to ensure that soreceive_stream is not used with protocols th
Re: svn commit: r194628 - head/lib/ncurses/ncurses
Hi, * Rong-En Fan wrote: > There is a --with-fallbacks in ncurses, let me check if we can use that. > > We don't really use the termcap/terminfo entries from ncurses, but > instead we have our own version. So, not sure if we should provide a > small /etc/termcap.small or we should use the entries from ncurses. I've noticed the xterm entry we have in FreeBSD is somewhat inconsistent with the one from other operating systems. For example: I've noticed that we use erase-line to fill a line with a certain color, but this breaks on OS X, because Terminal.app uses the default attributes while performing erase-line, instead of the current attributes. Is this a known issue? -- Ed Schouten WWW: http://80386.nl/ pgpqHVHQIFJGJ.pgp Description: PGP signature
Re: svn commit: r194681 - head/usr.sbin/wpa/ndis_events
Hi Maxim, * Maxim Konovalov wrote: > +static void usage(); ... > +usage() That should probably read: static void usage(void); Right? -- Ed Schouten WWW: http://80386.nl/ pgp2CbwhNsSVO.pgp Description: PGP signature
Re: svn commit: r192648 - in head: share/man/man4 sys/conf sys/netinet sys/netinet6 sys/netipsec
Hi, On Sat, May 23, 2009 at 04:42:38PM +, Bjoern A. Zeeb wrote: > Author: bz > Date: Sat May 23 16:42:38 2009 > New Revision: 192648 > URL: http://svn.freebsd.org/changeset/base/192648 > > Log: > Add sysctls to toggle the behaviour of the (former) IPSEC_FILTERTUNNEL > kernel option. > This also permits tuning of the option per virtual network stack, as > well as separately per inet, inet6. > > The kernel option is left for a transition period, marked deprecated, > and will be removed soon. Sorry, I'm lagging behind regarding my FreeBSD mail queue... But I'd like to know if this feature is going to be simply removed, or if it is replaced by something else? Thanks. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194672 - in head/sys: kern netinet sys
Robert Watson wrote: On Mon, 22 Jun 2009, Andre Oppermann wrote: Add soreceive_stream(), an optimized version of soreceive() for stream (TCP) sockets. While this sounds like very interesting work, I was struck by the lack of: Reviewed by:? Tested by:? Have you tested this change with some of our TCP conumer edge cases, especially in-kernel consumers: - Accept filters - NFS client - NFS server - smbfs - iscsi initiator No, yes, yes, no, no. Plus a large number of SSH copying (it will trip over every corrupted byte) and fetching half of the ports collection programs source code and comparing the checksum. I also assume that the plan is that this will not be enabled by default in 8.0? With soreceive_dgram, it took three months to shake out the nits, and the datagram case is far simpler than the stream case. Given that experience, I'd guess it will take longer for the new stream code to shake out, and probably involve painfully tracking subtle bugs in blocking code, data corruption in NFS, etc. I've identified one such possible bug for iscsi. No, it not supposed to be enable by default in 8.0. To provide easier access for early adopters, we shipped with soreceive_dgram available for UDP, but optionally enabled by a loader tunable, for at least one minor rev. I would recommend doing something similar here. A good hint, thank you. A few inline comments below, including one serious bug (assuming my reading is right). This doesn't consistute a full review because it's too early in the morning to reason fully about the socket buffer code. OK. Thanks. I will look into the specifics later today. -- Andre Robert N M Watson Computer Laboratory University of Cambridge It is functionally identical to generic soreceive() but has a number stream specific optimizations: o does only one sockbuf unlock/lock per receive independent of the length of data to be moved into the uio compared to soreceive() which unlocks/locks per *mbuf*. Hmm. I count four locks and unlocks per receive, assuming no blocking and a I/O to user memory: - sblock/sbunlock to stabilize sb_mb and prevent I/O interlacing. - start/stop socket buffer mutex lock/unlock at beginning/end of function - unlock/relock around m_mbuftouio() - unlock/relock around pru_rcvd One idea I've futzed with a little is whether or not we could drop sblock() in certain cases for receive and transmit. As far as I'm aware, it is used for at least four purposes in receive: - Prevent I/O interlacing from concurrent system calls - Provide consistency for blocking logic during concurrent system calls - Stabilize non-NULL sb_mb while the socket buffer mutex is dropped - Minimize contention on the socket buffer mutex during concurrent system calls Some of these are more important than others -- in particular, the function of preventing I/O interlacing for stream system calls seems something we might drop, as it's not a guarantee provided by other OS's, so no portable application should depend on it. Have you looked at all at this? o uses m_mbuftouio() instead of its own copy(out) variant. o much more compact code flow as a large number of special cases is removed. o much improved reability. It offers significantly reduced CPU usage and lock contention when receiving fast TCP streams. Additional gains are obtained when the receiving application is using SO_RCVLOWAT to batch up some data before a read (and wakeup) is done. This function was written by "reverse engineering" and is not just a stripped down variant of soreceive(). It is not yet enabled by default on TCP sockets. Instead it is commented out in the protocol initialization in tcp_usrreq.c until more widespread testing has been done. Have you looked at using this with SCTP and UNIX domain sockets? UNIX domain socket performance is quite important for database workloads, and SCTP is going to be increasingly important for Internet applications. In the UNIX domain socket case, not supporting control mbuf will be a potential problem (see comments below about either implementing it or falling back, and if falling back m_mbuftouio needs to know how to properly free them). Testers, especially with 10GigE gear, are welcome. MFP4:r164817 //depot/user/andre/soreceive_stream/ Modified: head/sys/kern/uipc_socket.c head/sys/netinet/tcp_usrreq.c head/sys/sys/socketvar.h Modified: head/sys/kern/uipc_socket.c == --- head/sys/kern/uipc_socket.cMon Jun 22 22:54:44 2009(r194671) +++ head/sys/kern/uipc_socket.cMon Jun 22 23:08:05 2009(r194672) @@ -1857,6 +1857,202 @@ release: } /* + * Optimized version of soreceive() for stream (TCP) sockets. + */ +int +soreceive_stream(struct socket *so, struct sockaddr **psa, struct uio *uio, +struct mbuf **mp0, struct mbuf **controlp, int *flagsp) +{ +int len = 0, error = 0,
svn commit: r194686 - head/usr.sbin/wpa/ndis_events
Author: maxim Date: Tue Jun 23 08:51:11 2009 New Revision: 194686 URL: http://svn.freebsd.org/changeset/base/194686 Log: o Fix usage() prototype [1] and correct its call. Submitted by: ed [1] Modified: head/usr.sbin/wpa/ndis_events/ndis_events.c Modified: head/usr.sbin/wpa/ndis_events/ndis_events.c == --- head/usr.sbin/wpa/ndis_events/ndis_events.c Tue Jun 23 06:57:46 2009 (r194685) +++ head/usr.sbin/wpa/ndis_events/ndis_events.c Tue Jun 23 08:51:11 2009 (r194686) @@ -93,7 +93,7 @@ struct ndis_evt { static int find_ifname(int, char *); static int announce_event(char *, int, struct sockaddr_in *); -static void usage(); +static void usage(void); static void dbgmsg(const char *fmt, ...) @@ -293,7 +293,7 @@ main(argc, argv) all_events++; break; default: - usage(PROGNAME); + usage(); break; } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194681 - head/usr.sbin/wpa/ndis_events
On Tue, 23 Jun 2009, 10:00+0200, Ed Schouten wrote: > Hi Maxim, > > * Maxim Konovalov wrote: > > +static void usage(); > ... > > +usage() > > That should probably read: > > static void usage(void); > > Right? > fixed, thanks. -- Maxim Konovalov ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194643 - head/sys/kern
Kip Macy wrote: As soon as INVARIANTS are enable the KASSERT will catch the offender red handed. The INVARIANTS check DTRT. i.e. fail-fast. If you're double-freeing a valid mbuf you'll get a random crash elsewhere. There is the uncertainty whether the m_nextpkt mbuf is really referenced from somewhere else or just hangs on by accident (bug). Under INVARIANTS the response is clear. Without debug code the question is how to respond in the most useful way. The options are: 1) assume m_nextpkt is a potential memory leak and potentially risk a subtle crash if it was referenced. 2) NULL out m_nextpkt and risk a memory leak. 3) panic in any case. m_nextpkt in an m_next chain is a bug in any case and should not happen. Option 3) seems excessive. Which of option 1) and 2) do you prefer? -- Andre ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194687 - head/sys/dev/firewire
Author: rdivacky Date: Tue Jun 23 09:02:24 2009 New Revision: 194687 URL: http://svn.freebsd.org/changeset/base/194687 Log: Fix what seems to be an obvious typo preventing the body of the if statement to ever be executed. Approved by: ed (mentor) Modified: head/sys/dev/firewire/fwdev.c Modified: head/sys/dev/firewire/fwdev.c == --- head/sys/dev/firewire/fwdev.c Tue Jun 23 08:51:11 2009 (r194686) +++ head/sys/dev/firewire/fwdev.c Tue Jun 23 09:02:24 2009 (r194687) @@ -443,7 +443,7 @@ fw_write_async(struct fw_drv1 *d, struct xfer->send.pay_len = uio->uio_resid; if (uio->uio_resid > 0) { if ((err = uiomove((caddr_t)&xfer->send.payload[0], - uio->uio_resid, uio))); + uio->uio_resid, uio))) goto out; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194688 - head/lib/libc/i386/stdlib
Author: ed Date: Tue Jun 23 09:04:59 2009 New Revision: 194688 URL: http://svn.freebsd.org/changeset/base/194688 Log: Remove hand-written labs/abs implementations. GCC is smart enough. It turns out GCC generates code that's a couple of bytes big bigger, but performs no branching whatsoever. Submitted by: Christoph Mallon Deleted: head/lib/libc/i386/stdlib/abs.S head/lib/libc/i386/stdlib/labs.S Modified: head/lib/libc/i386/stdlib/Makefile.inc Modified: head/lib/libc/i386/stdlib/Makefile.inc == --- head/lib/libc/i386/stdlib/Makefile.inc Tue Jun 23 09:02:24 2009 (r194687) +++ head/lib/libc/i386/stdlib/Makefile.inc Tue Jun 23 09:04:59 2009 (r194688) @@ -1,4 +1,4 @@ # @(#)Makefile.inc8.1 (Berkeley) 6/4/93 # $FreeBSD$ -MDSRCS+=abs.S div.S labs.S ldiv.S +MDSRCS+=div.S ldiv.S ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194687 - head/sys/dev/firewire
On Tue, Jun 23, 2009 at 09:02:24AM +, Roman Divacky wrote: > Author: rdivacky > Date: Tue Jun 23 09:02:24 2009 > New Revision: 194687 > URL: http://svn.freebsd.org/changeset/base/194687 > > Log: > Fix what seems to be an obvious typo preventing the body of the > if statement to ever be executed. what I meant was the the goto out; is executed every time. :( ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194689 - head/libexec/rtld-elf
Author: ed Date: Tue Jun 23 09:50:50 2009 New Revision: 194689 URL: http://svn.freebsd.org/changeset/base/194689 Log: Fix typo in comment. Submitted by: Christoph Mallon Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cTue Jun 23 09:04:59 2009 (r194688) +++ head/libexec/rtld-elf/rtld.cTue Jun 23 09:50:50 2009 (r194689) @@ -1308,7 +1308,7 @@ init_rtld(caddr_t mapbase) /* * Conjure up an Obj_Entry structure for the dynamic linker. * - * The "path" member can't be initialized yet because string constatns + * The "path" member can't be initialized yet because string constants * cannot yet be acessed. Below we will set it correctly. */ memset(&objtmp, 0, sizeof(objtmp)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194690 - in stable/7/etc: . periodic/daily
Author: brian Date: Tue Jun 23 09:51:38 2009 New Revision: 194690 URL: http://svn.freebsd.org/changeset/base/194690 Log: MFC: r193302: Avoid using find -delete in favour of find -prune PR: 122811 Modified: stable/7/etc/ (props changed) stable/7/etc/periodic/daily/100.clean-disks Modified: stable/7/etc/periodic/daily/100.clean-disks == --- stable/7/etc/periodic/daily/100.clean-disks Tue Jun 23 09:50:50 2009 (r194689) +++ stable/7/etc/periodic/daily/100.clean-disks Tue Jun 23 09:51:38 2009 (r194690) @@ -29,7 +29,7 @@ case "$daily_clean_disks_enable" in echo "" echo "Cleaning disks:" set -f noglob - args="$args -name "`echo "$daily_clean_disks_files" | + args="-name "`echo "$daily_clean_disks_files" | sed -e 's/^[]*//' \ -e 's/[ ]*$//' \ -e 's/[ ][ ]*/ -o -name /g'` @@ -41,9 +41,9 @@ case "$daily_clean_disks_enable" in print=;; esac - rc=$(find / \( ! -fstype local -o -fstype rdonly \) -a -prune -o \ - \( $args \) -atime +$daily_clean_disks_days -delete $print | - tee /dev/stderr | wc -l) + rc=$(find / \( ! -fstype local -o -fstype rdonly \) -prune -o \ + \( $args \) -atime +$daily_clean_disks_days \ + -execdir rm -df {} \; $print | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 [ $rc -gt 1 ] && rc=1 set -f glob ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194691 - in stable/7/sys: . contrib/pf kern
Author: kib Date: Tue Jun 23 10:37:28 2009 New Revision: 194691 URL: http://svn.freebsd.org/changeset/base/194691 Log: MFC r185358 (by ganbold): Remove unused variable. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/kern_lockf.c Modified: stable/7/sys/kern/kern_lockf.c == --- stable/7/sys/kern/kern_lockf.c Tue Jun 23 09:51:38 2009 (r194690) +++ stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:37:28 2009 (r194691) @@ -1342,7 +1342,6 @@ static int lf_setlock(struct lockf *state, struct lockf_entry *lock, struct vnode *vp, void **cookiep) { - struct lockf_entry *block; static char lockstr[] = "lockf"; int priority, error; @@ -1362,7 +1361,7 @@ lf_setlock(struct lockf *state, struct l /* * Scan lock list for this file looking for locks that would block us. */ - while ((block = lf_getblock(state, lock))) { + while (lf_getblock(state, lock)) { /* * Free the structure and return if nonblocking. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194692 - in stable/7/sys: . contrib/pf kern
Author: kib Date: Tue Jun 23 10:41:38 2009 New Revision: 194692 URL: http://svn.freebsd.org/changeset/base/194692 Log: MFC r192681: Replace the while statement with the if for clarity. The loop body cannot be executed more then once. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/kern_lockf.c Modified: stable/7/sys/kern/kern_lockf.c == --- stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:37:28 2009 (r194691) +++ stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:41:38 2009 (r194692) @@ -1361,7 +1361,7 @@ lf_setlock(struct lockf *state, struct l /* * Scan lock list for this file looking for locks that would block us. */ - while (lf_getblock(state, lock)) { + if (lf_getblock(state, lock)) { /* * Free the structure and return if nonblocking. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194693 - in stable/7/sys: . contrib/pf kern
Author: kib Date: Tue Jun 23 10:47:42 2009 New Revision: 194693 URL: http://svn.freebsd.org/changeset/base/194693 Log: MFC r192683: In lf_advlockasync(), recheck for doomed vnode after the state->ls_lock is acquired. In the lf_purgelocks(), assert that vnode is doomed and set *statep to NULL before clearing ls_pending list. Otherwise, we allow for the thread executing lf_advlockasync() to put new pending entry after state->ls_lock is dropped in lf_purgelocks(). MFC r193931: Do not leak the state->ls_lock after VI_DOOMED check introduced in the r192683. MFC r194356: Decrement state->ls_threads when vnode appeared to be doomed. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/kern_lockf.c Modified: stable/7/sys/kern/kern_lockf.c == --- stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:41:38 2009 (r194692) +++ stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:47:42 2009 (r194693) @@ -633,7 +633,23 @@ lf_advlockasync(struct vop_advlockasync_ } sx_xlock(&state->ls_lock); - switch(ap->a_op) { + /* +* Recheck the doomed vnode after state->ls_lock is +* locked. lf_purgelocks() requires that no new threads add +* pending locks when vnode is marked by VI_DOOMED flag. +*/ + VI_LOCK(vp); + if (vp->v_iflag & VI_DOOMED) { + state->ls_threads--; + wakeup(state); + VI_UNLOCK(vp); + sx_xunlock(&state->ls_lock); + lf_free_lock(lock); + return (ENOENT); + } + VI_UNLOCK(vp); + + switch (ap->a_op) { case F_SETLK: error = lf_setlock(state, lock, vp, ap->a_cookiep); break; @@ -755,8 +771,11 @@ lf_purgelocks(struct vnode *vp, struct l * the remaining locks. */ VI_LOCK(vp); + KASSERT(vp->v_iflag & VI_DOOMED, + ("lf_purgelocks: vp %p has not vgone yet", vp)); state = *statep; if (state) { + *statep = NULL; state->ls_threads++; VI_UNLOCK(vp); @@ -789,7 +808,6 @@ lf_purgelocks(struct vnode *vp, struct l VI_LOCK(vp); while (state->ls_threads > 1) msleep(state, VI_MTX(vp), 0, "purgelocks", 0); - *statep = 0; VI_UNLOCK(vp); /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194694 - in stable/7/sys: . contrib/pf kern
Author: kib Date: Tue Jun 23 10:49:55 2009 New Revision: 194694 URL: http://svn.freebsd.org/changeset/base/194694 Log: MFC r192684: In lf_purgelocks(), assert that state->ls_pending is empty after we weeded out threads, and clean ls_active instead of ls_pending. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/kern_lockf.c Modified: stable/7/sys/kern/kern_lockf.c == --- stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:47:42 2009 (r194693) +++ stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:49:55 2009 (r194694) @@ -816,7 +816,9 @@ lf_purgelocks(struct vnode *vp, struct l * above). We don't need to bother locking since we * are the last thread using this state structure. */ - LIST_FOREACH_SAFE(lock, &state->ls_pending, lf_link, nlock) { + KASSERT(LIST_EMPTY(&state->ls_pending), + ("lock pending for %p", state)); + LIST_FOREACH_SAFE(lock, &state->ls_active, lf_link, nlock) { LIST_REMOVE(lock, lf_link); lf_free_lock(lock); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194695 - in stable/7/sys: . contrib/pf kern sys
Author: kib Date: Tue Jun 23 10:55:21 2009 New Revision: 194695 URL: http://svn.freebsd.org/changeset/base/194695 Log: MFC r192685: The advisory lock may be activated or activated and removed during the sleep waiting for conditions when the lock may be granted. To prevent lf_setlock() from accessing possibly freed memory, add reference counting to the struct lockf_entry. Bump refcount around the sleep. Make lf_free_lock() return non-zero when structure was freed, and use this after the sleep to return EINTR to the caller. The error code might need a clarification, but we cannot return success to usermode, since the lock is not owned anymore. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/kern_lockf.c stable/7/sys/sys/lockf.h Modified: stable/7/sys/kern/kern_lockf.c == --- stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:49:55 2009 (r194694) +++ stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:55:21 2009 (r194695) @@ -106,7 +106,7 @@ static int lf_owner_matches(struct lock int); static struct lockf_entry * lf_alloc_lock(struct lock_owner *); -static void lf_free_lock(struct lockf_entry *); +static int lf_free_lock(struct lockf_entry *); static int lf_clearlock(struct lockf *, struct lockf_entry *); static int lf_overlaps(struct lockf_entry *, struct lockf_entry *); static int lf_blocks(struct lockf_entry *, struct lockf_entry *); @@ -347,9 +347,13 @@ lf_alloc_lock(struct lock_owner *lo) return (lf); } -static void +static int lf_free_lock(struct lockf_entry *lock) { + + KASSERT(lock->lf_refs > 0, ("lockf_entry negative ref count %p", lock)); + if (--lock->lf_refs > 0) + return (0); /* * Adjust the lock_owner reference count and * reclaim the entry if this is the last lock @@ -394,6 +398,7 @@ lf_free_lock(struct lockf_entry *lock) printf("Freed lock %p\n", lock); #endif free(lock, M_LOCKF); + return (1); } /* @@ -540,6 +545,7 @@ lf_advlockasync(struct vop_advlockasync_ * the lf_lock_owners_lock tax twice. */ lock = lf_alloc_lock(NULL); + lock->lf_refs = 1; lock->lf_start = start; lock->lf_end = end; lock->lf_owner = lo; @@ -1450,7 +1456,13 @@ lf_setlock(struct lockf *state, struct l goto out; } + lock->lf_refs++; error = sx_sleep(lock, &state->ls_lock, priority, lockstr, 0); + if (lf_free_lock(lock)) { + error = EINTR; + goto out; + } + /* * We may have been awakened by a signal and/or by a * debugger continuing us (in which cases we must @@ -1812,6 +1824,7 @@ lf_split(struct lockf *state, struct loc */ splitlock = lf_alloc_lock(lock1->lf_owner); memcpy(splitlock, lock1, sizeof *splitlock); + splitlock->lf_refs = 1; if (splitlock->lf_flags & F_REMOTE) vref(splitlock->lf_vnode); Modified: stable/7/sys/sys/lockf.h == --- stable/7/sys/sys/lockf.hTue Jun 23 10:49:55 2009(r194694) +++ stable/7/sys/sys/lockf.hTue Jun 23 10:55:21 2009(r194695) @@ -80,6 +80,7 @@ struct lockf_entry { LIST_ENTRY(lockf_entry) lf_link; /* (s) Linkage for lock lists */ struct lockf_edge_list lf_outedges; /* (s) list of out-edges */ struct lockf_edge_list lf_inedges; /* (s) list of out-edges */ + int lf_refs;/* (s) ref count */ }; LIST_HEAD(lockf_entry_list, lockf_entry); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194696 - in stable/7/sys: . contrib/pf gnu/fs/ext2fs kern ufs/ufs
Author: kib Date: Tue Jun 23 10:59:59 2009 New Revision: 194696 URL: http://svn.freebsd.org/changeset/base/194696 Log: MFC r194296: Do not use casts (int *)0 and (struct thread *)0 for the arguments of vn_rdwr, use NULL. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/gnu/fs/ext2fs/ext2_lookup.c stable/7/sys/gnu/fs/ext2fs/ext2_vnops.c stable/7/sys/kern/kern_acct.c stable/7/sys/ufs/ufs/ufs_lookup.c stable/7/sys/ufs/ufs/ufs_vnops.c Modified: stable/7/sys/gnu/fs/ext2fs/ext2_lookup.c == --- stable/7/sys/gnu/fs/ext2fs/ext2_lookup.cTue Jun 23 10:55:21 2009 (r194695) +++ stable/7/sys/gnu/fs/ext2fs/ext2_lookup.cTue Jun 23 10:59:59 2009 (r194696) @@ -1049,8 +1049,8 @@ ext2_checkpath(source, target, cred) } error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf, sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE, - IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, (int *)0, - (struct thread *)0); + IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, NULL, + NULL); if (error != 0) break; namlen = dirbuf.dotdot_type;/* like ufs little-endian */ Modified: stable/7/sys/gnu/fs/ext2fs/ext2_vnops.c == --- stable/7/sys/gnu/fs/ext2fs/ext2_vnops.c Tue Jun 23 10:55:21 2009 (r194695) +++ stable/7/sys/gnu/fs/ext2fs/ext2_vnops.c Tue Jun 23 10:59:59 2009 (r194696) @@ -1057,8 +1057,7 @@ abortit: error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf, sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, - tcnp->cn_cred, NOCRED, (int *)0, - (struct thread *)0); + tcnp->cn_cred, NOCRED, NULL, NULL); if (error == 0) { /* Like ufs little-endian: */ namlen = dirbuf.dotdot_type; @@ -1075,8 +1074,7 @@ abortit: (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_SYNC | IO_NOMACCHECK, tcnp->cn_cred, - NOCRED, (int *)0, - (struct thread *)0); + NOCRED, NULL, NULL); cache_purge(fdvp); } } @@ -1212,7 +1210,7 @@ ext2_mkdir(ap) error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate, sizeof (dirtemplate), (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_SYNC | IO_NOMACCHECK, cnp->cn_cred, NOCRED, - (int *)0, (struct thread *)0); + NULL, NULL); if (error) { dp->i_nlink--; dp->i_flag |= IN_CHANGE; @@ -1349,7 +1347,7 @@ ext2_symlink(ap) } else error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, - ap->a_cnp->cn_cred, NOCRED, (int *)0, (struct thread *)0); + ap->a_cnp->cn_cred, NOCRED, NULL, NULL); if (error) vput(vp); return (error); Modified: stable/7/sys/kern/kern_acct.c == --- stable/7/sys/kern/kern_acct.c Tue Jun 23 10:55:21 2009 (r194695) +++ stable/7/sys/kern/kern_acct.c Tue Jun 23 10:59:59 2009 (r194696) @@ -438,7 +438,7 @@ acct_process(struct thread *td) VOP_LEASE(acct_vp, td, acct_cred, LEASE_WRITE); ret = vn_rdwr(UIO_WRITE, acct_vp, (caddr_t)&acct, sizeof (acct), (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, acct_cred, NOCRED, - (int *)0, td); + NULL, td); VFS_UNLOCK_GIANT(vfslocked); sx_sunlock(&acct_sx); return (ret); Modified: stable/7/sys/ufs/ufs/ufs_lookup.c == --- stable/7/sys/ufs/ufs/ufs_lookup.c Tue Jun 23 10:55:21 2009 (r194695) +++ stable/7/sys/ufs/ufs/ufs_lookup.c Tue Jun 23 10:59:59 2009 (r194696) @@ -1248,7 +1248,7 @@ ufs_dir_dd_ino(struct vnode *vp, struct return (ENOTDIR); error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf, sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE, - IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, (int *)0, NULL); + IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, NULL,
svn commit: r194697 - head/sys/kern
Author: pho Date: Tue Jun 23 11:29:54 2009 New Revision: 194697 URL: http://svn.freebsd.org/changeset/base/194697 Log: vn_open_cred() needs a non NULL ucred pointer Reviewed by: kib Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c == --- head/sys/kern/kern_sig.cTue Jun 23 10:59:59 2009(r194696) +++ head/sys/kern/kern_sig.cTue Jun 23 11:29:54 2009(r194697) @@ -2941,7 +2941,7 @@ restart: NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, name, td); flags = O_CREAT | FWRITE | O_NOFOLLOW; error = vn_open_cred(&nd, &flags, S_IRUSR | S_IWUSR, VN_OPEN_NOAUDIT, - NULL, NULL); + cred, NULL); if (error) { #ifdef AUDIT audit_proc_coredump(td, name, error); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194699 - head/sys/netgraph
Author: mav Date: Tue Jun 23 12:30:21 2009 New Revision: 194699 URL: http://svn.freebsd.org/changeset/base/194699 Log: Mark ng_ether node hooks as HI_STACK. It is usually the last point when netgraph may unroll the call stack, and I have found that in some cases 2K guarantied there for i386 may be not enough for NIC driver and BPF. Modified: head/sys/netgraph/ng_ether.c Modified: head/sys/netgraph/ng_ether.c == --- head/sys/netgraph/ng_ether.cTue Jun 23 11:41:58 2009 (r194698) +++ head/sys/netgraph/ng_ether.cTue Jun 23 12:30:21 2009 (r194699) @@ -435,7 +435,7 @@ ng_ether_newhook(node_p node, hook_p hoo /* Disable hardware checksums while 'upper' hook is connected */ if (hookptr == &priv->upper) priv->ifp->if_hwassist = 0; - + NG_HOOK_HI_STACK(hook); /* OK */ *hookptr = hook; return (0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194687 - head/sys/dev/firewire
On Tue, 23.06.2009 at 11:30:58 +0200, Roman Divacky wrote: > On Tue, Jun 23, 2009 at 09:02:24AM +, Roman Divacky wrote: > > Log: > > Fix what seems to be an obvious typo preventing the body of the > > if statement to ever be executed. > > what I meant was the the goto out; is executed every time. :( Better than staying inside all the time, no? *scnr* Cheers, Ulrich Spörlein ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194700 - head/sys/net
Author: bz Date: Tue Jun 23 13:16:16 2009 New Revision: 194700 URL: http://svn.freebsd.org/changeset/base/194700 Log: Remove duplicate #include from the middle of the file. Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Tue Jun 23 12:30:21 2009(r194699) +++ head/sys/net/if.c Tue Jun 23 13:16:16 2009(r194700) @@ -1727,7 +1727,6 @@ done: return (ifa); } -#include #include /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194701 - in head: share/man/man4 sys/conf sys/dev/acpi_support sys/i386/conf sys/modules/acpi sys/modules/acpi/acpi_hp sys/modules/acpi/acpi_wmi
Author: rpaulo Date: Tue Jun 23 13:17:25 2009 New Revision: 194701 URL: http://svn.freebsd.org/changeset/base/194701 Log: * Driver for ACPI WMI (Windows Management Instrumentation) * Driver for ACPI HP extra functionations, which required ACPI WMI driver. Submitted by: Michael Approved by: re MFC after:2 weeks Added: head/share/man/man4/acpi_hp.4 (contents, props changed) head/share/man/man4/acpi_wmi.4 (contents, props changed) head/sys/dev/acpi_support/acpi_hp.c (contents, props changed) head/sys/dev/acpi_support/acpi_wmi.c (contents, props changed) head/sys/dev/acpi_support/acpi_wmi_if.m (contents, props changed) head/sys/modules/acpi/acpi_hp/ head/sys/modules/acpi/acpi_hp/Makefile (contents, props changed) head/sys/modules/acpi/acpi_wmi/ head/sys/modules/acpi/acpi_wmi/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/kmod.mk head/sys/i386/conf/NOTES head/sys/modules/acpi/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileTue Jun 23 13:16:16 2009 (r194700) +++ head/share/man/man4/MakefileTue Jun 23 13:17:25 2009 (r194701) @@ -7,12 +7,14 @@ MAN= aac.4 \ ${_acpi_asus.4} \ ${_acpi_dock.4} \ ${_acpi_fujitsu.4} \ + ${_acpi_hp.4} \ ${_acpi_ibm.4} \ ${_acpi_panasonic.4} \ ${_acpi_sony.4} \ acpi_thermal.4 \ ${_acpi_toshiba.4} \ acpi_video.4 \ + ${_acpi_wmi.4} \ adv.4 \ adw.4 \ ae.4 \ @@ -594,10 +596,12 @@ _acpi_aiboost.4=acpi_aiboost.4 _acpi_asus.4= acpi_asus.4 _acpi_dock.4= acpi_dock.4 _acpi_fujitsu.4=acpi_fujitsu.4 +_acpi_hp.4=acpi_hp.4 _acpi_ibm.4= acpi_ibm.4 _acpi_panasonic.4=acpi_panasonic.4 _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 +_acpi_wmi.4= acpi_wmi.4 _amdsmb.4= amdsmb.4 _amdtemp.4=amdtemp.4 _asmc.4= asmc.4 Added: head/share/man/man4/acpi_hp.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/acpi_hp.4 Tue Jun 23 13:17:25 2009 (r194701) @@ -0,0 +1,546 @@ +.\" Copyright (c) 2009 Michael Gmelin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 21, 2009 +.Dt ACPI_HP 4 i386 +.Os +.Sh NAME +.Nm acpi_hp +.Nd "ACPI extras driver for HP laptops" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi_hp" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +acpi_hp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for ACPI-controlled features found on HP laptops +that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). +.Pp +The main purpose of this driver is to provide an interface, +accessible via +.Xr sysctl 8 , +.Xr devd 8 and +.Xr devfs 8 , +through which applications can determine and change the status of +various laptop components and BIOS settings. +.Pp +.Ss Xr devd 8 Ss Events +Devd events received by +.Xr devd 8 +provide the following information: +.Pp +.Bl -tag -width "subsystem" -offset indent -compact +.It system +.Qq Li ACPI +.It subsystem +.Qq Li HP +.It type +The source of the event in the ACPI namespace. +The value depends on the model. +.It notify +E
svn commit: r194702 - head/sys/netinet6
Author: bz Date: Tue Jun 23 13:22:19 2009 New Revision: 194702 URL: http://svn.freebsd.org/changeset/base/194702 Log: in6_rtqdrain() has been unused. Cleanup. As this was the only consumer of net/route.h left remove that as well. Modified: head/sys/netinet6/in6_rmx.c Modified: head/sys/netinet6/in6_rmx.c == --- head/sys/netinet6/in6_rmx.c Tue Jun 23 13:17:25 2009(r194701) +++ head/sys/netinet6/in6_rmx.c Tue Jun 23 13:22:19 2009(r194702) @@ -90,7 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -409,28 +408,6 @@ in6_mtutimo(void *rock) CURVNET_RESTORE(); } -#if 0 -void -in6_rtqdrain(void) -{ - INIT_VNET_NET(curvnet); - struct radix_node_head *rnh; - struct rtqk_arg arg; - - rnh = rt_tables_get_rnh(0, AF_INET6); - if (rnh == NULL) - panic("%s: rnh == NULL", __func__); - arg.found = arg.killed = 0; - arg.rnh = rnh; - arg.nextstop = 0; - arg.draining = 1; - arg.updating = 0; - RADIX_NODE_HEAD_LOCK(rnh); - rnh->rnh_walktree(rnh, in6_rtqkill, &arg); - RADIX_NODE_HEAD_UNLOCK(rnh); -} -#endif - /* * Initialize our routing tree. * XXX MRT When off == 0, we are being called from vfs_export.c ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194672 - in head/sys: kern netinet sys
Andre Oppermann wrote: > Add soreceive_stream(), an optimized version of soreceive() for > stream (TCP) sockets. <> > > Testers, especially with 10GigE gear, are welcome. Awesome! On my very weak, ancient consumer grade athlon64 test machine (AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (2050.16-MHz K8-class CPU)) using mxge and LRO, I see a roughly 700Mb/s increase in bandwidth from 7.7Gb/s to 8.4Gb/s. For what its worth, this finally gives FreeBSD performance parity with Linux on this hardware for 10GbE single-stream receive. TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to venice-my (192.168.1.15) port 0 AF_INET Recv SendSend Utilization Service Demand Socket Socket Message Elapsed Send Recv SendRecv Size SizeSize Time Throughput localremote local remote bytes bytes bytessecs.10^6bits/s % S % C us/KB us/KB before: 65536 65536 6553660.01 7709.14 13.3079.600.283 1.692 after: 65536 65536 6553660.01 8403.86 14.6681.630.286 1.592 This is consistent across runs. Lockstat output for 10 seconds in the middle of a run is very interesting and shows a huge reduction in lock contention. Before: Adaptive mutex spin: 369333 events in 10.017 seconds (36869 events/sec) Count indv cuml rcnt nsec Lock Caller --- 303685 82% 82% 0.00 1080 0xff000f2f98d0 recvit+0x21 63847 17% 100% 0.00 25 0xff000f2f98d0 ip_input+0xad 1788 0% 100% 0.00 172 0xff0001c57c08 intr_event_execute_handlers+0x100 8 0% 100% 0.00 389 vm_page_queue_mtx trap+0x4ce 1 0% 100% 0.00 30 0xff8000251598 ithread_loop+0x8e 1 0% 100% 0.00 720 0xff8000251598 uhub_read_port_status+0x2d 1 0% 100% 0.00 1639 0xff000f477190 vm_fault+0x112 1 0% 100% 0.001 0xff001fecce10 mxge_intr+0x425 1 0% 100% 0.00 1332 0xff0001845600 clnt_reconnect_call+0x105 --- Adaptive mutex block: 89 events in 10.017 seconds (9 events/sec) Count indv cuml rcnt nsec Lock Caller --- 83 93% 93% 0.0020908 0xff000f2f98d0 tcp_input+0xd96 3 3% 97% 0.0045234 0xff8000259f08 fork_exit+0x118 3 3% 100% 0.0044862 0xff8000251598 fork_exit+0x118 --- After: Adaptive mutex spin: 105102 events in 10.020 seconds (10490 events/sec) Count indv cuml rcnt nsec Lock Caller --- 75886 72% 72% 0.00 2860 0xff0001fdde20 ip_input+0xad 28418 27% 99% 0.00 1355 0xff0001fdde20 recvit+0x21 779 1% 100% 0.00 171 0xff0001642808 intr_event_execute_handlers+0x100 7 0% 100% 0.00 670 vm_page_queue_mtx trap+0x4ce 5 0% 100% 0.00 46 0xff001fecce10 mxge_intr+0x425 1 0% 100% 0.00 105 vm_page_queue_mtx trap_pfault+0x142 1 0% 100% 0.00 568 0xff8000251598 usb_process+0xd8 1 0% 100% 0.00 880 0xff8000251598 ithread_loop+0x8e 1 0% 100% 0.00 233 0xff001a224578 vm_fault+0x112 1 0% 100% 0.00 60 0xff001a1759b8 syscall+0x28f 1 0% 100% 0.00 809 0xff0001846000 clnt_reconnect_call+0x105 1 0% 100% 0.00 1139 0xff0001fdde20 kern_recvit+0x1d4 --- Adaptive mutex block: 88 events in 10.020 seconds (9 events/sec) Count indv cuml rcnt nsec Lock Caller --- 80 91% 91% 0.0025891 0xff0001fdde20 tcp_input+0xd96 3 3% 94% 0.0045979 0xff8000259f08 fork_exit+0x118 3 3% 98% 0.0045886 0xff8000251598 fork_exit+0x118 1 1% 99% 0.0038254 0xff8000259f08 intr_event_execute_handlers+0x100 1 1% 100% 0.0079858 0xff001a1760f8 kern_wait+0x7ee --- Drew ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194703 - head/lib/libc/stdlib
Author: ed Date: Tue Jun 23 14:10:46 2009 New Revision: 194703 URL: http://svn.freebsd.org/changeset/base/194703 Log: Simplify. We can just use .sinclude here. Submitted by: Christoph Mallon Modified: head/lib/libc/stdlib/Makefile.inc Modified: head/lib/libc/stdlib/Makefile.inc == --- head/lib/libc/stdlib/Makefile.inc Tue Jun 23 13:22:19 2009 (r194702) +++ head/lib/libc/stdlib/Makefile.inc Tue Jun 23 14:10:46 2009 (r194703) @@ -16,9 +16,7 @@ MISRCS+=_Exit.c a64l.c abort.c abs.c ate SYM_MAPS+= ${.CURDIR}/stdlib/Symbol.map # machine-dependent stdlib sources -.if exists(${.CURDIR}/${MACHINE_ARCH}/stdlib/Makefile.inc) -.include "${.CURDIR}/${MACHINE_ARCH}/stdlib/Makefile.inc" -.endif +.sinclude "${.CURDIR}/${MACHINE_ARCH}/stdlib/Makefile.inc" MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 bsearch.3 \ div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194704 - in head/lib/libc: arm/stdlib ia64/stdlib mips/stdlib sparc64/stdlib
Author: ed Date: Tue Jun 23 14:11:41 2009 New Revision: 194704 URL: http://svn.freebsd.org/changeset/base/194704 Log: Remove unneeded stdlib directories. It's not necessary to add stdlib directories for each architecture, even if the architecture doesn't implement any files of its own. Submitted by: Christoph Mallon Deleted: head/lib/libc/arm/stdlib/ head/lib/libc/ia64/stdlib/ head/lib/libc/mips/stdlib/ head/lib/libc/sparc64/stdlib/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194705 - head/libexec/rtld-elf
Author: ed Date: Tue Jun 23 14:12:49 2009 New Revision: 194705 URL: http://svn.freebsd.org/changeset/base/194705 Log: Fix a typo in the same comment, one line below. Submitted by: bf1783 googlemail com Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cTue Jun 23 14:11:41 2009 (r194704) +++ head/libexec/rtld-elf/rtld.cTue Jun 23 14:12:49 2009 (r194705) @@ -1309,7 +1309,7 @@ init_rtld(caddr_t mapbase) * Conjure up an Obj_Entry structure for the dynamic linker. * * The "path" member can't be initialized yet because string constants - * cannot yet be acessed. Below we will set it correctly. + * cannot yet be accessed. Below we will set it correctly. */ memset(&objtmp, 0, sizeof(objtmp)); objtmp.path = NULL; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194706 - head/sys/dev/if_ndis
Author: cokane Date: Tue Jun 23 14:37:07 2009 New Revision: 194706 URL: http://svn.freebsd.org/changeset/base/194706 Log: Code cleanup by moving some repetitive code into an ndis_get_bssid_list helper function. Also, add ieee80211_announce() call for bootverbose case. Submitted by: Paul B. Mahol Modified: head/sys/dev/if_ndis/if_ndis.c Modified: head/sys/dev/if_ndis/if_ndis.c == --- head/sys/dev/if_ndis/if_ndis.c Tue Jun 23 14:12:49 2009 (r194705) +++ head/sys/dev/if_ndis/if_ndis.c Tue Jun 23 14:37:07 2009 (r194706) @@ -183,6 +183,8 @@ static void ndis_init (void *); static void ndis_stop (struct ndis_softc *); static int ndis_ifmedia_upd(struct ifnet *); static void ndis_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static int ndis_get_bssid_list (struct ndis_softc *, + ndis_80211_bssid_list_ex **); static int ndis_get_assoc (struct ndis_softc *, ndis_wlan_bssid_ex **); static int ndis_probe_offload (struct ndis_softc *); static int ndis_set_offload(struct ndis_softc *); @@ -943,6 +945,9 @@ got_crypto: ic->ic_update_mcast = ndis_update_mcast; ic->ic_update_promisc = ndis_update_promisc; + if (bootverbose) + ieee80211_announce(ic); + } else { ifmedia_init(&sc->ifmedia, IFM_IMASK, ndis_ifmedia_upd, ndis_ifmedia_sts); @@ -2621,6 +2626,36 @@ ndis_auth_and_assoc(sc, vap) } static int +ndis_get_bssid_list(sc, bl) + struct ndis_softc *sc; + ndis_80211_bssid_list_ex**bl; +{ + int len, error; + + len = sizeof(uint32_t) + (sizeof(ndis_wlan_bssid_ex) * 16); + *bl = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO); + if (*bl == NULL) + return (ENOMEM); + + error = ndis_get_info(sc, OID_802_11_BSSID_LIST, *bl, &len); + if (error == ENOSPC) { + free(*bl, M_DEVBUF); + *bl = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO); + if (*bl == NULL) + return (ENOMEM); + + error = ndis_get_info(sc, OID_802_11_BSSID_LIST, *bl, &len); + } + if (error) { + DPRINTF(("%s: failed to read\n", __func__)); + free(*bl, M_DEVBUF); + return (error); + } + + return (0); +} + +static int ndis_get_assoc(sc, assoc) struct ndis_softc *sc; ndis_wlan_bssid_ex **assoc; @@ -2647,25 +2682,9 @@ ndis_get_assoc(sc, assoc) vap = TAILQ_FIRST(&ic->ic_vaps); ni = vap->iv_bss; - len = sizeof(uint32_t) + (sizeof(ndis_wlan_bssid_ex) * 16); - bl = malloc(len, M_TEMP, M_NOWAIT | M_ZERO); - if (bl == NULL) - return (ENOMEM); - - error = ndis_get_info(sc, OID_802_11_BSSID_LIST, bl, &len); - if (error == ENOSPC) { - free(bl, M_TEMP); - bl = malloc(len, M_TEMP, M_NOWAIT | M_ZERO); - if (bl == NULL) - return (ENOMEM); - - error = ndis_get_info(sc, OID_802_11_BSSID_LIST, bl, &len); - } - if (error) { - free(bl, M_TEMP); - device_printf(sc->ndis_dev, "bssid_list failed\n"); + error = ndis_get_bssid_list(sc, &bl); + if (error) return (error); - } bs = (ndis_wlan_bssid_ex *)&bl->nblx_bssid[0]; for (i = 0; i < bl->nblx_items; i++) { @@ -3281,7 +3300,7 @@ ndis_scan_results(struct ndis_softc *sc) struct ieee80211_frame wh; struct ieee80211_channel *saved_chan; int i, j; - int error, len, rssi, noise, freq, chanflag; + int rssi, noise, freq, chanflag; uint8_t ssid[2+IEEE80211_NWID_LEN]; uint8_t rates[2+IEEE80211_RATE_MAXSIZE]; uint8_t *frm, *efrm; @@ -3291,26 +3310,9 @@ ndis_scan_results(struct ndis_softc *sc) saved_chan = ic->ic_curchan; noise = -96; - len = sizeof(uint32_t) + (sizeof(ndis_wlan_bssid_ex) * 16); - bl = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO); - if (bl == NULL) + if (ndis_get_bssid_list(sc, &bl)) return; - error = ndis_get_info(sc, OID_802_11_BSSID_LIST, bl, &len); - if (error == ENOSPC) { - free(bl, M_DEVBUF); - bl = malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO); - if (bl == NULL) - return; - - error = ndis_get_info(sc, OID_802_11_BSSID_LIST, bl, &len); - } - if (error) { - DPRINTF(("%s: failed to read\n", __func__)); - free(bl, M_DEVBUF); - return;; - } - DPRINTF(("%s: %d results\n", __func__, bl->nblx_items)); wb = &bl->nblx_bssid[0]; for (i = 0; i < bl->nblx_items; i++) { __
svn commit: r194707 - head/sys/kern
Author: jamie Date: Tue Jun 23 14:39:21 2009 New Revision: 194707 URL: http://svn.freebsd.org/changeset/base/194707 Log: Remove unnecessary/redundant includes. Approved by: bz (mentor) Modified: head/sys/kern/kern_cpuset.c head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/kern_cpuset.c == --- head/sys/kern/kern_cpuset.c Tue Jun 23 14:37:07 2009(r194706) +++ head/sys/kern/kern_cpuset.c Tue Jun 23 14:39:21 2009(r194707) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Tue Jun 23 14:37:07 2009(r194706) +++ head/sys/kern/uipc_usrreq.c Tue Jun 23 14:39:21 2009(r194707) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194708 - head/usr.sbin/jail
Author: jamie Date: Tue Jun 23 14:39:51 2009 New Revision: 194708 URL: http://svn.freebsd.org/changeset/base/194708 Log: Remove obsolete comment describing how the command line is no longer parsed. Approved by: bz (mentor) Modified: head/usr.sbin/jail/jail.c Modified: head/usr.sbin/jail/jail.c == --- head/usr.sbin/jail/jail.c Tue Jun 23 14:39:21 2009(r194707) +++ head/usr.sbin/jail/jail.c Tue Jun 23 14:39:51 2009(r194708) @@ -210,11 +210,6 @@ main(int argc, char **argv) if (uflag) GET_USER_INFO; - /* -* If the first argument (path) starts with a slash, and the third -* argument (IP address) starts with a digit, it is likely to be -* an old-style fixed-parameter command line. -*/ if (jailname) set_param("name", jailname); if (securelevel) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194709 - head/usr.sbin/jexec
Author: jamie Date: Tue Jun 23 14:40:08 2009 New Revision: 194709 URL: http://svn.freebsd.org/changeset/base/194709 Log: Whitespace fix. Approved by: bz (mentor) Modified: head/usr.sbin/jexec/jexec.c Modified: head/usr.sbin/jexec/jexec.c == --- head/usr.sbin/jexec/jexec.c Tue Jun 23 14:39:51 2009(r194708) +++ head/usr.sbin/jexec/jexec.c Tue Jun 23 14:40:08 2009(r194709) @@ -75,9 +75,9 @@ main(int argc, char *argv[]) int ch, ngroups, uflag, Uflag; long ngroups_max; char *ep, *username; + ch = uflag = Uflag = 0; username = NULL; - ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; if ((groups = malloc(sizeof(gid_t) * ngroups_max)) == NULL) err(1, "malloc"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194710 - in vendor/llvm/dist: include/llvm include/llvm/Analysis include/llvm/CodeGen include/llvm/Support include/llvm/Target lib/Analysis lib/CodeGen lib/CodeGen/SelectionDAG lib/Exe...
Author: ed Date: Tue Jun 23 14:50:01 2009 New Revision: 194710 URL: http://svn.freebsd.org/changeset/base/194710 Log: Import LLVM r73954. Added: vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/test/Analysis/ScalarEvolution/pointer-sign-bits.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/trip-count7.ll vendor/llvm/dist/test/CodeGen/ARM/2008-09-14-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-02-ISelCrash.ll vendor/llvm/dist/test/CodeGen/ARM/2009-06-22-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/ARM/arm-frameaddr.ll vendor/llvm/dist/test/CodeGen/ARM/neon_arith1.ll vendor/llvm/dist/test/CodeGen/ARM/neon_ld1.ll vendor/llvm/dist/test/CodeGen/ARM/neon_ld2.ll vendor/llvm/dist/test/CodeGen/ARM/vaba.ll vendor/llvm/dist/test/CodeGen/ARM/vabal.ll vendor/llvm/dist/test/CodeGen/ARM/vabd.ll vendor/llvm/dist/test/CodeGen/ARM/vabdl.ll vendor/llvm/dist/test/CodeGen/ARM/vabs.ll vendor/llvm/dist/test/CodeGen/ARM/vacge.ll vendor/llvm/dist/test/CodeGen/ARM/vacgt.ll vendor/llvm/dist/test/CodeGen/ARM/vadd.ll vendor/llvm/dist/test/CodeGen/ARM/vaddhn.ll vendor/llvm/dist/test/CodeGen/ARM/vaddl.ll vendor/llvm/dist/test/CodeGen/ARM/vaddw.ll vendor/llvm/dist/test/CodeGen/ARM/vand.ll vendor/llvm/dist/test/CodeGen/ARM/vbic.ll vendor/llvm/dist/test/CodeGen/ARM/vbsl.ll vendor/llvm/dist/test/CodeGen/ARM/vceq.ll vendor/llvm/dist/test/CodeGen/ARM/vcge.ll vendor/llvm/dist/test/CodeGen/ARM/vcgt.ll vendor/llvm/dist/test/CodeGen/ARM/vcls.ll vendor/llvm/dist/test/CodeGen/ARM/vclz.ll vendor/llvm/dist/test/CodeGen/ARM/vcnt.ll vendor/llvm/dist/test/CodeGen/ARM/vcvt.ll vendor/llvm/dist/test/CodeGen/ARM/vcvt_n.ll vendor/llvm/dist/test/CodeGen/ARM/vdup.ll vendor/llvm/dist/test/CodeGen/ARM/vdup_lane.ll vendor/llvm/dist/test/CodeGen/ARM/veor.ll vendor/llvm/dist/test/CodeGen/ARM/vfcmp.ll vendor/llvm/dist/test/CodeGen/ARM/vget_lane.ll vendor/llvm/dist/test/CodeGen/ARM/vhadd.ll vendor/llvm/dist/test/CodeGen/ARM/vhsub.ll vendor/llvm/dist/test/CodeGen/ARM/vicmp.ll vendor/llvm/dist/test/CodeGen/ARM/vmax.ll vendor/llvm/dist/test/CodeGen/ARM/vmin.ll vendor/llvm/dist/test/CodeGen/ARM/vmla.ll vendor/llvm/dist/test/CodeGen/ARM/vmlal.ll vendor/llvm/dist/test/CodeGen/ARM/vmls.ll vendor/llvm/dist/test/CodeGen/ARM/vmlsl.ll vendor/llvm/dist/test/CodeGen/ARM/vmov.ll vendor/llvm/dist/test/CodeGen/ARM/vmovl.ll vendor/llvm/dist/test/CodeGen/ARM/vmovn.ll vendor/llvm/dist/test/CodeGen/ARM/vmul.ll vendor/llvm/dist/test/CodeGen/ARM/vmull.ll vendor/llvm/dist/test/CodeGen/ARM/vmvn.ll vendor/llvm/dist/test/CodeGen/ARM/vneg.ll vendor/llvm/dist/test/CodeGen/ARM/vorn.ll vendor/llvm/dist/test/CodeGen/ARM/vorr.ll vendor/llvm/dist/test/CodeGen/ARM/vpadal.ll vendor/llvm/dist/test/CodeGen/ARM/vpadd.ll vendor/llvm/dist/test/CodeGen/ARM/vpaddl.ll vendor/llvm/dist/test/CodeGen/ARM/vpmax.ll vendor/llvm/dist/test/CodeGen/ARM/vpmin.ll vendor/llvm/dist/test/CodeGen/ARM/vqabs.ll vendor/llvm/dist/test/CodeGen/ARM/vqadd.ll vendor/llvm/dist/test/CodeGen/ARM/vqdmlal.ll vendor/llvm/dist/test/CodeGen/ARM/vqdmlsl.ll vendor/llvm/dist/test/CodeGen/ARM/vqdmulh.ll vendor/llvm/dist/test/CodeGen/ARM/vqdmull.ll vendor/llvm/dist/test/CodeGen/ARM/vqmovn.ll vendor/llvm/dist/test/CodeGen/ARM/vqneg.ll vendor/llvm/dist/test/CodeGen/ARM/vqrshl.ll vendor/llvm/dist/test/CodeGen/ARM/vqrshrn.ll vendor/llvm/dist/test/CodeGen/ARM/vqshl.ll vendor/llvm/dist/test/CodeGen/ARM/vqshrn.ll vendor/llvm/dist/test/CodeGen/ARM/vqsub.ll vendor/llvm/dist/test/CodeGen/ARM/vraddhn.ll vendor/llvm/dist/test/CodeGen/ARM/vrecpe.ll vendor/llvm/dist/test/CodeGen/ARM/vrecps.ll vendor/llvm/dist/test/CodeGen/ARM/vrhadd.ll vendor/llvm/dist/test/CodeGen/ARM/vrshl.ll vendor/llvm/dist/test/CodeGen/ARM/vrshrn.ll vendor/llvm/dist/test/CodeGen/ARM/vrsqrte.ll vendor/llvm/dist/test/CodeGen/ARM/vrsqrts.ll vendor/llvm/dist/test/CodeGen/ARM/vrsubhn.ll vendor/llvm/dist/test/CodeGen/ARM/vset_lane.ll vendor/llvm/dist/test/CodeGen/ARM/vshift.ll vendor/llvm/dist/test/CodeGen/ARM/vshiftins.ll vendor/llvm/dist/test/CodeGen/ARM/vshl.ll vendor/llvm/dist/test/CodeGen/ARM/vshll.ll vendor/llvm/dist/test/CodeGen/ARM/vshrn.ll vendor/llvm/dist/test/CodeGen/ARM/vsra.ll vendor/llvm/dist/test/CodeGen/ARM/vsub.ll vendor/llvm/dist/test/CodeGen/ARM/vsubhn.ll vendor/llvm/dist/test/CodeGen/ARM/vsubl.ll vendor/llvm/dist/test/CodeGen/ARM/vsubw.ll vendor/llvm/dist/test/CodeGen/ARM/vtst.ll Deleted: vendor/llvm/dist/test/CodeGen/ARM/2008-09-14-CoaleserBug.ll Modified: vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/LoopVR.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpander.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/CodeGen/BinaryObject.h vendor/llvm/dist/include/llvm/Intrinsics.td ve
svn commit: r194711 - in vendor/clang/dist: include/clang/AST include/clang/Analysis/PathSensitive include/clang/Basic include/clang/Parse lib/AST lib/Analysis lib/Basic lib/CodeGen lib/Frontend li...
Author: ed Date: Tue Jun 23 14:50:21 2009 New Revision: 194711 URL: http://svn.freebsd.org/changeset/base/194711 Log: Import Clang r73954. Added: vendor/clang/dist/lib/Analysis/ValueManager.cpp vendor/clang/dist/test/CodeGenCXX/implicit-instantiation-1.cpp vendor/clang/dist/test/SemaTemplate/implicit-instantiation-1.cpp Modified: vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/Analysis/PathSensitive/Environment.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRExprEngine.h vendor/clang/dist/include/clang/Analysis/PathSensitive/GRState.h vendor/clang/dist/include/clang/Analysis/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/Analysis/PathSensitive/SVals.h vendor/clang/dist/include/clang/Analysis/PathSensitive/ValueManager.h vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Parse/Action.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/Analysis/BasicStore.cpp vendor/clang/dist/lib/Analysis/CFRefCount.cpp vendor/clang/dist/lib/Analysis/Environment.cpp vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/GRExprEngineInternalChecks.cpp vendor/clang/dist/lib/Analysis/GRSimpleVals.cpp vendor/clang/dist/lib/Analysis/MemRegion.cpp vendor/clang/dist/lib/Analysis/RegionStore.cpp vendor/clang/dist/lib/Analysis/SVals.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/Warnings.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateExpr.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateStmt.cpp vendor/clang/dist/test/CodeGen/functions.c vendor/clang/dist/test/SemaCXX/default-constructor-initializers.cpp vendor/clang/dist/test/SemaTemplate/class-template-decl.cpp vendor/clang/dist/test/SemaTemplate/example-dynarray.cpp Modified: vendor/clang/dist/include/clang/AST/Decl.h == --- vendor/clang/dist/include/clang/AST/Decl.h Tue Jun 23 14:50:01 2009 (r194710) +++ vendor/clang/dist/include/clang/AST/Decl.h Tue Jun 23 14:50:21 2009 (r194711) @@ -647,6 +647,13 @@ private: // Move to DeclGroup when it is implemented. SourceLocation TypeSpecStartLoc; + /// \brief End part of this FunctionDecl's source range. + /// + /// We could compute the full range in getSourceRange(). However, when we're + /// dealing with a function definition deserialized from a PCH/AST file, + /// we can only compute the full range once the function body has been + /// de-serialized, so it's far better to have the (sometimes-redundant) + /// EndRangeLoc. SourceLocation EndRangeLoc; /// \brief The template or declaration that this declaration @@ -687,7 +694,6 @@ public: return SourceRange(getLocation(), EndRangeLoc); } void setLocEnd(SourceLocation E) { -assert(getLocation() <= E && "Invalid end location"); EndRangeLoc = E; } Modified: vendor/clang/dist/include/clang/AST/DeclCXX.h == --- vendor/clang/dist/include/clang/AST/DeclCXX.h Tue Jun 23 14:50:01 2009(r194710) +++ vendor/clang/dist/include/clang/AST/DeclCXX.h Tue Jun 23 14:50:21 2009(r194711) @@ -283,6 +283,10 @@ public: /// copy constructor that accepts a const-qualified argument. bool hasConstCopyConstructor(ASTContext &Context) const; + /// getCopyConstructor - Returns the copy constructor for this class + CXXConstructorDecl *getCopyConstructor(ASTContext &Context, + unsigned TypeQuals) const; + /// hasConstCopyAssignment - Determines whether this class has a /// copy assignment operator that accepts a const-qualifi
svn commit: r194712 - vendor/llvm/llvm-r73954
Author: ed Date: Tue Jun 23 14:51:21 2009 New Revision: 194712 URL: http://svn.freebsd.org/changeset/base/194712 Log: Tag LLVM r73954. Added: vendor/llvm/llvm-r73954/ - copied from r194711, vendor/llvm/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194713 - vendor/clang/clang-r73954
Author: ed Date: Tue Jun 23 14:51:45 2009 New Revision: 194713 URL: http://svn.freebsd.org/changeset/base/194713 Log: Tag Clang r73954. Added: vendor/clang/clang-r73954/ - copied from r194712, vendor/clang/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194702 - head/sys/netinet6
Bjoern A. Zeeb wrote: Author: bz Date: Tue Jun 23 13:22:19 2009 New Revision: 194702 URL: http://svn.freebsd.org/changeset/base/194702 Log: in6_rtqdrain() has been unused. Cleanup. As this was the only consumer of net/route.h left remove that as well. Modified: head/sys/netinet6/in6_rmx.c Modified: head/sys/netinet6/in6_rmx.c == --- head/sys/netinet6/in6_rmx.c Tue Jun 23 13:17:25 2009(r194701) +++ head/sys/netinet6/in6_rmx.c Tue Jun 23 13:22:19 2009(r194702) @@ -90,7 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include My kernel build dies without net/route.h: cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstric s -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc ../.. -I../../../contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit am inline-unit-growth=100 --param large-function-growth=1000 -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone 7 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fsta r -Werror ../../../netinet6/in6_rmx.c cc1: warnings being treated as errors ../../../netinet6/in6_rmx.c:123: warning: 'struct radix_node_head' declared inside parameter list ../../../netinet6/in6_rmx.c:123: warning: its scope is only this definition or declaration, which is probably not wha ../../../netinet6/in6_rmx.c: In function 'in6_addroute': ../../../netinet6/in6_rmx.c:126: warning: implicit declaration of function 'rt_key' ../../../netinet6/in6_rmx.c:126: warning: nested extern declaration of 'rt_key' ../../../netinet6/in6_rmx.c:126: warning: cast to pointer from integer of different size ../../../netinet6/in6_rmx.c:129: warning: implicit declaration of function 'RADIX_NODE_HEAD_WLOCK_ASSERT' ../../../netinet6/in6_rmx.c:129: warning: nested extern declaration of 'RADIX_NODE_HEAD_WLOCK_ASSERT' ../../../netinet6/in6_rmx.c:131: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:131: error: 'RTF_MULTICAST' undeclared (first use in this function) ../../../netinet6/in6_rmx.c:131: error: (Each undeclared identifier is reported only once ../../../netinet6/in6_rmx.c:131: error: for each function it appears in.) ../../../netinet6/in6_rmx.c:147: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:147: error: 'RTF_HOST' undeclared (first use in this function) ../../../netinet6/in6_rmx.c:148: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:151: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:151: error: 'RTF_LOCAL' undeclared (first use in this function) ../../../netinet6/in6_rmx.c:155: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:155: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:156: error: dereferencing pointer to incomplete type ../../../netinet6/in6_rmx.c:158: warning: implicit declaration of function 'rn_addroute' ../../../netinet6/in6_rmx.c:158: warning: nested extern declaration of 'rn_addroute' ../../../netinet6/in6_rmx.c:158: warning: assignment makes pointer from integer without a cast ../../../netinet6/in6_rmx.c:173: warning: implicit declaration of function 'rtalloc1' ../../../netinet6/in6_rmx.c:173: warning: nested extern declaration of 'rtalloc1' ../../../netinet6/in6_rmx.c:173: error: 'RTF_RNH_LOCKED' undeclared (first use in this function) ../../../netinet6/in6_rmx.c:173: warning: assignment makes pointer from integer without a cast Re-instating the net/route.h include fixes the build for me. Drew ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194714 - head/sys/netinet6
Author: bz Date: Tue Jun 23 14:54:42 2009 New Revision: 194714 URL: http://svn.freebsd.org/changeset/base/194714 Log: In r194702 I meant to remove vnet.h which is no longer needed, not route.h. Modified: head/sys/netinet6/in6_rmx.c Modified: head/sys/netinet6/in6_rmx.c == --- head/sys/netinet6/in6_rmx.c Tue Jun 23 14:51:45 2009(r194713) +++ head/sys/netinet6/in6_rmx.c Tue Jun 23 14:54:42 2009(r194714) @@ -90,7 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194715 - head/share/man/man4
Author: rpaulo Date: Tue Jun 23 14:57:06 2009 New Revision: 194715 URL: http://svn.freebsd.org/changeset/base/194715 Log: Fix double path issue and other nits. MFC after:2 weeks Modified: head/share/man/man4/acpi_hp.4 head/share/man/man4/acpi_wmi.4 Modified: head/share/man/man4/acpi_hp.4 == --- head/share/man/man4/acpi_hp.4 Tue Jun 23 14:54:42 2009 (r194714) +++ head/share/man/man4/acpi_hp.4 Tue Jun 23 14:57:06 2009 (r194715) @@ -226,282 +226,6 @@ Set maximum detail level for /dev/hpcmi sysctl dev.acpi_hp.0.cmi_detail=7 .Ed .Pp - - - -.Sh SEE ALSO -.Xr acpi 4 , -.Xr acpi_wmi 4 , -.Xr sysctl.conf 5 , -.Xr devd 8 , -.Xr devfs 8 , -.Xr sysctl 8 -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx CURRENT . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Michael Gmelin Aq free...@grem.de -.Pp -It has been inspired by hp-wmi driver, which implements a subset of these -features (hotkeys) on Linux. -.Pp -.Bl -tag -width indent -.It HP CMI whitepaper: -http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf -.It wmi-hp for Linux: -http://www.kernel.org -.It WMI and ACPI: -http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx -.El -.Pp -This manual page was written by -.An Michael Gmelin Aq free...@grem.de -.Sh BUGS -This driver is experimental and has only been tested on CURRENT i386 on an -HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). -Expect undefined results when operating on different hardware. -.Pp -Loading the driver is slow. Reading from /dev/hpcmi is even slower. -.Pp -Additional features like HP specific sensor readings or writing BIOS -settings are not supported. -.\" Copyright (c) 2009 Michael Gmelin -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\"notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\"notice, this list of conditions and the following disclaimer in the -.\"documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd June 21, 2009 -.Dt ACPI_HP 4 i386 -.Os -.Sh NAME -.Nm acpi_hp -.Nd "ACPI extras driver for HP laptops" -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following line in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device acpi_hp" -.Ed -.Pp -Alternatively, to load the driver as a -module at boot time, place the following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -acpi_hp_load="YES" -.Ed -.Sh DESCRIPTION -The -.Nm -driver provides support for ACPI-controlled features found on HP laptops -that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). -.Pp -The main purpose of this driver is to provide an interface, -accessible via -.Xr sysctl 8 , -.Xr devd 8 and -.Xr devfs 8 , -through which applications can determine and change the status of -various laptop components and BIOS settings. -.Pp -.Ss Xr devd 8 Ss Events -Devd events received by -.Xr devd 8 -provide the following information: -.Pp -.Bl -tag -width "subsystem" -offset indent -compact -.It system -.Qq Li ACPI -.It subsystem -.Qq Li HP -.It type -The source of the event in the ACPI namespace. -The value depends on the model. -.It notify -Event code (see below). -.El -.Pp -Event codes: -.Pp -.Bl -tag -width "0xc0" -offset indent -compact -.It Li 0xc0 -WLAN on air status changed to 0 (not on air) -.It Li 0xc1 -WLAN on air status changed to 1 (on air) -.It Li 0xd0 -Bluetooth on air status changed to 0 (not on air) -.It Li 0xd1 -Bluetooth on air status changed to 1 (on air) -.It Li 0xe0 -WWAN on air status changed to 0 (not on air) -.It Li 0xe1 -WWAN on air status changed to 1 (on air) -.El -.Ss Xr devfs 8 Ss Device -You can read /dev/hpcmi to see your current BIOS settings. The detail level -can be adjusted by setting the sysctl -.Va cmi_detail
Re: svn commit: r194715 - head/share/man/man4
On 23 Jun 2009, at 15:57, Rui Paulo wrote: Author: rpaulo Date: Tue Jun 23 14:57:06 2009 New Revision: 194715 URL: http://svn.freebsd.org/changeset/base/194715 Log: Fix double path issue and other nits. MFC after: 2 weeks Noticed by: maxim and -- Rui Paulo ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194702 - head/sys/netinet6
On Tue, 23 Jun 2009, Andrew Gallatin wrote: Hi, Bjoern A. Zeeb wrote: Author: bz Date: Tue Jun 23 13:22:19 2009 New Revision: 194702 URL: http://svn.freebsd.org/changeset/base/194702 Log: in6_rtqdrain() has been unused. Cleanup. As this was the only consumer of net/route.h left remove that as well. Modified: head/sys/netinet6/in6_rmx.c Modified: head/sys/netinet6/in6_rmx.c == --- head/sys/netinet6/in6_rmx.c Tue Jun 23 13:17:25 2009 (r194701) +++ head/sys/netinet6/in6_rmx.c Tue Jun 23 13:22:19 2009 (r194702) @@ -90,7 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include My kernel build dies without net/route.h: ... Re-instating the net/route.h include fixes the build for me. yes, already fixed; That change was part of something larger that had passed universe a day or two ago and I got the wrong line cleaning up route.h in the other screen. Send more iscream! ;-) /bz -- Bjoern A. Zeeb The greatest risk is not taking one. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194672 - in head/sys: kern netinet sys
On Tue, 23 Jun 2009, Andrew Gallatin wrote: This is consistent across runs. Lockstat output for 10 seconds in the middle of a run is very interesting and shows a huge reduction in lock contention. I continue to wonder if we should be deferring TCP reassembly to the user thread when there's an effective pipeline going on -- currently we still contend on the inpcb lock heavily, generally, and pipelining the work via a separate queue (which is what Linux does, I believe) would mean the ithread could spend more time doing other things instead of spinning. Robert N M Watson Computer Laboratory University of Cambridge Before: Adaptive mutex spin: 369333 events in 10.017 seconds (36869 events/sec) Count indv cuml rcnt nsec Lock Caller --- 303685 82% 82% 0.00 1080 0xff000f2f98d0 recvit+0x21 63847 17% 100% 0.00 25 0xff000f2f98d0 ip_input+0xad 1788 0% 100% 0.00 172 0xff0001c57c08 intr_event_execute_handlers+0x100 8 0% 100% 0.00 389 vm_page_queue_mtx trap+0x4ce 1 0% 100% 0.00 30 0xff8000251598 ithread_loop+0x8e 1 0% 100% 0.00 720 0xff8000251598 uhub_read_port_status+0x2d 1 0% 100% 0.00 1639 0xff000f477190 vm_fault+0x112 1 0% 100% 0.001 0xff001fecce10 mxge_intr+0x425 1 0% 100% 0.00 1332 0xff0001845600 clnt_reconnect_call+0x105 --- Adaptive mutex block: 89 events in 10.017 seconds (9 events/sec) Count indv cuml rcnt nsec Lock Caller --- 83 93% 93% 0.0020908 0xff000f2f98d0 tcp_input+0xd96 3 3% 97% 0.0045234 0xff8000259f08 fork_exit+0x118 3 3% 100% 0.0044862 0xff8000251598 fork_exit+0x118 --- After: Adaptive mutex spin: 105102 events in 10.020 seconds (10490 events/sec) Count indv cuml rcnt nsec Lock Caller --- 75886 72% 72% 0.00 2860 0xff0001fdde20 ip_input+0xad 28418 27% 99% 0.00 1355 0xff0001fdde20 recvit+0x21 779 1% 100% 0.00 171 0xff0001642808 intr_event_execute_handlers+0x100 7 0% 100% 0.00 670 vm_page_queue_mtx trap+0x4ce 5 0% 100% 0.00 46 0xff001fecce10 mxge_intr+0x425 1 0% 100% 0.00 105 vm_page_queue_mtx trap_pfault+0x142 1 0% 100% 0.00 568 0xff8000251598 usb_process+0xd8 1 0% 100% 0.00 880 0xff8000251598 ithread_loop+0x8e 1 0% 100% 0.00 233 0xff001a224578 vm_fault+0x112 1 0% 100% 0.00 60 0xff001a1759b8 syscall+0x28f 1 0% 100% 0.00 809 0xff0001846000 clnt_reconnect_call+0x105 1 0% 100% 0.00 1139 0xff0001fdde20 kern_recvit+0x1d4 --- Adaptive mutex block: 88 events in 10.020 seconds (9 events/sec) Count indv cuml rcnt nsec Lock Caller --- 80 91% 91% 0.0025891 0xff0001fdde20 tcp_input+0xd96 3 3% 94% 0.0045979 0xff8000259f08 fork_exit+0x118 3 3% 98% 0.0045886 0xff8000251598 fork_exit+0x118 1 1% 99% 0.0038254 0xff8000259f08 intr_event_execute_handlers+0x100 1 1% 100% 0.0079858 0xff001a1760f8 kern_wait+0x7ee --- Drew ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194716 - head/sys/dev/acpi_support
Author: rpaulo Date: Tue Jun 23 15:08:03 2009 New Revision: 194716 URL: http://svn.freebsd.org/changeset/base/194716 Log: Fix build with ACPI_DEBUG. MFC after:2 weeks Modified: head/sys/dev/acpi_support/acpi_wmi.c Modified: head/sys/dev/acpi_support/acpi_wmi.c == --- head/sys/dev/acpi_support/acpi_wmi.cTue Jun 23 14:57:06 2009 (r194715) +++ head/sys/dev/acpi_support/acpi_wmi.cTue Jun 23 15:08:03 2009 (r194716) @@ -653,7 +653,7 @@ acpi_wmi_ec_handler(UINT32 function, ACP UINT8 ec_addr; ACPI_STATUS status; - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Address); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)address); sc = (struct acpi_wmi_softc *)context; if (width % 8 != 0 || value == NULL || context == NULL) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194717 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:10:49 2009 New Revision: 194717 URL: http://svn.freebsd.org/changeset/base/194717 Log: Merge r190020 from HEAD Pull in some suspend / resume changes from Intel's code Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/i915_drv.h stable/7/sys/dev/drm/i915_reg.h stable/7/sys/dev/drm/i915_suspend.c Modified: stable/7/sys/dev/drm/i915_drv.h == --- stable/7/sys/dev/drm/i915_drv.h Tue Jun 23 15:08:03 2009 (r194716) +++ stable/7/sys/dev/drm/i915_drv.h Tue Jun 23 15:10:49 2009 (r194717) @@ -151,6 +151,8 @@ typedef struct drm_i915_private { u32 saveDSPACNTR; u32 saveDSPBCNTR; u32 saveDSPARB; + u32 saveRENDERSTANDBY; + u32 saveHWS; u32 savePIPEACONF; u32 savePIPEBCONF; u32 savePIPEASRC; @@ -232,8 +234,8 @@ typedef struct drm_i915_private { u8 saveAR_INDEX; u8 saveAR[21]; u8 saveDACMASK; - u8 saveDACDATA[256*3]; /* 256 3-byte colors */ u8 saveCR[37]; + struct { #ifdef __linux__ struct drm_mm gtt_space; @@ -651,7 +653,8 @@ extern int i915_wait_ring(struct drm_dev #define IS_G4X(dev) ((dev)->pci_device == 0x2E02 || \ (dev)->pci_device == 0x2E12 || \ -(dev)->pci_device == 0x2E22) +(dev)->pci_device == 0x2E22 || \ +IS_GM45(dev)) #define IS_G33(dev)((dev)->pci_device == 0x29C2 || \ (dev)->pci_device == 0x29B2 || \ Modified: stable/7/sys/dev/drm/i915_reg.h == --- stable/7/sys/dev/drm/i915_reg.h Tue Jun 23 15:08:03 2009 (r194716) +++ stable/7/sys/dev/drm/i915_reg.h Tue Jun 23 15:10:49 2009 (r194717) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #define INTEL_GMCH_MEM_64M 0x1 #define INTEL_GMCH_MEM_128M0 -#define INTEL_855_GMCH_GMS_MASK(0x7 << 4) +#define INTEL_GMCH_GMS_MASK(0xf << 4) #define INTEL_855_GMCH_GMS_DISABLED(0x0 << 4) #define INTEL_855_GMCH_GMS_STOLEN_1M (0x1 << 4) #define INTEL_855_GMCH_GMS_STOLEN_4M (0x2 << 4) @@ -48,6 +48,12 @@ __FBSDID("$FreeBSD$"); #define INTEL_915G_GMCH_GMS_STOLEN_48M (0x6 << 4) #define INTEL_915G_GMCH_GMS_STOLEN_64M (0x7 << 4) +#define INTEL_GMCH_GMS_STOLEN_128M (0x8 << 4) +#define INTEL_GMCH_GMS_STOLEN_256M (0x9 << 4) +#define INTEL_GMCH_GMS_STOLEN_96M (0xa << 4) +#define INTEL_GMCH_GMS_STOLEN_160M (0xb << 4) +#define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4) +#define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4) /* PCI config space */ @@ -178,9 +184,27 @@ __FBSDID("$FreeBSD$"); #define DISPLAY_PLANE_B (1<<20) /* - * Instruction and interrupt control regs + * Fence registers */ +#define FENCE_REG_830_00x2000 +#define FENCE_REG_945_80x3000 +#define I830_FENCE_START_MASK0x07f8 +#define I830_FENCE_TILING_Y_SHIFT12 +#define I830_FENCE_SIZE_BITS(size) ((ffs((size) >> 19) - 1) << 8) +#define I830_FENCE_PITCH_SHIFT 4 +#define I830_FENCE_REG_VALID (1<<0) + +#define I915_FENCE_START_MASK0x0ff0 +#define I915_FENCE_SIZE_BITS(size) ((ffs((size) >> 20) - 1) << 8) + +#define FENCE_REG_965_00x03000 +#define I965_FENCE_PITCH_SHIFT 2 +#define I965_FENCE_TILING_Y_SHIFT1 +#define I965_FENCE_REG_VALID (1<<0) +/* + * Instruction and interrupt control regs + */ #define PRB0_TAIL 0x02030 #define PRB0_HEAD 0x02034 #define PRB0_START 0x02038 @@ -248,6 +272,7 @@ __FBSDID("$FreeBSD$"); #define CM0_RC_OP_FLUSH_DISABLE (1<<0) #define GFX_FLSH_CNTL 0x02170 /* 915+ only */ + /* * Framebuffer compression (915+ only) */ @@ -525,11 +550,17 @@ __FBSDID("$FreeBSD$"); #define DCC_ADDRESSING_MODE_DUAL_CHANNEL_INTERLEAVED (2 << 0) #define DCC_ADDRESSING_MODE_MASK (3 << 0) #define DCC_CHANNEL_XOR_DISABLE(1 << 10) +#define DCC_CHANNEL_XOR_BIT_17 (1 << 9) /** 965 MCH register controlling DRAM channel configuration */ #define C0DRB3 0x10206 #define C1DRB3 0x10606 +/** GM965 GM45 render standby register */ +#define MCHBAR_RENDER_STANDBY 0x111B8 + +#define PEG_BAND_GAP_DATA 0x14d68 + /* * Overlay regs */ @@ -593,6 +624,9 @@ __FBSDID("$FreeBSD$"); /* Hotplug control (945+ only) */ #define PORT_HOTPLUG_EN0x61110 +#define HDMIB_HOTPLUG_INT_EN (1 << 29) +#define HDMIC_HOTPLUG_INT_EN (1 << 28) +#define HDMID_HOTPLUG_INT_EN (1 << 27) #define SDVOB_HOTPLUG_INT_EN (1 << 26) #define SDVOC_HOT
svn commit: r194718 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:22:38 2009 New Revision: 194718 URL: http://svn.freebsd.org/changeset/base/194718 Log: Merge 190021 from HEAD Sync up the rest of the code that we use with what Intel is shipping -Some irq/vblank related changes that hopefully will help. -A little more cleanup while I'm here. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/i915_dma.c stable/7/sys/dev/drm/i915_irq.c Modified: stable/7/sys/dev/drm/i915_dma.c == --- stable/7/sys/dev/drm/i915_dma.c Tue Jun 23 15:10:49 2009 (r194717) +++ stable/7/sys/dev/drm/i915_dma.c Tue Jun 23 15:22:38 2009 (r194718) @@ -193,7 +193,7 @@ static int i915_initialize(struct drm_de dev_priv->ring.map.flags = 0; dev_priv->ring.map.mtrr = 0; - drm_core_ioremap(&dev_priv->ring.map, dev); + drm_core_ioremap_wc(&dev_priv->ring.map, dev); if (dev_priv->ring.map.handle == NULL) { i915_dma_cleanup(dev); @@ -209,7 +209,7 @@ static int i915_initialize(struct drm_de dev_priv->back_offset = init->back_offset; dev_priv->front_offset = init->front_offset; dev_priv->current_page = 0; - dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; + dev_priv->sarea_priv->pf_current_page = 0; /* Allow hardware batchbuffers unless told otherwise. */ @@ -721,7 +721,7 @@ static int i915_flip_bufs(struct drm_dev DRM_DEBUG("%s\n", __func__); - LOCK_TEST_WITH_RETURN(dev, file_priv); + RING_LOCK_TEST_WITH_RETURN(dev, file_priv); ret = i915_dispatch_flip(dev); @@ -758,7 +758,7 @@ static int i915_getparam(struct drm_devi value = 0; break; default: - DRM_ERROR("Unknown parameter %d\n", param->param); + DRM_DEBUG("Unknown parameter %d\n", param->param); return -EINVAL; } @@ -791,7 +791,7 @@ static int i915_setparam(struct drm_devi dev_priv->allow_batchbuffer = param->value; break; default: - DRM_ERROR("unknown parameter %d\n", param->param); + DRM_DEBUG("unknown parameter %d\n", param->param); return -EINVAL; } @@ -822,7 +822,7 @@ static int i915_set_status_page(struct d dev_priv->hws_map.flags = 0; dev_priv->hws_map.mtrr = 0; - drm_core_ioremap(&dev_priv->hws_map, dev); + drm_core_ioremap_wc(&dev_priv->hws_map, dev); if (dev_priv->hws_map.handle == NULL) { i915_dma_cleanup(dev); dev_priv->status_gfx_addr = 0; @@ -880,8 +880,12 @@ int i915_driver_load(struct drm_device * /* Init HWS */ if (!I915_NEED_GFX_HWS(dev)) { ret = i915_init_phys_hws(dev); - if (ret != 0) + if (ret != 0) { + drm_rmmap(dev, dev_priv->mmio_map); + drm_free(dev_priv, sizeof(struct drm_i915_private), + DRM_MEM_DRIVER); return ret; + } } #ifdef __linux__ /* On the 945G/GM, the chipset reports the MSI capability on the @@ -901,6 +905,7 @@ int i915_driver_load(struct drm_device * intel_opregion_init(dev); #endif DRM_SPININIT(&dev_priv->user_irq_lock, "userirq"); + dev_priv->user_irq_refcount = 0; ret = drm_vblank_init(dev, I915_NUM_PIPE); Modified: stable/7/sys/dev/drm/i915_irq.c == --- stable/7/sys/dev/drm/i915_irq.c Tue Jun 23 15:10:49 2009 (r194717) +++ stable/7/sys/dev/drm/i915_irq.c Tue Jun 23 15:22:38 2009 (r194718) @@ -43,21 +43,28 @@ __FBSDID("$FreeBSD$"); * we leave them always unmasked in IMR and then control enabling them through * PIPESTAT alone. */ -#define I915_INTERRUPT_ENABLE_FIX (I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | \ - I915_DISPLAY_PIPE_B_EVENT_INTERRUPT) +#define I915_INTERRUPT_ENABLE_FIX (I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | \ +I915_DISPLAY_PIPE_B_EVENT_INTERRUPT) /** Interrupts that we mask and unmask at runtime. */ -#define I915_INTERRUPT_ENABLE_VAR (I915_USER_INTERRUPT) +#define I915_INTERRUPT_ENABLE_VAR (I915_USER_INTERRUPT) /** These are all of the interrupts used by the driver */ -#define I915_INTERRUPT_ENABLE_MASK (I915_INTERRUPT_ENABLE_FIX | \ - I915_INTERRUPT_ENABLE_VAR) +#define I915_INTERRUPT_ENABLE_MASK (I915_INTERRUPT_ENABLE_FIX | \ +I915_INTERRUPT_ENABLE_VAR) + +#define I915_PIPE_VBLANK_STATUS (PIPE_START_VBLANK_INTERRUPT_STATUS
svn commit: r194719 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:44:23 2009 New Revision: 194719 URL: http://svn.freebsd.org/changeset/base/194719 Log: Merge 190022 from HEAD Rework vblank handling to try to resolve some reports of "slow" windows after vt switch or suspend. I can't really test this on Intel right now but I think I've heard reports of it on radeon as well. I can't break it on the radeon here. (This doesn't actually fix the "slow" window problem.) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_irq.c Modified: stable/7/sys/dev/drm/drm_irq.c == --- stable/7/sys/dev/drm/drm_irq.c Tue Jun 23 15:22:38 2009 (r194718) +++ stable/7/sys/dev/drm/drm_irq.c Tue Jun 23 15:44:23 2009 (r194719) @@ -98,15 +98,13 @@ static void vblank_disable_fn(void *arg) void drm_vblank_cleanup(struct drm_device *dev) { - unsigned long irqflags; - /* Bail if the driver didn't call drm_vblank_init() */ if (dev->num_crtcs == 0) return; - DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags); + DRM_SPINLOCK(&dev->vbl_lock); callout_stop(&dev->vblank_disable_timer); - DRM_SPINUNLOCK_IRQRESTORE(&dev->vbl_lock, irqflags); + DRM_SPINUNLOCK(&dev->vbl_lock); callout_drain(&dev->vblank_disable_timer); @@ -200,11 +198,25 @@ err: int drm_irq_uninstall(struct drm_device *dev) { + int crtc; + if (!dev->irq_enabled) return EINVAL; dev->irq_enabled = 0; + /* + * Wake up any waiters so they don't hang. + */ + DRM_SPINLOCK(&dev->vbl_lock); + for (crtc = 0; crtc < dev->num_crtcs; crtc++) { + DRM_WAKEUP(&dev->vblank[crtc].queue); + dev->vblank[crtc].enabled = 0; + dev->vblank[crtc].last = + dev->driver->get_vblank_counter(dev, crtc); + } + DRM_SPINUNLOCK(&dev->vbl_lock); + DRM_DEBUG("irq=%d\n", dev->irq); dev->driver->irq_uninstall(dev); @@ -277,16 +289,15 @@ static void drm_update_vblank_count(stru int drm_vblank_get(struct drm_device *dev, int crtc) { - unsigned long irqflags; int ret = 0; - DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags); + DRM_SPINLOCK(&dev->vbl_lock); /* Going from 0->1 means we have to enable interrupts again */ atomic_add_acq_int(&dev->vblank[crtc].refcount, 1); - DRM_DEBUG("vblank refcount = %d\n", dev->vblank[crtc].refcount); if (dev->vblank[crtc].refcount == 1 && !dev->vblank[crtc].enabled) { ret = dev->driver->enable_vblank(dev, crtc); + DRM_DEBUG("enabling vblank on crtc %d, ret: %d\n", crtc, ret); if (ret) atomic_dec(&dev->vblank[crtc].refcount); else { @@ -294,30 +305,28 @@ int drm_vblank_get(struct drm_device *de drm_update_vblank_count(dev, crtc); } } - DRM_SPINUNLOCK_IRQRESTORE(&dev->vbl_lock, irqflags); + DRM_SPINUNLOCK(&dev->vbl_lock); return ret; } void drm_vblank_put(struct drm_device *dev, int crtc) { - unsigned long irqflags; + KASSERT(atomic_read(&dev->vblank[crtc].refcount) > 0, + ("invalid refcount")); - DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags); /* Last user schedules interrupt disable */ atomic_subtract_acq_int(&dev->vblank[crtc].refcount, 1); - DRM_DEBUG("vblank refcount = %d\n", dev->vblank[crtc].refcount); + if (dev->vblank[crtc].refcount == 0) callout_reset(&dev->vblank_disable_timer, 5 * DRM_HZ, (timeout_t *)vblank_disable_fn, (void *)dev); - DRM_SPINUNLOCK_IRQRESTORE(&dev->vbl_lock, irqflags); } int drm_modeset_ctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_modeset_ctl *modeset = data; - unsigned long irqflags; int crtc, ret = 0; DRM_DEBUG("num_crtcs=%d\n", dev->num_crtcs); @@ -343,18 +352,22 @@ int drm_modeset_ctl(struct drm_device *d case _DRM_PRE_MODESET: DRM_DEBUG("pre-modeset\n"); if (!dev->vblank[crtc].inmodeset) { - dev->vblank[crtc].inmodeset = 1; - drm_vblank_get(dev, crtc); + dev->vblank[crtc].inmodeset = 0x1; + if (drm_vblank_get(dev, crtc) == 0) + dev->vblank[crtc].inmodeset |= 0x2; } break; case _DRM_POST_MODESET: DRM_DEBUG("post-modeset\n"); if (dev->vblank[crtc].inmodeset) { - DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags); + DRM_SPINLOCK(&dev->vbl_lock); dev->vblan
svn commit: r194721 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:49:02 2009 New Revision: 194721 URL: http://svn.freebsd.org/changeset/base/194721 Log: Merge 190125 from HEAD Only issue the wakeup and store the counter if vblank is enabled on the pipe. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_irq.c Modified: stable/7/sys/dev/drm/drm_irq.c == --- stable/7/sys/dev/drm/drm_irq.c Tue Jun 23 15:46:22 2009 (r194720) +++ stable/7/sys/dev/drm/drm_irq.c Tue Jun 23 15:49:02 2009 (r194721) @@ -210,10 +210,12 @@ int drm_irq_uninstall(struct drm_device */ DRM_SPINLOCK(&dev->vbl_lock); for (crtc = 0; crtc < dev->num_crtcs; crtc++) { - DRM_WAKEUP(&dev->vblank[crtc].queue); - dev->vblank[crtc].enabled = 0; - dev->vblank[crtc].last = - dev->driver->get_vblank_counter(dev, crtc); + if (dev->vblank[crtc].enabled) { + DRM_WAKEUP(&dev->vblank[crtc].queue); + dev->vblank[crtc].enabled = 0; + dev->vblank[crtc].last = + dev->driver->get_vblank_counter(dev, crtc); + } } DRM_SPINUNLOCK(&dev->vbl_lock); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194722 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:50:48 2009 New Revision: 194722 URL: http://svn.freebsd.org/changeset/base/194722 Log: Merge 190163 from HEAD Don't deref dev->dev_private before checking that it exists. Found with: Coverity Prevent(tm) CID:2940 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/i915_drv.c Modified: stable/7/sys/dev/drm/i915_drv.c == --- stable/7/sys/dev/drm/i915_drv.c Tue Jun 23 15:49:02 2009 (r194721) +++ stable/7/sys/dev/drm/i915_drv.c Tue Jun 23 15:50:48 2009 (r194722) @@ -46,9 +46,8 @@ static drm_pci_id_list_t i915_pciidlist[ static int i915_suspend(device_t kdev) { struct drm_device *dev = device_get_softc(kdev); - struct drm_i915_private *dev_priv = dev->dev_private; - if (!dev || !dev_priv) { + if (!dev || !dev->dev_private) { DRM_ERROR("dev: 0x%lx, dev_priv: 0x%lx\n", (unsigned long) dev, (unsigned long) dev_priv); DRM_ERROR("DRM not initialized, aborting suspend.\n"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194723 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:52:08 2009 New Revision: 194723 URL: http://svn.freebsd.org/changeset/base/194723 Log: Merge 190164 from HEAD Fix what appears to be a typo, and restore the registers correctly. Found with: Coverity Prevent(tm) CID:2454 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/i915_suspend.c Modified: stable/7/sys/dev/drm/i915_suspend.c == --- stable/7/sys/dev/drm/i915_suspend.c Tue Jun 23 15:50:48 2009 (r194722) +++ stable/7/sys/dev/drm/i915_suspend.c Tue Jun 23 15:52:08 2009 (r194723) @@ -515,7 +515,7 @@ int i915_restore_state(struct drm_device for (i = 0; i < 16; i++) { I915_WRITE(SWF00 + (i << 2), dev_priv->saveSWF0[i]); - I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]); + I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i]); } for (i = 0; i < 3; i++) I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194724 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:53:17 2009 New Revision: 194724 URL: http://svn.freebsd.org/changeset/base/194724 Log: Merge 190166 from HEAD Remove the DRM_ERROR to fix build. It didn't make any sense anyway. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/i915_drv.c Modified: stable/7/sys/dev/drm/i915_drv.c == --- stable/7/sys/dev/drm/i915_drv.c Tue Jun 23 15:52:08 2009 (r194723) +++ stable/7/sys/dev/drm/i915_drv.c Tue Jun 23 15:53:17 2009 (r194724) @@ -48,8 +48,6 @@ static int i915_suspend(device_t kdev) struct drm_device *dev = device_get_softc(kdev); if (!dev || !dev->dev_private) { - DRM_ERROR("dev: 0x%lx, dev_priv: 0x%lx\n", - (unsigned long) dev, (unsigned long) dev_priv); DRM_ERROR("DRM not initialized, aborting suspend.\n"); return -ENODEV; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194725 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:54:34 2009 New Revision: 194725 URL: http://svn.freebsd.org/changeset/base/194725 Log: Merge 190170 from HEAD vm_offset_t is unsigned, so compare of >= 0 is not needed. Found with: Coverity Prevent(tm) CID:2259 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_vm.c Modified: stable/7/sys/dev/drm/drm_vm.c == --- stable/7/sys/dev/drm/drm_vm.c Tue Jun 23 15:53:17 2009 (r194724) +++ stable/7/sys/dev/drm/drm_vm.c Tue Jun 23 15:54:34 2009 (r194725) @@ -54,7 +54,7 @@ int drm_mmap(struct cdev *kdev, vm_offse if (file_priv && !file_priv->authenticated) return EACCES; - if (dev->dma && offset >= 0 && offset < ptoa(dev->dma->page_count)) { + if (dev->dma && offset < ptoa(dev->dma->page_count)) { drm_device_dma_t *dma = dev->dma; DRM_SPINLOCK(&dev->dma_lock); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194720 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:46:22 2009 New Revision: 194720 URL: http://svn.freebsd.org/changeset/base/194720 Log: Merge 190023 from HEAD Add some debugging so I can see when syscalls are being restarted consistantly. After a lengthy irc discussion it seems like we shouldn't need to worry about them, but it's nice to know about. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_lock.c stable/7/sys/dev/drm/mga_irq.c stable/7/sys/dev/drm/radeon_irq.c Modified: stable/7/sys/dev/drm/drm_lock.c == --- stable/7/sys/dev/drm/drm_lock.c Tue Jun 23 15:44:23 2009 (r194719) +++ stable/7/sys/dev/drm/drm_lock.c Tue Jun 23 15:46:22 2009 (r194720) @@ -87,7 +87,12 @@ int drm_lock(struct drm_device *dev, voi break; } DRM_UNLOCK(); - DRM_DEBUG("%d %s\n", lock->context, ret ? "interrupted" : "has lock"); + + if (ret == ERESTART) + DRM_DEBUG("restarting syscall\n"); + else + DRM_DEBUG("%d %s\n", lock->context, + ret ? "interrupted" : "has lock"); if (ret != 0) return ret; Modified: stable/7/sys/dev/drm/mga_irq.c == --- stable/7/sys/dev/drm/mga_irq.c Tue Jun 23 15:44:23 2009 (r194719) +++ stable/7/sys/dev/drm/mga_irq.c Tue Jun 23 15:46:22 2009 (r194720) @@ -139,6 +139,9 @@ int mga_driver_fence_wait(struct drm_dev (((cur_fence = atomic_read(&dev_priv->last_fence_retired)) - *sequence) <= (1 << 23))); + if (ret == -ERESTART) + DRM_DEBUG("restarting syscall\n"); + *sequence = cur_fence; return ret; Modified: stable/7/sys/dev/drm/radeon_irq.c == --- stable/7/sys/dev/drm/radeon_irq.c Tue Jun 23 15:44:23 2009 (r194719) +++ stable/7/sys/dev/drm/radeon_irq.c Tue Jun 23 15:46:22 2009 (r194720) @@ -282,6 +282,9 @@ static int radeon_wait_irq(struct drm_de DRM_WAIT_ON(ret, dev_priv->swi_queue, 3 * DRM_HZ, RADEON_READ(RADEON_LAST_SWI_REG) >= swi_nr); + if (ret == -ERESTART) + DRM_DEBUG("restarting syscall"); + return ret; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194726 - in stable/6/lib/libc: . inet sys
Author: jhb Date: Tue Jun 23 15:55:58 2009 New Revision: 194726 URL: http://svn.freebsd.org/changeset/base/194726 Log: Move mergeinfo up to libc. Modified: stable/6/lib/libc/ (props changed) stable/6/lib/libc/inet/inet_net_pton.c (props changed) stable/6/lib/libc/sys/ (props changed) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194727 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:56:10 2009 New Revision: 194727 URL: http://svn.freebsd.org/changeset/base/194727 Log: Merge 190400 from HEAD Intel handled the management of the breadcrumb counter inconsistently. Make sure that we always handle it the same way. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/i915_dma.c stable/7/sys/dev/drm/i915_irq.c Modified: stable/7/sys/dev/drm/i915_dma.c == --- stable/7/sys/dev/drm/i915_dma.c Tue Jun 23 15:55:58 2009 (r194726) +++ stable/7/sys/dev/drm/i915_dma.c Tue Jun 23 15:56:10 2009 (r194727) @@ -439,8 +439,7 @@ static void i915_emit_breadcrumb(struct drm_i915_private_t *dev_priv = dev->dev_private; RING_LOCALS; - dev_priv->counter++; - if (dev_priv->counter > 0x7FFFUL) + if (++dev_priv->counter > 0x7FFFUL) dev_priv->counter = 0; if (dev_priv->sarea_priv) dev_priv->sarea_priv->last_enqueue = dev_priv->counter; @@ -574,7 +573,10 @@ static int i915_dispatch_flip(struct drm OUT_RING(0); ADVANCE_LP_RING(); - dev_priv->sarea_priv->last_enqueue = dev_priv->counter++; + if (++dev_priv->counter > 0x7FFFUL) + dev_priv->counter = 0; + if (dev_priv->sarea_priv) + dev_priv->sarea_priv->last_enqueue = dev_priv->counter; BEGIN_LP_RING(4); OUT_RING(MI_STORE_DWORD_INDEX); Modified: stable/7/sys/dev/drm/i915_irq.c == --- stable/7/sys/dev/drm/i915_irq.c Tue Jun 23 15:55:58 2009 (r194726) +++ stable/7/sys/dev/drm/i915_irq.c Tue Jun 23 15:56:10 2009 (r194727) @@ -284,14 +284,13 @@ static int i915_emit_irq(struct drm_devi i915_kernel_lost_context(dev); - DRM_DEBUG("\n"); - - dev_priv->counter++; - if (dev_priv->counter > 0x7FFFUL) - dev_priv->counter = 1; + if (++dev_priv->counter > 0x7FFFUL) + dev_priv->counter = 0; if (dev_priv->sarea_priv) dev_priv->sarea_priv->last_enqueue = dev_priv->counter; + DRM_DEBUG("emitting: %d\n", dev_priv->counter); + BEGIN_LP_RING(4); OUT_RING(MI_STORE_DWORD_INDEX); OUT_RING(I915_BREADCRUMB_INDEX << MI_STORE_DWORD_INDEX_SHIFT); @@ -331,9 +330,6 @@ static int i915_wait_irq(struct drm_devi drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; int ret = 0; - DRM_DEBUG("irq_nr=%d breadcrumb=%d\n", irq_nr, - READ_BREADCRUMB(dev_priv)); - if (READ_BREADCRUMB(dev_priv) >= irq_nr) { if (dev_priv->sarea_priv) { dev_priv->sarea_priv->last_dispatch = @@ -345,6 +341,9 @@ static int i915_wait_irq(struct drm_devi if (dev_priv->sarea_priv) dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT; + DRM_DEBUG("irq_nr=%d breadcrumb=%d\n", irq_nr, + READ_BREADCRUMB(dev_priv)); + i915_user_irq_get(dev); DRM_WAIT_ON(ret, dev_priv->irq_queue, 3 * DRM_HZ, READ_BREADCRUMB(dev_priv) >= irq_nr); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194728 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 15:59:10 2009 New Revision: 194728 URL: http://svn.freebsd.org/changeset/base/194728 Log: Merge 190401 from HEAD Rework the management of vblank interrupts a bit. When a vt switch occurs the irq handler is uninstalled. Interrupts and the state tracking of what was enabled/disabled wasn't working properly. This should resolve the reports of "slow windows" after a vt switch, among other things. The radeon 2d driver seems to work a bit more correctly than the Intel driver. With the Intel driver, vblank interrupts will be enabled at system startup and will only be disabled after an additional modeset (vt switch, dpms, randr event). With this patch, I am able to run glxgears synced to vblank and vt switch while it is running without ill effects. (Still didn't fix the slow window issues on Intel) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_irq.c Modified: stable/7/sys/dev/drm/drm_irq.c == --- stable/7/sys/dev/drm/drm_irq.c Tue Jun 23 15:56:10 2009 (r194727) +++ stable/7/sys/dev/drm/drm_irq.c Tue Jun 23 15:59:10 2009 (r194728) @@ -80,13 +80,14 @@ static void vblank_disable_fn(void *arg) } callout_deactivate(&dev->vblank_disable_timer); - DRM_DEBUG("vblank_disable_allowed=%d\n", dev->vblank_disable_allowed); + DRM_DEBUG("vblank_disable: %s\n", dev->vblank_disable_allowed ? + "allowed" : "denied"); if (!dev->vblank_disable_allowed) return; for (i = 0; i < dev->num_crtcs; i++) { if (atomic_read(&dev->vblank[i].refcount) == 0 && - dev->vblank[i].enabled) { + dev->vblank[i].enabled && !dev->vblank[i].inmodeset) { DRM_DEBUG("disabling vblank on crtc %d\n", i); dev->vblank[i].last = dev->driver->get_vblank_counter(dev, i); @@ -149,7 +150,7 @@ err: int drm_irq_install(struct drm_device *dev) { - int retcode; + int crtc, retcode; if (dev->irq == 0 || dev->dev_private == NULL) return EINVAL; @@ -186,6 +187,17 @@ int drm_irq_install(struct drm_device *d DRM_LOCK(); dev->driver->irq_postinstall(dev); DRM_UNLOCK(); + if (dev->driver->enable_vblank) { + DRM_SPINLOCK(&dev->vbl_lock); + for( crtc = 0 ; crtc < dev->num_crtcs ; crtc++) { + if (dev->driver->enable_vblank(dev, crtc) == 0) { + dev->vblank[crtc].enabled = 1; + } + } + callout_reset(&dev->vblank_disable_timer, 5 * DRM_HZ, + (timeout_t *)vblank_disable_fn, (void *)dev); + DRM_SPINUNLOCK(&dev->vbl_lock); + } return 0; err: @@ -212,9 +224,9 @@ int drm_irq_uninstall(struct drm_device for (crtc = 0; crtc < dev->num_crtcs; crtc++) { if (dev->vblank[crtc].enabled) { DRM_WAKEUP(&dev->vblank[crtc].queue); - dev->vblank[crtc].enabled = 0; dev->vblank[crtc].last = - dev->driver->get_vblank_counter(dev, crtc); + dev->driver->get_vblank_counter(dev, crtc); + dev->vblank[crtc].enabled = 0; } } DRM_SPINUNLOCK(&dev->vbl_lock); @@ -320,9 +332,11 @@ void drm_vblank_put(struct drm_device *d /* Last user schedules interrupt disable */ atomic_subtract_acq_int(&dev->vblank[crtc].refcount, 1); + DRM_SPINLOCK(&dev->vbl_lock); if (dev->vblank[crtc].refcount == 0) callout_reset(&dev->vblank_disable_timer, 5 * DRM_HZ, (timeout_t *)vblank_disable_fn, (void *)dev); + DRM_SPINUNLOCK(&dev->vbl_lock); } int drm_modeset_ctl(struct drm_device *dev, void *data, @@ -449,31 +463,26 @@ int drm_wait_vblank(struct drm_device *d } else { DRM_DEBUG("waiting on vblank count %d, crtc %d\n", vblwait->request.sequence, crtc); - for ( ret = 0 ; !ret && !((drm_vblank_count(dev, crtc) - - vblwait->request.sequence) <= (1 << 23)) ; ) { - mtx_lock(&dev->irq_lock); - if (!((drm_vblank_count(dev, crtc) - - vblwait->request.sequence) <= (1 << 23))) - ret = mtx_sleep(&dev->vblank[crtc].queue, - &dev->irq_lock, PCATCH, "vblwtq", - 3 * DRM_HZ); - mtx_unlock(&dev->irq_lock); - } - - if (ret == ERESTART) { - DRM_DEBUG("restarting syscall\n"); -
svn commit: r194729 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:00:14 2009 New Revision: 194729 URL: http://svn.freebsd.org/changeset/base/194729 Log: Merge 190433 from HEAD Fix up waiting on vblank again... This reverts a last minute change that I made on the last patch, it seems to upset suspend/resume and shutdown. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_irq.c Modified: stable/7/sys/dev/drm/drm_irq.c == --- stable/7/sys/dev/drm/drm_irq.c Tue Jun 23 15:59:10 2009 (r194728) +++ stable/7/sys/dev/drm/drm_irq.c Tue Jun 23 16:00:14 2009 (r194729) @@ -463,16 +463,19 @@ int drm_wait_vblank(struct drm_device *d } else { DRM_DEBUG("waiting on vblank count %d, crtc %d\n", vblwait->request.sequence, crtc); - mtx_lock(&dev->irq_lock); dev->vblank[crtc].last = vblwait->request.sequence; for ( ret = 0 ; !ret && !(((drm_vblank_count(dev, crtc) - vblwait->request.sequence) <= (1 << 23)) || !dev->irq_enabled) ; ) { - ret = mtx_sleep(&dev->vblank[crtc].queue, - &dev->irq_lock, PCATCH, "vblwtq", - 3 * DRM_HZ); + mtx_lock(&dev->irq_lock); + if (!(((drm_vblank_count(dev, crtc) - + vblwait->request.sequence) <= (1 << 23)) || + !dev->irq_enabled)) + ret = mtx_sleep(&dev->vblank[crtc].queue, + &dev->irq_lock, PCATCH, "vblwtq", + 3 * DRM_HZ); + mtx_unlock(&dev->irq_lock); } - mtx_unlock(&dev->irq_lock); if (ret != EINTR && ret != ERESTART) { struct timeval now; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194730 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:02:04 2009 New Revision: 194730 URL: http://svn.freebsd.org/changeset/base/194730 Log: Merge 190595 from HEAD Simplify the radeon microcode loading. Submitted by: Christoph Mallon Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/r600_cp.c stable/7/sys/dev/drm/radeon_cp.c Modified: stable/7/sys/dev/drm/r600_cp.c == --- stable/7/sys/dev/drm/r600_cp.c Tue Jun 23 16:00:14 2009 (r194729) +++ stable/7/sys/dev/drm/r600_cp.c Tue Jun 23 16:02:04 2009 (r194730) @@ -282,6 +282,8 @@ static void r600_vm_init(struct drm_devi /* load r600 microcode */ static void r600_cp_load_microcode(drm_radeon_private_t *dev_priv) { + const u32 (*cp)[3]; + const u32 *pfp; int i; r600_do_cp_stop(dev_priv); @@ -298,116 +300,60 @@ static void r600_cp_load_microcode(drm_r RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); - if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R600)) { - DRM_INFO("Loading R600 CP Microcode\n"); - for (i = 0; i < PM4_UCODE_SIZE; i++) { - RADEON_WRITE(R600_CP_ME_RAM_DATA, -R600_cp_microcode[i][0]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -R600_cp_microcode[i][1]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -R600_cp_microcode[i][2]); - } - - RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); - DRM_INFO("Loading R600 PFP Microcode\n"); - for (i = 0; i < PFP_UCODE_SIZE; i++) - RADEON_WRITE(R600_CP_PFP_UCODE_DATA, R600_pfp_microcode[i]); - } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610)) { - DRM_INFO("Loading RV610 CP Microcode\n"); - for (i = 0; i < PM4_UCODE_SIZE; i++) { - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV610_cp_microcode[i][0]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV610_cp_microcode[i][1]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV610_cp_microcode[i][2]); - } - - RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); - DRM_INFO("Loading RV610 PFP Microcode\n"); - for (i = 0; i < PFP_UCODE_SIZE; i++) - RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RV610_pfp_microcode[i]); - } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630)) { - DRM_INFO("Loading RV630 CP Microcode\n"); - for (i = 0; i < PM4_UCODE_SIZE; i++) { - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV630_cp_microcode[i][0]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV630_cp_microcode[i][1]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV630_cp_microcode[i][2]); - } - - RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); - DRM_INFO("Loading RV630 PFP Microcode\n"); - for (i = 0; i < PFP_UCODE_SIZE; i++) - RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RV630_pfp_microcode[i]); - } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620)) { - DRM_INFO("Loading RV620 CP Microcode\n"); - for (i = 0; i < PM4_UCODE_SIZE; i++) { - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV620_cp_microcode[i][0]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV620_cp_microcode[i][1]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV620_cp_microcode[i][2]); - } - - RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); - DRM_INFO("Loading RV620 PFP Microcode\n"); - for (i = 0; i < PFP_UCODE_SIZE; i++) - RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RV620_pfp_microcode[i]); - } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV635)) { - DRM_INFO("Loading RV635 CP Microcode\n"); - for (i = 0; i < PM4_UCODE_SIZE; i++) { - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV635_cp_microcode[i][0]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV635_cp_microcode[i][1]); - RADEON_WRITE(R600_CP_ME_RAM_DATA, -RV635_cp_microcode[i][2]); - } + switch (dev_priv->flags & RADEON_FAMILY_MASK) { +
svn commit: r194731 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:04:54 2009 New Revision: 194731 URL: http://svn.freebsd.org/changeset/base/194731 Log: Merge 190674 from HEAD A little more cleanup from AMD, if we don't have the right microcode there is no reason to mess with the chip. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/r600_cp.c stable/7/sys/dev/drm/radeon_cp.c Modified: stable/7/sys/dev/drm/r600_cp.c == --- stable/7/sys/dev/drm/r600_cp.c Tue Jun 23 16:02:04 2009 (r194730) +++ stable/7/sys/dev/drm/r600_cp.c Tue Jun 23 16:04:54 2009 (r194731) @@ -286,20 +286,6 @@ static void r600_cp_load_microcode(drm_r const u32 *pfp; int i; - r600_do_cp_stop(dev_priv); - - RADEON_WRITE(R600_CP_RB_CNTL, -R600_RB_NO_UPDATE | -R600_RB_BLKSZ(15) | -R600_RB_BUFSZ(3)); - - RADEON_WRITE(R600_GRBM_SOFT_RESET, R600_SOFT_RESET_CP); - RADEON_READ(R600_GRBM_SOFT_RESET); - DRM_UDELAY(15000); - RADEON_WRITE(R600_GRBM_SOFT_RESET, 0); - - RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); - switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_R600: DRM_INFO("Loading R600 Microcode\n"); @@ -337,19 +323,32 @@ static void r600_cp_load_microcode(drm_r pfp = RS780_pfp_microcode; break; default: - goto no_microcode; + return; } - for (i = 0; i != PM4_UCODE_SIZE; i++) { + r600_do_cp_stop(dev_priv); + + RADEON_WRITE(R600_CP_RB_CNTL, +R600_RB_NO_UPDATE | +R600_RB_BLKSZ(15) | +R600_RB_BUFSZ(3)); + + RADEON_WRITE(R600_GRBM_SOFT_RESET, R600_SOFT_RESET_CP); + RADEON_READ(R600_GRBM_SOFT_RESET); + DRM_UDELAY(15000); + RADEON_WRITE(R600_GRBM_SOFT_RESET, 0); + + RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); + + for (i = 0; i < PM4_UCODE_SIZE; i++) { RADEON_WRITE(R600_CP_ME_RAM_DATA, cp[i][0]); RADEON_WRITE(R600_CP_ME_RAM_DATA, cp[i][1]); RADEON_WRITE(R600_CP_ME_RAM_DATA, cp[i][2]); } RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); - for (i = 0; i != PFP_UCODE_SIZE; i++) + for (i = 0; i < PFP_UCODE_SIZE; i++) RADEON_WRITE(R600_CP_PFP_UCODE_DATA, pfp[i]); -no_microcode:; RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); @@ -415,21 +414,9 @@ static void r700_cp_load_microcode(drm_r const u32 *cp; int i; - r600_do_cp_stop(dev_priv); - - RADEON_WRITE(R600_CP_RB_CNTL, -R600_RB_NO_UPDATE | -(15 << 8) | -(3 << 0)); - - RADEON_WRITE(R600_GRBM_SOFT_RESET, R600_SOFT_RESET_CP); - RADEON_READ(R600_GRBM_SOFT_RESET); - DRM_UDELAY(15000); - RADEON_WRITE(R600_GRBM_SOFT_RESET, 0); - switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_RV770: - DRM_INFO("Loading RV770 Microcode\n"); + DRM_INFO("Loading RV770/RV790 Microcode\n"); pfp = RV770_pfp_microcode; cp = RV770_cp_microcode; break; @@ -444,19 +431,30 @@ static void r700_cp_load_microcode(drm_r cp = RV710_cp_microcode; break; default: - goto no_microcode; + return; } + r600_do_cp_stop(dev_priv); + + RADEON_WRITE(R600_CP_RB_CNTL, +R600_RB_NO_UPDATE | +(15 << 8) | +(3 << 0)); + + RADEON_WRITE(R600_GRBM_SOFT_RESET, R600_SOFT_RESET_CP); + RADEON_READ(R600_GRBM_SOFT_RESET); + DRM_UDELAY(15000); + RADEON_WRITE(R600_GRBM_SOFT_RESET, 0); + RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); - for (i = 0; i != R700_PFP_UCODE_SIZE; i++) + for (i = 0; i < R700_PFP_UCODE_SIZE; i++) RADEON_WRITE(R600_CP_PFP_UCODE_DATA, pfp[i]); RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); - for (i = 0; i != R700_PM4_UCODE_SIZE; i++) + for (i = 0; i < R700_PM4_UCODE_SIZE; i++) RADEON_WRITE(R600_CP_ME_RAM_DATA, cp[i]); RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); -no_microcode:; RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); Modified: stable/7/sys/dev/drm/radeon_cp.c == --- stable/7/sys/dev/drm/radeon_cp.cTue Jun 23 16:02:04 2009 (r194730) +++ stable/7/sys/dev/drm/radeon_cp.cTue Jun 23 16:04:54 2009 (r194731) @@ -460,9 +460,6 @@ static void radeon_cp_load_microcode(drm DRM_DEBUG("\n"); -
svn commit: r194732 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:06:13 2009 New Revision: 194732 URL: http://svn.freebsd.org/changeset/base/194732 Log: Merge 190675 from HEAD Add support for RV790 (HD 4890) asics Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_pciids.h Modified: stable/7/sys/dev/drm/drm_pciids.h == --- stable/7/sys/dev/drm/drm_pciids.h Tue Jun 23 16:04:54 2009 (r194731) +++ stable/7/sys/dev/drm/drm_pciids.h Tue Jun 23 16:06:13 2009 (r194732) @@ -336,6 +336,8 @@ {0x1002, 0x944B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850 X2"}, \ {0x1002, 0x945A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4870"}, \ {0x1002, 0x945B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon M98"}, \ + {0x1002, 0x9460, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x9462, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x946A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7750"}, \ {0x1002, 0x946B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ {0x1002, 0x947A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194733 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:07:56 2009 New Revision: 194733 URL: http://svn.freebsd.org/changeset/base/194733 Log: Merge 190831 from HEAD Add regs required for occlusion queries support Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/r300_cmdbuf.c stable/7/sys/dev/drm/r300_reg.h stable/7/sys/dev/drm/radeon_cp.c stable/7/sys/dev/drm/radeon_drv.h Modified: stable/7/sys/dev/drm/r300_cmdbuf.c == --- stable/7/sys/dev/drm/r300_cmdbuf.c Tue Jun 23 16:06:13 2009 (r194732) +++ stable/7/sys/dev/drm/r300_cmdbuf.c Tue Jun 23 16:07:56 2009 (r194733) @@ -208,6 +208,10 @@ void r300_init_reg_flags(struct drm_devi ADD_RANGE(0x42C0, 2); ADD_RANGE(R300_RS_CNTL_0, 2); + ADD_RANGE(R300_SU_REG_DEST, 1); + if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV530) + ADD_RANGE(RV530_FG_ZBREG_DEST, 1); + ADD_RANGE(R300_SC_HYPERZ, 2); ADD_RANGE(0x43E8, 1); @@ -233,6 +237,7 @@ void r300_init_reg_flags(struct drm_devi ADD_RANGE(R300_ZB_DEPTHPITCH, 1); ADD_RANGE(R300_ZB_DEPTHCLEARVALUE, 1); ADD_RANGE(R300_ZB_ZMASK_OFFSET, 13); + ADD_RANGE(R300_ZB_ZPASS_DATA, 2); /* ZB_ZPASS_DATA, ZB_ZPASS_ADDR */ ADD_RANGE(R300_TX_FILTER_0, 16); ADD_RANGE(R300_TX_FILTER1_0, 16); Modified: stable/7/sys/dev/drm/r300_reg.h == --- stable/7/sys/dev/drm/r300_reg.h Tue Jun 23 16:06:13 2009 (r194732) +++ stable/7/sys/dev/drm/r300_reg.h Tue Jun 23 16:07:56 2009 (r194733) @@ -1776,6 +1776,11 @@ __FBSDID("$FreeBSD$"); #define R500_RB3D_COLOR_CLEAR_VALUE_AR 0x46c0 #define R500_RB3D_CONSTANT_COLOR_AR 0x4ef8 +#define R300_SU_REG_DEST0x42c8 +#define RV530_FG_ZBREG_DEST 0x4be8 +#define R300_ZB_ZPASS_DATA 0x4f58 +#define R300_ZB_ZPASS_ADDR 0x4f5c + #endif /* _R300_REG_H */ /* *INDENT-ON* */ Modified: stable/7/sys/dev/drm/radeon_cp.c == --- stable/7/sys/dev/drm/radeon_cp.cTue Jun 23 16:06:13 2009 (r194732) +++ stable/7/sys/dev/drm/radeon_cp.cTue Jun 23 16:07:56 2009 (r194733) @@ -436,7 +436,7 @@ static void radeon_init_pipes(drm_radeon if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RV515) { RADEON_WRITE_PLL(R500_DYN_SCLK_PWMEM_PIPE, (1 | ((gb_pipe_sel >> 8) & 0xf) << 4)); - RADEON_WRITE(R500_SU_REG_DEST, ((1 << dev_priv->num_gb_pipes) - 1)); + RADEON_WRITE(R300_SU_REG_DEST, ((1 << dev_priv->num_gb_pipes) - 1)); } RADEON_WRITE(R300_GB_TILE_CONFIG, gb_tile_config); radeon_do_wait_for_idle(dev_priv); Modified: stable/7/sys/dev/drm/radeon_drv.h == --- stable/7/sys/dev/drm/radeon_drv.h Tue Jun 23 16:06:13 2009 (r194732) +++ stable/7/sys/dev/drm/radeon_drv.h Tue Jun 23 16:07:56 2009 (r194733) @@ -684,7 +684,6 @@ extern void r600_page_table_cleanup(stru /* pipe config regs */ #define R400_GB_PIPE_SELECT 0x402c #define R500_DYN_SCLK_PWMEM_PIPE0x000d /* PLL */ -#define R500_SU_REG_DEST0x42c8 #define R300_GB_TILE_CONFIG 0x4018 # define R300_ENABLE_TILING (1 << 0) # define R300_PIPE_COUNT_RV350(0 << 1) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194734 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:09:05 2009 New Revision: 194734 URL: http://svn.freebsd.org/changeset/base/194734 Log: Merge 190833 from HEAD check offsets for R300_ZB_ZPASS_ADDR Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/r300_cmdbuf.c Modified: stable/7/sys/dev/drm/r300_cmdbuf.c == --- stable/7/sys/dev/drm/r300_cmdbuf.c Tue Jun 23 16:07:56 2009 (r194733) +++ stable/7/sys/dev/drm/r300_cmdbuf.c Tue Jun 23 16:09:05 2009 (r194734) @@ -236,8 +236,11 @@ void r300_init_reg_flags(struct drm_devi ADD_RANGE_MARK(R300_ZB_DEPTHOFFSET, 1, MARK_CHECK_OFFSET); /* check offset */ ADD_RANGE(R300_ZB_DEPTHPITCH, 1); ADD_RANGE(R300_ZB_DEPTHCLEARVALUE, 1); - ADD_RANGE(R300_ZB_ZMASK_OFFSET, 13); - ADD_RANGE(R300_ZB_ZPASS_DATA, 2); /* ZB_ZPASS_DATA, ZB_ZPASS_ADDR */ + ADD_RANGE(R300_ZB_ZMASK_OFFSET, 5); + ADD_RANGE(R300_ZB_HIZ_OFFSET, 5); + ADD_RANGE(R300_ZB_ZPASS_DATA, 1); + ADD_RANGE_MARK(R300_ZB_ZPASS_ADDR, 1, MARK_CHECK_OFFSET); /* check offset */ + ADD_RANGE(R300_ZB_DEPTHXY_OFFSET, 1) ADD_RANGE(R300_TX_FILTER_0, 16); ADD_RANGE(R300_TX_FILTER1_0, 16); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194735 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:11:44 2009 New Revision: 194735 URL: http://svn.freebsd.org/changeset/base/194735 Log: Merge 194537 from HEAD Don't panic if drm_rmmap is called with a NULL map pointer. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_bufs.c Modified: stable/7/sys/dev/drm/drm_bufs.c == --- stable/7/sys/dev/drm/drm_bufs.c Tue Jun 23 16:09:05 2009 (r194734) +++ stable/7/sys/dev/drm/drm_bufs.c Tue Jun 23 16:11:44 2009 (r194735) @@ -296,6 +296,9 @@ void drm_rmmap(struct drm_device *dev, d { DRM_SPINLOCK_ASSERT(&dev->dev_lock); + if (map == NULL) + return; + TAILQ_REMOVE(&dev->maplist, map, link); switch (map->type) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194736 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:12:40 2009 New Revision: 194736 URL: http://svn.freebsd.org/changeset/base/194736 Log: Merge 194539 from HEAD realloc() behaves identically to malloc when passed a NULL object pointer If an error does occur we would have left max_context with an incorrect value. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/drm_context.c Modified: stable/7/sys/dev/drm/drm_context.c == --- stable/7/sys/dev/drm/drm_context.c Tue Jun 23 16:11:44 2009 (r194735) +++ stable/7/sys/dev/drm/drm_context.c Tue Jun 23 16:12:40 2009 (r194736) @@ -72,34 +72,23 @@ int drm_ctxbitmap_next(struct drm_device } set_bit(bit, dev->ctx_bitmap); - DRM_DEBUG("drm_ctxbitmap_next bit : %d\n", bit); + DRM_DEBUG("bit : %d\n", bit); if ((bit+1) > dev->max_context) { - dev->max_context = (bit+1); - if (dev->context_sareas != NULL) { - drm_local_map_t **ctx_sareas; - - ctx_sareas = realloc(dev->context_sareas, - dev->max_context * sizeof(*dev->context_sareas), - DRM_MEM_SAREA, M_NOWAIT); - if (ctx_sareas == NULL) { - clear_bit(bit, dev->ctx_bitmap); - DRM_UNLOCK(); - return -1; - } - dev->context_sareas = ctx_sareas; - dev->context_sareas[bit] = NULL; - } else { - /* max_context == 1 at this point */ - dev->context_sareas = malloc(dev->max_context * - sizeof(*dev->context_sareas), DRM_MEM_SAREA, - M_NOWAIT); - if (dev->context_sareas == NULL) { - clear_bit(bit, dev->ctx_bitmap); - DRM_UNLOCK(); - return -1; - } - dev->context_sareas[bit] = NULL; + drm_local_map_t **ctx_sareas; + int max_ctx = (bit+1); + + ctx_sareas = realloc(dev->context_sareas, + max_ctx * sizeof(*dev->context_sareas), + DRM_MEM_SAREA, M_NOWAIT); + if (ctx_sareas == NULL) { + clear_bit(bit, dev->ctx_bitmap); + DRM_DEBUG("failed to allocate bit : %d\n", bit); + DRM_UNLOCK(); + return -1; } + dev->max_context = max_ctx; + dev->context_sareas = ctx_sareas; + dev->context_sareas[bit] = NULL; } DRM_UNLOCK(); return bit; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194737 - in stable/7/sys: . contrib/pf dev/drm
Author: rnoland Date: Tue Jun 23 16:14:08 2009 New Revision: 194737 URL: http://svn.freebsd.org/changeset/base/194737 Log: Merge 194540 from HEAD The G45 docs indicate that all G4X chips use the new framecount register. Intel agrees with my reading of the docs, make it so for all G4X chips. The new register also has a 32 bit width as opposed to 24 bits. Fix things up so that the counters roll over properly. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/drm/i915_dma.c stable/7/sys/dev/drm/i915_drv.h stable/7/sys/dev/drm/i915_irq.c Modified: stable/7/sys/dev/drm/i915_dma.c == --- stable/7/sys/dev/drm/i915_dma.c Tue Jun 23 16:12:40 2009 (r194736) +++ stable/7/sys/dev/drm/i915_dma.c Tue Jun 23 16:14:08 2009 (r194737) @@ -871,10 +871,13 @@ int i915_driver_load(struct drm_device * ret = drm_addmap(dev, base, size, _DRM_REGISTERS, _DRM_KERNEL | _DRM_DRIVER, &dev_priv->mmio_map); - if (IS_GM45(dev)) - dev->driver->get_vblank_counter = gm45_get_vblank_counter; - else + if (IS_G4X(dev)) { + dev->driver->get_vblank_counter = g45_get_vblank_counter; + dev->max_vblank_count = 0x; /* 32 bits of frame count */ + } else { dev->driver->get_vblank_counter = i915_get_vblank_counter; + dev->max_vblank_count = 0x00ff; /* 24 bits of frame count */ + } #ifdef I915_HAVE_GEM i915_gem_load(dev); Modified: stable/7/sys/dev/drm/i915_drv.h == --- stable/7/sys/dev/drm/i915_drv.h Tue Jun 23 16:12:40 2009 (r194736) +++ stable/7/sys/dev/drm/i915_drv.h Tue Jun 23 16:14:08 2009 (r194737) @@ -453,7 +453,7 @@ extern int i915_vblank_pipe_get(struct d extern int i915_enable_vblank(struct drm_device *dev, int crtc); extern void i915_disable_vblank(struct drm_device *dev, int crtc); extern u32 i915_get_vblank_counter(struct drm_device *dev, int crtc); -extern u32 gm45_get_vblank_counter(struct drm_device *dev, int crtc); +extern u32 g45_get_vblank_counter(struct drm_device *dev, int crtc); extern int i915_vblank_swap(struct drm_device *dev, void *data, struct drm_file *file_priv); Modified: stable/7/sys/dev/drm/i915_irq.c == --- stable/7/sys/dev/drm/i915_irq.c Tue Jun 23 16:12:40 2009 (r194736) +++ stable/7/sys/dev/drm/i915_irq.c Tue Jun 23 16:14:08 2009 (r194737) @@ -177,7 +177,7 @@ u32 i915_get_vblank_counter(struct drm_d return count; } -u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe) +u32 g45_get_vblank_counter(struct drm_device *dev, int pipe) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; int reg = pipe ? PIPEB_FRMCOUNT_GM45 : PIPEA_FRMCOUNT_GM45; @@ -516,8 +516,6 @@ int i915_driver_irq_postinstall(struct d dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B; - dev->max_vblank_count = 0xff; /* only 24 bits of frame count */ - /* Unmask the interrupts that we always want on. */ dev_priv->irq_mask_reg = ~I915_INTERRUPT_ENABLE_FIX; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194739 - in head/sys: compat/linprocfs compat/linux compat/svr4 contrib/altq/altq contrib/pf/net dev/cxgb/ulp/iw_cxgb kern net net80211 netgraph netgraph/atm netinet netinet6 nfsclient
Author: bz Date: Tue Jun 23 17:03:45 2009 New Revision: 194739 URL: http://svn.freebsd.org/changeset/base/194739 Log: After cleaning up rt_tables from vnet.h and cleaning up opt_route.h a lot of files no longer need route.h either. Garbage collect them. While here remove now unneeded vnet.h #includes as well. Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_ioctl.c head/sys/compat/svr4/svr4_sockio.c head/sys/contrib/altq/altq/altq_subr.c head/sys/contrib/pf/net/pf_if.c head/sys/contrib/pf/net/pf_ioctl.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c head/sys/kern/kern_poll.c head/sys/kern/kern_uuid.c head/sys/net/bridgestp.c head/sys/net/if_ef.c head/sys/net/if_mib.c head/sys/net/if_vlan.c head/sys/net/raw_cb.c head/sys/net/raw_usrreq.c head/sys/net80211/ieee80211_ddb.c head/sys/netgraph/atm/ng_atm.c head/sys/netgraph/ng_ether.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in_pcb.h head/sys/netinet/in_rmx.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_offload.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/scope6.c head/sys/nfsclient/nfs_diskless.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Tue Jun 23 16:50:23 2009 (r194738) +++ head/sys/compat/linprocfs/linprocfs.c Tue Jun 23 17:03:45 2009 (r194739) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/compat/linux/linux_ioctl.c == --- head/sys/compat/linux/linux_ioctl.c Tue Jun 23 16:50:23 2009 (r194738) +++ head/sys/compat/linux/linux_ioctl.c Tue Jun 23 17:03:45 2009 (r194739) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef COMPAT_LINUX32 Modified: head/sys/compat/svr4/svr4_sockio.c == --- head/sys/compat/svr4/svr4_sockio.c Tue Jun 23 16:50:23 2009 (r194738) +++ head/sys/compat/svr4/svr4_sockio.c Tue Jun 23 17:03:45 2009 (r194739) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/contrib/altq/altq/altq_subr.c == --- head/sys/contrib/altq/altq/altq_subr.c Tue Jun 23 16:50:23 2009 (r194738) +++ head/sys/contrib/altq/altq/altq_subr.c Tue Jun 23 17:03:45 2009 (r194739) @@ -55,7 +55,6 @@ #include #include #ifdef __FreeBSD__ -#include #include #endif Modified: head/sys/contrib/pf/net/pf_if.c == --- head/sys/contrib/pf/net/pf_if.c Tue Jun 23 16:50:23 2009 (r194738) +++ head/sys/contrib/pf/net/pf_if.c Tue Jun 23 17:03:45 2009 (r194739) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #ifdef __FreeBSD__ -#include #include #endif Modified: head/sys/contrib/pf/net/pf_ioctl.c == --- head/sys/contrib/pf/net/pf_ioctl.c Tue Jun 23 16:50:23 2009 (r194738) +++ head/sys/contrib/pf/net/pf_ioctl.c Tue Jun 23 17:03:45 2009 (r194739) @@ -98,7 +98,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #ifdef __FreeBSD__ #include #endif Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c == --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Tue Jun 23 16:50:23 2009 (r194738) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Tue Jun 23 17:03:45 2009 (r194739) @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include #if __FreeBSD_version >= 800056 -#include #include #endif Modified: head/sys/kern/kern_poll.c == --- head/sys/kern/kern_poll.c Tue Jun 23 16:50:23 2009(r194738) +++ head/sys/kern/kern_poll.c Tue Jun 23 17:03:45 2009(r194739) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include /* for IFF_* flags */ #include /* for NETISR_POLL */ -#include #include static int poll_switch(SYSCTL_HANDLER_ARGS); Modified: head/sys/kern/kern_uuid.c == --- head/sys/kern/kern_uuid.c Tue Jun 23 16:50:23 2009(r194738) +++ head/sys/kern/kern_uuid.c Tue Jun 23 17:03:45 2009(r194739) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/net/bridgestp.c
svn commit: r194740 - in stable/6/lib/libc: . gen
Author: jhb Date: Tue Jun 23 17:19:50 2009 New Revision: 194740 URL: http://svn.freebsd.org/changeset/base/194740 Log: MF7: If the running kernel has support for shm_open() and shm_unlink() as system calls (i.e. 8.0+), then invoke the system calls instead of using open/fcntl/unlink. Modified: stable/6/lib/libc/ (props changed) stable/6/lib/libc/gen/posixshm.c Modified: stable/6/lib/libc/gen/posixshm.c == --- stable/6/lib/libc/gen/posixshm.cTue Jun 23 17:03:45 2009 (r194739) +++ stable/6/lib/libc/gen/posixshm.cTue Jun 23 17:19:50 2009 (r194740) @@ -40,12 +40,34 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +static int _shm_in_kernel = -1; + +/* Wrappers for POSIX SHM system calls in newer kernels. */ +static __inline int +_shm_open(const char *path, int flags, mode_t mode) +{ + +return (syscall(482, path, flags, mode)); +} + +static __inline int +_shm_unlink(const char *path) +{ + +return (syscall(483, path)); +} + int shm_open(const char *path, int flags, mode_t mode) { int fd; struct stat stab; + if (_shm_in_kernel == -1) + _shm_in_kernel = feature_present("posix_shm"); + if (_shm_in_kernel == 1) + return (_shm_open(path, flags, mode)); + if ((flags & O_ACCMODE) == O_WRONLY) return (EINVAL); @@ -68,5 +90,11 @@ shm_open(const char *path, int flags, mo int shm_unlink(const char *path) { + + if (_shm_in_kernel == -1) + _shm_in_kernel = feature_present("posix_shm"); + if (_shm_in_kernel == 1) + return (_shm_unlink(path)); + return (unlink(path)); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194741 - head/sys/dev/drm
Author: rnoland Date: Tue Jun 23 17:38:28 2009 New Revision: 194741 URL: http://svn.freebsd.org/changeset/base/194741 Log: Hold the lock while we save/restore register for suspend/resume. MFC after:3 days Modified: head/sys/dev/drm/i915_drv.c Modified: head/sys/dev/drm/i915_drv.c == --- head/sys/dev/drm/i915_drv.c Tue Jun 23 17:19:50 2009(r194740) +++ head/sys/dev/drm/i915_drv.c Tue Jun 23 17:38:28 2009(r194741) @@ -52,7 +52,10 @@ static int i915_suspend(device_t kdev) return -ENODEV; } + DRM_LOCK(); + DRM_DEBUG("starting suspend\n"); i915_save_state(dev); + DRM_UNLOCK(); return (bus_generic_suspend(kdev)); } @@ -61,7 +64,10 @@ static int i915_resume(device_t kdev) { struct drm_device *dev = device_get_softc(kdev); + DRM_LOCK(); i915_restore_state(dev); + DRM_DEBUG("finished resume\n"); + DRM_UNLOCK(); return (bus_generic_resume(kdev)); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194743 - in head/sys: conf dev/mxge modules/mxge/mxge
Author: gallatin Date: Tue Jun 23 17:42:06 2009 New Revision: 194743 URL: http://svn.freebsd.org/changeset/base/194743 Log: Implement minimal set of changes suggested by bz to make mxge no longer depend on INET. Modified: head/sys/conf/files head/sys/dev/mxge/if_mxge.c head/sys/dev/mxge/mxge_lro.c head/sys/modules/mxge/mxge/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Tue Jun 23 17:41:51 2009(r194742) +++ head/sys/conf/files Tue Jun 23 17:42:06 2009(r194743) @@ -1207,12 +1207,12 @@ mwlboot.fw optional mwlfw \ compile-with"uudecode -o ${.TARGET} $S/contrib/dev/mwl/mwlboot.fw.uu" \ no-obj no-implicit-rule \ clean "mwlboot.fw" -dev/mxge/if_mxge.c optional mxge pci inet -dev/mxge/mxge_lro.coptional mxge pci inet -dev/mxge/mxge_eth_z8e.coptional mxge pci inet -dev/mxge/mxge_ethp_z8e.c optional mxge pci inet -dev/mxge/mxge_rss_eth_z8e.coptional mxge pci inet -dev/mxge/mxge_rss_ethp_z8e.c optional mxge pci inet +dev/mxge/if_mxge.c optional mxge pci +dev/mxge/mxge_lro.coptional mxge pci +dev/mxge/mxge_eth_z8e.coptional mxge pci +dev/mxge/mxge_ethp_z8e.c optional mxge pci +dev/mxge/mxge_rss_eth_z8e.coptional mxge pci +dev/mxge/mxge_rss_ethp_z8e.c optional mxge pci dev/my/if_my.c optional my dev/ncv/ncr53c500.coptional ncv dev/ncv/ncr53c500_pccard.c optional ncv pccard Modified: head/sys/dev/mxge/if_mxge.c == --- head/sys/dev/mxge/if_mxge.c Tue Jun 23 17:41:51 2009(r194742) +++ head/sys/dev/mxge/if_mxge.c Tue Jun 23 17:42:06 2009(r194743) @@ -89,6 +89,8 @@ __FBSDID("$FreeBSD$"); #include #endif +#include "opt_inet.h" + /* tunable params */ static int mxge_nvidia_ecrc_enable = 1; static int mxge_force_firmware = 0; @@ -2408,10 +2410,13 @@ mxge_rx_csum(struct mbuf *m, int csum) if (__predict_false(ip->ip_p != IPPROTO_TCP && ip->ip_p != IPPROTO_UDP)) return 1; - +#ifdef INET c = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htonl(ntohs(csum) + ntohs(ip->ip_len) + - (ip->ip_hl << 2) + ip->ip_p)); +#else + c = 1; +#endif c ^= 0x; return (c); } @@ -2607,7 +2612,6 @@ static inline void mxge_clean_rx_done(struct mxge_slice_state *ss) { mxge_rx_done_t *rx_done = &ss->rx_done; - struct lro_entry *lro; int limit = 0; uint16_t length; uint16_t checksum; @@ -2628,11 +2632,13 @@ mxge_clean_rx_done(struct mxge_slice_sta if (__predict_false(++limit > rx_done->mask / 2)) break; } +#ifdef INET while (!SLIST_EMPTY(&ss->lro_active)) { - lro = SLIST_FIRST(&ss->lro_active); + struct lro_entry *lro = SLIST_FIRST(&ss->lro_active); SLIST_REMOVE_HEAD(&ss->lro_active, next); mxge_lro_flush(ss, lro); } +#endif } @@ -4529,7 +4535,10 @@ mxge_attach(device_t dev) ifp->if_baudrate = IF_Gbps(10UL); ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO4 | - IFCAP_VLAN_MTU | IFCAP_LRO; + IFCAP_VLAN_MTU; +#ifdef INET + ifp->if_capabilities |= IFCAP_LRO; +#endif #ifdef MXGE_NEW_VLAN_API ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM; Modified: head/sys/dev/mxge/mxge_lro.c == --- head/sys/dev/mxge/mxge_lro.cTue Jun 23 17:41:51 2009 (r194742) +++ head/sys/dev/mxge/mxge_lro.cTue Jun 23 17:42:06 2009 (r194743) @@ -54,6 +54,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_inet.h" + +#ifdef INET /* Assume len is a multiple of 4 */ static uint16_t @@ -340,6 +343,8 @@ mxge_lro_rx(struct mxge_slice_state *ss, lro->m_tail = m_tail; return 0; } + +#endif /* INET */ /* This file uses Myri10GE driver indentation. Modified: head/sys/modules/mxge/mxge/Makefile == --- head/sys/modules/mxge/mxge/Makefile Tue Jun 23 17:41:51 2009 (r194742) +++ head/sys/modules/mxge/mxge/Makefile Tue Jun 23 17:42:06 2009 (r194743) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../../dev/mxge KMOD= if_mxge -SRCS= if_mxge.c mxge_lro.c device_if.h bus_if.h pci_if.h +SRCS= if_mxge.c mxge_lro.c device_if.h bus_if.h pci_if.h opt_inet.h .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/
svn commit: r194744 - in stable/4/lib/libc: . gen
Author: jhb Date: Tue Jun 23 17:44:55 2009 New Revision: 194744 URL: http://svn.freebsd.org/changeset/base/194744 Log: MF7: If the running kernel has support for shm_open() and shm_unlink() as system calls (i.e. 8.0+), then invoke the system calls instead of using open/fcntl/unlink. Modified: stable/4/lib/libc/ (props changed) stable/4/lib/libc/gen/posixshm.c Modified: stable/4/lib/libc/gen/posixshm.c == --- stable/4/lib/libc/gen/posixshm.cTue Jun 23 17:42:06 2009 (r194743) +++ stable/4/lib/libc/gen/posixshm.cTue Jun 23 17:44:55 2009 (r194744) @@ -37,12 +37,34 @@ #include #include +static int _shm_in_kernel = -1; + +/* Wrappers for POSIX SHM system calls in newer kernels. */ +static __inline int +_shm_open(const char *path, int flags, mode_t mode) +{ + +return (syscall(482, path, flags, mode)); +} + +static __inline int +_shm_unlink(const char *path) +{ + +return (syscall(483, path)); +} + int shm_open(const char *path, int flags, mode_t mode) { int fd; struct stat stab; + if (_shm_in_kernel == -1) + _shm_in_kernel = feature_present("posix_shm"); + if (_shm_in_kernel == 1) + return (_shm_open(path, flags, mode)); + if ((flags & O_ACCMODE) == O_WRONLY) return (EINVAL); @@ -65,5 +87,11 @@ shm_open(const char *path, int flags, mo int shm_unlink(const char *path) { + + if (_shm_in_kernel == -1) + _shm_in_kernel = feature_present("posix_shm"); + if (_shm_in_kernel == 1) + return (_shm_unlink(path)); + return (unlink(path)); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194745 - head/sys/dev/drm
Author: rnoland Date: Tue Jun 23 17:50:35 2009 New Revision: 194745 URL: http://svn.freebsd.org/changeset/base/194745 Log: vblank[crtc].last represents the hardware counter while request.sequence represents the software counter. Don't currupt things here. MFC after:3 days Modified: head/sys/dev/drm/drm_irq.c Modified: head/sys/dev/drm/drm_irq.c == --- head/sys/dev/drm/drm_irq.c Tue Jun 23 17:44:55 2009(r194744) +++ head/sys/dev/drm/drm_irq.c Tue Jun 23 17:50:35 2009(r194745) @@ -463,7 +463,6 @@ int drm_wait_vblank(struct drm_device *d } else { DRM_DEBUG("waiting on vblank count %d, crtc %d\n", vblwait->request.sequence, crtc); - dev->vblank[crtc].last = vblwait->request.sequence; for ( ret = 0 ; !ret && !(((drm_vblank_count(dev, crtc) - vblwait->request.sequence) <= (1 << 23)) || !dev->irq_enabled) ; ) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194746 - head/sys/dev/drm
Author: rnoland Date: Tue Jun 23 17:52:41 2009 New Revision: 194746 URL: http://svn.freebsd.org/changeset/base/194746 Log: Given that vblanks generally occur 60 times a second, waiting 3 seconds seems rather excessive. MFC after:3 days Modified: head/sys/dev/drm/drm_irq.c Modified: head/sys/dev/drm/drm_irq.c == --- head/sys/dev/drm/drm_irq.c Tue Jun 23 17:50:35 2009(r194745) +++ head/sys/dev/drm/drm_irq.c Tue Jun 23 17:52:41 2009(r194746) @@ -472,7 +472,7 @@ int drm_wait_vblank(struct drm_device *d !dev->irq_enabled)) ret = mtx_sleep(&dev->vblank[crtc].queue, &dev->irq_lock, PCATCH, "vblwtq", - 3 * DRM_HZ); + DRM_HZ); mtx_unlock(&dev->irq_lock); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194748 - head/sys/dev/drm
Author: rnoland Date: Tue Jun 23 18:09:35 2009 New Revision: 194748 URL: http://svn.freebsd.org/changeset/base/194748 Log: Using signals for vblank events is prone to issues. There have never been any consumers and likely will never be. Furthermore, we have never enabled the code for it, so just get rid of it. MFC after:3 days Modified: head/sys/dev/drm/drmP.h head/sys/dev/drm/drm_irq.c Modified: head/sys/dev/drm/drmP.h == --- head/sys/dev/drm/drmP.h Tue Jun 23 18:00:43 2009(r194747) +++ head/sys/dev/drm/drmP.h Tue Jun 23 18:09:35 2009(r194748) @@ -502,19 +502,10 @@ typedef struct drm_local_map { TAILQ_ENTRY(drm_local_map) link; } drm_local_map_t; -TAILQ_HEAD(drm_vbl_sig_list, drm_vbl_sig); -typedef struct drm_vbl_sig { - TAILQ_ENTRY(drm_vbl_sig) link; - unsigned intsequence; - int signo; - int pid; -} drm_vbl_sig_t; - struct drm_vblank_info { wait_queue_head_t queue;/* vblank wait queue */ atomic_t count; /* number of VBLANK interrupts */ /* (driver must alloc the right number of counters) */ - struct drm_vbl_sig_list sigs; /* signal list to send on VBLANK */ atomic_t refcount; /* number of users of vblank interrupts */ u32 last; /* protected by dev->vbl_lock, used */ /* for wraparound handling */ @@ -684,7 +675,6 @@ struct drm_device { int last_context; /* Last current context*/ int vblank_disable_allowed; - atomic_t vbl_signal_pending; /* number of signals pending on all crtcs */ struct calloutvblank_disable_timer; u32 max_vblank_count; /* size of vblank counter register */ struct drm_vblank_info *vblank; /* per crtc vblank info */ @@ -802,7 +792,6 @@ voiddrm_vblank_put(struct drm_device *d void drm_vblank_cleanup(struct drm_device *dev); intdrm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq); intdrm_vblank_init(struct drm_device *dev, int num_crtcs); -void drm_vbl_send_signals(struct drm_device *dev, int crtc); intdrm_modeset_ctl(struct drm_device *dev, void *data, struct drm_file *file_priv); Modified: head/sys/dev/drm/drm_irq.c == --- head/sys/dev/drm/drm_irq.c Tue Jun 23 18:00:43 2009(r194747) +++ head/sys/dev/drm/drm_irq.c Tue Jun 23 18:09:35 2009(r194748) @@ -121,7 +121,6 @@ int drm_vblank_init(struct drm_device *d int i, ret = ENOMEM; callout_init_mtx(&dev->vblank_disable_timer, &dev->vbl_lock, 0); - atomic_set(&dev->vbl_signal_pending, 0); dev->num_crtcs = num_crtcs; dev->vblank = malloc(sizeof(struct drm_vblank_info) * num_crtcs, @@ -134,7 +133,6 @@ int drm_vblank_init(struct drm_device *d /* Zero per-crtc vblank stuff */ for (i = 0; i < num_crtcs; i++) { DRM_INIT_WAITQUEUE(&dev->vblank[i].queue); - TAILQ_INIT(&dev->vblank[i].sigs); atomic_set(&dev->vblank[i].count, 0); atomic_set(&dev->vblank[i].refcount, 0); } @@ -442,23 +440,7 @@ int drm_wait_vblank(struct drm_device *d } if (flags & _DRM_VBLANK_SIGNAL) { -#if 0 /* disabled */ - drm_vbl_sig_t *vbl_sig = malloc(sizeof(drm_vbl_sig_t), - DRM_MEM_DRIVER, M_NOWAIT | M_ZERO); - if (vbl_sig == NULL) - return ENOMEM; - - vbl_sig->sequence = vblwait->request.sequence; - vbl_sig->signo = vblwait->request.signal; - vbl_sig->pid = DRM_CURRENTPID; - - vblwait->reply.sequence = atomic_read(&dev->vbl_received); - - DRM_SPINLOCK(&dev->vbl_lock); - TAILQ_INSERT_HEAD(&dev->vbl_sig_list, vbl_sig, link); - DRM_SPINUNLOCK(&dev->vbl_lock); - ret = 0; -#endif + /* There have never been any consumers */ ret = EINVAL; } else { DRM_DEBUG("waiting on vblank count %d, crtc %d\n", @@ -495,38 +477,9 @@ done: return ret; } -void drm_vbl_send_signals(struct drm_device *dev, int crtc) -{ -} - -#if 0 /* disabled */ -void drm_vbl_send_signals(struct drm_device *dev, int crtc ) -{ - drm_vbl_sig_t *vbl_sig; - unsigned int vbl_seq = atomic_read( &dev->vbl_received ); - struct proc *p; - - vbl_sig = TAILQ_FIRST(&dev->vbl_sig_list); - while (vbl_sig != NULL) { - drm_vbl_sig_t *next = TAILQ_NEXT(vbl_sig, link); - - if ((vbl_seq - vbl_sig->sequence) <= (1 << 23)) { -
svn commit: r194749 - head/sys/dev/drm
Author: rnoland Date: Tue Jun 23 18:24:09 2009 New Revision: 194749 URL: http://svn.freebsd.org/changeset/base/194749 Log: Only release irq resources if we were actually using them. MFC after:3 days Modified: head/sys/dev/drm/drm_drv.c Modified: head/sys/dev/drm/drm_drv.c == --- head/sys/dev/drm/drm_drv.c Tue Jun 23 18:09:35 2009(r194748) +++ head/sys/dev/drm/drm_drv.c Tue Jun 23 18:24:09 2009(r194749) @@ -273,11 +273,14 @@ int drm_detach(device_t kdev) drm_unload(dev); - bus_release_resource(dev->device, SYS_RES_IRQ, dev->irqrid, dev->irqr); - - if (dev->msi_enabled) { - pci_release_msi(dev->device); - DRM_INFO("MSI released\n"); + if (dev->irqr) { + bus_release_resource(dev->device, SYS_RES_IRQ, dev->irqrid, + dev->irqr); + + if (dev->msi_enabled) { + pci_release_msi(dev->device); + DRM_INFO("MSI released\n"); + } } return 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194750 - head/sys/netipx
Author: cognet Date: Tue Jun 23 18:36:42 2009 New Revision: 194750 URL: http://svn.freebsd.org/changeset/base/194750 Log: Include sys/lock.h before sys/rwlock.h. If anything used to bring it for us before, it does not anymore. Modified: head/sys/netipx/ipx_input.c Modified: head/sys/netipx/ipx_input.c == --- head/sys/netipx/ipx_input.c Tue Jun 23 18:24:09 2009(r194749) +++ head/sys/netipx/ipx_input.c Tue Jun 23 18:36:42 2009(r194750) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194744 - in stable/4/lib/libc: . gen
On Tue, 23 Jun 2009 17:44:55 + (UTC), John Baldwin wrote: > Author: jhb > Date: Tue Jun 23 17:44:55 2009 > New Revision: 194744 > URL: http://svn.freebsd.org/changeset/base/194744 > > Log: > MF7: If the running kernel has support for shm_open() and shm_unlink() as > system calls (i.e. 8.0+), then invoke the system calls instead of using > open/fcntl/unlink. > > Modified: > stable/4/lib/libc/ (props changed) > stable/4/lib/libc/gen/posixshm.c In preparation for the 4.12 release? ;^1 -- Brian Somers Don't _EVER_ lose your sense of humour ! ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194751 - head/sys/dev/mxge
Author: gallatin Date: Tue Jun 23 19:04:25 2009 New Revision: 194751 URL: http://svn.freebsd.org/changeset/base/194751 Log: Revert most of 193311 so as to track mxge transmit stats on a per-ring basis and avoid racy (and costly) updates to the ifp stats via drbr by defining NO_SLOW_STATS Discussed with: kmacy Modified: head/sys/dev/mxge/if_mxge.c head/sys/dev/mxge/if_mxge_var.h Modified: head/sys/dev/mxge/if_mxge.c == --- head/sys/dev/mxge/if_mxge.c Tue Jun 23 18:36:42 2009(r194750) +++ head/sys/dev/mxge/if_mxge.c Tue Jun 23 19:04:25 2009(r194751) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include +/* count xmits ourselves, rather than via drbr */ +#define NO_SLOW_STATS #include #include #include @@ -2200,7 +2202,6 @@ mxge_transmit_locked(struct mxge_slice_s BPF_MTAP(ifp, m); /* give it to the nic */ mxge_encap(ss, m); - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); } else if ((err = drbr_enqueue(ifp, tx->br, m)) != 0) { return (err); } @@ -2661,6 +2662,9 @@ mxge_tx_done(struct mxge_slice_state *ss /* mbuf and DMA map only attached to the first segment per-mbuf */ if (m != NULL) { + ss->obytes += m->m_pkthdr.len; + if (m->m_flags & M_MCAST) + ss->omcasts++; ss->opackets++; tx->info[idx].m = NULL; map = tx->info[idx].map; @@ -3787,6 +3791,11 @@ mxge_update_stats(mxge_softc_t *sc) struct mxge_slice_state *ss; u_long ipackets = 0; u_long opackets = 0; +#ifdef IFNET_BUF_RING + u_long obytes = 0; + u_long omcasts = 0; + u_long odrops = 0; +#endif u_long oerrors = 0; int slice; @@ -3794,10 +3803,20 @@ mxge_update_stats(mxge_softc_t *sc) ss = &sc->ss[slice]; ipackets += ss->ipackets; opackets += ss->opackets; +#ifdef IFNET_BUF_RING + obytes += ss->obytes; + omcasts += ss->omcasts; + odrops += ss->tx.br->br_drops; +#endif oerrors += ss->oerrors; } sc->ifp->if_ipackets = ipackets; sc->ifp->if_opackets = opackets; +#ifdef IFNET_BUF_RING + sc->ifp->if_obytes = obytes; + sc->ifp->if_omcasts = omcasts; + sc->ifp->if_snd.ifq_drops = odrops; +#endif sc->ifp->if_oerrors = oerrors; } Modified: head/sys/dev/mxge/if_mxge_var.h == --- head/sys/dev/mxge/if_mxge_var.h Tue Jun 23 18:36:42 2009 (r194750) +++ head/sys/dev/mxge/if_mxge_var.h Tue Jun 23 19:04:25 2009 (r194751) @@ -196,6 +196,8 @@ struct mxge_slice_state { volatile uint32_t *irq_claim; u_long ipackets; u_long opackets; + u_long obytes; + u_long omcasts; u_long oerrors; int if_drv_flags; struct lro_head lro_active; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194752 - head/sys/arm/xscale/ixp425
Author: sam Date: Tue Jun 23 19:05:02 2009 New Revision: 194752 URL: http://svn.freebsd.org/changeset/base/194752 Log: use consistent style Modified: head/sys/arm/xscale/ixp425/ixp425.c Modified: head/sys/arm/xscale/ixp425/ixp425.c == --- head/sys/arm/xscale/ixp425/ixp425.c Tue Jun 23 19:04:25 2009 (r194751) +++ head/sys/arm/xscale/ixp425/ixp425.c Tue Jun 23 19:05:02 2009 (r194752) @@ -247,7 +247,7 @@ arm_get_next_irq(int last) last += 1; /* always advance fwd, NB: handles -1 */ if (last < 32) { mask = ixp425_irq_read() >> last; - for (; mask != 0; mask >>= 1, last += 1) { + for (; mask != 0; mask >>= 1, last++) { if (mask & 1) return last; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194743 - in head/sys: conf dev/mxge modules/mxge/mxge
On Tue, 23 Jun 2009, Andrew Gallatin wrote: Author: gallatin Date: Tue Jun 23 17:42:06 2009 New Revision: 194743 URL: http://svn.freebsd.org/changeset/base/194743 Log: Implement minimal set of changes suggested by bz to make mxge no longer depend on INET. W:) That looks good so far. Thanks a lot! /bz -- Bjoern A. Zeeb The greatest risk is not taking one. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194744 - in stable/4/lib/libc: . gen
On Tuesday 23 June 2009 2:13:48 pm Brian Somers wrote: > On Tue, 23 Jun 2009 17:44:55 + (UTC), John Baldwin > wrote: > > Author: jhb > > Date: Tue Jun 23 17:44:55 2009 > > New Revision: 194744 > > URL: http://svn.freebsd.org/changeset/base/194744 > > > > Log: > > MF7: If the running kernel has support for shm_open() and shm_unlink() as > > system calls (i.e. 8.0+), then invoke the system calls instead of using > > open/fcntl/unlink. > > > > Modified: > > stable/4/lib/libc/ (props changed) > > stable/4/lib/libc/gen/posixshm.c > > In preparation for the 4.12 release? ;^1 I expect there will be several companies running 4.x binaries under 8.x kernels actually. There are ones doing it under 7.x now. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194753 - head/sys/arm/xscale/ixp425
Author: sam Date: Tue Jun 23 19:29:23 2009 New Revision: 194753 URL: http://svn.freebsd.org/changeset/base/194753 Log: Now that we have UARTs running with fast interrupt handlers the ata driver's i/o ops must be locked to avoid chaos. Extend the cambria bus tag to support ata and add a spin lock. The ata driver is hacked to use that instead of it's builtin hack for ixp425. Once the ata driver is fixed to not be confused about byte order we can generalize the cambria bus tag code and make it generally useful. While here take advantage of our being ixp435-specific to remove delays when switching between byte+word accesses and to eliminate the 2us delay for the uarts (the spin lock overhead looks to do this for us). Modified: head/sys/arm/xscale/ixp425/avila_ata.c head/sys/arm/xscale/ixp425/cambria_exp_space.c Modified: head/sys/arm/xscale/ixp425/avila_ata.c == --- head/sys/arm/xscale/ixp425/avila_ata.c Tue Jun 23 19:05:02 2009 (r194752) +++ head/sys/arm/xscale/ixp425/avila_ata.c Tue Jun 23 19:29:23 2009 (r194753) @@ -119,7 +119,7 @@ ata_getconfig(struct ixp425_softc *sa) /* XXX honor hint? (but then no multi-board support) */ /* XXX total hack */ - if ((cpu_id() & CPU_ID_CPU_MASK) == CPU_ID_IXP435) + if (cpu_is_ixp43x()) return &configs[1]; /* Cambria */ if (EXP_BUS_READ_4(sa, EXP_TIMING_CS2_OFFSET) != 0) return &configs[0]; /* Avila */ @@ -191,31 +191,41 @@ ata_avila_attach(device_t dev) __func__, config->basealt, config->sizealt); sc->sc_16bit_off = config->off16; - /* -* Craft special resource for ATA bus space ops -* that go through the expansion bus and require -* special hackery to ena/dis 16-bit operations. -* -* XXX probably should just make this generic for -* accessing the expansion bus. -*/ - sc->sc_expbus_tag.bs_cookie = sc; /* NB: backpointer */ - /* read single */ - sc->sc_expbus_tag.bs_r_1= ata_bs_r_1, - sc->sc_expbus_tag.bs_r_2= ata_bs_r_2, - /* read multiple */ - sc->sc_expbus_tag.bs_rm_2 = ata_bs_rm_2, - sc->sc_expbus_tag.bs_rm_2_s = ata_bs_rm_2_s, - /* write (single) */ - sc->sc_expbus_tag.bs_w_1= ata_bs_w_1, - sc->sc_expbus_tag.bs_w_2= ata_bs_w_2, - /* write multiple */ - sc->sc_expbus_tag.bs_wm_2 = ata_bs_wm_2, - sc->sc_expbus_tag.bs_wm_2_s = ata_bs_wm_2_s, - - rman_set_bustag(&sc->sc_ata, &sc->sc_expbus_tag); + if (config->base16 != CAMBRIA_CFSEL0_HWBASE) { + /* +* Craft special resource for ATA bus space ops +* that go through the expansion bus and require +* special hackery to ena/dis 16-bit operations. +* +* XXX probably should just make this generic for +* accessing the expansion bus. +*/ + sc->sc_expbus_tag.bs_cookie = sc; /* NB: backpointer */ + /* read single */ + sc->sc_expbus_tag.bs_r_1= ata_bs_r_1, + sc->sc_expbus_tag.bs_r_2= ata_bs_r_2, + /* read multiple */ + sc->sc_expbus_tag.bs_rm_2 = ata_bs_rm_2, + sc->sc_expbus_tag.bs_rm_2_s = ata_bs_rm_2_s, + /* write (single) */ + sc->sc_expbus_tag.bs_w_1= ata_bs_w_1, + sc->sc_expbus_tag.bs_w_2= ata_bs_w_2, + /* write multiple */ + sc->sc_expbus_tag.bs_wm_2 = ata_bs_wm_2, + sc->sc_expbus_tag.bs_wm_2_s = ata_bs_wm_2_s, + + rman_set_bustag(&sc->sc_ata, &sc->sc_expbus_tag); + rman_set_bustag(&sc->sc_alt_ata, &sc->sc_expbus_tag); + } else { + /* +* On Cambria use the shared CS3 expansion bus tag +* that handles interlock for sharing access with the +* optional UART's. +*/ + rman_set_bustag(&sc->sc_ata, &cambria_exp_bs_tag); + rman_set_bustag(&sc->sc_alt_ata, &cambria_exp_bs_tag); + } rman_set_bushandle(&sc->sc_ata, sc->sc_ioh); - rman_set_bustag(&sc->sc_alt_ata, &sc->sc_expbus_tag); rman_set_bushandle(&sc->sc_alt_ata, sc->sc_alt_ioh); ixp425_set_gpio(sa, config->gpin, GPIO_TYPE_EDG_RISING); Modified: head/sys/arm/xscale/ixp425/cambria_exp_space.c == --- head/sys/arm/xscale/ixp425/cambria_exp_space.c Tue Jun 23 19:05:02 2009(r194752) +++ head/sys/arm/xscale/ixp425/cambria_exp_space.c Tue Jun 23 19:29:23 2009(r194753) @@ -23,8 +23,16 @@ */
svn commit: r194754 - in vendor/llvm/dist: . autoconf cmake/modules include/llvm include/llvm/Config include/llvm/MC include/llvm/Support include/llvm/System include/llvm/Target lib/ExecutionEngine...
Author: ed Date: Tue Jun 23 19:31:59 2009 New Revision: 194754 URL: http://svn.freebsd.org/changeset/base/194754 Log: Import LLVM r73984. It seems I keep importing sources at very unlucky moments. Let's see what this revision of LLVM does. Added: vendor/llvm/dist/include/llvm/MC/MCImm.h vendor/llvm/dist/test/FrontendC/2009-02-13-zerosize-union-field-ppc.c vendor/llvm/dist/tools/llvm-mc/MC-X86Specific.cpp Deleted: vendor/llvm/dist/cmake/modules/AddPartiallyLinkedObject.cmake Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/cmake/modules/LLVMConfig.cmake vendor/llvm/dist/configure vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/MC/MCInst.h vendor/llvm/dist/include/llvm/Support/Timer.h vendor/llvm/dist/include/llvm/System/Atomic.h vendor/llvm/dist/include/llvm/Target/TargetSelect.h vendor/llvm/dist/include/llvm/Type.h vendor/llvm/dist/lib/ExecutionEngine/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/Interpreter/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/JIT/CMakeLists.txt vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/System/Atomic.cpp vendor/llvm/dist/lib/Target/ARM/ARMAddressingModes.h vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/IA64/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/VMCore/Mangler.cpp vendor/llvm/dist/test/FrontendC/2007-05-07-PaddingElements.c vendor/llvm/dist/test/FrontendC/2008-03-24-BitField-And-Alloca.c vendor/llvm/dist/test/FrontendC/2009-02-13-zerosize-union-field.c vendor/llvm/dist/tools/CMakeLists.txt vendor/llvm/dist/tools/llvm-mc/AsmParser.cpp vendor/llvm/dist/tools/llvm-mc/AsmParser.h vendor/llvm/dist/tools/llvm-mc/CMakeLists.txt Modified: vendor/llvm/dist/CMakeLists.txt == --- vendor/llvm/dist/CMakeLists.txt Tue Jun 23 19:29:23 2009 (r194753) +++ vendor/llvm/dist/CMakeLists.txt Tue Jun 23 19:31:59 2009 (r194754) @@ -100,24 +100,6 @@ configure_file( set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm) -# The USE_EXPLICIT_DEPENDENCIES variable will be TRUE to indicate that -# we should use the library dependencies explicitly specified in the -# CMakeLists.txt files rather than those determined by -# llvm-config. This value must be true for non-make and IDE -# generators. -if (MSVC_IDE) - set(DEFAULT_USE_EXPLICIT_DEPENDENCIES ON) -elseif (XCODE) - set(DEFAULT_USE_EXPLICIT_DEPENDENCIES ON) -else () - set(DEFAULT_USE_EXPLICIT_DEPENDENCIES OFF) -endif () - -option(USE_EXPLICIT_DEPENDENCIES - "Use explicit dependencies instead of llvm-config" - ${DEFAULT_USE_EXPLICIT_DEPENDENCIES}) -mark_as_advanced(USE_EXPLICIT_DEPENDENCIES) - # Add path for custom modules set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} @@ -180,9 +162,6 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LL add_llvm_definitions( -D__STDC_LIMIT_MACROS ) add_llvm_definitions( -D__STDC_CONSTANT_MACROS ) -set(LLVM_PLO_FLAGS "" CACHE - STRING "Flags for creating partially linked objects.") - if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) # TODO: support other platforms and toolchains. option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF) @@ -221,7 +200,6 @@ endif( MSVC ) include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR}) include(AddLLVM) -include(AddPartiallyLinkedObject) include(TableGen) add_subdirectory(lib/Support) Modified: vendor/llvm/dist/CREDITS.TXT == --- vendor/llvm/dist/CREDITS.TXTTue Jun 23 19:29:23 2009 (r194753) +++ vendor/llvm/dist/CREDITS.TXTTue Jun 23 19:31:59 2009 (r194754) @@ -302,3 +302,7 @@ D: Thread Local Storage implementation N: Bill Wendling E: isanb...@gmail.com D: Bunches of stuff + +N: Bob Wilson +E: bob.wil...@acm.org +D: Advanced SIMD (NEON) support in the ARM backend Modified: vendor/llvm/dist/autoconf/configure.ac == --- vendor/llvm/dist/autoconf/configure.ac Tue Jun 23 19:29:23 2009 (r194753) +++ v
svn commit: r194755 - in vendor/clang/dist: clang.xcodeproj include/clang/Analysis/PathSensitive lib/Analysis lib/Driver lib/Frontend test/CXX/basic/basic.def.odr test/CXX/temp/temp.res/temp.dep.re...
Author: ed Date: Tue Jun 23 19:32:16 2009 New Revision: 194755 URL: http://svn.freebsd.org/changeset/base/194755 Log: Import Clang r73984. Added: vendor/clang/dist/test/CXX/basic/basic.def.odr/p2-typeid.cpp vendor/clang/dist/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp Deleted: vendor/clang/dist/clang.xcodeproj/project.pbxproj Modified: vendor/clang/dist/include/clang/Analysis/PathSensitive/GRState.h vendor/clang/dist/include/clang/Analysis/PathSensitive/MemRegion.h vendor/clang/dist/lib/Analysis/BugReporter.cpp vendor/clang/dist/lib/Analysis/CFRefCount.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Analysis/GRExprEngine.cpp vendor/clang/dist/lib/Analysis/GRState.cpp vendor/clang/dist/lib/Analysis/MemRegion.cpp vendor/clang/dist/lib/Analysis/RegionStore.cpp vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Frontend/CMakeLists.txt Modified: vendor/clang/dist/include/clang/Analysis/PathSensitive/GRState.h == --- vendor/clang/dist/include/clang/Analysis/PathSensitive/GRState.hTue Jun 23 19:31:59 2009(r194754) +++ vendor/clang/dist/include/clang/Analysis/PathSensitive/GRState.hTue Jun 23 19:32:16 2009(r194755) @@ -530,21 +530,6 @@ public: private: - // Methods that query & manipulate the Environment. - SVal GetSVal(const GRState* St, const Stmt* Ex) { -return St->getEnvironment().GetSVal(Ex, ValueMgr); - } - - SVal GetSValAsScalarOrLoc(const GRState* state, const Stmt *S) { -if (const Expr *Ex = dyn_cast(S)) { - QualType T = Ex->getType(); - if (Loc::IsLocType(T) || T->isIntegerType()) -return GetSVal(state, S); -} - -return UnknownVal(); - } - SVal GetBlkExprSVal(const GRState* St, const Stmt* Ex) { return St->getEnvironment().GetBlkExprSVal(Ex, ValueMgr); } @@ -589,21 +574,11 @@ public: // Methods that manipulate the GDM. const GRState* addGDM(const GRState* St, void* Key, void* Data); - // Methods that query or create regions. - bool hasStackStorage(const MemRegion* R) { -return getRegionManager().hasStackStorage(R); - } - // Methods that query & manipulate the Store. void iterBindings(const GRState* state, StoreManager::BindingsHandler& F) { StoreMgr->iterBindings(state->getStore(), F); } - - - SVal GetSVal(const GRState* state, Loc LV, QualType T = QualType()) { -return StoreMgr->Retrieve(state, LV, T); - } SVal GetSVal(const GRState* state, const MemRegion* R) { return StoreMgr->Retrieve(state, loc::MemRegionVal(R)); @@ -781,19 +756,25 @@ inline const llvm::APSInt *GRState::getS } inline SVal GRState::getSVal(const Stmt* Ex) const { - return Mgr->GetSVal(this, Ex); + return getEnvironment().GetSVal(Ex, Mgr->ValueMgr); } inline SVal GRState::getBlkExprSVal(const Stmt* Ex) const { return Mgr->GetBlkExprSVal(this, Ex); } -inline SVal GRState::getSValAsScalarOrLoc(const Stmt *Ex) const { - return Mgr->GetSValAsScalarOrLoc(this, Ex); +inline SVal GRState::getSValAsScalarOrLoc(const Stmt *S) const { + if (const Expr *Ex = dyn_cast(S)) { +QualType T = Ex->getType(); +if (Loc::IsLocType(T) || T->isIntegerType()) + return getSVal(S); + } + + return UnknownVal(); } inline SVal GRState::getSVal(Loc LV, QualType T) const { - return Mgr->GetSVal(this, LV, T); + return Mgr->StoreMgr->Retrieve(this, LV, T); } inline SVal GRState::getSVal(const MemRegion* R) const { Modified: vendor/clang/dist/include/clang/Analysis/PathSensitive/MemRegion.h == --- vendor/clang/dist/include/clang/Analysis/PathSensitive/MemRegion.h Tue Jun 23 19:31:59 2009(r194754) +++ vendor/clang/dist/include/clang/Analysis/PathSensitive/MemRegion.h Tue Jun 23 19:32:16 2009(r194755) @@ -33,7 +33,7 @@ namespace llvm { class raw_ostream; } namespace clang { class MemRegionManager; - +class MemSpaceRegion; /// MemRegion - The root abstract class for all memory regions. class MemRegion : public llvm::FoldingSetNode { @@ -68,6 +68,14 @@ public: virtual MemRegionManager* getMemRegionManager() const = 0; std::string getString() const; + + const MemSpaceRegion *getMemorySpace() const; + + bool hasStackStorage() const; + + bool hasHeapStorage() const; + + bool hasHeapOrStackStorage() const; virtual void print(llvm::raw_ostream& os) const; @@ -668,10 +676,6 @@ public: assert(R); return R == globals; } - - bool hasStackStorage(const MemRegion* R); - - bool hasHeapStorage(const MemRegion* R); private: MemSpaceRegion* LazyAllocate(MemSpaceRegion*& region); Modified: vendor/clang/dist/lib/Analysis/BugReporter.cpp == --- vendor/clang/dist/lib/Analysis/BugReporter.cpp
svn commit: r194756 - vendor/llvm/llvm-r73984
Author: ed Date: Tue Jun 23 19:32:50 2009 New Revision: 194756 URL: http://svn.freebsd.org/changeset/base/194756 Log: Tag LLVM r73984. Added: vendor/llvm/llvm-r73984/ - copied from r194755, vendor/llvm/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194757 - vendor/clang/clang-r73984
Author: ed Date: Tue Jun 23 19:33:13 2009 New Revision: 194757 URL: http://svn.freebsd.org/changeset/base/194757 Log: Tag Clang r73984. Added: vendor/clang/clang-r73984/ - copied from r194756, vendor/clang/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194744 - in stable/4/lib/libc: . gen
John Baldwin wrote: On Tuesday 23 June 2009 2:13:48 pm Brian Somers wrote: On Tue, 23 Jun 2009 17:44:55 + (UTC), John Baldwin wrote: Author: jhb Date: Tue Jun 23 17:44:55 2009 New Revision: 194744 URL: http://svn.freebsd.org/changeset/base/194744 Log: MF7: If the running kernel has support for shm_open() and shm_unlink() as system calls (i.e. 8.0+), then invoke the system calls instead of using open/fcntl/unlink. Modified: stable/4/lib/libc/ (props changed) stable/4/lib/libc/gen/posixshm.c In preparation for the 4.12 release? ;^1 I expect there will be several companies running 4.x binaries under 8.x kernels actually. There are ones doing it under 7.x now. this is going to break my 1.0 compatibility right? ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194759 - head/sys/dev/drm
Author: rnoland Date: Tue Jun 23 20:19:02 2009 New Revision: 194759 URL: http://svn.freebsd.org/changeset/base/194759 Log: Add some sysctl info so that we can see what is going on with vblanks. MFC after:3 days Modified: head/sys/dev/drm/drm_sysctl.c Modified: head/sys/dev/drm/drm_sysctl.c == --- head/sys/dev/drm/drm_sysctl.c Tue Jun 23 20:17:24 2009 (r194758) +++ head/sys/dev/drm/drm_sysctl.c Tue Jun 23 20:19:02 2009 (r194759) @@ -38,6 +38,7 @@ static int drm_name_info DRM_SYSCTL_H static intdrm_vm_info DRM_SYSCTL_HANDLER_ARGS; static intdrm_clients_info DRM_SYSCTL_HANDLER_ARGS; static intdrm_bufs_info DRM_SYSCTL_HANDLER_ARGS; +static intdrm_vblank_info DRM_SYSCTL_HANDLER_ARGS; struct drm_sysctl_list { const char *name; @@ -47,6 +48,7 @@ struct drm_sysctl_list { {"vm", drm_vm_info}, {"clients", drm_clients_info}, {"bufs",drm_bufs_info}, + {"vblank",drm_vblank_info}, }; #define DRM_SYSCTL_ENTRIES (sizeof(drm_sysctl_list)/sizeof(drm_sysctl_list[0])) @@ -313,3 +315,25 @@ done: free(tempprivs, DRM_MEM_DRIVER); return retcode; } + +static int drm_vblank_info DRM_SYSCTL_HANDLER_ARGS +{ + struct drm_device *dev = arg1; + char buf[128]; + int retcode; + int i; + + DRM_SYSCTL_PRINT("\ncrtc ref countlast enabled inmodeset\n"); + for(i = 0 ; i < dev->num_crtcs ; i++) { + DRM_SYSCTL_PRINT(" %02d %02d %08d %08d %02d %02d\n", + i, atomic_load_acq_32(&dev->vblank[i].refcount), + atomic_load_acq_32(&dev->vblank[i].count), + atomic_load_acq_32(&dev->vblank[i].last), + atomic_load_acq_int(&dev->vblank[i].enabled), + atomic_load_acq_int(&dev->vblank[i].inmodeset)); + } + + SYSCTL_OUT(req, "", -1); +done: + return retcode; +} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194760 - in head/sys: contrib/rdma net net80211 netinet netinet6 netipx
Author: rwatson Date: Tue Jun 23 20:19:09 2009 New Revision: 194760 URL: http://svn.freebsd.org/changeset/base/194760 Log: Modify most routines returning 'struct ifaddr *' to return references rather than pointers, requiring callers to properly dispose of those references. The following routines now return references: ifaddr_byindex ifa_ifwithaddr ifa_ifwithbroadaddr ifa_ifwithdstaddr ifa_ifwithnet ifaof_ifpforaddr ifa_ifwithroute ifa_ifwithroute_fib rt_getifa rt_getifa_fib IFP_TO_IA ip_rtaddr in6_ifawithifp in6ifa_ifpforlinklocal in6ifa_ifpwithaddr in6_ifadd carp_iamatch6 ip6_getdstifaddr Remove unused macro which didn't have required referencing: IFP_TO_IA6 This closes many small races in which changes to interface or address lists while an ifaddr was in use could lead to use of freed memory (etc). In a few cases, add missing if_addr_list locking required to safely acquire references. Because of a lack of deep copying support, we accept a race in which an in6_ifaddr pointed to by mbuf tags and extracted with ip6_getdstifaddr() doesn't hold a reference while in transmit. Once we have mbuf tag deep copy support, this can be fixed. Reviewed by: bz Obtained from:Apple, Inc. (portions) MFC after:6 weeks (portions) Modified: head/sys/contrib/rdma/rdma_addr.c head/sys/contrib/rdma/rdma_cma.c head/sys/net/if.c head/sys/net/route.c head/sys/net/rtsock.c head/sys/net80211/ieee80211.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_var.h head/sys/netinet/ip_carp.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet/tcp_input.c head/sys/netinet6/frag6.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_src.c head/sys/netinet6/in6_var.h head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_output.c head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/raw_ip6.c head/sys/netipx/ipx_pcb.c Modified: head/sys/contrib/rdma/rdma_addr.c == --- head/sys/contrib/rdma/rdma_addr.c Tue Jun 23 20:19:02 2009 (r194759) +++ head/sys/contrib/rdma/rdma_addr.c Tue Jun 23 20:19:09 2009 (r194760) @@ -129,13 +129,16 @@ int rdma_translate_ip(struct sockaddr *a struct ifaddr *ifa; struct sockaddr_in *sin = (struct sockaddr_in *)addr; uint16_t port = sin->sin_port; + int ret; sin->sin_port = 0; ifa = ifa_ifwithaddr(addr); sin->sin_port = port; if (!ifa) return (EADDRNOTAVAIL); - return rdma_copy_addr(dev_addr, ifa->ifa_ifp, NULL); + ret = rdma_copy_addr(dev_addr, ifa->ifa_ifp, NULL); + ifa_free(ifa); + return (ret); } static void queue_req(struct addr_req *req) Modified: head/sys/contrib/rdma/rdma_cma.c == --- head/sys/contrib/rdma/rdma_cma.cTue Jun 23 20:19:02 2009 (r194759) +++ head/sys/contrib/rdma/rdma_cma.cTue Jun 23 20:19:09 2009 (r194760) @@ -1337,6 +1337,7 @@ static int iw_conn_req_handler(struct iw } dev = ifa->ifa_ifp; ret = rdma_copy_addr(&conn_id->id.route.addr.dev_addr, dev, NULL); + ifa_free(ifa); if (ret) { cma_enable_remove(conn_id); rdma_destroy_id(new_cm_id); Modified: head/sys/net/if.c == --- head/sys/net/if.c Tue Jun 23 20:19:02 2009(r194759) +++ head/sys/net/if.c Tue Jun 23 20:19:09 2009(r194760) @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -261,6 +262,8 @@ ifaddr_byindex(u_short idx) IFNET_RLOCK(); ifa = ifnet_byindex_locked(idx)->if_addr; + if (ifa != NULL) + ifa_ref(ifa); IFNET_RUNLOCK(); return (ifa); } @@ -1464,7 +1467,7 @@ ifa_free(struct ifaddr *ifa) */ /*ARGSUSED*/ static struct ifaddr * -ifa_ifwithaddr_internal(struct sockaddr *addr) +ifa_ifwithaddr_internal(struct sockaddr *addr, int getref) { INIT_VNET_NET(curvnet); struct ifnet *ifp; @@ -1477,6 +1480,8 @@ ifa_ifwithaddr_internal(struct sockaddr if (ifa->ifa_addr->sa_family != addr->sa_family) continue; if (sa_equal(addr, ifa->ifa_addr)) { + if (getref) + ifa
Re: svn commit: r194744 - in stable/4/lib/libc: . gen
On Tuesday 23 June 2009 3:37:18 pm Julian Elischer wrote: > John Baldwin wrote: > > On Tuesday 23 June 2009 2:13:48 pm Brian Somers wrote: > >> On Tue, 23 Jun 2009 17:44:55 + (UTC), John Baldwin wrote: > >>> Author: jhb > >>> Date: Tue Jun 23 17:44:55 2009 > >>> New Revision: 194744 > >>> URL: http://svn.freebsd.org/changeset/base/194744 > >>> > >>> Log: > >>> MF7: If the running kernel has support for shm_open() and shm_unlink() as > >>> system calls (i.e. 8.0+), then invoke the system calls instead of using > >>> open/fcntl/unlink. > >>> > >>> Modified: > >>> stable/4/lib/libc/ (props changed) > >>> stable/4/lib/libc/gen/posixshm.c > >> In preparation for the 4.12 release? ;^1 > > > > I expect there will be several companies running 4.x binaries under 8.x > > kernels actually. There are ones doing it under 7.x now. > > this is going to break my 1.0 compatibility right? No, not at all. 1.0 binaries do not use libc.so.4. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194761 - head/sys/dev/mxge
Author: gallatin Date: Tue Jun 23 20:22:34 2009 New Revision: 194761 URL: http://svn.freebsd.org/changeset/base/194761 Log: - Fix bug where device would loose promisc setting when reset. - Allow all rss hash modes to be chosen Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c == --- head/sys/dev/mxge/if_mxge.c Tue Jun 23 20:19:09 2009(r194760) +++ head/sys/dev/mxge/if_mxge.c Tue Jun 23 20:22:34 2009(r194761) @@ -1310,7 +1310,7 @@ mxge_reset(mxge_softc_t *sc, int interru } sc->rdma_tags_available = 15; status = mxge_update_mac_address(sc); - mxge_change_promisc(sc, 0); + mxge_change_promisc(sc, sc->ifp->if_flags & IFF_PROMISC); mxge_change_pause(sc, sc->pause); mxge_set_multicast_list(sc); return status; @@ -4020,7 +4020,7 @@ mxge_fetch_tunables(mxge_softc_t *sc) mxge_ticks = hz / 2; sc->pause = mxge_flow_control; if (mxge_rss_hash_type < MXGEFW_RSS_HASH_TYPE_IPV4 - || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_SRC_PORT) { + || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) { mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT; } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194762 - in head: lib/libc/sys sys/kern sys/sys usr.sbin/jail
Author: jamie Date: Tue Jun 23 20:35:51 2009 New Revision: 194762 URL: http://svn.freebsd.org/changeset/base/194762 Log: Add a limit for child jails via the "children.cur" and "children.max" parameters. This replaces the simple "allow.jails" permission. Approved by: bz (mentor) Modified: head/lib/libc/sys/jail.2 head/sys/kern/kern_jail.c head/sys/sys/jail.h head/usr.sbin/jail/jail.8 Modified: head/lib/libc/sys/jail.2 == --- head/lib/libc/sys/jail.2Tue Jun 23 20:22:34 2009(r194761) +++ head/lib/libc/sys/jail.2Tue Jun 23 20:35:51 2009(r194762) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2009 +.Dd June 23, 2009 .Dt JAIL 2 .Os .Sh NAME @@ -293,9 +293,9 @@ will fail if: .Bl -tag -width Er .It Bq Er EPERM This process is not allowed to create a jail, either because it is not -the super-user, or because it is in a jail where the -.Va allow.jails -parameter is not set. +the super-user, or because it would exceed the jail's +.Va children.max +limit. .It Bq Er EFAULT .Fa jail points to an address outside the allocated address space of the process. @@ -312,9 +312,9 @@ will fail if: .Bl -tag -width Er .It Bq Er EPERM This process is not allowed to create a jail, either because it is not -the super-user, or because it is in a jail where the -.Va allow.jails -parameter is not set. +the super-user, or because it would exceed the jail's +.Va children.max +limit. .It Bq Er EPERM A jail parameter was set to a less restrictive value then the current environment. Modified: head/sys/kern/kern_jail.c == --- head/sys/kern/kern_jail.c Tue Jun 23 20:22:34 2009(r194761) +++ head/sys/kern/kern_jail.c Tue Jun 23 20:35:51 2009(r194762) @@ -80,6 +80,7 @@ struct prison prison0 = { .pr_uref= 1, .pr_path= "/", .pr_securelevel = -1, + .pr_childmax= JAIL_MAX, .pr_hostuuid= "----", .pr_children= LIST_HEAD_INITIALIZER(&prison0.pr_children), .pr_flags = PR_HOST, @@ -152,7 +153,6 @@ static char *pr_allow_names[] = { "allow.chflags", "allow.mount", "allow.quotas", - "allow.jails", "allow.socket_af", }; @@ -163,7 +163,6 @@ static char *pr_allow_nonames[] = { "allow.nochflags", "allow.nomount", "allow.noquotas", - "allow.nojails", "allow.nosocket_af", }; @@ -479,8 +478,8 @@ kern_jail_set(struct thread *td, struct unsigned long hid; size_t namelen, onamelen; int created, cuflags, descend, enforce, error, errmsg_len, errmsg_pos; - int gotenforce, gothid, gotslevel, fi, jid, len; - int slevel, vfslocked; + int gotchildmax, gotenforce, gothid, gotslevel, fi, jid, len, level; + int childmax, slevel, vfslocked; #if defined(INET) || defined(INET6) int ii, ij; #endif @@ -500,7 +499,7 @@ kern_jail_set(struct thread *td, struct if (error) return (error); mypr = ppr = td->td_ucred->cr_prison; - if ((flags & JAIL_CREATE) && !(mypr->pr_allow & PR_ALLOW_JAILS)) + if ((flags & JAIL_CREATE) && mypr->pr_childmax == 0) return (EPERM); if (flags & ~JAIL_SET_MASK) return (EINVAL); @@ -544,6 +543,15 @@ kern_jail_set(struct thread *td, struct else gotslevel = 1; + error = + vfs_copyopt(opts, "children.max", &childmax, sizeof(childmax)); + if (error == ENOENT) + gotchildmax = 0; + else if (error != 0) + goto done_free; + else + gotchildmax = 1; + error = vfs_copyopt(opts, "enforce_statfs", &enforce, sizeof(enforce)); gotenforce = (error == 0); if (gotenforce) { @@ -1023,6 +1031,12 @@ kern_jail_set(struct thread *td, struct /* If there's no prison to update, create a new one and link it in. */ if (pr == NULL) { + for (tpr = mypr; tpr != NULL; tpr = tpr->pr_parent) + if (tpr->pr_childcount >= tpr->pr_childmax) { + error = EPERM; + vfs_opterror(opts, "prison limit exceeded"); + goto done_unlock_list; + } created = 1; mtx_lock(&ppr->pr_mtx); if (ppr->pr_ref == 0 || (ppr->pr_flags & PR_REMOVE)) { @@ -1076,7 +1090,7 @@ kern_jail_set(struct thread *td, struct TAILQ_INSERT_TAIL(&allprison, pr, pr_list); LIST_INSERT_HEAD(&ppr->pr_children, pr, pr_sibling); for (tpr = ppr; tpr != NULL; tpr = tpr->pr_parent) - tpr->pr_prisoncount++; + tpr->pr_childcount++;
svn commit: r194763 - in head/sys: conf dev/gem modules/gem
Author: marius Date: Tue Jun 23 20:36:59 2009 New Revision: 194763 URL: http://svn.freebsd.org/changeset/base/194763 Log: - Initialize the ifnet structure, especially if_dname, before probing the PHYs as some PHY drivers use it (but probably shouldn't). How gem(4) has worked with brgphy(4) on powerpc without this so far is unclear to me. - Introduce a dying flag which is set during detach and checked in gem_ioctl() in order to prevent active BPF listeners to clear promiscuous mode which may lead to the tick callout being restarted which will trigger a panic once it's actually gone. - In gem_stop() reset rather than just disable the transmitter and receiver in order to ensure we're not unloading DMA maps still in use by the hardware. [1] - The blanking time is specified in PCI clocks so we should use twice the value when operating at 66MHz. - Spell some 2 as ETHER_ALIGN and a 19 as GEM_STATUS_TX_COMPLETION_SHFT to make the actual intentions clear. - As we don't unload the peak attempts counter ignore its overflow interrupts. - Remove a stale setting of a variable to GEM_TD_INTERRUPT_ME which isn't used afterwards. - For optimum performance increment the TX kick register in multiples of 4 if possible as suggested by the documentation. - Partially revert r164931; drivers should only clear the watchdog timer if all outstanding TX descriptors are done. - Fix some debugging strings. - Add a missing BUS_DMASYNC_POSTWRITE in gem_rint(). - As the error paths in the interrupt handler are generally unlikely predict them as false. - Add support for the SBus version of the GEM controller. [2] - Add some lock assertions. - Improve some comments. - Fix some more or less cosmetic issues in the code of the PCI front-end. - Change some softc members to be unsigned where more appropriate and remove unused ones. Approved by: re (kib) Obtained from:NetBSD (partially) [2], OpenBSD [1] MFC after:2 weeks Added: head/sys/dev/gem/if_gem_sbus.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/gem/if_gem.c head/sys/dev/gem/if_gem_pci.c head/sys/dev/gem/if_gemreg.h head/sys/dev/gem/if_gemvar.h head/sys/modules/gem/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Tue Jun 23 20:35:51 2009(r194762) +++ head/sys/conf/files Tue Jun 23 20:36:59 2009(r194763) @@ -923,6 +923,7 @@ dev/flash/at45d.c optional at45d dev/fxp/if_fxp.c optional fxp inet dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci +dev/gem/if_gem_sbus.c optional gem sbus dev/hatm/if_hatm.c optional hatm pci dev/hatm/if_hatm_intr.coptional hatm pci dev/hatm/if_hatm_ioctl.c optional hatm pci Modified: head/sys/dev/gem/if_gem.c == --- head/sys/dev/gem/if_gem.c Tue Jun 23 20:35:51 2009(r194762) +++ head/sys/dev/gem/if_gem.c Tue Jun 23 20:36:59 2009(r194763) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); CTASSERT(powerof2(GEM_NRXDESC) && GEM_NRXDESC >= 32 && GEM_NRXDESC <= 8192); CTASSERT(powerof2(GEM_NTXDESC) && GEM_NTXDESC >= 32 && GEM_NTXDESC <= 8192); -#defineTRIES 1 +#defineGEM_TRIES 1 /* * The hardware supports basic TCP/UDP checksum offloading. However, @@ -119,7 +119,7 @@ static void gem_rint(struct gem_softc *s #ifdef GEM_RINT_TIMEOUT static voidgem_rint_timeout(void *arg); #endif -static __inline void gem_rxcksum(struct mbuf *m, uint64_t flags); +static inline void gem_rxcksum(struct mbuf *m, uint64_t flags); static voidgem_rxdrain(struct gem_softc *sc); static voidgem_setladrf(struct gem_softc *sc); static voidgem_start(struct ifnet *ifp); @@ -127,6 +127,7 @@ static void gem_start_locked(struct ifne static voidgem_stop(struct ifnet *ifp, int disable); static voidgem_tick(void *arg); static voidgem_tint(struct gem_softc *sc); +static inline void gem_txkick(struct gem_softc *sc); static int gem_watchdog(struct gem_softc *sc); devclass_t gem_devclass; @@ -151,9 +152,24 @@ gem_attach(struct gem_softc *sc) int error, i; uint32_t v; + if (bootverbose) + device_printf(sc->sc_dev, "flags=0x%x\n", sc->sc_flags); + + /* Set up ifnet structure. */ ifp = sc->sc_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) return (ENOSPC); + sc->sc_csum_features = GEM_CSUM_FEATURES; + ifp->if_softc = sc; + if_initname(ifp, device_get_name(sc->sc_dev), + device_get_unit(sc->sc_dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_start = gem_start; + ifp->if_ioctl = gem_ioctl; + ifp->if_init = gem_init
svn commit: r194764 - head/share/man/man4
Author: marius Date: Tue Jun 23 20:38:35 2009 New Revision: 194764 URL: http://svn.freebsd.org/changeset/base/194764 Log: - Update regarding the support for SBus GEM added in r194763. - Improve the description a bit and add a reference to vlan(4). Modified: head/share/man/man4/gem.4 Modified: head/share/man/man4/gem.4 == --- head/share/man/man4/gem.4 Tue Jun 23 20:36:59 2009(r194763) +++ head/share/man/man4/gem.4 Tue Jun 23 20:38:35 2009(r194764) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2009 +.Dd June 14, 2009 .Dt GEM 4 .Os .Sh NAME @@ -57,9 +57,16 @@ if_gem_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the GMac Ethernet hardware found mostly in +driver provides support for the GMAC Ethernet hardware found mostly in the last Apple PowerBooks G3s and most G4-based Apple hardware, as -well as many Sun UltraSPARCs. +well as Sun UltraSPARC machines. +.Pp +All controllers supported by the +.Nm +driver have TCP checksum offload capability for both receive and transmit, +support for the reception and transmission of extended frames for +.Xr vlan 4 +and a 512-bit multicast hash filter. .Sh HARDWARE .Pp Chips supported by the @@ -84,6 +91,9 @@ driver at this time: .It Sun Gigabit Ethernet PCI 2.0/3.0 (GBE/P) (part no.\& 501-4373) +.It +Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S) +(part no.\& 501-4375) .El .Sh NOTES On sparc64 the @@ -108,15 +118,11 @@ the system's default MAC address. Supported interfaces having their own MAC address include the on-board Sun ERI 10/100 Mbps on boards equipped with more than one Ethernet interface and the Sun Gigabit Ethernet 2.0/3.0 GBE add-on cards. -.Sh CAVEATS -Currently the -.Nm -driver fails to attach to Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S) cards, -as no SBus front-end has been written so far. .Sh SEE ALSO .Xr altq 4 , .Xr miibus 4 , .Xr netintro 4 , +.Xr vlan 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Sh HISTORY @@ -132,9 +138,19 @@ version to include it was .An -nosplit The .Nm -driver was written by +driver was written for +.Nx +by .An Eduardo Horvath .Aq e...@netbsd.org . +It was ported to +.Fx +by +.An Thomas Moestl +.Aq t...@freebsd.org +and later on improved by +.An Marius Strobl +.Aq ma...@freebsd.org . The man page was written by .An Thomas Klausner .Aq w...@netbsd.org . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194765 - head/bin/sh
Author: jilles Date: Tue Jun 23 20:45:12 2009 New Revision: 194765 URL: http://svn.freebsd.org/changeset/base/194765 Log: sh: Improve handling of setjmp/longjmp volatile: - remove ineffective and unnecessary (void) &var; [1] - remove some unnecessary volatile keywords - add a necessary volatile keyword - save the old handler before doing something that could use the saved value Submitted by: Christoph Mallon [1] Approved by: ed (mentor) Modified: head/bin/sh/eval.c head/bin/sh/histedit.c head/bin/sh/parser.c head/bin/sh/var.c Modified: head/bin/sh/eval.c == --- head/bin/sh/eval.c Tue Jun 23 20:38:35 2009(r194764) +++ head/bin/sh/eval.c Tue Jun 23 20:45:12 2009(r194765) @@ -589,22 +589,14 @@ evalcommand(union node *cmd, int flags, struct cmdentry cmdentry; struct job *jp; struct jmploc jmploc; - struct jmploc *volatile savehandler; - char *volatile savecmdname; - volatile struct shparam saveparam; - struct localvar *volatile savelocalvars; + struct jmploc *savehandler; + char *savecmdname; + struct shparam saveparam; + struct localvar *savelocalvars; volatile int e; char *lastarg; int realstatus; int do_clearcmdentry; -#ifdef __GNUC__ - /* Avoid longjmp clobbering */ - (void) &argv; - (void) &argc; - (void) &lastarg; - (void) &flags; - (void) &do_clearcmdentry; -#endif /* First expand the arguments. */ TRACE(("evalcommand(%p, %d) called\n", (void *)cmd, flags)); @@ -779,9 +771,10 @@ evalcommand(union node *cmd, int flags, savelocalvars = localvars; localvars = NULL; INTON; + savehandler = handler; if (setjmp(jmploc.loc)) { if (exception == EXSHELLPROC) - freeparam((struct shparam *)&saveparam); + freeparam(&saveparam); else { freeparam(&shellparam); shellparam = saveparam; @@ -791,7 +784,6 @@ evalcommand(union node *cmd, int flags, handler = savehandler; longjmp(handler->loc, 1); } - savehandler = handler; handler = &jmploc; for (sp = varlist.list ; sp ; sp = sp->next) mklocal(sp->text); @@ -830,12 +822,12 @@ evalcommand(union node *cmd, int flags, savecmdname = commandname; cmdenviron = varlist.list; e = -1; + savehandler = handler; if (setjmp(jmploc.loc)) { e = exception; exitstatus = (e == EXINT)? SIGINT+128 : 2; goto cmddone; } - savehandler = handler; handler = &jmploc; redirect(cmd->ncmd.redirect, mode); if (cmdentry.special) Modified: head/bin/sh/histedit.c == --- head/bin/sh/histedit.c Tue Jun 23 20:38:35 2009(r194764) +++ head/bin/sh/histedit.c Tue Jun 23 20:45:12 2009(r194765) @@ -173,25 +173,11 @@ histcmd(int argc, char **argv) char *pat = NULL, *repl; static int active = 0; struct jmploc jmploc; - struct jmploc *volatile savehandler; - char editfile[PATH_MAX]; + struct jmploc *savehandler; + char editfilestr[PATH_MAX]; + char *volatile editfile; FILE *efp; int oldhistnum; -#ifdef __GNUC__ - /* Avoid longjmp clobbering */ - (void) &editor; - (void) &lflg; - (void) &nflg; - (void) &rflg; - (void) &sflg; - (void) &firststr; - (void) &laststr; - (void) &pat; - (void) &repl; - (void) &efp; - (void) &argc; - (void) &argv; -#endif if (hist == NULL) error("history not active"); @@ -232,19 +218,19 @@ histcmd(int argc, char **argv) */ if (lflg == 0 || editor || sflg) { lflg = 0; /* ignore */ - editfile[0] = '\0'; + editfile = NULL; /* * Catch interrupts to reset active counter and * cleanup temp files. */ + savehandler = handler; if (setjmp(jmploc.loc)) { active = 0; - if (*editfile) + if (editfile) unlink(editfile); handler = savehandler; longjmp(handler->loc, 1); } - savehandler = handler; handler
svn commit: r194766 - in head/sys: dev/md fs/procfs fs/tmpfs kern security/mac_biba security/mac_lomac sys vm
Author: kib Date: Tue Jun 23 20:45:22 2009 New Revision: 194766 URL: http://svn.freebsd.org/changeset/base/194766 Log: Implement global and per-uid accounting of the anonymous memory. Add rlimit RLIMIT_SWAP that limits the amount of swap that may be reserved for the uid. The accounting information (charge) is associated with either map entry, or vm object backing the entry, assuming the object is the first one in the shadow chain and entry does not require COW. Charge is moved from entry to object on allocation of the object, e.g. during the mmap, assuming the object is allocated, or on the first page fault on the entry. It moves back to the entry on forks due to COW setup. The per-entry granularity of accounting makes the charge process fair for processes that change uid during lifetime, and decrements charge for proper uid when region is unmapped. The interface of vm_pager_allocate(9) is extended by adding struct ucred *, that is used to charge appropriate uid when allocation if performed by kernel, e.g. md(4). Several syscalls, among them is fork(2), may now return ENOMEM when global or per-uid limits are enforced. In collaboration with:pho Reviewed by: alc Approved by: re (kensmith) Modified: head/sys/dev/md/md.c head/sys/fs/procfs/procfs_map.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/kern/kern_fork.c head/sys/kern/kern_resource.c head/sys/kern/sys_process.c head/sys/kern/sysv_shm.c head/sys/kern/uipc_shm.c head/sys/security/mac_biba/mac_biba.c head/sys/security/mac_lomac/mac_lomac.c head/sys/sys/priv.h head/sys/sys/resource.h head/sys/sys/resourcevar.h head/sys/vm/default_pager.c head/sys/vm/device_pager.c head/sys/vm/phys_pager.c head/sys/vm/swap_pager.c head/sys/vm/vm.h head/sys/vm/vm_extern.h head/sys/vm/vm_fault.c head/sys/vm/vm_kern.c head/sys/vm/vm_map.c head/sys/vm/vm_map.h head/sys/vm/vm_mmap.c head/sys/vm/vm_object.c head/sys/vm/vm_object.h head/sys/vm/vm_pager.c head/sys/vm/vm_pager.h head/sys/vm/vnode_pager.c Modified: head/sys/dev/md/md.c == --- head/sys/dev/md/md.cTue Jun 23 20:45:12 2009(r194765) +++ head/sys/dev/md/md.cTue Jun 23 20:45:22 2009(r194766) @@ -1042,18 +1042,18 @@ mdcreate_swap(struct md_s *sc, struct md if (mdio->md_fwheads != 0) sc->fwheads = mdio->md_fwheads; sc->object = vm_pager_allocate(OBJT_SWAP, NULL, PAGE_SIZE * npage, - VM_PROT_DEFAULT, 0); + VM_PROT_DEFAULT, 0, td->td_ucred); if (sc->object == NULL) return (ENOMEM); sc->flags = mdio->md_options & MD_FORCE; if (mdio->md_options & MD_RESERVE) { if (swap_pager_reserve(sc->object, 0, npage) < 0) { - vm_object_deallocate(sc->object); - sc->object = NULL; - return (EDOM); + error = EDOM; + goto finish; } } error = mdsetcred(sc, td->td_ucred); + finish: if (error != 0) { vm_object_deallocate(sc->object); sc->object = NULL; Modified: head/sys/fs/procfs/procfs_map.c == --- head/sys/fs/procfs/procfs_map.c Tue Jun 23 20:45:12 2009 (r194765) +++ head/sys/fs/procfs/procfs_map.c Tue Jun 23 20:45:22 2009 (r194766) @@ -45,6 +45,7 @@ #include #include #include +#include #include #ifdef COMPAT_IA32 #include @@ -82,6 +83,7 @@ procfs_doprocmap(PFS_FILL_ARGS) vm_map_entry_t entry, tmp_entry; struct vnode *vp; char *fullpath, *freepath; + struct uidinfo *uip; int error, vfslocked; unsigned int last_timestamp; #ifdef COMPAT_IA32 @@ -134,6 +136,7 @@ procfs_doprocmap(PFS_FILL_ARGS) if (obj->shadow_count == 1) privateresident = obj->resident_page_count; } + uip = (entry->uip) ? entry->uip : (obj ? obj->uip : NULL); resident = 0; addr = entry->start; @@ -198,10 +201,11 @@ procfs_doprocmap(PFS_FILL_ARGS) /* * format: -* start, end, resident, private resident, cow, access, type. +* start, end, resident, private resident, cow, access, type, +* charged, charged uid. */ error = sbuf_printf(sb, - "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s\n", + "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s %s %d\n", (u_long)e_start, (u_long)e_end, resident, privateresident, #ifdef COMPAT_IA32 @@ -215,7 +219,8 @@ procfs_doprocmap(PFS_FILL_ARGS)
svn commit: r194767 - in head: bin/sh contrib/tcsh etc lib/libc/sys lib/libutil share/man/man7 share/man/man9 usr.bin/limits
Author: kib Date: Tue Jun 23 20:57:27 2009 New Revision: 194767 URL: http://svn.freebsd.org/changeset/base/194767 Log: Usermode portion of the support for swap allocation accounting: - update for getrlimit(2) manpage; - support for setting RLIMIT_SWAP in login class; - addition to the limits(1) and sh and csh limit-setting builtins; - tuning(7) documentation on the sysctls controlling overcommit. In collaboration with:pho Reviewed by: alc Approved by: re (kensmith) Modified: head/bin/sh/miscbltin.c head/contrib/tcsh/sh.func.c head/contrib/tcsh/tcsh.man head/etc/login.conf head/lib/libc/sys/getrlimit.2 head/lib/libutil/login_class.c head/share/man/man7/tuning.7 head/share/man/man9/vm_map.9 head/usr.bin/limits/limits.c Modified: head/bin/sh/miscbltin.c == --- head/bin/sh/miscbltin.c Tue Jun 23 20:45:22 2009(r194766) +++ head/bin/sh/miscbltin.c Tue Jun 23 20:57:27 2009(r194767) @@ -403,7 +403,7 @@ ulimitcmd(int argc __unused, char **argv struct rlimit limit; what = 'f'; - while ((optc = nextopt("HSatfdsmcnuvlbp")) != '\0') + while ((optc = nextopt("HSatfdsmcnuvlbpw")) != '\0') switch (optc) { case 'H': how = HARD; Modified: head/contrib/tcsh/sh.func.c == --- head/contrib/tcsh/sh.func.c Tue Jun 23 20:45:22 2009(r194766) +++ head/contrib/tcsh/sh.func.c Tue Jun 23 20:57:27 2009(r194767) @@ -1796,6 +1796,10 @@ struct limits limits[] = { RLIMIT_SBSIZE, "sbsize", 1, "" }, # endif /* RLIMIT_SBSIZE */ +# ifdef RLIMIT_SWAP +{ RLIMIT_SWAP, "swaplimit",1024, "kbytes"}, +# endif /* RLIMIT_SWAP */ + { -1, NULL, 0, NULL} }; Modified: head/contrib/tcsh/tcsh.man == --- head/contrib/tcsh/tcsh.man Tue Jun 23 20:45:22 2009(r194766) +++ head/contrib/tcsh/tcsh.man Tue Jun 23 20:57:27 2009(r194767) @@ -2921,6 +2921,9 @@ the maximum number of simultaneous proce .TP \fIsbsize\fR the maximum size of socket buffer usage for this user +.TP +\fIswaplimit\fR +the maximum amount of swap space reserved or used for this user .PP \fImaximum-use\fR may be given as a (floating point or integer) number followed by a scale factor. For all limits Modified: head/etc/login.conf == --- head/etc/login.conf Tue Jun 23 20:45:22 2009(r194766) +++ head/etc/login.conf Tue Jun 23 20:57:27 2009(r194767) @@ -40,6 +40,7 @@ default:\ :maxproc=unlimited:\ :sbsize=unlimited:\ :vmemoryuse=unlimited:\ + :swapuse=unlimited:\ :pseudoterminals=unlimited:\ :priority=0:\ :ignoretime@:\ Modified: head/lib/libc/sys/getrlimit.2 == --- head/lib/libc/sys/getrlimit.2 Tue Jun 23 20:45:22 2009 (r194766) +++ head/lib/libc/sys/getrlimit.2 Tue Jun 23 20:57:27 2009 (r194767) @@ -97,6 +97,15 @@ mbufs, that this user may hold at any ti The maximum size (in bytes) of the stack segment for a process; this defines how far a program's stack segment may be extended. Stack extension is performed automatically by the system. +.It Dv RLIMIT_SWAP +The maximum size (in bytes) of the swap space that may be reserved or +used by all of this user id's processes. +This limit is enforced only if bit 1 of the +.Va vm.overcommit +sysctl is set. +Please see +.Xr tuning 7 +for a complete description of this sysctl. .It Dv RLIMIT_NPTS The maximum number of pseudo-terminals created by this user id. .El Modified: head/lib/libutil/login_class.c == --- head/lib/libutil/login_class.c Tue Jun 23 20:45:22 2009 (r194766) +++ head/lib/libutil/login_class.c Tue Jun 23 20:57:27 2009 (r194767) @@ -64,6 +64,7 @@ static struct login_res { { "sbsize", login_getcapsize, RLIMIT_SBSIZE }, { "vmemoryuse", login_getcapsize, RLIMIT_VMEM}, { "pseudoterminals", login_getcapnum, RLIMIT_NPTS}, +{ "swapuse", login_getcapsize, RLIMIT_SWAP}, { NULL, 0,0 } }; Modified: head/share/man/man7/tuning.7 == --- head/share/man/man7/tuning.7Tue Jun 23 20:45:22 2009 (r194766) +++ head/share/man/man7/tuning.7Tue Jun 23 20:57:27 2009 (r194767) @@ -404,6 +404,35 @@ In this document we will only cover the on the system. .Pp The +.Va vm.overcommit +sy
Re: svn commit: r194744 - in stable/4/lib/libc: . gen
John Baldwin wrote: On Tuesday 23 June 2009 3:37:18 pm Julian Elischer wrote: John Baldwin wrote: On Tuesday 23 June 2009 2:13:48 pm Brian Somers wrote: On Tue, 23 Jun 2009 17:44:55 + (UTC), John Baldwin wrote: Author: jhb Date: Tue Jun 23 17:44:55 2009 New Revision: 194744 URL: http://svn.freebsd.org/changeset/base/194744 Log: MF7: If the running kernel has support for shm_open() and shm_unlink() as system calls (i.e. 8.0+), then invoke the system calls instead of using open/fcntl/unlink. Modified: stable/4/lib/libc/ (props changed) stable/4/lib/libc/gen/posixshm.c In preparation for the 4.12 release? ;^1 I expect there will be several companies running 4.x binaries under 8.x kernels actually. There are ones doing it under 7.x now. this is going to break my 1.0 compatibility right? No, not at all. 1.0 binaries do not use libc.so.4. but you are taking away the semsys syscall right? ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194763 - in head/sys: conf dev/gem modules/gem
On Tuesday 23 June 2009 4:36:59 pm Marius Strobl wrote: > Author: marius > Date: Tue Jun 23 20:36:59 2009 > New Revision: 194763 > URL: http://svn.freebsd.org/changeset/base/194763 > > Log: > - Initialize the ifnet structure, especially if_dname, before probing > the PHYs as some PHY drivers use it (but probably shouldn't). How > gem(4) has worked with brgphy(4) on powerpc without this so far is > unclear to me. > - Introduce a dying flag which is set during detach and checked in > gem_ioctl() in order to prevent active BPF listeners to clear > promiscuous mode which may lead to the tick callout being restarted > which will trigger a panic once it's actually gone. This should not be needed assuming you follow a model of: gem_detach() { ether_ifdetach(ifp);/* calls bpfdetach() */ GEM_LOCK(sc); gem_stop(sc); GEM_UNLOCK(sc); ... } If you are invoking gem_stop() prior to ether_ifdetach() then that is your real bug. :) -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194744 - in stable/4/lib/libc: . gen
On Tuesday 23 June 2009 5:00:00 pm Julian Elischer wrote: > John Baldwin wrote: > > On Tuesday 23 June 2009 3:37:18 pm Julian Elischer wrote: > >> John Baldwin wrote: > >>> On Tuesday 23 June 2009 2:13:48 pm Brian Somers wrote: > On Tue, 23 Jun 2009 17:44:55 + (UTC), John Baldwin > > wrote: > > Author: jhb > > Date: Tue Jun 23 17:44:55 2009 > > New Revision: 194744 > > URL: http://svn.freebsd.org/changeset/base/194744 > > > > Log: > > MF7: If the running kernel has support for shm_open() and shm_unlink() > > as > > system calls (i.e. 8.0+), then invoke the system calls instead of > > using > > open/fcntl/unlink. > > > > Modified: > > stable/4/lib/libc/ (props changed) > > stable/4/lib/libc/gen/posixshm.c > In preparation for the 4.12 release? ;^1 > >>> I expect there will be several companies running 4.x binaries under 8.x > >>> kernels actually. There are ones doing it under 7.x now. > >> this is going to break my 1.0 compatibility right? > > > > No, not at all. 1.0 binaries do not use libc.so.4. > > > but you are taking away the semsys syscall right? That is not in this change, and no I am not taking it away. I am merely not supporting it for 8.0+ binaries. The actual system call will continue to exist and work for old binaries. However, new binaries should not use it (and in fact no binaries since 5.0 are likely using it since 5.0 and later all have separate syscalls for the various SYSV IPC methods). -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194768 - head/share/man/man4
Author: joel (doc committer) Date: Tue Jun 23 21:24:21 2009 New Revision: 194768 URL: http://svn.freebsd.org/changeset/base/194768 Log: Bring in a few mdoc/language fixes. Submitted by: ru Modified: head/share/man/man4/pcm.4 Modified: head/share/man/man4/pcm.4 == --- head/share/man/man4/pcm.4 Tue Jun 23 20:57:27 2009(r194767) +++ head/share/man/man4/pcm.4 Tue Jun 23 21:24:21 2009(r194768) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 22, 2009 +.Dd June 23, 2009 .Dt SOUND 4 .Os .Sh NAME @@ -288,7 +288,9 @@ File names and versions of the currently Various messages intended for debugging. .El .It Va hw.snd.vpc_0db -Default value for pcm volume. +Default value for +.Nm +volume. Increase to give more room for attenuation control. Decrease for more amplification, with the possible cost of sound clipping. .It Va hw.snd.vpc_autoreset @@ -298,8 +300,10 @@ Enabling this will preserve the volume, when applications tries to re-open the same device. .It Va hw.snd.vpc_mixer_bypass The recommended way to use the vpc feature is to teach applications to use -the correct ioctl(): SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL, -SNDCTL_DSP_SETRECVOL, SNDCTL_DSP_SETRECVOL. +the correct +.Fn ioctl : +.Dv SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL, +.Dv SNDCTL_DSP_SETRECVOL, SNDCTL_DSP_SETRECVOL. This is however not always possible. Enable this to allow applications to use their own existing mixer logic to control their own channel volume. @@ -309,7 +313,9 @@ Enable to restore all channel volumes ba Enable or disable bitperfect mode. When enabled, channels will skip all dsp processing, such as channel matrixing, rate converting and equalizing. -The pure pcm stream will be fed directly to the hardware. +The pure +.Nm +stream will be fed directly to the hardware. If .Tn VCHANs are enabled, the bitperfect mode will use the @@ -341,26 +347,32 @@ process begins. format/rate selection. Available options include: .Bl -tag -width 2n -.It fixed / 0 +.It fixed Channel mixing is done using fixed format/rate. Advanced operations such as digital passthrough will not work. -Can be considered as a 'legacy' mode. +Can be considered as a +.Dq legacy +mode. This is the default mode for hardware channels which lack support for digital formats. -.It passthrough / 1 +.It passthrough Channel mixing is done using fixed format/rate, but advanced operations such -as digital passthrough also works. +as digital passthrough also work. All channels will produce sound as usual until a digital format playback is requested. When this happens all other channels will be muted and the latest incoming digital format will be allowed to pass through undisturbed. Multiple concurrent digital streams are supported, but the latest stream will take precedence and mute all other streams. -.It adaptive / 2 -Works like the 'passthrough' mode, but is a bit smarter, especially for -multiple pcm channels with different format/rate. +.It adaptive +Works like the +.Dq passthrough +mode, but is a bit smarter, especially for +multiple +.Nm +channels with different format/rate. When a new channel is about to start, the entire list of virtual channels will -be scanned and the channel with the best format/rate (usuallay the +be scanned, and the channel with the best format/rate (usually the highest/biggest) will be selected. This ensures that mixing quality depends on the best channel. The downside is that the hardware DMA mode needs to be restarted, which may ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"