svn commit: r216648 - releng/7.4/usr.sbin/pkg_install/add
Author: kensmith Date: Wed Dec 22 05:53:46 2010 New Revision: 216648 URL: http://svn.freebsd.org/changeset/base/216648 Log: Add release package directories for upcoming releases, and one past release. Approved by: re (implicit) Modified: releng/7.4/usr.sbin/pkg_install/add/main.c Modified: releng/7.4/usr.sbin/pkg_install/add/main.c == --- releng/7.4/usr.sbin/pkg_install/add/main.c Wed Dec 22 05:51:44 2010 (r216647) +++ releng/7.4/usr.sbin/pkg_install/add/main.c Wed Dec 22 05:53:46 2010 (r216648) @@ -83,7 +83,10 @@ struct { { 701000, 701099, "/packages-7.1-release" }, { 702000, 702099, "/packages-7.2-release" }, { 703000, 703099, "/packages-7.3-release" }, + { 704000, 704099, "/packages-7.4-release" }, { 80, 800499, "/packages-8.0-release" }, + { 801000, 801499, "/packages-8.1-release" }, + { 802000, 802499, "/packages-8.2-release" }, { 30, 399000, "/packages-3-stable" }, { 40, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, ___ 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: r216647 - releng/7.4/sys/sys
Author: kensmith Date: Wed Dec 22 05:51:44 2010 New Revision: 216647 URL: http://svn.freebsd.org/changeset/base/216647 Log: Adjust __FreeBSD_version for upcoming FreeBSD 7.4 release. Approved by: re (implicit) Modified: releng/7.4/sys/sys/param.h Modified: releng/7.4/sys/sys/param.h == --- releng/7.4/sys/sys/param.h Wed Dec 22 05:50:22 2010(r216646) +++ releng/7.4/sys/sys/param.h Wed Dec 22 05:51:44 2010(r216647) @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 703100 /* Master, propagated to newvers */ +#define __FreeBSD_version 704000 /* Master, propagated to newvers */ #ifndef LOCORE #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: r216646 - releng/7.4/share/examples/cvsup
Author: kensmith Date: Wed Dec 22 05:50:22 2010 New Revision: 216646 URL: http://svn.freebsd.org/changeset/base/216646 Log: Adjust branch tag in example. Approved by: re (implicit) Modified: releng/7.4/share/examples/cvsup/standard-supfile Modified: releng/7.4/share/examples/cvsup/standard-supfile == --- releng/7.4/share/examples/cvsup/standard-supfileWed Dec 22 05:49:19 2010(r216645) +++ releng/7.4/share/examples/cvsup/standard-supfileWed Dec 22 05:50:22 2010(r216646) @@ -49,7 +49,7 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -*default release=cvs tag=RELENG_7 +*default release=cvs tag=RELENG_7_4 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try ___ 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: r216645 - releng/7.4/release
Author: kensmith Date: Wed Dec 22 05:49:19 2010 New Revision: 216645 URL: http://svn.freebsd.org/changeset/base/216645 Log: Misc. 7.3 -> 7.4 adjustments for upcoming release. Approved by: re (implicit) Modified: releng/7.4/release/Makefile Modified: releng/7.4/release/Makefile == --- releng/7.4/release/Makefile Wed Dec 22 05:47:15 2010(r216644) +++ releng/7.4/release/Makefile Wed Dec 22 05:49:19 2010(r216645) @@ -24,11 +24,11 @@ # Set these, release builder! # # Fixed version: -#BUILDNAME=7.3-STABLE +#BUILDNAME=7.4-STABLE # # Automatic SNAP versioning: DATE != date +%Y%m%d -BASE = 7.3 +BASE = 7.4 BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release ___ 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: r216644 - releng/7.4/gnu/usr.bin/groff/tmac
Author: kensmith Date: Wed Dec 22 05:47:15 2010 New Revision: 216644 URL: http://svn.freebsd.org/changeset/base/216644 Log: Adjust FreeBSD version printed for manual pages. Approved by: re (implicit) Modified: releng/7.4/gnu/usr.bin/groff/tmac/mdoc.local Modified: releng/7.4/gnu/usr.bin/groff/tmac/mdoc.local == --- releng/7.4/gnu/usr.bin/groff/tmac/mdoc.localWed Dec 22 05:44:24 2010(r216643) +++ releng/7.4/gnu/usr.bin/groff/tmac/mdoc.localWed Dec 22 05:47:15 2010(r216644) @@ -64,7 +64,7 @@ .ds doc-volume-as-arm arm . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~7.3 +.ds doc-default-operating-system FreeBSD\~7.4 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-6.36.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: r216643 - releng/7.4
Author: kensmith Date: Wed Dec 22 05:44:24 2010 New Revision: 216643 URL: http://svn.freebsd.org/changeset/base/216643 Log: Adjust branch tag for 'make update'. Approved by: re (implicit) Modified: releng/7.4/Makefile.inc1 Modified: releng/7.4/Makefile.inc1 == --- releng/7.4/Makefile.inc1Wed Dec 22 05:03:24 2010(r216642) +++ releng/7.4/Makefile.inc1Wed Dec 22 05:44:24 2010(r216643) @@ -88,7 +88,7 @@ CLEANDIR= cleandir .endif CVS?= cvs -CVSFLAGS?= -r RELENG_7 -P -d -I! +CVSFLAGS?= -r RELENG_7_4 -P -d -I! SUP?= /usr/bin/csup SUPFLAGS?= -g -L 2 .if defined(SUPHOST) ___ 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: r216642 - head/lib/libthr/thread
Author: davidxu Date: Wed Dec 22 05:03:24 2010 New Revision: 216642 URL: http://svn.freebsd.org/changeset/base/216642 Log: Add sleep queue code. Added: head/lib/libthr/thread/thr_sleepq.c (contents, props changed) Added: head/lib/libthr/thread/thr_sleepq.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libthr/thread/thr_sleepq.c Wed Dec 22 05:03:24 2010 (r216642) @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2010 David Xu + * 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 unmodified, 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 ``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 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$ + */ + +#include +#include "thr_private.h" + +#define HASHSHIFT 9 +#define HASHSIZE (1 << HASHSHIFT) +#define SC_HASH(wchan) ((unsigned) \ + uintptr_t)(wchan) >> 3) \ + ^ ((uintptr_t)(wchan) >> (HASHSHIFT + 3))) \ + & (HASHSIZE - 1))) +#define SC_LOOKUP(wc) &sc_table[SC_HASH(wc)] + +struct sleepqueue_chain { + struct umutex sc_lock; + LIST_HEAD(, sleepqueue) sc_queues; + int sc_type; +}; + +static struct sleepqueue_chain sc_table[HASHSIZE]; + +void +_sleepq_init(void) +{ + int i; + + for (i = 0; i < HASHSIZE; ++i) { + LIST_INIT(&sc_table[i].sc_queues); + _thr_umutex_init(&sc_table[i].sc_lock); + } +} + +struct sleepqueue * +_sleepq_alloc(void) +{ + struct sleepqueue *sq; + + sq = calloc(1, sizeof(struct sleepqueue)); + TAILQ_INIT(&sq->sq_blocked); + SLIST_INIT(&sq->sq_freeq); + return (sq); +} + +void +_sleepq_free(struct sleepqueue *sq) +{ + free(sq); +} + +void +_sleepq_lock(void *wchan) +{ + struct pthread *curthread = _get_curthread(); + struct sleepqueue_chain *sc; + + sc = SC_LOOKUP(wchan); + THR_LOCK_ACQUIRE_SPIN(curthread, &sc->sc_lock); +} + +void +_sleepq_unlock(void *wchan) +{ + struct sleepqueue_chain *sc; + struct pthread *curthread = _get_curthread(); + + sc = SC_LOOKUP(wchan); + THR_LOCK_RELEASE(curthread, &sc->sc_lock); +} + +struct sleepqueue * +_sleepq_lookup(void *wchan) +{ + struct sleepqueue_chain *sc; + struct sleepqueue *sq; + + sc = SC_LOOKUP(wchan); + LIST_FOREACH(sq, &sc->sc_queues, sq_hash) + if (sq->sq_wchan == wchan) + return (sq); + return (NULL); +} + +void +_sleepq_add(void *wchan, struct pthread *td) +{ + struct sleepqueue_chain *sc; + struct sleepqueue *sq; + + sq = _sleepq_lookup(wchan); + if (sq != NULL) { + SLIST_INSERT_HEAD(&sq->sq_freeq, td->sleepqueue, sq_flink); + } else { + sc = SC_LOOKUP(wchan); + sq = td->sleepqueue; + LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash); + sq->sq_wchan = wchan; + /* sq->sq_type = type; */ + } + td->sleepqueue = NULL; + td->wchan = wchan; + TAILQ_INSERT_TAIL(&sq->sq_blocked, td, wle); +} + +int +_sleepq_remove(struct sleepqueue *sq, struct pthread *td) +{ + int rc; + + TAILQ_REMOVE(&sq->sq_blocked, td, wle); + if (TAILQ_EMPTY(&sq->sq_blocked)) { + LIST_REMOVE(sq, sq_hash); + td->sleepqueue = sq; + rc = 0; + } else { + td->sleepqueue = SLIST_FIRST(&sq->sq_freeq); + SLIST_REMOVE_HEAD(&sq->sq_freeq, sq_flink); + rc = 1; + } + td->wchan = NULL; + return (rc); +} + +void +_sleepq_drop(struct sleepqueue *sq, + void (*cb)(struct pthread *, void *arg), void *arg) +{
svn commit: r216641 - in head: lib/libthr/thread sys/kern sys/sys
Author: davidxu Date: Wed Dec 22 05:01:52 2010 New Revision: 216641 URL: http://svn.freebsd.org/changeset/base/216641 Log: MFp4: - Add flags CVWAIT_ABSTIME and CVWAIT_CLOCKID for umtx kernel based condition variable, this should eliminate an extra system call to get current time. - Add sub-function UMTX_OP_NWAKE_PRIVATE to wake up N channels in single system call. Create userland sleep queue for condition variable, in most cases, thread will wait in the queue, the pthread_cond_signal will defer thread wakeup until the mutex is unlocked, it tries to avoid an extra system call and a extra context switch in time window of pthread_cond_signal and pthread_mutex_unlock. The changes are part of process-shared mutex project. Modified: head/lib/libthr/thread/Makefile.inc head/lib/libthr/thread/thr_cond.c head/lib/libthr/thread/thr_init.c head/lib/libthr/thread/thr_kern.c head/lib/libthr/thread/thr_list.c head/lib/libthr/thread/thr_mutex.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_umtx.c head/lib/libthr/thread/thr_umtx.h head/sys/kern/kern_umtx.c head/sys/sys/_umtx.h head/sys/sys/umtx.h Modified: head/lib/libthr/thread/Makefile.inc == --- head/lib/libthr/thread/Makefile.inc Wed Dec 22 04:56:55 2010 (r216640) +++ head/lib/libthr/thread/Makefile.inc Wed Dec 22 05:01:52 2010 (r216641) @@ -45,6 +45,7 @@ SRCS+= \ thr_setschedparam.c \ thr_sig.c \ thr_single_np.c \ + thr_sleepq.c \ thr_spec.c \ thr_spinlock.c \ thr_stack.c \ Modified: head/lib/libthr/thread/thr_cond.c == --- head/lib/libthr/thread/thr_cond.c Wed Dec 22 04:56:55 2010 (r216640) +++ head/lib/libthr/thread/thr_cond.c Wed Dec 22 05:01:52 2010 (r216641) @@ -45,7 +45,8 @@ int __pthread_cond_timedwait(pthread_con static int cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr); static int cond_wait_common(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime, int cancel); -static int cond_signal_common(pthread_cond_t *cond, int broadcast); +static int cond_signal_common(pthread_cond_t *cond); +static int cond_broadcast_common(pthread_cond_t *cond); /* * Double underscore versions are cancellation points. Single underscore @@ -60,31 +61,31 @@ __weak_reference(_pthread_cond_destroy, __weak_reference(_pthread_cond_signal, pthread_cond_signal); __weak_reference(_pthread_cond_broadcast, pthread_cond_broadcast); +#define CV_PSHARED(cvp)(((cvp)->__flags & USYNC_PROCESS_SHARED) != 0) + static int cond_init(pthread_cond_t *cond, const pthread_condattr_t *cond_attr) { - pthread_cond_t pcond; - int rval = 0; + struct pthread_cond *cvp; + int error = 0; - if ((pcond = (pthread_cond_t) + if ((cvp = (pthread_cond_t) calloc(1, sizeof(struct pthread_cond))) == NULL) { - rval = ENOMEM; + error = ENOMEM; } else { /* * Initialise the condition variable structure: */ if (cond_attr == NULL || *cond_attr == NULL) { - pcond->c_pshared = 0; - pcond->c_clockid = CLOCK_REALTIME; + cvp->__clock_id = CLOCK_REALTIME; } else { - pcond->c_pshared = (*cond_attr)->c_pshared; - pcond->c_clockid = (*cond_attr)->c_clockid; + if ((*cond_attr)->c_pshared) + cvp->__flags |= USYNC_PROCESS_SHARED; + cvp->__clock_id = (*cond_attr)->c_clockid; } - _thr_umutex_init(&pcond->c_lock); - *cond = pcond; + *cond = cvp; } - /* Return the completion status: */ - return (rval); + return (error); } static int @@ -105,16 +106,16 @@ init_static(struct pthread *thread, pthr } #define CHECK_AND_INIT_COND \ - if (__predict_false((cv = (*cond)) <= THR_COND_DESTROYED)) { \ - if (cv == THR_COND_INITIALIZER) { \ + if (__predict_false((cvp = (*cond)) <= THR_COND_DESTROYED)) { \ + if (cvp == THR_COND_INITIALIZER) { \ int ret; \ ret = init_static(_get_curthread(), cond); \ if (ret) \ return (ret); \ - } else if (cv == THR_COND_DESTRO
svn commit: r216640 - releng/8.2/usr.sbin/pkg_install/add
Author: kensmith Date: Wed Dec 22 04:56:55 2010 New Revision: 216640 URL: http://svn.freebsd.org/changeset/base/216640 Log: Add packages-7.4-release and packages-8.2-release for the upcoming releases. Approved by: re (implicit) Modified: releng/8.2/usr.sbin/pkg_install/add/main.c Modified: releng/8.2/usr.sbin/pkg_install/add/main.c == --- releng/8.2/usr.sbin/pkg_install/add/main.c Wed Dec 22 04:51:05 2010 (r216639) +++ releng/8.2/usr.sbin/pkg_install/add/main.c Wed Dec 22 04:56:55 2010 (r216640) @@ -83,8 +83,10 @@ struct { { 701000, 701099, "/packages-7.1-release" }, { 702000, 702099, "/packages-7.2-release" }, { 703000, 703099, "/packages-7.3-release" }, + { 704000, 704099, "/packages-7.4-release" }, { 80, 800499, "/packages-8.0-release" }, { 801000, 801499, "/packages-8.1-release" }, + { 802000, 802499, "/packages-8.2-release" }, { 30, 399000, "/packages-3-stable" }, { 40, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, ___ 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: r216639 - releng/8.2/sys/sys
Author: kensmith Date: Wed Dec 22 04:51:05 2010 New Revision: 216639 URL: http://svn.freebsd.org/changeset/base/216639 Log: Adjust __FreeBSD_version for the 8.2 release. Approved by: re (implicit) Modified: releng/8.2/sys/sys/param.h Modified: releng/8.2/sys/sys/param.h == --- releng/8.2/sys/sys/param.h Wed Dec 22 04:47:14 2010(r216638) +++ releng/8.2/sys/sys/param.h Wed Dec 22 04:51:05 2010(r216639) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 801501 /* Master, propagated to newvers */ +#define __FreeBSD_version 802000 /* Master, propagated to newvers */ #ifdef _KERNEL #defineP_OSREL_SIGSEGV 74 ___ 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: r216638 - releng/8.2/share/examples/cvsup
Author: kensmith Date: Wed Dec 22 04:47:14 2010 New Revision: 216638 URL: http://svn.freebsd.org/changeset/base/216638 Log: Adjust branch tag in example. Approved by: re (implicit) Modified: releng/8.2/share/examples/cvsup/standard-supfile Modified: releng/8.2/share/examples/cvsup/standard-supfile == --- releng/8.2/share/examples/cvsup/standard-supfileWed Dec 22 04:44:38 2010(r216637) +++ releng/8.2/share/examples/cvsup/standard-supfileWed Dec 22 04:47:14 2010(r216638) @@ -49,7 +49,7 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -*default release=cvs tag=RELENG_8 +*default release=cvs tag=RELENG_8_2 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try ___ 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: r216637 - releng/8.2/release
Author: kensmith Date: Wed Dec 22 04:44:38 2010 New Revision: 216637 URL: http://svn.freebsd.org/changeset/base/216637 Log: Misc. 8.1 -> 8.2 adjustments for the 8.2 release. Approved by: re (implicit) Modified: releng/8.2/release/Makefile Modified: releng/8.2/release/Makefile == --- releng/8.2/release/Makefile Wed Dec 22 04:40:58 2010(r216636) +++ releng/8.2/release/Makefile Wed Dec 22 04:44:38 2010(r216637) @@ -24,11 +24,11 @@ # Set these, release builder! # # Fixed version: -#BUILDNAME=8.1-STABLE +#BUILDNAME=8.2-STABLE # # Automatic SNAP versioning: DATE != date +%Y%m%d -BASE = 8.1 +BASE = 8.2 BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release ___ 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: r216636 - releng/8.2/gnu/usr.bin/groff/tmac
Author: kensmith Date: Wed Dec 22 04:40:58 2010 New Revision: 216636 URL: http://svn.freebsd.org/changeset/base/216636 Log: Adjust the FreeBSD version printed as part of manual pages. Approved by: re (implicit) Modified: releng/8.2/gnu/usr.bin/groff/tmac/mdoc.local Modified: releng/8.2/gnu/usr.bin/groff/tmac/mdoc.local == --- releng/8.2/gnu/usr.bin/groff/tmac/mdoc.localWed Dec 22 04:37:44 2010(r216635) +++ releng/8.2/gnu/usr.bin/groff/tmac/mdoc.localWed Dec 22 04:40:58 2010(r216636) @@ -67,7 +67,7 @@ .ds doc-volume-as-arm arm . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~8.1 +.ds doc-default-operating-system FreeBSD\~8.2 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-7.27.2 @@ -76,6 +76,7 @@ .ds doc-operating-system-FreeBSD-8.08.0 .ds doc-operating-system-FreeBSD-8.18.1 .ds doc-operating-system-FreeBSD-8.28.2 +.ds doc-operating-system-FreeBSD-8.38.3 .ds doc-operating-system-FreeBSD-9.09.0 . .\" Definitions not (yet) in doc-syms ___ 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: r216635 - releng/8.2
Author: kensmith Date: Wed Dec 22 04:37:44 2010 New Revision: 216635 URL: http://svn.freebsd.org/changeset/base/216635 Log: Adjust branch tag for 'make update'. Approved by: re (implicit) Modified: releng/8.2/Makefile.inc1 Modified: releng/8.2/Makefile.inc1 == --- releng/8.2/Makefile.inc1Wed Dec 22 00:18:42 2010(r216634) +++ releng/8.2/Makefile.inc1Wed Dec 22 04:37:44 2010(r216635) @@ -93,7 +93,7 @@ CLEANDIR= cleandir .endif CVS?= cvs -CVSFLAGS?= -r RELENG_8 -P -d -I! +CVSFLAGS?= -r RELENG_8_2 -P -d -I! SVN?= svn SVNFLAGS?= -r HEAD SUP?= /usr/bin/csup ___ 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: r216634 - in head/sys/amd64: amd64 ia32 include linux32
Author: jkim Date: Wed Dec 22 00:18:42 2010 New Revision: 216634 URL: http://svn.freebsd.org/changeset/base/216634 Log: Improve PCB flags handling and make it more robust. Add two new functions for manipulating pcb_flags. These inline functions are very similar to atomic_set_char(9) and atomic_clear_char(9) but without unnecessary LOCK prefix for SMP. Add comments about the rationale[1]. Use these functions wherever possible. Although there are some places where it is not strictly necessary (e.g., a PCB is copied to create a new PCB), it is done across the board for sake of consistency. Turn pcb_full_iret into a PCB flag as it is safe now. Move rarely used fields before pcb_flags and reduce size of pcb_flags to one byte. Fix some style(9) nits in pcb.h while I am in the neighborhood. Reviewed by: kib Submitted by: kib[1] MFC after:2 months Modified: head/sys/amd64/amd64/cpu_switch.S head/sys/amd64/amd64/exception.S head/sys/amd64/amd64/fpu.c head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/sys_machdep.c head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/ia32/ia32_reg.c head/sys/amd64/ia32/ia32_signal.c head/sys/amd64/include/pcb.h head/sys/amd64/linux32/linux32_machdep.c head/sys/amd64/linux32/linux32_sysvec.c Modified: head/sys/amd64/amd64/cpu_switch.S == --- head/sys/amd64/amd64/cpu_switch.S Tue Dec 21 23:15:40 2010 (r216633) +++ head/sys/amd64/amd64/cpu_switch.S Wed Dec 22 00:18:42 2010 (r216634) @@ -94,7 +94,7 @@ END(cpu_throw) ENTRY(cpu_switch) /* Switch to new thread. First, save context. */ movqTD_PCB(%rdi),%r8 - movb$1,PCB_FULL_IRET(%r8) + orb $PCB_FULL_IRET,PCB_FLAGS(%r8) movq(%rsp),%rax /* Hardware registers */ movq%r15,PCB_R15(%r8) @@ -106,7 +106,7 @@ ENTRY(cpu_switch) movq%rbx,PCB_RBX(%r8) movq%rax,PCB_RIP(%r8) - testl $PCB_DBREGS,PCB_FLAGS(%r8) + testb $PCB_DBREGS,PCB_FLAGS(%r8) jnz store_dr/* static predict not taken */ done_store_dr: @@ -210,7 +210,7 @@ done_tss: movq%rsi,PCPU(CURTHREAD)/* into next thread */ /* Test if debug registers should be restored. */ - testl $PCB_DBREGS,PCB_FLAGS(%r8) + testb $PCB_DBREGS,PCB_FLAGS(%r8) jnz load_dr /* static predict not taken */ done_load_dr: Modified: head/sys/amd64/amd64/exception.S == --- head/sys/amd64/amd64/exception.STue Dec 21 23:15:40 2010 (r216633) +++ head/sys/amd64/amd64/exception.SWed Dec 22 00:18:42 2010 (r216634) @@ -170,7 +170,7 @@ alltraps: jz alltraps_testi /* already running with kernel GS.base */ swapgs movqPCPU(CURPCB),%rdi - movb$0,PCB_FULL_IRET(%rdi) + andb$~PCB_FULL_IRET,PCB_FLAGS(%rdi) movw%fs,TF_FS(%rsp) movw%gs,TF_GS(%rsp) movw%es,TF_ES(%rsp) @@ -243,7 +243,7 @@ alltraps_noen: jz 1f /* already running with kernel GS.base */ swapgs movqPCPU(CURPCB),%rdi - movb$0,PCB_FULL_IRET(%rdi) + andb$~PCB_FULL_IRET,PCB_FLAGS(%rdi) 1: movw%fs,TF_FS(%rsp) movw%gs,TF_GS(%rsp) movw%es,TF_ES(%rsp) @@ -294,7 +294,7 @@ IDTVEC(page) jz 1f /* already running with kernel GS.base */ swapgs movqPCPU(CURPCB),%rdi - movb$0,PCB_FULL_IRET(%rdi) + andb$~PCB_FULL_IRET,PCB_FLAGS(%rdi) 1: movq%cr2,%rdi /* preserve %cr2 before .. */ movq%rdi,TF_ADDR(%rsp) /* enabling interrupts. */ movw%fs,TF_FS(%rsp) @@ -324,7 +324,7 @@ IDTVEC(prot) jz 2f /* already running with kernel GS.base */ 1: swapgs 2: movqPCPU(CURPCB),%rdi - movb$1,PCB_FULL_IRET(%rdi) /* always full iret from GPF */ + orb $PCB_FULL_IRET,PCB_FLAGS(%rdi) /* always full iret from GPF */ movw%fs,TF_FS(%rsp) movw%gs,TF_GS(%rsp) movw%es,TF_ES(%rsp) @@ -356,7 +356,7 @@ IDTVEC(fast_syscall) movw%es,TF_ES(%rsp) movw%ds,TF_DS(%rsp) movqPCPU(CURPCB),%r11 - movb$0,PCB_FULL_IRET(%r11) + andb$~PCB_FULL_IRET,PCB_FLAGS(%r11) sti movq$KUDSEL,TF_SS(%rsp) movq$KUCSEL,TF_CS(%rsp) @@ -661,8 +661,8 @@ doreti_exit: */ testb $SEL_RPL_MASK,TF_CS(%rsp) jz ld_regs - cmpb$0,PCB_FULL_IRET(%r8) - je ld_regs + testb $PCB_FULL_IRET,PCB_FLAGS(%r8) + jz ld_regs testl $TF_HASSEGS,TF_FLAGS(%rsp) je
svn commit: r216633 - head/sys/nfsserver
Author: pjd Date: Tue Dec 21 23:15:40 2010 New Revision: 216633 URL: http://svn.freebsd.org/changeset/base/216633 Log: Use newly added NFSRV_FLAG_BUSY flag for nfsrv_fhtovp() to keep mount point busy. This fixes a race where we can pass invalid mount point to VFS_VGET() via vp->v_mount when exported file system was forcibly unmounted between nfsrv_fhtovp() and VFS_VGET(). Reviewed by: kib MFC after:5 days Modified: head/sys/nfsserver/nfs_serv.c Modified: head/sys/nfsserver/nfs_serv.c == --- head/sys/nfsserver/nfs_serv.c Tue Dec 21 23:12:45 2010 (r216632) +++ head/sys/nfsserver/nfs_serv.c Tue Dec 21 23:15:40 2010 (r216633) @@ -3036,9 +3036,11 @@ nfsrv_readdirplus(struct nfsrv_descript int v3 = (nfsd->nd_flag & ND_NFSV3); int usevget = 1, vfslocked; struct componentname cn; + struct mount *mntp = NULL; nfsdbprintf(("%s %d\n", __FILE__, __LINE__)); vfslocked = 0; + vp_locked = 0; if (!v3) panic("nfsrv_readdirplus: v3 proc called on a v2 connection"); fhp = &nfh.fh_generic; @@ -3058,14 +3060,17 @@ nfsrv_readdirplus(struct nfsrv_descript if (siz > xfer) siz = xfer; fullsiz = siz; - error = nfsrv_fhtovp(fhp, 0, &vp, &vfslocked, nfsd, slp, - nam, &rdonly, TRUE); - vp_locked = 1; - if (!error && vp->v_type != VDIR) { - error = ENOTDIR; - vput(vp); - vp = NULL; - vp_locked = 0; + error = nfsrv_fhtovp(fhp, NFSRV_FLAG_BUSY, &vp, &vfslocked, nfsd, slp, + nam, &rdonly); + if (!error) { + vp_locked = 1; + mntp = vp->v_mount; + if (vp->v_type != VDIR) { + error = ENOTDIR; + vput(vp); + vp = NULL; + vp_locked = 0; + } } if (error) { nfsm_reply(NFSX_UNSIGNED); @@ -3207,8 +3212,8 @@ again: * For readdir_and_lookup get the vnode using * the file number. */ - error = VFS_VGET(vp->v_mount, dp->d_fileno, - LK_SHARED, &nvp); + error = VFS_VGET(mntp, dp->d_fileno, LK_SHARED, + &nvp); if (error != 0 && error != EOPNOTSUPP) { error = 0; goto invalid; ___ 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: r216632 - head/sys/nfsserver
Author: pjd Date: Tue Dec 21 23:12:45 2010 New Revision: 216632 URL: http://svn.freebsd.org/changeset/base/216632 Log: - Move pubflag and lockflag handling from nfsrv_fhtovp() to nfs_namei() - this is the only place that is different from all the other nfsrv_fhtovp() consumers. This simplifies nfsrv_fhtovp() a bit and also eliminates one vn_lock/VOP_UNLOCK() cycle in case of NFSv3. - Implement NFSRV_FLAG_BUSY flag for nfsrv_fhtovp() that tells it to leave mount point busy. Reviewed by: kib MFC after:5 days Modified: head/sys/nfsserver/nfs.h head/sys/nfsserver/nfs_serv.c head/sys/nfsserver/nfs_srvsubs.c Modified: head/sys/nfsserver/nfs.h == --- head/sys/nfsserver/nfs.hTue Dec 21 23:04:04 2010(r216631) +++ head/sys/nfsserver/nfs.hTue Dec 21 23:12:45 2010(r216632) @@ -239,6 +239,12 @@ extern int nfs_debug; #endif +/* + * The following flags can be passed to nfsrv_fhtovp() function. + */ +/* Leave file system busy on success. */ +#defineNFSRV_FLAG_BUSY 0x01 + struct mbuf *nfs_rephead(int, struct nfsrv_descript *, int, struct mbuf **, caddr_t *); void nfsm_srvfattr(struct nfsrv_descript *, struct vattr *, @@ -264,7 +270,7 @@ int nfsrv_create(struct nfsrv_descript * struct mbuf **mrq); intnfsrv_fhtovp(fhandle_t *, int, struct vnode **, int *, struct nfsrv_descript *, struct nfssvc_sock *, struct sockaddr *, - int *, int); + int *); intnfsrv_setpublicfs(struct mount *, struct netexport *, struct export_args *); intnfs_ispublicfh(fhandle_t *); Modified: head/sys/nfsserver/nfs_serv.c == --- head/sys/nfsserver/nfs_serv.c Tue Dec 21 23:04:04 2010 (r216631) +++ head/sys/nfsserver/nfs_serv.c Tue Dec 21 23:12:45 2010 (r216632) @@ -213,8 +213,7 @@ nfsrv3_access(struct nfsrv_descript *nfs fhp = &nfh.fh_generic; nfsm_srvmtofh(fhp); tl = nfsm_dissect_nonblock(u_int32_t *, NFSX_UNSIGNED); - error = nfsrv_fhtovp(fhp, 1, &vp, &vfslocked, nfsd, slp, - nam, &rdonly, TRUE); + error = nfsrv_fhtovp(fhp, 0, &vp, &vfslocked, nfsd, slp, nam, &rdonly); if (error) { nfsm_reply(NFSX_UNSIGNED); nfsm_srvpostop_attr(1, NULL); @@ -280,8 +279,7 @@ nfsrv_getattr(struct nfsrv_descript *nfs vfslocked = 0; fhp = &nfh.fh_generic; nfsm_srvmtofh(fhp); - error = nfsrv_fhtovp(fhp, 1, &vp, &vfslocked, nfsd, slp, nam, - &rdonly, TRUE); + error = nfsrv_fhtovp(fhp, 0, &vp, &vfslocked, nfsd, slp, nam, &rdonly); if (error) { nfsm_reply(0); error = 0; @@ -389,8 +387,7 @@ nfsrv_setattr(struct nfsrv_descript *nfs /* * Now that we have all the fields, lets do it. */ - error = nfsrv_fhtovp(fhp, 1, &vp, &tvfslocked, nfsd, slp, - nam, &rdonly, TRUE); + error = nfsrv_fhtovp(fhp, 0, &vp, &tvfslocked, nfsd, slp, nam, &rdonly); vfslocked = nfsrv_lockedpair(vfslocked, tvfslocked); if (error) { nfsm_reply(2 * NFSX_UNSIGNED); @@ -712,8 +709,7 @@ nfsrv_readlink(struct nfsrv_descript *nf uiop->uio_rw = UIO_READ; uiop->uio_segflg = UIO_SYSSPACE; uiop->uio_td = NULL; - error = nfsrv_fhtovp(fhp, 1, &vp, &vfslocked, nfsd, slp, - nam, &rdonly, TRUE); + error = nfsrv_fhtovp(fhp, 0, &vp, &vfslocked, nfsd, slp, nam, &rdonly); if (error) { nfsm_reply(2 * NFSX_UNSIGNED); if (v3) @@ -808,8 +804,7 @@ nfsrv_read(struct nfsrv_descript *nfsd, * as well. */ - error = nfsrv_fhtovp(fhp, 1, &vp, &vfslocked, nfsd, slp, - nam, &rdonly, TRUE); + error = nfsrv_fhtovp(fhp, 0, &vp, &vfslocked, nfsd, slp, nam, &rdonly); if (error) { vp = NULL; nfsm_reply(2 * NFSX_UNSIGNED); @@ -1109,8 +1104,7 @@ nfsrv_write(struct nfsrv_descript *nfsd, error = 0; goto nfsmout; } - error = nfsrv_fhtovp(fhp, 1, &vp, &tvfslocked, nfsd, slp, - nam, &rdonly, TRUE); + error = nfsrv_fhtovp(fhp, 0, &vp, &tvfslocked, nfsd, slp, nam, &rdonly); vfslocked = nfsrv_lockedpair(vfslocked, tvfslocked); if (error) { vp = NULL; @@ -2102,8 +2096,7 @@ nfsrv_link(struct nfsrv_descript *nfsd, nfsm_srvmtofh(dfhp); nfsm_srvnamesiz(len); - error = nfsrv_fhtovp(fhp, TRUE, &vp, &tvfslocked, nfsd, slp, - nam, &rdonly, TRUE); + error = nfsrv_fhtovp(fhp, 0, &vp, &tvfslocked, nfsd, slp, nam, &rdonly); vfslocked = nfsrv_lockedpair(vfslocked, tvfslocked); if (error) { nfsm_reply(NFSX_POSTOPATTR(v3) + NFSX_WCCDATA(v3)); @
svn commit: r216631 - head/sys/nfsserver
Author: pjd Date: Tue Dec 21 23:04:04 2010 New Revision: 216631 URL: http://svn.freebsd.org/changeset/base/216631 Log: On error, unbusy file system and jump to the end, so we won't try to unlock NULL *vpp. Reviewed by: kib MFC after:5 days Modified: head/sys/nfsserver/nfs_srvsubs.c Modified: head/sys/nfsserver/nfs_srvsubs.c == --- head/sys/nfsserver/nfs_srvsubs.cTue Dec 21 22:48:56 2010 (r216630) +++ head/sys/nfsserver/nfs_srvsubs.cTue Dec 21 23:04:04 2010 (r216631) @@ -1144,6 +1144,8 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla vput(*vpp); *vpp = NULL; error = NFSERR_AUTHERR | AUTH_TOOWEAK; + vfs_unbusy(mp); + goto out; } } #endif ___ 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: r216630 - head/bin/sh
Author: jilles Date: Tue Dec 21 22:48:56 2010 New Revision: 216630 URL: http://svn.freebsd.org/changeset/base/216630 Log: sh(1): Explain why it is a bad idea to use aliases in scripts. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 == --- head/bin/sh/sh.1Tue Dec 21 22:47:34 2010(r216629) +++ head/bin/sh/sh.1Tue Dec 21 22:48:56 2010(r216630) @@ -456,9 +456,10 @@ would become Aliases provide a convenient way for naive users to create shorthands for commands without having to learn how to create functions with arguments. -They can also be -used to create lexically obscure code. -This use is discouraged. +Using aliases in scripts is discouraged +because the command that defines them must be executed +before the code that uses them is parsed. +This is fragile and not portable. .Pp An alias name may be escaped in a command line, so that it is not replaced by its alias value, by using quoting characters within or ___ 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: r216629 - in head: bin/kill bin/sh bin/sh/bltin share/man/man1
Author: jilles Date: Tue Dec 21 22:47:34 2010 New Revision: 216629 URL: http://svn.freebsd.org/changeset/base/216629 Log: sh: Add kill builtin. This allows specifying a %job (which is equivalent to the corresponding process group). Additionally, it improves reliability of kill from sh in high-load situations and ensures "kill" finds the correct utility regardless of PATH, as required by POSIX (unless the undocumented %builtin mechanism is used). Side effect: fatal errors (any error other than kill(2) failure) now return exit status 2 instead of 1. (This is consistent with other sh builtins, but not in NetBSD.) Code size increases about 1K on i386. Obtained from:NetBSD Modified: head/bin/kill/kill.1 head/bin/kill/kill.c head/bin/sh/Makefile head/bin/sh/bltin/bltin.h head/bin/sh/builtins.def head/bin/sh/jobs.c head/bin/sh/sh.1 head/share/man/man1/builtin.1 Modified: head/bin/kill/kill.1 == --- head/bin/kill/kill.1Tue Dec 21 22:03:12 2010(r216628) +++ head/bin/kill/kill.1Tue Dec 21 22:47:34 2010(r216629) @@ -134,6 +134,7 @@ Terminate the process group with PGID 11 .Xr csh 1 , .Xr killall 1 , .Xr ps 1 , +.Xr sh 1 , .Xr kill 2 , .Xr sigaction 2 .Sh STANDARDS Modified: head/bin/kill/kill.c == --- head/bin/kill/kill.cTue Dec 21 22:03:12 2010(r216628) +++ head/bin/kill/kill.cTue Dec 21 22:47:34 2010(r216629) @@ -49,6 +49,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef SHELL +#define main killcmd +#include "bltin/bltin.h" +#include "error.h" +#endif + static void nosig(const char *); static void printsignals(FILE *); static int signame_to_signum(const char *); @@ -75,16 +81,16 @@ main(int argc, char *argv[]) usage(); numsig = strtol(*argv, &ep, 10); if (!**argv || *ep) - errx(1, "illegal signal number: %s", *argv); + errx(2, "illegal signal number: %s", *argv); if (numsig >= 128) numsig -= 128; if (numsig <= 0 || numsig >= sys_nsig) nosig(*argv); printf("%s\n", sys_signame[numsig]); - exit(0); + return (0); } printsignals(stdout); - exit(0); + return (0); } if (!strcmp(*argv, "-s")) { @@ -107,7 +113,7 @@ main(int argc, char *argv[]) } else if (isdigit(**argv)) { numsig = strtol(*argv, &ep, 10); if (!**argv || *ep) - errx(1, "illegal signal number: %s", *argv); + errx(2, "illegal signal number: %s", *argv); if (numsig < 0) nosig(*argv); } else @@ -122,16 +128,23 @@ main(int argc, char *argv[]) usage(); for (errors = 0; argc; argc--, argv++) { - pid = strtol(*argv, &ep, 10); - if (!**argv || *ep) - errx(1, "illegal process id: %s", *argv); - else if (kill(pid, numsig) == -1) { +#ifdef SHELL + if (**argv == '%') + pid = getjobpgrp(*argv); + else +#endif + { + pid = strtol(*argv, &ep, 10); + if (!**argv || *ep) + errx(2, "illegal process id: %s", *argv); + } + if (kill(pid, numsig) == -1) { warn("%s", *argv); errors = 1; } } - exit(errors); + return (errors); } static int @@ -154,7 +167,11 @@ nosig(const char *name) warnx("unknown signal %s; valid signals:", name); printsignals(stderr); - exit(1); +#ifdef SHELL + error(NULL); +#else + exit(2); +#endif } static void @@ -180,5 +197,9 @@ usage(void) " kill -l [exit_status]", " kill -signal_name pid ...", " kill -signal_number pid ..."); - exit(1); +#ifdef SHELL + error(NULL); +#else + exit(2); +#endif } Modified: head/bin/sh/Makefile == --- head/bin/sh/MakefileTue Dec 21 22:03:12 2010(r216628) +++ head/bin/sh/MakefileTue Dec 21 22:47:34 2010(r216629) @@ -4,7 +4,7 @@ PROG= sh INSTALLFLAGS= -S SHSRCS=alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \ - histedit.c input.c jobs.c mail.c
svn commit: r216628 - in head/sys/sparc64: include sparc64
Author: marius Date: Tue Dec 21 22:03:12 2010 New Revision: 216628 URL: http://svn.freebsd.org/changeset/base/216628 Log: Extend the hack of r182730 to trick GAS/GCC into compiling access to STICK/STICK_COMPARE independently of the selected instruction set by TICK_COMPARE so tick.c as of r214358 once again can be compiled with gcc -mcpu=v9 for reference purposes. Modified: head/sys/sparc64/include/cpufunc.h head/sys/sparc64/sparc64/tick.c Modified: head/sys/sparc64/include/cpufunc.h == --- head/sys/sparc64/include/cpufunc.h Tue Dec 21 22:01:26 2010 (r216627) +++ head/sys/sparc64/include/cpufunc.h Tue Dec 21 22:03:12 2010 (r216628) @@ -174,11 +174,13 @@ int fasword32(u_long asi, void *addr, ui } while (0) /* - * Trick GAS/GCC into compiling access to STICK/STICK_COMPARE independently + * Trick GAS/GCC into compiling access to TICK/(S)TICK_COMPARE independently * of the selected instruction set. */ +#definerdtickcmpr()rd(asr23) #definerdstick() rd(asr24) #definerdstickcmpr() rd(asr25) +#definewrtickcmpr(val, xor)wr(asr23, (val), (xor)) #definewrstick(val, xor) wr(asr24, (val), (xor)) #definewrstickcmpr(val, xor) wr(asr25, (val), (xor)) @@ -191,7 +193,7 @@ int fasword32(u_long asi, void *addr, ui * aligned to a quadword boundary in order to ensure that I$ misses won't * split them up. */ -#definewrtickcmpr(val, xor) ({ \ +#definewrtickcmpr_bbwar(val, xor) ({ \ __asm __volatile( \ " ba,pt %%xcc, 1f ; " \ "nop ; " \ Modified: head/sys/sparc64/sparc64/tick.c == --- head/sys/sparc64/sparc64/tick.c Tue Dec 21 22:01:26 2010 (r216627) +++ head/sys/sparc64/sparc64/tick.c Tue Dec 21 22:03:12 2010 (r216628) @@ -132,14 +132,14 @@ static void tick_wr_cmpr(uint64_t tick_cmpr) { - wr(tick_cmpr, tick_cmpr, 0); + wrtickcmpr(tick_cmpr, 0); } static void tick_wr_cmpr_bbwar(uint64_t tick_cmpr) { - wrtickcmpr(tick_cmpr, 0); + wrtickcmpr_bbwar(tick_cmpr, 0); } static uint64_t ___ 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: r216627 - head/sys/nfsserver
Author: pjd Date: Tue Dec 21 22:01:26 2010 New Revision: 216627 URL: http://svn.freebsd.org/changeset/base/216627 Log: After r216626 no extra { } are needed with VFS_UNLOCK_GIANT(). Modified: head/sys/nfsserver/nfs_srvsubs.c Modified: head/sys/nfsserver/nfs_srvsubs.c == --- head/sys/nfsserver/nfs_srvsubs.cTue Dec 21 21:59:21 2010 (r216626) +++ head/sys/nfsserver/nfs_srvsubs.cTue Dec 21 22:01:26 2010 (r216627) @@ -1166,9 +1166,9 @@ out: if (credanon != NULL) crfree(credanon); - if (error) { + if (error) VFS_UNLOCK_GIANT(vfslocked); - } else + else *vfslockedp = vfslocked; return (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: r216626 - head/sys/sys
Author: pjd Date: Tue Dec 21 21:59:21 2010 New Revision: 216626 URL: http://svn.freebsd.org/changeset/base/216626 Log: Close body of the VFS_UNLOCK_GIANT() macro into do { } while (0) loop, so it can be used in code like this: if (cond) VFS_UNLOCK_GIANT(vfslocked); else ; /* Do something else. */ Before the change, compiler couldn't decide on its own if else should be applied to the 'if (cond)' or to the if statement inside VFS_UNLOCK_GIANT() macro. Modified: head/sys/sys/mount.h Modified: head/sys/sys/mount.h == --- head/sys/sys/mount.hTue Dec 21 21:32:17 2010(r216625) +++ head/sys/sys/mount.hTue Dec 21 21:59:21 2010(r216626) @@ -644,7 +644,11 @@ vfs_statfs_t __vfs_statfs; _locked = 0;\ _locked;\ }) -#defineVFS_UNLOCK_GIANT(locked)if ((locked)) mtx_unlock(&Giant); +#defineVFS_UNLOCK_GIANT(locked) do \ +{ \ + if ((locked)) \ + mtx_unlock(&Giant); \ +} while (0) #defineVFS_ASSERT_GIANT(MP) do \ { \ struct mount *_mp; \ ___ 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: r216625 - head/sys/sparc64/include
Marius Strobl wrote: Author: marius Date: Tue Dec 21 21:32:17 2010 New Revision: 216625 URL: http://svn.freebsd.org/changeset/base/216625 Log: Revert r216080 so kmem_map is capped at 3/5 of the currently rather modest kernel address space in order to leave space for the buffer cache, pipes, thread stacks, etc on machines with more physical memory until we take advantage of ASI_ATOMIC_QUAD_LDD_PHYS on CPUs providing it so we don't need to lock the kernel TSB pages into the dTLB, basically making the entire 64-bit kernel address space available on relevant machines. Submitted by: alc Thanks! Alan ___ 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: r216625 - head/sys/sparc64/include
Author: marius Date: Tue Dec 21 21:32:17 2010 New Revision: 216625 URL: http://svn.freebsd.org/changeset/base/216625 Log: Revert r216080 so kmem_map is capped at 3/5 of the currently rather modest kernel address space in order to leave space for the buffer cache, pipes, thread stacks, etc on machines with more physical memory until we take advantage of ASI_ATOMIC_QUAD_LDD_PHYS on CPUs providing it so we don't need to lock the kernel TSB pages into the dTLB, basically making the entire 64-bit kernel address space available on relevant machines. Submitted by: alc Modified: head/sys/sparc64/include/vmparam.h Modified: head/sys/sparc64/include/vmparam.h == --- head/sys/sparc64/include/vmparam.h Tue Dec 21 21:29:02 2010 (r216624) +++ head/sys/sparc64/include/vmparam.h Tue Dec 21 21:32:17 2010 (r216625) @@ -240,7 +240,8 @@ * Ceiling on amount of kmem_map kva space. */ #ifndef VM_KMEM_SIZE_MAX -#defineVM_KMEM_SIZE_MAX(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) +#defineVM_KMEM_SIZE_MAX((VM_MAX_KERNEL_ADDRESS - \ +VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5) #endif /* ___ 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: r216623 - head/sys/dev/mii
Author: marius Date: Tue Dec 21 21:12:18 2010 New Revision: 216623 URL: http://svn.freebsd.org/changeset/base/216623 Log: - Add a comment regarding the fact that as documented in the datasheet manual 1000BASE-T modes of DP83865 only work together with other National Semiconductor PHYs. - Spell 10BASE-T correctly - Remove some redundant braces. Modified: head/sys/dev/mii/nsgphy.c Modified: head/sys/dev/mii/nsgphy.c == --- head/sys/dev/mii/nsgphy.c Tue Dec 21 20:47:06 2010(r216622) +++ head/sys/dev/mii/nsgphy.c Tue Dec 21 21:12:18 2010(r216623) @@ -140,11 +140,15 @@ nsgphy_attach(device_t dev) mii_phy_reset(sc); /* -* NB: the PHY has the 10baseT BMSR bits hard-wired to 0, -* even though it supports 10baseT. +* NB: the PHY has the 10BASE-T BMSR bits hard-wired to 0, +* even though it supports 10BASE-T. */ sc->mii_capabilities = (PHY_READ(sc, MII_BMSR) | - (BMSR_10TFDX | BMSR_10THDX)) & ma->mii_capmask; + BMSR_10TFDX | BMSR_10THDX) & ma->mii_capmask; + /* +* Note that as documented manual 1000BASE-T modes of DP83865 only +* work together with other National Semiconductor PHYs. +*/ if (sc->mii_capabilities & BMSR_EXTSTAT) sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); ___ 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: r216622 - in head/bin/sh: . bltin
Author: jilles Date: Tue Dec 21 20:47:06 2010 New Revision: 216622 URL: http://svn.freebsd.org/changeset/base/216622 Log: sh: Add a function to print warnings (with command name and newline). This is like error() but without raising an exception. It is particularly useful as a replacement for the warnx macro in bltin/bltin.h. Modified: head/bin/sh/alias.c head/bin/sh/bltin/bltin.h head/bin/sh/cd.c head/bin/sh/error.c head/bin/sh/error.h head/bin/sh/trap.c Modified: head/bin/sh/alias.c == --- head/bin/sh/alias.c Tue Dec 21 19:30:24 2010(r216621) +++ head/bin/sh/alias.c Tue Dec 21 20:47:06 2010(r216622) @@ -246,7 +246,7 @@ aliascmd(int argc, char **argv) while ((n = *++argv) != NULL) { if ((v = strchr(n+1, '=')) == NULL) /* n+1: funny ksh stuff */ if ((ap = lookupalias(n, 0)) == NULL) { - outfmt(out2, "alias: %s not found\n", n); + warning("%s not found", n); ret = 1; } else printalias(ap); Modified: head/bin/sh/bltin/bltin.h == --- head/bin/sh/bltin/bltin.h Tue Dec 21 19:30:24 2010(r216621) +++ head/bin/sh/bltin/bltin.h Tue Dec 21 20:47:06 2010(r216622) @@ -57,11 +57,7 @@ #define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file) #define fflush flushout #define INITARGS(argv) -#define warnx(...) do {\ - out2fmt_flush("%s: ", commandname); \ - out2fmt_flush(__VA_ARGS__); \ - out2fmt_flush("\n");\ - } while (0) +#define warnx warning #define errx(exitstatus, ...) error(__VA_ARGS__) #else Modified: head/bin/sh/cd.c == --- head/bin/sh/cd.cTue Dec 21 19:30:24 2010(r216621) +++ head/bin/sh/cd.cTue Dec 21 20:47:06 2010(r216622) @@ -224,7 +224,7 @@ cdphysical(char *dest) } p = findcwd(NULL); if (p == NULL) - out2fmt_flush("cd: warning: failed to get name of current directory\n"); + warning("warning: failed to get name of current directory"); updatepwd(p); INTON; return (0); Modified: head/bin/sh/error.c == --- head/bin/sh/error.c Tue Dec 21 19:30:24 2010(r216621) +++ head/bin/sh/error.c Tue Dec 21 20:47:06 2010(r216622) @@ -134,6 +134,26 @@ onint(void) } +static void +vwarning(const char *msg, va_list ap) +{ + if (commandname) + outfmt(out2, "%s: ", commandname); + doformat(out2, msg, ap); + out2fmt_flush("\n"); +} + + +void +warning(const char *msg, ...) +{ + va_list ap; + va_start(ap, msg); + vwarning(msg, ap); + va_end(ap); +} + + /* * Exverror is called to raise the error exception. If the first argument * is not NULL then error prints an error message using printf style @@ -158,12 +178,8 @@ exverror(int cond, const char *msg, va_l else TRACE(("exverror(%d, NULL) pid=%d\n", cond, getpid())); #endif - if (msg) { - if (commandname) - outfmt(out2, "%s: ", commandname); - doformat(out2, msg, ap); - out2c('\n'); - } + if (msg) + vwarning(msg, ap); flushall(); exraise(cond); } Modified: head/bin/sh/error.h == --- head/bin/sh/error.h Tue Dec 21 19:30:24 2010(r216621) +++ head/bin/sh/error.h Tue Dec 21 20:47:06 2010(r216622) @@ -80,6 +80,7 @@ extern volatile sig_atomic_t intpending; void exraise(int) __dead2; void onint(void); +void warning(const char *, ...) __printflike(1, 2); void error(const char *, ...) __printf0like(1, 2) __dead2; void exerror(int, const char *, ...) __printf0like(2, 3) __dead2; Modified: head/bin/sh/trap.c == --- head/bin/sh/trap.c Tue Dec 21 19:30:24 2010(r216621) +++ head/bin/sh/trap.c Tue Dec 21 20:47:06 2010(r216622) @@ -185,7 +185,7 @@ trapcmd(int argc, char **argv) } while (*argv) { if ((signo = sigstring_to_signum(*argv)) == -1) { - out2fmt_flush("trap: bad signal %s\n", *argv); + warning("bad signal %s", *argv); errors = 1; } INTOFF; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listi
svn commit: r216621 - head/sys/netinet
Author: jhb Date: Tue Dec 21 19:30:24 2010 New Revision: 216621 URL: http://svn.freebsd.org/changeset/base/216621 Log: Fix a typo in a comment. MFC after:1 week Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c == --- head/sys/netinet/tcp_timer.cTue Dec 21 18:23:03 2010 (r216620) +++ head/sys/netinet/tcp_timer.cTue Dec 21 19:30:24 2010 (r216621) @@ -533,7 +533,7 @@ tcp_timer_rexmt(void * xtp) TCPT_RANGESET(tp->t_rxtcur, rexmt, tp->t_rttmin, TCPTV_REXMTMAX); /* -* Disable rfc1323 if we havn't got any response to +* Disable rfc1323 if we haven't got any response to * our third SYN to work-around some broken terminal servers * (most of which have hopefully been retired) that have bad VJ * header compression code which trashes TCP segments containing ___ 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: r216620 - in head/sys: kern sys
Author: mdf Date: Tue Dec 21 18:23:03 2010 New Revision: 216620 URL: http://svn.freebsd.org/changeset/base/216620 Log: Initialize fp_location for explicitly managed fail points, and push the parentheses around the location for simple fail points into the location string. This makes the print on fail point set more consistent between the two versions. Also fix up fail.h a little for style(9): only use one of sys/param.h and sys/types.h, and use the existing __XSTRING() macro instead of rolling our own. Also fix up a few tabs on changed and nearby lines. Lastly, since KFAIL_POINT_{BEGIN,END} are not meant for use outside this file, just eliminate the macros entirely. MFC after: 1 week Modified: head/sys/kern/kern_fail.c head/sys/sys/fail.h Modified: head/sys/kern/kern_fail.c == --- head/sys/kern/kern_fail.c Tue Dec 21 17:24:32 2010(r216619) +++ head/sys/kern/kern_fail.c Tue Dec 21 18:23:03 2010(r216620) @@ -177,6 +177,7 @@ fail_point_init(struct fail_point *fp, c va_end(ap); } fp->fp_name = name; + fp->fp_location = ""; fp->fp_flags |= FAIL_POINT_DYNAMIC_NAME; fp->fp_sleep_fn = NULL; fp->fp_sleep_arg = NULL; @@ -372,10 +373,10 @@ fail_point_set(struct fail_point *fp, ch end: #ifdef IWARNING if (error) - IWARNING("Failed to set %s (%s) to %s", + IWARNING("Failed to set %s %s to %s", fp->fp_name, fp->fp_location, buf); else - INOTICE("Set %s (%s) to %s", + INOTICE("Set %s %s to %s", fp->fp_name, fp->fp_location, buf); #endif /* IWARNING */ Modified: head/sys/sys/fail.h == --- head/sys/sys/fail.h Tue Dec 21 17:24:32 2010(r216619) +++ head/sys/sys/fail.h Tue Dec 21 18:23:03 2010(r216620) @@ -32,10 +32,9 @@ #ifndef _SYS_FAIL_H_ #define _SYS_FAIL_H_ -#include - -#include #include +#include +#include #include #include @@ -129,10 +128,8 @@ fail_point_eval(struct fail_point *fp, i __END_DECLS /* Declare a fail_point and its sysctl in a function. */ -#define _FAIL_POINT_NAME(name) _fail_point_##name -#define _STRINGIFY_HELPER(x) #x -#define _STRINGIFY(x) _STRINGIFY_HELPER(x) -#define _FAIL_POINT_LOCATION() __FILE__ ":" _STRINGIFY(__LINE__) +#define_FAIL_POINT_NAME(name) _fail_point_##name +#define_FAIL_POINT_LOCATION() "(" __FILE__ ":" __XSTRING(__LINE__) ")" /** * Instantiate a failpoint which returns "value" from the function when triggered. @@ -178,53 +175,43 @@ __END_DECLS /** * Instantiate a failpoint which runs arbitrary code when triggered. * @param parent The parent sysctl under which to locate the sysctl - * @param name The name of the failpoint in the sysctl tree (and printouts) + * @param name The name of the failpoint in the sysctl tree + * (and printouts) * @param code The arbitrary code to run when triggered. Can reference - * "RETURN_VALUE" if desired to extract the specified user - * return-value when triggered + * "RETURN_VALUE" if desired to extract the specified + * user return-value when triggered. Note that this is + * implemented with a do-while loop so be careful of + * break and continue statements. */ #define KFAIL_POINT_CODE(parent, name, code) \ - KFAIL_POINT_START(parent, name) { \ +do { \ + int RETURN_VALUE; \ + static struct fail_point _FAIL_POINT_NAME(name) = { \ + #name, \ + _FAIL_POINT_LOCATION(), \ + TAILQ_HEAD_INITIALIZER(_FAIL_POINT_NAME(name).fp_entries), \ + 0, \ + NULL, NULL, \ + }; \ + SYSCTL_OID(parent, OID_AUTO, name, \ + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, \ + &_FAIL_POINT_NAME(name), 0, fail_point_sysctl, \ + "A", ""); \ + \ + if (__predict_false(\ + fail_point_eval(&_FAIL_POINT_NAME(name), &RETURN_VALUE))) { \ + \
svn commit: r216619 - head/sbin/geom/class/part
Author: ae Date: Tue Dec 21 17:24:32 2010 New Revision: 216619 URL: http://svn.freebsd.org/changeset/base/216619 Log: Check number of arguments before trying to read arg0. This prevents access to arg0 and dumping core when `gpart bootcode` called without arguments. Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c == --- head/sbin/geom/class/part/geom_part.c Tue Dec 21 17:10:29 2010 (r216618) +++ head/sbin/geom/class/part/geom_part.c Tue Dec 21 17:24:32 2010 (r216619) @@ -1133,6 +1133,8 @@ gpart_bootcode(struct gctl_req *req, uns geom_deletetree(&mesh); errx(EXIT_FAILURE, "Class %s not found.", s); } + if (gctl_get_int(req, "nargs") != 1) + errx(EXIT_FAILURE, "Invalid number of arguments."); s = gctl_get_ascii(req, "arg0"); if (s == NULL) abort(); ___ 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: r216616 - in head/sys: kern sys
On Tue, Dec 21, 2010 at 8:52 AM, Stefan Farfeleder wrote: > On Tue, Dec 21, 2010 at 04:29:58PM +, Matthew D Fleming wrote: >> Author: mdf >> Date: Tue Dec 21 16:29:58 2010 >> New Revision: 216616 >> URL: http://svn.freebsd.org/changeset/base/216616 >> >> Log: >> Move the fail_point_entry definition from fail.h to kern_fail.c, which >> allows putting the enumeration constants of fail point types with the >> text string that matches them. > > [snip] > >> +enum fail_point_t { >> + FAIL_POINT_OFF, /**< don't fail */ >> + FAIL_POINT_PANIC, /**< panic */ >> + FAIL_POINT_RETURN, /**< return an errorcode */ >> + FAIL_POINT_BREAK, /**< break into the debugger */ >> + FAIL_POINT_PRINT, /**< print a message */ >> + FAIL_POINT_SLEEP, /**< sleep for some msecs */ >> + FAIL_POINT_INVALID, /**< placeholder */ >> +}; >> + >> +static const char *fail_type_strings[] = { >> + "off", >> + "panic", >> + "return", >> + "break", >> + "print", >> + "sleep", >> +}; > > FWIW, you can also do this in C99: > > static const char *fail_type_strings[] = { > [FAIL_POINT_OFF] = "off", > }; True. In this case I also wanted to get the stuff out of the header that was really private. Thanks, matthew ___ 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: r216618 - releng/7.4
Author: kensmith Date: Tue Dec 21 17:10:29 2010 New Revision: 216618 URL: http://svn.freebsd.org/changeset/base/216618 Log: Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit) Added: - copied from r216617, stable/7/ Directory Properties: releng/7.4/ (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: r216617 - releng/8.2
Author: kensmith Date: Tue Dec 21 17:09:25 2010 New Revision: 216617 URL: http://svn.freebsd.org/changeset/base/216617 Log: Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit) Added: - copied from r216616, stable/8/ Directory Properties: releng/8.2/ (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"
Re: svn commit: r216616 - in head/sys: kern sys
On Tue, Dec 21, 2010 at 04:29:58PM +, Matthew D Fleming wrote: > Author: mdf > Date: Tue Dec 21 16:29:58 2010 > New Revision: 216616 > URL: http://svn.freebsd.org/changeset/base/216616 > > Log: > Move the fail_point_entry definition from fail.h to kern_fail.c, which > allows putting the enumeration constants of fail point types with the > text string that matches them. [snip] > +enum fail_point_t { > + FAIL_POINT_OFF, /**< don't fail */ > + FAIL_POINT_PANIC, /**< panic */ > + FAIL_POINT_RETURN, /**< return an errorcode */ > + FAIL_POINT_BREAK, /**< break into the debugger */ > + FAIL_POINT_PRINT, /**< print a message */ > + FAIL_POINT_SLEEP, /**< sleep for some msecs */ > + FAIL_POINT_INVALID, /**< placeholder */ > +}; > + > +static const char *fail_type_strings[] = { > + "off", > + "panic", > + "return", > + "break", > + "print", > + "sleep", > +}; FWIW, you can also do this in C99: static const char *fail_type_strings[] = { [FAIL_POINT_OFF] = "off", }; Cheers, Stefan ___ 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: r216616 - in head/sys: kern sys
On Tue, Dec 21, 2010 at 8:29 AM, Matthew D Fleming wrote: > Author: mdf > Date: Tue Dec 21 16:29:58 2010 > New Revision: 216616 > URL: http://svn.freebsd.org/changeset/base/216616 > > Log: > Move the fail_point_entry definition from fail.h to kern_fail.c, which > allows putting the enumeration constants of fail point types with the > text string that matches them. Forgot the other part of the change. Mark the oid as MPSAFE since it runs using an internal lock, add __BEGIN_DECLS/__END_DECLS tag around the function declarations, and move a #define under the guard, since using the define makes no sense if the sysctl node is not declared. Thanks, matthew > > MFC after: 1 week > > Modified: > head/sys/kern/kern_fail.c > head/sys/sys/fail.h > > Modified: head/sys/kern/kern_fail.c > == > --- head/sys/kern/kern_fail.c Tue Dec 21 13:45:29 2010 (r216615) > +++ head/sys/kern/kern_fail.c Tue Dec 21 16:29:58 2010 (r216616) > @@ -76,6 +76,43 @@ MTX_SYSINIT(g_fp_mtx, &g_fp_mtx, "fail p > #define FP_LOCK() mtx_lock(&g_fp_mtx) > #define FP_UNLOCK() mtx_unlock(&g_fp_mtx) > > +/** > + * Failpoint types. > + * Don't change these without changing fail_type_strings in fail.c. > + * @ingroup failpoint_private > + */ > +enum fail_point_t { > + FAIL_POINT_OFF, /**< don't fail */ > + FAIL_POINT_PANIC, /**< panic */ > + FAIL_POINT_RETURN, /**< return an errorcode */ > + FAIL_POINT_BREAK, /**< break into the debugger */ > + FAIL_POINT_PRINT, /**< print a message */ > + FAIL_POINT_SLEEP, /**< sleep for some msecs */ > + FAIL_POINT_INVALID, /**< placeholder */ > +}; > + > +static const char *fail_type_strings[] = { > + "off", > + "panic", > + "return", > + "break", > + "print", > + "sleep", > +}; > + > +/** > + * Internal structure tracking a single term of a complete failpoint. > + * @ingroup failpoint_private > + */ > +struct fail_point_entry { > + enum fail_point_t fe_type; /**< type of entry */ > + int fe_arg; /**< argument to type (e.g. return > value) */ > + int fe_prob; /**< likelihood of firing in > millionths */ > + int fe_count; /**< number of times to fire, 0 means > always */ > + > + TAILQ_ENTRY(fail_point_entry) fe_entries; /**< next entry in fail > point */ > +}; > + > static inline void > fail_point_sleep(struct fail_point *fp, struct fail_point_entry *ent, > int msecs, enum fail_point_return_code *pret) > @@ -102,15 +139,6 @@ enum { > PROB_DIGITS = 6, /* number of zero's in above number */ > }; > > -static const char *fail_type_strings[] = { > - "off", > - "panic", > - "return", > - "break", > - "print", > - "sleep", > -}; > - > static char *parse_fail_point(struct fail_point_entries *, char *); > static char *parse_term(struct fail_point_entries *, char *); > static char *parse_number(int *out_units, int *out_decimal, char *); > > Modified: head/sys/sys/fail.h > == > --- head/sys/sys/fail.h Tue Dec 21 13:45:29 2010 (r216615) > +++ head/sys/sys/fail.h Tue Dec 21 16:29:58 2010 (r216616) > @@ -39,22 +39,6 @@ > #include > #include > > - > -/** > - * Failpoint types. > - * Don't change these without changing fail_type_strings in fail.c. > - * @ingroup failpoint_private > - */ > -enum fail_point_t { > - FAIL_POINT_OFF, /**< don't fail */ > - FAIL_POINT_PANIC, /**< panic */ > - FAIL_POINT_RETURN, /**< return an errorcode */ > - FAIL_POINT_BREAK, /**< break into the debugger */ > - FAIL_POINT_PRINT, /**< print a message */ > - FAIL_POINT_SLEEP, /**< sleep for some msecs */ > - FAIL_POINT_INVALID, /**< placeholder */ > -}; > - > /** > * Failpoint return codes, used internally. > * @ingroup failpoint_private > @@ -65,6 +49,7 @@ enum fail_point_return_code { > FAIL_POINT_RC_QUEUED, /**< sleep_fn will be called */ > }; > > +struct fail_point_entry; > TAILQ_HEAD(fail_point_entries, fail_point_entry); > /** > * Internal failpoint structure, tracking all the current details of the > @@ -84,18 +69,7 @@ struct fail_point { > > #define FAIL_POINT_DYNAMIC_NAME 0x01 /**< Must free name on > destroy */ > > -/** > - * Internal structure tracking a single term of a complete failpoint. > - * @ingroup failpoint_private > - */ > -struct fail_point_entry { > - enum fail_point_t fe_type; /**< type of entry */ > - int fe_arg; /**< argument to type (e.g. return > value) */ > - int fe_prob; /**< likelihood of firing in > millionths */ > - int fe_count; /**< number of t
svn commit: r216616 - in head/sys: kern sys
Author: mdf Date: Tue Dec 21 16:29:58 2010 New Revision: 216616 URL: http://svn.freebsd.org/changeset/base/216616 Log: Move the fail_point_entry definition from fail.h to kern_fail.c, which allows putting the enumeration constants of fail point types with the text string that matches them. MFC after:1 week Modified: head/sys/kern/kern_fail.c head/sys/sys/fail.h Modified: head/sys/kern/kern_fail.c == --- head/sys/kern/kern_fail.c Tue Dec 21 13:45:29 2010(r216615) +++ head/sys/kern/kern_fail.c Tue Dec 21 16:29:58 2010(r216616) @@ -76,6 +76,43 @@ MTX_SYSINIT(g_fp_mtx, &g_fp_mtx, "fail p #define FP_LOCK() mtx_lock(&g_fp_mtx) #define FP_UNLOCK()mtx_unlock(&g_fp_mtx) +/** + * Failpoint types. + * Don't change these without changing fail_type_strings in fail.c. + * @ingroup failpoint_private + */ +enum fail_point_t { + FAIL_POINT_OFF, /**< don't fail */ + FAIL_POINT_PANIC, /**< panic */ + FAIL_POINT_RETURN, /**< return an errorcode */ + FAIL_POINT_BREAK, /**< break into the debugger */ + FAIL_POINT_PRINT, /**< print a message */ + FAIL_POINT_SLEEP, /**< sleep for some msecs */ + FAIL_POINT_INVALID, /**< placeholder */ +}; + +static const char *fail_type_strings[] = { + "off", + "panic", + "return", + "break", + "print", + "sleep", +}; + +/** + * Internal structure tracking a single term of a complete failpoint. + * @ingroup failpoint_private + */ +struct fail_point_entry { + enum fail_point_t fe_type; /**< type of entry */ + int fe_arg; /**< argument to type (e.g. return value) */ + int fe_prob;/**< likelihood of firing in millionths */ + int fe_count; /**< number of times to fire, 0 means always */ + + TAILQ_ENTRY(fail_point_entry) fe_entries; /**< next entry in fail point */ +}; + static inline void fail_point_sleep(struct fail_point *fp, struct fail_point_entry *ent, int msecs, enum fail_point_return_code *pret) @@ -102,15 +139,6 @@ enum { PROB_DIGITS = 6,/* number of zero's in above number */ }; -static const char *fail_type_strings[] = { - "off", - "panic", - "return", - "break", - "print", - "sleep", -}; - static char *parse_fail_point(struct fail_point_entries *, char *); static char *parse_term(struct fail_point_entries *, char *); static char *parse_number(int *out_units, int *out_decimal, char *); Modified: head/sys/sys/fail.h == --- head/sys/sys/fail.h Tue Dec 21 13:45:29 2010(r216615) +++ head/sys/sys/fail.h Tue Dec 21 16:29:58 2010(r216616) @@ -39,22 +39,6 @@ #include #include - -/** - * Failpoint types. - * Don't change these without changing fail_type_strings in fail.c. - * @ingroup failpoint_private - */ -enum fail_point_t { - FAIL_POINT_OFF, /**< don't fail */ - FAIL_POINT_PANIC, /**< panic */ - FAIL_POINT_RETURN, /**< return an errorcode */ - FAIL_POINT_BREAK, /**< break into the debugger */ - FAIL_POINT_PRINT, /**< print a message */ - FAIL_POINT_SLEEP, /**< sleep for some msecs */ - FAIL_POINT_INVALID, /**< placeholder */ -}; - /** * Failpoint return codes, used internally. * @ingroup failpoint_private @@ -65,6 +49,7 @@ enum fail_point_return_code { FAIL_POINT_RC_QUEUED, /**< sleep_fn will be called */ }; +struct fail_point_entry; TAILQ_HEAD(fail_point_entries, fail_point_entry); /** * Internal failpoint structure, tracking all the current details of the @@ -84,18 +69,7 @@ struct fail_point { #defineFAIL_POINT_DYNAMIC_NAME 0x01/**< Must free name on destroy */ -/** - * Internal structure tracking a single term of a complete failpoint. - * @ingroup failpoint_private - */ -struct fail_point_entry { - enum fail_point_t fe_type; /**< type of entry */ - int fe_arg; /**< argument to type (e.g. return value) */ - int fe_prob;/**< likelihood of firing in millionths */ - int fe_count; /**< number of times to fire, 0 means always */ - - TAILQ_ENTRY(fail_point_entry) fe_entries; /**< next entry in fail point */ -}; +__BEGIN_DECLS /* Private failpoint eval function -- use fail_point_eval() instead. */ enum fail_point_return_code fail_point_eval_nontrivial(struct fail_point *, @@ -152,6 +126,8 @@ fail_point_eval(struct fail_point *fp, i return (fail_point_eval_nontrivial(fp, ret)); } +__END_DECLS + /* Declare a fail_point and its sysctl in a function. */ #define _FAIL_POINT_NAME(name) _fail_point_##name #define _STRINGIFY_HELPER(x) #x @@ -233,7 +209,7 @@ fail_poin
svn commit: r216615 - in head/sys: conf kern sys
Author: lstewart Date: Tue Dec 21 13:45:29 2010 New Revision: 216615 URL: http://svn.freebsd.org/changeset/base/216615 Log: - Introduce the Hhook (Helper Hook) KPI. The KPI is closely modelled on pfil(9), and in many respects can be thought of as a more generic superset of pfil. Hhook provides a way for kernel subsystems to export hook points that Khelp modules can hook to provide enhanced or new functionality to the kernel. The KPI has been designed to ensure hook points pose no noticeable overhead when no hook functions are registered. - Introduce the Khelp (Kernel Helpers) KPI. Khelp provides a framework for managing Khelp modules, which indirectly use the Hhook KPI to register their hook functions with hook points of interest within the kernel. Khelp modules aim to provide a structured way to dynamically extend the kernel at runtime in an ABI preserving manner. Depending on the subsystem providing hook points, a Khelp module may be able to associate per-object data for maintaining relevant state between hook calls. - pjd's Object Specific Data (OSD) KPI is used to manage the per-object data allocated to Khelp modules. Create a new "OSD_KHELP" OSD type for use by the Khelp framework. - Bump __FreeBSD_version to 900028 to mark the introduction of the new KPIs. In collaboration with:David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz, others along the way MFC after:3 months Added: head/sys/kern/kern_hhook.c (contents, props changed) head/sys/kern/kern_khelp.c (contents, props changed) head/sys/sys/hhook.h (contents, props changed) head/sys/sys/khelp.h (contents, props changed) head/sys/sys/module_khelp.h (contents, props changed) Modified: head/sys/conf/files head/sys/sys/osd.h head/sys/sys/param.h Modified: head/sys/conf/files == --- head/sys/conf/files Tue Dec 21 12:49:37 2010(r216614) +++ head/sys/conf/files Tue Dec 21 13:45:29 2010(r216615) @@ -2138,9 +2138,11 @@ kern/kern_exit.c standard kern/kern_fail.c standard kern/kern_fork.c standard kern/kern_gzio.c optional gzio +kern/kern_hhook.c standard kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard +kern/kern_khelp.c standard kern/kern_kthread.cstandard kern/kern_ktr.coptional ktr kern/kern_ktrace.c standard Added: head/sys/kern/kern_hhook.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_hhook.c Tue Dec 21 13:45:29 2010(r216615) @@ -0,0 +1,457 @@ +/*- + * Copyright (c) 2010 Lawrence Stewart + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Lawrence Stewart while studying at the Centre + * for Advanced Internet Architectures, Swinburne University, made possible in + * part by grants from the FreeBSD Foundation and Cisco University Research + * Program Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#
svn commit: r216614 - head/sys/dev/atkbdc
Author: jhb Date: Tue Dec 21 12:49:37 2010 New Revision: 216614 URL: http://svn.freebsd.org/changeset/base/216614 Log: Only use the BIOS-supplied IRQ for the atkbdc device for a child atkbd device. Specifically, do not reuse it for a child psm device. Tested by:many Modified: head/sys/dev/atkbdc/atkbdc_isa.c Modified: head/sys/dev/atkbdc/atkbdc_isa.c == --- head/sys/dev/atkbdc/atkbdc_isa.cTue Dec 21 10:43:51 2010 (r216613) +++ head/sys/dev/atkbdc/atkbdc_isa.cTue Dec 21 12:49:37 2010 (r216614) @@ -272,14 +272,16 @@ atkbdc_isa_add_child(device_t bus, u_int * list entry so we can use a standard bus_get_resource() * method. */ - if (sc->irq == NULL) { - if (resource_int_value(name, unit, "irq", &t) != 0) - t = -1; - } else - t = rman_get_start(sc->irq); - if (t > 0) - resource_list_add(&ivar->resources, SYS_RES_IRQ, ivar->rid, - t, t, 1); + if (order == KBDC_RID_KBD) { + if (sc->irq == NULL) { + if (resource_int_value(name, unit, "irq", &t) != 0) + t = -1; + } else + t = rman_get_start(sc->irq); + if (t > 0) + resource_list_add(&ivar->resources, SYS_RES_IRQ, + ivar->rid, t, t, 1); + } if (resource_disabled(name, unit)) device_disable(child); ___ 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: r216613 - stable/8/sys/netinet
Author: tuexen Date: Tue Dec 21 10:43:51 2010 New Revision: 216613 URL: http://svn.freebsd.org/changeset/base/216613 Log: MFC c216495: Bugfix: Take also the nr-mapping array into account when detecting gaps. Approved by: re@ Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c == --- stable/8/sys/netinet/sctp_indata.c Tue Dec 21 09:33:06 2010 (r216612) +++ stable/8/sys/netinet/sctp_indata.c Tue Dec 21 10:43:51 2010 (r216613) @@ -2585,8 +2585,9 @@ sctp_process_data(struct mbuf **mm, int int num_chunks = 0; /* number of control chunks processed */ int stop_proc = 0; int chk_length, break_flag, last_chunk; - int abort_flag = 0, was_a_gap = 0; + int abort_flag = 0, was_a_gap; struct mbuf *m; + uint32_t highest_tsn; /* set the rwnd */ sctp_set_rwnd(stcb, &stcb->asoc); @@ -2594,11 +2595,12 @@ sctp_process_data(struct mbuf **mm, int m = *mm; SCTP_TCB_LOCK_ASSERT(stcb); asoc = &stcb->asoc; - if (compare_with_wrap(stcb->asoc.highest_tsn_inside_map, - stcb->asoc.cumulative_tsn, MAX_TSN)) { - /* there was a gap before this data was processed */ - was_a_gap = 1; + if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, asoc->highest_tsn_inside_map, MAX_TSN)) { + highest_tsn = asoc->highest_tsn_inside_nr_map; + } else { + highest_tsn = asoc->highest_tsn_inside_map; } + was_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); /* * setup where we got the last DATA packet from for any SACK that * may need to go out. Don't bump the net. This is done ONLY when a Modified: stable/8/sys/netinet/sctp_input.c == --- stable/8/sys/netinet/sctp_input.c Tue Dec 21 09:33:06 2010 (r216612) +++ stable/8/sys/netinet/sctp_input.c Tue Dec 21 10:43:51 2010 (r216613) @@ -5650,13 +5650,15 @@ sctp_common_input_processing(struct mbuf */ } if ((data_processed == 0) && (fwd_tsn_seen)) { - int was_a_gap = 0; + int was_a_gap; + uint32_t highest_tsn; - if (compare_with_wrap(stcb->asoc.highest_tsn_inside_map, - stcb->asoc.cumulative_tsn, MAX_TSN)) { - /* there was a gap before this data was processed */ - was_a_gap = 1; + if (compare_with_wrap(stcb->asoc.highest_tsn_inside_nr_map, stcb->asoc.highest_tsn_inside_map, MAX_TSN)) { + highest_tsn = stcb->asoc.highest_tsn_inside_nr_map; + } else { + highest_tsn = stcb->asoc.highest_tsn_inside_map; } + was_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); stcb->asoc.send_sack = 1; sctp_sack_check(stcb, was_a_gap, &abort_flag); if (abort_flag) { ___ 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: r216612 - stable/7/sys/kern
Author: thompsa Date: Tue Dec 21 09:33:06 2010 New Revision: 216612 URL: http://svn.freebsd.org/changeset/base/216612 Log: MFC r216371: Fix race in devfs by using LIST_FIRST() instead of LIST_FOREACH_SAFE() when freeing the devfs private data entries. Approved by: re (kib) Modified: stable/7/sys/kern/kern_conf.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_conf.c == --- stable/7/sys/kern/kern_conf.c Tue Dec 21 09:31:48 2010 (r216611) +++ stable/7/sys/kern/kern_conf.c Tue Dec 21 09:33:06 2010 (r216612) @@ -863,7 +863,7 @@ static void destroy_devl(struct cdev *dev) { struct cdevsw *csw; - struct cdev_privdata *p, *p1; + struct cdev_privdata *p; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -908,7 +908,7 @@ destroy_devl(struct cdev *dev) dev_unlock(); notify_destroy(dev); mtx_lock(&cdevpriv_mtx); - LIST_FOREACH_SAFE(p, &dev->si_priv->cdp_fdpriv, cdpd_list, p1) { + while ((p = LIST_FIRST(&dev->si_priv->cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(&cdevpriv_mtx); } ___ 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: r216611 - stable/8/sys/kern
Author: thompsa Date: Tue Dec 21 09:31:48 2010 New Revision: 216611 URL: http://svn.freebsd.org/changeset/base/216611 Log: MFC r216371: Fix race in devfs by using LIST_FIRST() instead of LIST_FOREACH_SAFE() when freeing the devfs private data entries. Approved by: re (kib) Modified: stable/8/sys/kern/kern_conf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_conf.c == --- stable/8/sys/kern/kern_conf.c Tue Dec 21 09:16:42 2010 (r216610) +++ stable/8/sys/kern/kern_conf.c Tue Dec 21 09:31:48 2010 (r216611) @@ -871,7 +871,7 @@ static void destroy_devl(struct cdev *dev) { struct cdevsw *csw; - struct cdev_privdata *p, *p1; + struct cdev_privdata *p; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -919,7 +919,7 @@ destroy_devl(struct cdev *dev) dev_unlock(); notify_destroy(dev); mtx_lock(&cdevpriv_mtx); - LIST_FOREACH_SAFE(p, &cdev2priv(dev)->cdp_fdpriv, cdpd_list, p1) { + while ((p = LIST_FIRST(&cdev2priv(dev)->cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(&cdevpriv_mtx); } ___ 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: r216610 - stable/8/sys/dev/wpi
Author: bschmidt Date: Tue Dec 21 09:16:42 2010 New Revision: 216610 URL: http://svn.freebsd.org/changeset/base/216610 Log: Add 2 missing bus_dmamap_sync() calls. Those fix random 'scan timeout', 'could not set power mode', 'device config failed' and other errors due reading invalid memory. Approved by: re (kib) Obtained from:OpenBSD Modified: stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/wpi/if_wpi.c == --- stable/8/sys/dev/wpi/if_wpi.c Tue Dec 21 09:14:59 2010 (r216609) +++ stable/8/sys/dev/wpi/if_wpi.c Tue Dec 21 09:16:42 2010 (r216610) @@ -1645,9 +1645,15 @@ wpi_notif_intr(struct wpi_softc *sc) struct wpi_rx_data *data; uint32_t hw; + bus_dmamap_sync(sc->shared_dma.tag, sc->shared_dma.map, + BUS_DMASYNC_POSTREAD); + hw = le32toh(sc->shared->next); while (sc->rxq.cur != hw) { data = &sc->rxq.data[sc->rxq.cur]; + + bus_dmamap_sync(sc->rxq.data_dmat, data->map, + BUS_DMASYNC_POSTREAD); desc = (void *)data->m->m_ext.ext_buf; DPRINTFN(WPI_DEBUG_NOTIFY, ___ 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: r216609 - stable/8/sys/dev/wpi
Author: bschmidt Date: Tue Dec 21 09:14:59 2010 New Revision: 216609 URL: http://svn.freebsd.org/changeset/base/216609 Log: Fix association on 5GHz channels. The device is initially configured using a 2GHz channel with appropriate flags set to sc->config. Due to not zeroing sc->config for auth/assoc those flags are still set while trying to connect on a 5GHz channel. Approved by: re (kib) Modified: stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/wpi/if_wpi.c == --- stable/8/sys/dev/wpi/if_wpi.c Tue Dec 21 09:13:24 2010 (r216608) +++ stable/8/sys/dev/wpi/if_wpi.c Tue Dec 21 09:14:59 2010 (r216609) @@ -2429,6 +2429,9 @@ wpi_auth(struct wpi_softc *sc, struct ie if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) { sc->config.flags |= htole32(WPI_CONFIG_AUTO | WPI_CONFIG_24GHZ); + } else { + sc->config.flags &= ~htole32(WPI_CONFIG_AUTO | + WPI_CONFIG_24GHZ); } if (IEEE80211_IS_CHAN_A(ni->ni_chan)) { sc->config.cck_mask = 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: r216608 - stable/8/sys/dev/wpi
Author: bschmidt Date: Tue Dec 21 09:13:24 2010 New Revision: 216608 URL: http://svn.freebsd.org/changeset/base/216608 Log: Fix a panic while disabling the RF kill button, caller of the wpi_rfkill_resume() function will take care of the lock. PR: kern/14489 Approved by: re (kib) Modified: stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/wpi/if_wpi.c == --- stable/8/sys/dev/wpi/if_wpi.c Mon Dec 20 23:41:31 2010 (r216607) +++ stable/8/sys/dev/wpi/if_wpi.c Tue Dec 21 09:13:24 2010 (r216608) @@ -3004,14 +3004,12 @@ wpi_rfkill_resume(struct wpi_softc *sc) if (ntries == 1000) { device_printf(sc->sc_dev, "timeout waiting for thermal calibration\n"); - WPI_UNLOCK(sc); return; } DPRINTFN(WPI_DEBUG_TEMP,("temperature %d\n", sc->temp)); if (wpi_config(sc) != 0) { device_printf(sc->sc_dev, "device config failed\n"); - WPI_UNLOCK(sc); return; } ___ 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: r216591 - head
On Mon, 20 Dec 2010 19:42:51 -0500 Ben Kaduk wrote: > On Mon, Dec 20, 2010 at 10:17 AM, Alexander Leidinger > wrote: > == > > --- head/UPDATING Mon Dec 20 14:54:24 2010 (r216590) > > +++ head/UPDATING Mon Dec 20 15:17:34 2010 (r216591) > > @@ -1136,8 +1136,8 @@ COMMON ITEMS: > > [3] > > mergemaster -p [5] > > make installworld > > - make delete-old > > mergemaster -i [4] > > + make delete-old [6] > > > > There is of course the issue of when a file is erroneously listed in > ObsoleteFiles.inc and deleted by delete-old. The previous order would > have installworld come in and correct the error, but the current > version leaves that file deleted. So there is something of a > tradeoff. delete-old was never before installworld. Bye, Alexander. ___ 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"