From owner-p4-projects@FreeBSD.ORG Thu Mar 13 15:30:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F8F01065673; Thu, 13 Mar 2008 15:30:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE66C1065671 for ; Thu, 13 Mar 2008 15:30:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C50078FC15 for ; Thu, 13 Mar 2008 15:30:47 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2DFUlts071190 for ; Thu, 13 Mar 2008 15:30:47 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2DFUl3E071188 for perforce@freebsd.org; Thu, 13 Mar 2008 15:30:47 GMT (envelope-from imp@freebsd.org) Date: Thu, 13 Mar 2008 15:30:47 GMT Message-Id: <200803131530.m2DFUl3E071188@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 137614 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 15:30:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=137614 Change 137614 by imp@imp_paco-paco on 2008/03/13 15:30:23 IFC @137612 Affected files ... .. //depot/projects/arm/src/lib/libc/gen/sem_timedwait.3#2 integrate .. //depot/projects/arm/src/lib/libc/gen/sem_wait.3#2 integrate .. //depot/projects/arm/src/lib/libc/sys/kldunload.2#3 integrate .. //depot/projects/arm/src/sys/amd64/amd64/machdep.c#27 integrate .. //depot/projects/arm/src/sys/amd64/ia32/ia32_signal.c#5 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux32_sysvec.c#19 integrate .. //depot/projects/arm/src/sys/dev/tdfx/tdfx_pci.c#5 integrate .. //depot/projects/arm/src/sys/i386/i386/k6_mem.c#3 integrate .. //depot/projects/arm/src/sys/i386/i386/machdep.c#32 integrate .. //depot/projects/arm/src/sys/i386/linux/linux_sysvec.c#14 integrate .. //depot/projects/arm/src/sys/i386/svr4/svr4_machdep.c#3 integrate .. //depot/projects/arm/src/sys/kern/subr_sleepqueue.c#18 integrate .. //depot/projects/arm/src/sys/pc98/pc98/machdep.c#22 integrate .. //depot/projects/arm/src/sys/sys/cpuset.h#2 integrate .. //depot/projects/arm/src/usr.bin/cpuset/cpuset.1#3 integrate .. //depot/projects/arm/src/usr.bin/cpuset/cpuset.c#2 integrate Differences ... ==== //depot/projects/arm/src/lib/libc/gen/sem_timedwait.3#2 (text+ko) ==== @@ -32,7 +32,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.\" $FreeBSD: src/lib/libc/gen/sem_timedwait.3,v 1.2 2008/03/12 02:37:31 davidxu Exp $ +.\" $FreeBSD: src/lib/libc/gen/sem_timedwait.3,v 1.4 2008/03/13 10:26:17 ru Exp $ .\" .Dd March 3, 2008 .Dt SEM_TIMEDWAIT 3 @@ -106,17 +106,15 @@ A signal interrupted this function. .El .Sh SEE ALSO -.Xr semctl 2 , -.Xr semget 2 , -.Xr semop 2 , .Xr sem_post 3 , .Xr sem_trywait 3 , -.Xr sem_wait 3 +.Xr sem_wait 3 , +.Xr sem 4 .Sh STANDARDS The .Fn sem_timedwait function conforms to .St -p1003.1-2004 . .Sh HISTORY -The function first appeared in +The function first appeared in .Fx 5.0 . ==== //depot/projects/arm/src/lib/libc/gen/sem_wait.3#2 (text+ko) ==== @@ -25,7 +25,7 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/sem_wait.3,v 1.13 2005/07/13 13:15:22 rwatson Exp $ +.\" $FreeBSD: src/lib/libc/gen/sem_wait.3,v 1.15 2008/03/13 10:25:30 ru Exp $ .\" .Dd February 15, 2000 .Dt SEM_WAIT 3 @@ -84,6 +84,7 @@ .Sh SEE ALSO .Xr sem_getvalue 3 , .Xr sem_post 3 , +.Xr sem_timedwait 3 , .Xr sem 4 .Sh STANDARDS The ==== //depot/projects/arm/src/lib/libc/sys/kldunload.2#3 (text+ko) ==== @@ -23,14 +23,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/kldunload.2,v 1.19 2008/03/10 09:54:13 rwatson Exp $ +.\" $FreeBSD: src/lib/libc/sys/kldunload.2,v 1.20 2008/03/13 10:33:24 ru Exp $ .\" .Dd March 10, 2008 .Dt KLDUNLOAD 2 .Os .Sh NAME -.Nm kldunload -.Nm kldunloadf +.Nm kldunload , kldunloadf .Nd unload kld files .Sh LIBRARY .Lb libc @@ -40,7 +39,7 @@ .Ft int .Fn kldunload "int fileid" .Ft int -.Fn kldunload "int fileid" "int flags" +.Fn kldunloadf "int fileid" "int flags" .Sh DESCRIPTION The .Fn kldunload ==== //depot/projects/arm/src/sys/amd64/amd64/machdep.c#27 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.681 2008/03/12 10:11:54 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.682 2008/03/13 10:54:36 kib Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -357,7 +357,7 @@ regs->tf_rsp = (long)sfp; regs->tf_rip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); - regs->tf_rflags &= ~PSL_T; + regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; PROC_LOCK(p); mtx_lock(&psp->ps_mtx); ==== //depot/projects/arm/src/sys/amd64/ia32/ia32_signal.c#5 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_signal.c,v 1.15 2006/10/05 01:56:10 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_signal.c,v 1.16 2008/03/13 10:54:37 kib Exp $"); #include "opt_compat.h" @@ -391,7 +391,7 @@ regs->tf_rsp = (uintptr_t)sfp; regs->tf_rip = FREEBSD32_PS_STRINGS - sz_freebsd4_ia32_sigcode; - regs->tf_rflags &= ~PSL_T; + regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucode32sel; regs->tf_ss = _udatasel; load_ds(_udatasel); @@ -511,7 +511,7 @@ regs->tf_rsp = (uintptr_t)sfp; regs->tf_rip = FREEBSD32_PS_STRINGS - *(p->p_sysent->sv_szsigcode); - regs->tf_rflags &= ~PSL_T; + regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucode32sel; regs->tf_ss = _udatasel; load_ds(_udatasel); ==== //depot/projects/arm/src/sys/amd64/linux32/linux32_sysvec.c#19 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.32 2008/03/12 10:11:55 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.33 2008/03/13 10:54:37 kib Exp $"); #include "opt_compat.h" #ifndef COMPAT_IA32 @@ -401,7 +401,7 @@ regs->tf_rsp = PTROUT(fp); regs->tf_rip = LINUX32_PS_STRINGS - *(p->p_sysent->sv_szsigcode) + linux_sznonrtsigcode; - regs->tf_rflags &= ~PSL_T; + regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucode32sel; regs->tf_ss = _udatasel; load_ds(_udatasel); @@ -523,7 +523,7 @@ */ regs->tf_rsp = PTROUT(fp); regs->tf_rip = LINUX32_PS_STRINGS - *(p->p_sysent->sv_szsigcode); - regs->tf_rflags &= ~PSL_T; + regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucode32sel; regs->tf_ss = _udatasel; load_ds(_udatasel); ==== //depot/projects/arm/src/sys/dev/tdfx/tdfx_pci.c#5 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/tdfx/tdfx_pci.c,v 1.39 2006/03/03 21:37:36 yar Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/tdfx/tdfx_pci.c,v 1.40 2008/03/13 14:08:41 cokane Exp $"); /* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET * @@ -823,4 +823,5 @@ /* Tell Mr. Kernel about us! */ DRIVER_MODULE(tdfx, pci, tdfx_driver, tdfx_devclass, 0, 0); +MODULE_DEPEND(tdfx, mem, 1, 1, 1); MODULE_VERSION(tdfx, 1); ==== //depot/projects/arm/src/sys/i386/i386/k6_mem.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/k6_mem.c,v 1.13 2008/03/12 21:44:46 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/k6_mem.c,v 1.14 2008/03/13 09:52:48 kib Exp $"); #include #include @@ -180,7 +180,7 @@ if ((cpu_id & 0xf00) != 0x500) return; if ((cpu_id & 0xf0) < 0x80 || - (cpu_id & 0xf0) == 0x80 && (cpu_id & 0xf) <= 0x7) + ((cpu_id & 0xf0) == 0x80 && (cpu_id & 0xf) <= 0x7)) return; mem_range_softc.mr_op = &k6_mrops; } ==== //depot/projects/arm/src/sys/i386/i386/machdep.c#32 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.665 2007/12/31 21:12:45 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.666 2008/03/13 10:54:37 kib Exp $"); #include "opt_apic.h" #include "opt_atalk.h" @@ -417,7 +417,7 @@ regs->tf_esp = (int)fp; regs->tf_eip = PS_STRINGS - szosigcode; - regs->tf_eflags &= ~PSL_T; + regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; @@ -538,7 +538,7 @@ regs->tf_esp = (int)sfp; regs->tf_eip = PS_STRINGS - szfreebsd4_sigcode; - regs->tf_eflags &= ~PSL_T; + regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; @@ -674,7 +674,7 @@ regs->tf_esp = (int)sfp; regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); - regs->tf_eflags &= ~PSL_T; + regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; ==== //depot/projects/arm/src/sys/i386/linux/linux_sysvec.c#14 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.151 2008/03/12 10:11:58 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.152 2008/03/13 10:54:37 kib Exp $"); #include #include @@ -388,7 +388,7 @@ regs->tf_esp = (int)fp; regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode) + linux_sznonrtsigcode; - regs->tf_eflags &= ~(PSL_T | PSL_VM); + regs->tf_eflags &= ~(PSL_T | PSL_VM | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; @@ -507,7 +507,7 @@ */ regs->tf_esp = (int)fp; regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); - regs->tf_eflags &= ~(PSL_T | PSL_VM); + regs->tf_eflags &= ~(PSL_T | PSL_VM | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; ==== //depot/projects/arm/src/sys/i386/svr4/svr4_machdep.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/svr4/svr4_machdep.c,v 1.38 2005/10/19 14:59:54 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/svr4/svr4_machdep.c,v 1.39 2008/03/13 10:54:37 kib Exp $"); #include #include @@ -497,13 +497,13 @@ svr4_szsigcode); tf->tf_cs = GSEL(GUSERLDT_SEL, SEL_UPL); - tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC); + tf->tf_eflags &= ~(PSL_T|PSL_VM|PSL_AC|PSL_D); tf->tf_esp = (int)fp; tf->tf_ss = GSEL(GUSERLDT_SEL, SEL_UPL); #else tf->tf_esp = (int)fp; tf->tf_eip = (int)(((char *)PS_STRINGS) - *(p->p_sysent->sv_szsigcode)); - tf->tf_eflags &= ~PSL_T; + tf->tf_eflags &= ~(PSL_T | PSL_D); tf->tf_cs = _ucodesel; tf->tf_ds = _udatasel; tf->tf_es = _udatasel; ==== //depot/projects/arm/src/sys/kern/subr_sleepqueue.c#18 (text+ko) ==== @@ -60,7 +60,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_sleepqueue.c,v 1.47 2008/03/12 10:11:59 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_sleepqueue.c,v 1.48 2008/03/13 00:46:12 jeff Exp $"); #include "opt_sleepqueue_profiling.h" #include "opt_ddb.h" @@ -403,12 +403,15 @@ mtx_unlock(&ps->ps_mtx); } /* - * Lock sleepq chain before unlocking proc - * without this, we could lose a race. + * Lock the per-process spinlock prior to dropping the PROC_LOCK + * to avoid a signal delivery race. PROC_LOCK, PROC_SLOCK, and + * thread_lock() are currently held in tdsignal(). */ + PROC_SLOCK(p); mtx_lock_spin(&sc->sc_lock); PROC_UNLOCK(p); thread_lock(td); + PROC_SUNLOCK(p); if (ret == 0) { sleepq_switch(wchan, pri); return (0); ==== //depot/projects/arm/src/sys/pc98/pc98/machdep.c#22 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/pc98/pc98/machdep.c,v 1.401 2008/03/12 10:12:00 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/pc98/pc98/machdep.c,v 1.402 2008/03/13 10:54:38 kib Exp $"); #include "opt_atalk.h" #include "opt_compat.h" @@ -385,7 +385,7 @@ regs->tf_esp = (int)fp; regs->tf_eip = PS_STRINGS - szosigcode; - regs->tf_eflags &= ~PSL_T; + regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; @@ -506,7 +506,7 @@ regs->tf_esp = (int)sfp; regs->tf_eip = PS_STRINGS - szfreebsd4_sigcode; - regs->tf_eflags &= ~PSL_T; + regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; @@ -642,7 +642,7 @@ regs->tf_esp = (int)sfp; regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); - regs->tf_eflags &= ~PSL_T; + regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; ==== //depot/projects/arm/src/sys/sys/cpuset.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/cpuset.h,v 1.2 2008/03/05 01:49:20 jeff Exp $ + * $FreeBSD: src/sys/sys/cpuset.h,v 1.3 2008/03/13 02:56:11 davidxu Exp $ */ #ifndef _SYS_CPUSET_H_ @@ -162,7 +162,7 @@ int cpuset_setid(cpuwhich_t, id_t, cpusetid_t); int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *); int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, int, cpuset_t *); -int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, int, cpuset_t *); +int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, int, const cpuset_t *); __END_DECLS #endif #endif /* !_SYS_CPUSET_H_ */ ==== //depot/projects/arm/src/usr.bin/cpuset/cpuset.1#3 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/usr.bin/cpuset/cpuset.1,v 1.2 2008/03/11 14:48:59 joel Exp $ +.\" $FreeBSD: src/usr.bin/cpuset/cpuset.1,v 1.3 2008/03/12 23:54:40 jeff Exp $ .\" .Dd March 11, 2008 .Dt CPUSET 1 @@ -89,8 +89,12 @@ When running a command it may join a set specified with .Fl s otherwise a new set is created. -In addition, a mask for the set may be specified using +In addition, a mask for the command may be specified using .Fl l . +When used in conjunction with +.Fl c +the mask modifies the supplied or created set rather than the private mask +for the thread. .Pp The options are as follows: .Bl -tag -width ".Fl l Ar cpu-list" @@ -127,7 +131,7 @@ Create a new group with CPUs 0-4 inclusive and run .Pa /bin/sh on it: -.Dl cpuset -l 0-4 /bin/sh +.Dl cpuset -c -l 0-4 /bin/sh .Pp Query the mask of CPUs the .Aq sh pid ==== //depot/projects/arm/src/usr.bin/cpuset/cpuset.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/usr.bin/cpuset/cpuset.c,v 1.3 2008/03/05 02:10:43 jeff Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/cpuset/cpuset.c,v 1.4 2008/03/12 23:54:40 jeff Exp $"); #include #include @@ -257,7 +257,7 @@ * The user wants to run a command with a set and possibly cpumask. */ if (argc) { - if (pflag | rflag | tflag || cflag) + if (pflag | rflag | tflag) usage(); if (sflag) { if (cpuset_setid(CPU_WHICH_PID, -1, setid)) @@ -267,7 +267,7 @@ err(argc, "newid"); } if (lflag) { - if (cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, + if (cpuset_setaffinity(level, CPU_WHICH_PID, -1, sizeof(mask), &mask) != 0) err(EXIT_FAILURE, "setaffinity"); }