From owner-svn-src-all@FreeBSD.ORG Sun May 1 01:34:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E1D91065670; Sun, 1 May 2011 01:34:22 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BB8A8FC0C; Sun, 1 May 2011 01:34:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p411YMDo070863; Sun, 1 May 2011 01:34:22 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p411YM00070861; Sun, 1 May 2011 01:34:22 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105010134.p411YM00070861@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 01:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221288 - head/sbin/mount_nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 01:34:22 -0000 Author: rmacklem Date: Sun May 1 01:34:22 2011 New Revision: 221288 URL: http://svn.freebsd.org/changeset/base/221288 Log: Fix the Makefile for mount_nfs so that it creates a link for mount_oldnfs.8 instead of mount_newnfs.8. Modified: head/sbin/mount_nfs/Makefile Modified: head/sbin/mount_nfs/Makefile ============================================================================== --- head/sbin/mount_nfs/Makefile Sun May 1 00:48:03 2011 (r221287) +++ head/sbin/mount_nfs/Makefile Sun May 1 01:34:22 2011 (r221288) @@ -5,7 +5,7 @@ PROG= mount_nfs SRCS= mount_nfs.c getmntopts.c mounttab.c MAN= mount_nfs.8 -MLINKS= mount_nfs.8 mount_newnfs.8 +MLINKS= mount_nfs.8 mount_oldnfs.8 MOUNT= ${.CURDIR}/../mount UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall From owner-svn-src-all@FreeBSD.ORG Sun May 1 02:22:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49D33106566C; Sun, 1 May 2011 02:22:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CCE58FC08; Sun, 1 May 2011 02:22:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p412MtwP072337; Sun, 1 May 2011 02:22:55 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p412MssY072335; Sun, 1 May 2011 02:22:55 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105010222.p412MssY072335@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 02:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221290 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 02:22:55 -0000 Author: rmacklem Date: Sun May 1 02:22:54 2011 New Revision: 221290 URL: http://svn.freebsd.org/changeset/base/221290 Log: MFC: r220735 Fix readdirplus in the experimental NFS client so that it skips over ".." to avoid a LOR race with nfs_lookup(). This fix is analagous to r138256 in the regular NFS client. Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.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/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Sun May 1 01:49:35 2011 (r221289) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Sun May 1 02:22:54 2011 (r221290) @@ -2942,7 +2942,7 @@ nfsrpc_readdirplus(vnode_t vp, struct ui nfsquad_t cookie, ncookie; int error = 0, tlen, more_dirs = 1, blksiz = 0, bigenough = 1; int attrflag, tryformoredirs = 1, eof = 0, gotmnton = 0; - int unlocknewvp = 0; + int isdotdot = 0, unlocknewvp = 0; long dotfileid, dotdotfileid = 0, fileno = 0; char *cp; nfsattrbit_t attrbits, dattrbits; @@ -3192,6 +3192,11 @@ nfsrpc_readdirplus(vnode_t vp, struct ui *cp = '\0'; cp += tlen; /* points to cookie storage */ tl2 = (u_int32_t *)cp; + if (len == 2 && cnp->cn_nameptr[0] == '.' && + cnp->cn_nameptr[1] == '.') + isdotdot = 1; + else + isdotdot = 0; uio_iov_base_add(uiop, (tlen + NFSX_HYPER)); uio_iov_len_add(uiop, -(tlen + NFSX_HYPER)); uio_uio_resid_add(uiop, -(tlen + NFSX_HYPER)); @@ -3269,6 +3274,22 @@ nfsrpc_readdirplus(vnode_t vp, struct ui unlocknewvp = 0; FREE((caddr_t)nfhp, M_NFSFH); np = dnp; + } else if (isdotdot != 0) { + /* + * Skip doing a nfscl_nget() call for "..". + * There's a race between acquiring the nfs + * node here and lookups that look for the + * directory being read (in the parent). + * It would try to get a lock on ".." here, + * owning the lock on the directory being + * read. Lookup will hold the lock on ".." + * and try to acquire the lock on the + * directory being read. + * If the directory is unlocked/relocked, + * then there is a LOR with the buflock + * vp is relocked. + */ + free(nfhp, M_NFSFH); } else { error = nfscl_nget(vnode_mount(vp), vp, nfhp, cnp, p, &np, NULL, LK_EXCLUSIVE); From owner-svn-src-all@FreeBSD.ORG Sun May 1 02:36:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A28EF106566B; Sun, 1 May 2011 02:36:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 902C68FC17; Sun, 1 May 2011 02:36:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p412a9ZC072750; Sun, 1 May 2011 02:36:09 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p412a9VI072747; Sun, 1 May 2011 02:36:09 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105010236.p412a9VI072747@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 02:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221291 - in stable/8/sys/fs: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 02:36:09 -0000 Author: rmacklem Date: Sun May 1 02:36:09 2011 New Revision: 221291 URL: http://svn.freebsd.org/changeset/base/221291 Log: MFC: r220739 Change some defaults in the experimental NFS client to be the same as the regular NFS client for NFSv3. The main one is making use of a reserved port# the default. Also, set the retry limit for TCP the same and fix the code so that it doesn't disable readdirplus for NFSv4. Modified: stable/8/sys/fs/nfs/nfs.h stable/8/sys/fs/nfsclient/nfs_clvfsops.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/fs/nfs/nfs.h ============================================================================== --- stable/8/sys/fs/nfs/nfs.h Sun May 1 02:22:54 2011 (r221290) +++ stable/8/sys/fs/nfs/nfs.h Sun May 1 02:36:09 2011 (r221291) @@ -56,6 +56,7 @@ #define NFSV4_UPCALLRETRY 4 /* Number of retries before failure */ #define NFS_MAXWINDOW 1024 /* Max number of outstanding requests */ #define NFS_RETRANS 10 /* Num of retrans for soft mounts */ +#define NFS_RETRANS_TCP 2 /* Num of retrans for TCP soft mounts */ #define NFS_MAXGRPS 16 /* Max. size of groups list */ #define NFS_TRYLATERDEL 15 /* Maximum delay timeout (sec) */ #ifndef NFS_REMOVETIMEO Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvfsops.c Sun May 1 02:22:54 2011 (r221290) +++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c Sun May 1 02:36:09 2011 (r221291) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -556,14 +557,29 @@ nfs_decode_args(struct mount *mp, struct if (argp->sotype == SOCK_STREAM) { nmp->nm_flag &= ~NFSMNT_NOCONN; nmp->nm_timeo = NFS_MAXTIMEO; + if ((argp->flags & NFSMNT_NFSV4) != 0) + nmp->nm_retry = INT_MAX; + else + nmp->nm_retry = NFS_RETRANS_TCP; } - /* Also clear RDIRPLUS if not NFSv3, it crashes some servers */ - if ((argp->flags & NFSMNT_NFSV3) == 0) + /* Also clear RDIRPLUS if NFSv2, it crashes some servers */ + if ((argp->flags & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 0) { + argp->flags &= ~NFSMNT_RDIRPLUS; nmp->nm_flag &= ~NFSMNT_RDIRPLUS; + } + + /* Clear NFSMNT_RESVPORT for NFSv4, since it is not required. */ + if ((argp->flags & NFSMNT_NFSV4) != 0) { + argp->flags &= ~NFSMNT_RESVPORT; + nmp->nm_flag &= ~NFSMNT_RESVPORT; + } + /* Re-bind if rsrvd port requested and wasn't on one */ + adjsock = !(nmp->nm_flag & NFSMNT_RESVPORT) + && (argp->flags & NFSMNT_RESVPORT); /* Also re-bind if we're switching to/from a connected UDP socket */ - adjsock = ((nmp->nm_flag & NFSMNT_NOCONN) != + adjsock |= ((nmp->nm_flag & NFSMNT_NOCONN) != (argp->flags & NFSMNT_NOCONN)); /* Update flags atomically. Don't change the lock bits. */ @@ -708,7 +724,7 @@ nfs_mount(struct mount *mp) .proto = 0, .fh = NULL, .fhsize = 0, - .flags = 0, + .flags = NFSMNT_RESVPORT, .wsize = NFS_WSIZE, .rsize = NFS_RSIZE, .readdirsize = NFS_READDIRSIZE, From owner-svn-src-all@FreeBSD.ORG Sun May 1 02:47:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67F76106564A; Sun, 1 May 2011 02:47:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0386E8FC13; Sun, 1 May 2011 02:47:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p412lsax073182; Sun, 1 May 2011 02:47:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p412ls9G073179; Sun, 1 May 2011 02:47:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105010247.p412ls9G073179@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 02:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221292 - in stable/8/sys/fs: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 02:47:55 -0000 Author: rmacklem Date: Sun May 1 02:47:54 2011 New Revision: 221292 URL: http://svn.freebsd.org/changeset/base/221292 Log: MFC: r220751 Fix up some of the sysctls for the experimental NFS client so that they use the same names as the regular client. Also add string descriptions for them. Modified: stable/8/sys/fs/nfs/nfs_commonport.c stable/8/sys/fs/nfsclient/nfs_clvnops.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/fs/nfs/nfs_commonport.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonport.c Sun May 1 02:36:09 2011 (r221291) +++ stable/8/sys/fs/nfs/nfs_commonport.c Sun May 1 02:47:54 2011 (r221292) @@ -70,11 +70,15 @@ static int nfs_realign_test; static int nfs_realign_count; SYSCTL_NODE(_vfs, OID_AUTO, newnfs, CTLFLAG_RW, 0, "New NFS filesystem"); -SYSCTL_INT(_vfs_newnfs, OID_AUTO, newnfs_realign_test, CTLFLAG_RW, &nfs_realign_test, 0, ""); -SYSCTL_INT(_vfs_newnfs, OID_AUTO, newnfs_realign_count, CTLFLAG_RW, &nfs_realign_count, 0, ""); -SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs4acl_enable, CTLFLAG_RW, &nfsrv_useacl, 0, ""); +SYSCTL_INT(_vfs_newnfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, + 0, "Number of realign tests done"); +SYSCTL_INT(_vfs_newnfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, + 0, "Number of mbuf realignments done"); +SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs4acl_enable, CTLFLAG_RW, &nfsrv_useacl, + 0, "Enable NFSv4 ACLs"); SYSCTL_STRING(_vfs_newnfs, OID_AUTO, callback_addr, CTLFLAG_RW, - nfsv4_callbackaddr, sizeof(nfsv4_callbackaddr), ""); + nfsv4_callbackaddr, sizeof(nfsv4_callbackaddr), + "NFSv4 callback addr for server to use"); /* * Defines for malloc Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun May 1 02:36:09 2011 (r221291) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun May 1 02:47:54 2011 (r221292) @@ -219,7 +219,7 @@ SYSCTL_INT(_vfs_newnfs, OID_AUTO, clean_ &nfs_clean_pages_on_close, 0, "NFS clean dirty pages on close"); int newnfs_directio_enable = 0; -SYSCTL_INT(_vfs_newnfs, OID_AUTO, directio_enable, CTLFLAG_RW, +SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs_directio_enable, CTLFLAG_RW, &newnfs_directio_enable, 0, "Enable NFS directio"); /* @@ -234,7 +234,7 @@ SYSCTL_INT(_vfs_newnfs, OID_AUTO, direct * meaningful. */ int newnfs_directio_allow_mmap = 1; -SYSCTL_INT(_vfs_newnfs, OID_AUTO, directio_allow_mmap, CTLFLAG_RW, +SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs_directio_allow_mmap, CTLFLAG_RW, &newnfs_directio_allow_mmap, 0, "Enable mmaped IO on file with O_DIRECT opens"); #if 0 From owner-svn-src-all@FreeBSD.ORG Sun May 1 03:01:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A54C1065670; Sun, 1 May 2011 03:01:21 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 671578FC0A; Sun, 1 May 2011 03:01:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4131LSo073744; Sun, 1 May 2011 03:01:21 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4131L6W073742; Sun, 1 May 2011 03:01:21 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105010301.p4131L6W073742@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 03:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221293 - stable/8/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 03:01:21 -0000 Author: rmacklem Date: Sun May 1 03:01:21 2011 New Revision: 221293 URL: http://svn.freebsd.org/changeset/base/221293 Log: MFC: r220752 Get rid of the "nfscl: consider increasing kern.ipc.maxsockbuf" message that was generated when doing experimental NFS client mounts. I put that message in because the krpc would hang with the default size for mounts that used large rsize/wsize values. Since the bug that caused these hangs was fixed by r213756, which fixed the way the krpc used soreserve(), I think the message is no longer needed. Modified: stable/8/sys/fs/nfs/nfs_commonkrpc.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/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonkrpc.c Sun May 1 02:47:54 2011 (r221292) +++ stable/8/sys/fs/nfs/nfs_commonkrpc.c Sun May 1 03:01:21 2011 (r221293) @@ -143,7 +143,7 @@ newnfs_connect(struct nfsmount *nmp, str CLIENT *client; struct netconfig *nconf; struct socket *so; - int one = 1, retries, error, printsbmax = 0; + int one = 1, retries, error; struct thread *td = curthread; /* @@ -202,13 +202,8 @@ newnfs_connect(struct nfsmount *nmp, str return (error); } do { - if (error != 0 && pktscale > 2) { + if (error != 0 && pktscale > 2) pktscale--; - if (printsbmax == 0) { - printf("nfscl: consider increasing kern.ipc.maxsockbuf\n"); - printsbmax = 1; - } - } if (nrp->nr_sotype == SOCK_DGRAM) { if (nmp != NULL) { sndreserve = (NFS_MAXDGRAMDATA + NFS_MAXPKTHDR) * From owner-svn-src-all@FreeBSD.ORG Sun May 1 03:16:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D67231065673; Sun, 1 May 2011 03:16:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C45BB8FC12; Sun, 1 May 2011 03:16:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p413GDCF074370; Sun, 1 May 2011 03:16:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p413GDkn074368; Sun, 1 May 2011 03:16:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105010316.p413GDkn074368@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 03:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221294 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 03:16:13 -0000 Author: rmacklem Date: Sun May 1 03:16:13 2011 New Revision: 221294 URL: http://svn.freebsd.org/changeset/base/221294 Log: MFC: r220762 Change the mutex locking for several locations in the experimental NFS client's vnode op functions to make them compatible with the regular NFS client. I'll admit I'm not sure that the mutex locks around the assignments are needed, but the regular client has them, so I added them. Also, add handling of the case of partial attributes in setattr to be compatible with the regular client. Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.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/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun May 1 03:01:21 2011 (r221293) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun May 1 03:16:13 2011 (r221294) @@ -1522,6 +1522,20 @@ again: } } else if (NFS_ISV34(dvp) && (fmode & O_EXCL)) { if (nfscl_checksattr(vap, &nfsva)) { + /* + * We are normally called with only a partially + * initialized VAP. Since the NFSv3 spec says that + * the server may use the file attributes to + * store the verifier, the spec requires us to do a + * SETATTR RPC. FreeBSD servers store the verifier in + * atime, but we can't really assume that all servers + * will so we ensure that our SETATTR sets both atime + * and mtime. + */ + if (vap->va_mtime.tv_sec == VNOVAL) + vfs_timestamp(&vap->va_mtime); + if (vap->va_atime.tv_sec == VNOVAL) + vap->va_atime = vap->va_mtime; error = nfsrpc_setattr(newvp, vap, NULL, cnp->cn_cred, cnp->cn_thread, &nfsva, &attrflag, NULL); if (error && (vap->va_uid != (uid_t)VNOVAL || @@ -1609,7 +1623,9 @@ nfs_remove(struct vop_remove_args *ap) error = 0; } else if (!np->n_sillyrename) error = nfs_sillyrename(dvp, vp, cnp); + mtx_lock(&np->n_mtx); np->n_attrstamp = 0; + mtx_unlock(&np->n_mtx); return (error); } @@ -1697,7 +1713,7 @@ nfs_rename(struct vop_rename_args *ap) error = 0; goto out; } - if ((error = vn_lock(fvp, LK_EXCLUSIVE))) + if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) goto out; /* @@ -1735,7 +1751,7 @@ nfs_rename(struct vop_rename_args *ap) tdvp, tvp, tcnp->cn_nameptr, tcnp->cn_namelen, tcnp->cn_cred, tcnp->cn_thread); - if (!error) { + if (error == 0 && NFS_ISV4(tdvp)) { /* * For NFSv4, check to see if it is the same name and * replace the name, if it is different. @@ -1831,18 +1847,22 @@ nfs_renamerpc(struct vnode *fdvp, struct &tattrflag, NULL, NULL); mtx_lock(&fdnp->n_mtx); fdnp->n_flag |= NMODIFIED; - mtx_unlock(&fdnp->n_mtx); - mtx_lock(&tdnp->n_mtx); - tdnp->n_flag |= NMODIFIED; - mtx_unlock(&tdnp->n_mtx); - if (fattrflag) + if (fattrflag != 0) { + mtx_unlock(&fdnp->n_mtx); (void) nfscl_loadattrcache(&fdvp, &fnfsva, NULL, NULL, 0, 1); - else + } else { fdnp->n_attrstamp = 0; - if (tattrflag) + mtx_unlock(&fdnp->n_mtx); + } + mtx_lock(&tdnp->n_mtx); + tdnp->n_flag |= NMODIFIED; + if (tattrflag != 0) { + mtx_unlock(&tdnp->n_mtx); (void) nfscl_loadattrcache(&tdvp, &tnfsva, NULL, NULL, 0, 1); - else + } else { tdnp->n_attrstamp = 0; + mtx_unlock(&tdnp->n_mtx); + } if (error && NFS_ISV4(fdvp)) error = nfscl_maperr(td, error, (uid_t)0, (gid_t)0); return (error); @@ -1857,7 +1877,7 @@ nfs_link(struct vop_link_args *ap) struct vnode *vp = ap->a_vp; struct vnode *tdvp = ap->a_tdvp; struct componentname *cnp = ap->a_cnp; - struct nfsnode *tdnp; + struct nfsnode *np, *tdnp; struct nfsvattr nfsva, dnfsva; int error = 0, attrflag, dattrflag; @@ -1878,15 +1898,21 @@ nfs_link(struct vop_link_args *ap) tdnp = VTONFS(tdvp); mtx_lock(&tdnp->n_mtx); tdnp->n_flag |= NMODIFIED; - mtx_unlock(&tdnp->n_mtx); - if (attrflag) - (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1); - else - VTONFS(vp)->n_attrstamp = 0; - if (dattrflag) + if (dattrflag != 0) { + mtx_unlock(&tdnp->n_mtx); (void) nfscl_loadattrcache(&tdvp, &dnfsva, NULL, NULL, 0, 1); - else + } else { tdnp->n_attrstamp = 0; + mtx_unlock(&tdnp->n_mtx); + } + if (attrflag) + (void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0, 1); + else { + np = VTONFS(vp); + mtx_lock(&np->n_mtx); + np->n_attrstamp = 0; + mtx_unlock(&np->n_mtx); + } /* * If negative lookup caching is enabled, I might as well * add an entry for this node. Not necessary for correctness, @@ -1966,11 +1992,13 @@ nfs_symlink(struct vop_symlink_args *ap) dnp = VTONFS(dvp); mtx_lock(&dnp->n_mtx); dnp->n_flag |= NMODIFIED; - mtx_unlock(&dnp->n_mtx); - if (dattrflag) + if (dattrflag != 0) { + mtx_unlock(&dnp->n_mtx); (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); - else + } else { dnp->n_attrstamp = 0; + mtx_unlock(&dnp->n_mtx); + } return (error); } @@ -1990,7 +2018,7 @@ nfs_mkdir(struct vop_mkdir_args *ap) struct nfsvattr nfsva, dnfsva; int error = 0, attrflag, dattrflag, ret; - if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred))) + if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred)) != 0) return (error); vap->va_type = VDIR; error = nfsrpc_mkdir(dvp, cnp->cn_nameptr, cnp->cn_namelen, @@ -1999,11 +2027,13 @@ nfs_mkdir(struct vop_mkdir_args *ap) dnp = VTONFS(dvp); mtx_lock(&dnp->n_mtx); dnp->n_flag |= NMODIFIED; - mtx_unlock(&dnp->n_mtx); - if (dattrflag) + if (dattrflag != 0) { + mtx_unlock(&dnp->n_mtx); (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); - else + } else { dnp->n_attrstamp = 0; + mtx_unlock(&dnp->n_mtx); + } if (nfhp) { ret = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, cnp->cn_thread, &np, NULL, LK_EXCLUSIVE); @@ -2065,11 +2095,13 @@ nfs_rmdir(struct vop_rmdir_args *ap) dnp = VTONFS(dvp); mtx_lock(&dnp->n_mtx); dnp->n_flag |= NMODIFIED; - mtx_unlock(&dnp->n_mtx); - if (dattrflag) + if (dattrflag != 0) { + mtx_unlock(&dnp->n_mtx); (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); - else + } else { dnp->n_attrstamp = 0; + mtx_unlock(&dnp->n_mtx); + } cache_purge(dvp); cache_purge(vp); From owner-svn-src-all@FreeBSD.ORG Sun May 1 13:22:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BED7106566C; Sun, 1 May 2011 13:22:18 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 1F04E8FC18; Sun, 1 May 2011 13:22:17 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id A20F445C9C; Sun, 1 May 2011 15:22:15 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 440CA4569A; Sun, 1 May 2011 15:22:10 +0200 (CEST) Date: Sun, 1 May 2011 15:21:56 +0200 From: Pawel Jakub Dawidek To: Marcel Moolenaar Message-ID: <20110501132156.GB3245@garage.freebsd.pl> References: <201104300528.p3U5StZN031259@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: <201104300528.p3U5StZN031259@svn.freebsd.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r221242 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 13:22:18 -0000 --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 30, 2011 at 05:28:55AM +0000, Marcel Moolenaar wrote: > Author: marcel > Date: Sat Apr 30 05:28:54 2011 > New Revision: 221242 > URL: http://svn.freebsd.org/changeset/base/221242 >=20 > Log: > Unbreak non-x86 and in particular ia64, The default stack size > on ia64 is 32KB. Unconditionally hardcoding a 16KB stack for > reasons of increasing the stack size on i386 is just wrong. If > the size was indeed expressed in terms of pages, as the commit > log suggested, then it would happen to be just right for ia64, > though only accidentally. > =20 > Pointy hat: avg, pjd Marcel, you already know my opinion that I don't agree with this change. I don't think you are going to update the code once new architecture arrive. This change also reduces thread stack size for already existing architectures (arm and mips). I'd prefer to either commit my patch that protects against passing stack size smaller than the default on given architecture or commit what we have in HEAD. > --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Sat Apr= 30 02:44:15 2011 (r221241) > +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Sat Apr= 30 05:28:54 2011 (r221242) > @@ -129,6 +129,7 @@ void > txg_sync_start(dsl_pool_t *dp) > { > tx_state_t *tx =3D &dp->dp_tx; > + size_t stksize =3D 0; > =20 > mutex_enter(&tx->tx_sync_lock); > =20 > @@ -146,7 +147,10 @@ txg_sync_start(dsl_pool_t *dp) > * 32-bit x86. This is due in part to nested pools and > * scrub_visitbp() recursion. > */ > - tx->tx_sync_thread =3D thread_create(NULL, 16<<10, txg_sync_thread, > +#ifdef __i386__ > + stksize =3D 16 << 10; > +#endif > + tx->tx_sync_thread =3D thread_create(NULL, stksize, txg_sync_thread, > dp, 0, &p0, TS_RUN, minclsyspri); > =20 > mutex_exit(&tx->tx_sync_lock); --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk29XnMACgkQForvXbEpPzTpvwCg5XqB7Ws8HXbTTXGOcHNycdE5 hV0AnRF9zTitawbGVsKWXI/4Qq1R+wKP =nsBi -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z-- From owner-svn-src-all@FreeBSD.ORG Sun May 1 13:26:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 066201065673; Sun, 1 May 2011 13:26:35 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF9338FC16; Sun, 1 May 2011 13:26:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41DQY4G093950; Sun, 1 May 2011 13:26:34 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41DQYoW093946; Sun, 1 May 2011 13:26:34 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201105011326.p41DQYoW093946@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 1 May 2011 13:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221296 - in head/sys: amd64/conf conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 13:26:35 -0000 Author: bschmidt Date: Sun May 1 13:26:34 2011 New Revision: 221296 URL: http://svn.freebsd.org/changeset/base/221296 Log: Add the remaining wireless drivers. Discussed with: joel Modified: head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun May 1 05:36:59 2011 (r221295) +++ head/sys/amd64/conf/GENERIC Sun May 1 13:26:34 2011 (r221296) @@ -261,8 +261,16 @@ device ath_pci # Atheros pci/cardbus g device ath_hal # pci/cardbus chip support options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors device ath_rate_sample # SampleRate tx rate control for ath +#device bwi # Broadcom BCM430x/BCM431x wireless NICs. +#device bwn # Broadcom BCM43xx wireless NICs. +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device malo # Marvell Libertas wireless NICs. +device mwl # Marvell 88W8363 802.11n wireless NICs. device ral # Ralink Technology RT2500 wireless NICs. device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. +device wpi # Intel 3945ABG wireless NICs. # Pseudo devices. device loop # Network loopback @@ -314,7 +322,9 @@ device rue # RealTek RTL8150 USB Ether device udav # Davicom DM9601E USB # USB Wireless device rum # Ralink Technology RT2501USB wireless NICs +device run # Ralink Technology RT2700/RT2800/RT3000 NICs. device uath # Atheros AR5523 wireless NICs +device upgt # Conexant/Intersil PrismGT wireless NICs. device ural # Ralink Technology RT2500USB wireless NICs device urtw # Realtek RTL8187B/L wireless NICs device zyd # ZyDAS zb1211/zb1211b wireless NICs Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun May 1 05:36:59 2011 (r221295) +++ head/sys/conf/NOTES Sun May 1 13:26:34 2011 (r221296) @@ -1935,11 +1935,16 @@ device xmphy # XaQti XMAC II # (hint of prefer_iomap can be done to prefer I/O instead of Mem mapping) # gem: Apple GMAC/Sun ERI/Sun GEM # hme: Sun HME (Happy Meal Ethernet) +# ipw: Intel 2100 wireless NICs. +# iwi: Intel 2200BG/2225BG/2915ABG wireless NICs. +# iwn: Intel 4965/1000/5000/6000 wireless NICs. # jme: JMicron JMC260 Fast Ethernet/JMC250 Gigabit Ethernet based adapters. # le: AMD Am7900 LANCE and Am79C9xx PCnet # lge: Support for PCI gigabit ethernet adapters based on the Level 1 # LXT1001 NetCellerator chipset. This includes the D-Link DGE-500SX, # SMC TigerCard 1000 (SMC9462SX), and some Addtron cards. +# malo: Marvell Libertas wireless NICs. +# mwl: Marvell 88W8363 802.11n wireless NICs. # msk: Support for gigabit ethernet adapters based on the Marvell/SysKonnect # Yukon II Gigabit controllers, including 88E8021, 88E8022, 88E8061, # 88E8062, 88E8035, 88E8036, 88E8038, 88E8050, 88E8052, 88E8053, @@ -2011,6 +2016,7 @@ device xmphy # XaQti XMAC II # wi: Lucent WaveLAN/IEEE 802.11 PCMCIA adapters. Note: this supports both # the PCMCIA and ISA cards: the ISA card is really a PCMCIA to ISA # bridge with a PCMCIA adapter plugged into it. +# wpi: Intel 3945ABG wireless NICs. # xe: Xircom/Intel EtherExpress Pro100/16 PC Card ethernet controller, # Accton Fast EtherCard-16, Compaq Netelligent 10/100 PC Card, # Toshiba 10/100 Ethernet PC Card, Xircom 16-bit Ethernet + Modem 56 @@ -2131,7 +2137,13 @@ options AH_RXCFG_SDMAMW_4BYTES device ath_rate_sample # SampleRate tx rate control for ath device bwi # Broadcom BCM430* BCM431* device bwn # Broadcom BCM43xx +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device malo # Marvell Libertas wireless NICs. +device mwl # Marvell 88W8363 802.11n wireless NICs. device ral # Ralink Technology RT2500 wireless NICs. +device wpi # Intel 3945ABG wireless NICs. # Use "private" jumbo buffers allocated exclusively for the ti(4) driver. # This option is incompatible with the TI_JUMBO_HDRSPLIT option below. @@ -2727,6 +2739,9 @@ device run # Atheros AR5523 wireless driver device uath # +# Conexant/Intersil PrismGT wireless driver +device upgt +# # Ralink Technology RT2500USB wireless driver device ural # Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun May 1 05:36:59 2011 (r221295) +++ head/sys/i386/conf/GENERIC Sun May 1 13:26:34 2011 (r221296) @@ -273,9 +273,17 @@ device ath_pci # Atheros pci/cardbus g device ath_hal # pci/cardbus chip support options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors device ath_rate_sample # SampleRate tx rate control for ath +#device bwi # Broadcom BCM430x/BCM431x wireless NICs. +#device bwn # Broadcom BCM43xx wireless NICs. +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device malo # Marvell Libertas wireless NICs. +device mwl # Marvell 88W8363 802.11n wireless NICs. device ral # Ralink Technology RT2500 wireless NICs. device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. #device wl # Older non 802.11 Wavelan wireless NIC. +device wpi # Intel 3945ABG wireless NICs. # Pseudo devices. device loop # Network loopback @@ -327,7 +335,9 @@ device rue # RealTek RTL8150 USB Ether device udav # Davicom DM9601E USB # USB Wireless device rum # Ralink Technology RT2501USB wireless NICs +device run # Ralink Technology RT2700/RT2800/RT3000 NICs. device uath # Atheros AR5523 wireless NICs +device upgt # Conexant/Intersil PrismGT wireless NICs. device ural # Ralink Technology RT2500USB wireless NICs device urtw # Realtek RTL8187B/L wireless NICs device zyd # ZyDAS zb1211/zb1211b wireless NICs From owner-svn-src-all@FreeBSD.ORG Sun May 1 15:46:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B22B8106566C; Sun, 1 May 2011 15:46:18 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A18458FC0A; Sun, 1 May 2011 15:46:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41FkISY098027; Sun, 1 May 2011 15:46:18 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41FkIsO098025; Sun, 1 May 2011 15:46:18 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201105011546.p41FkIsO098025@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 1 May 2011 15:46:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221297 - head/contrib/openresolv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 15:46:18 -0000 Author: ume Date: Sun May 1 15:46:18 2011 New Revision: 221297 URL: http://svn.freebsd.org/changeset/base/221297 Log: Fix typo in manpage resolvconf.conf(5). PR: docs/156494 Submitted by: bcr Requested by: bcr Obtained from: http://roy.marples.name/projects/openresolv/ticket/12 Modified: head/contrib/openresolv/resolvconf.conf.5.in Modified: head/contrib/openresolv/resolvconf.conf.5.in ============================================================================== --- head/contrib/openresolv/resolvconf.conf.5.in Sun May 1 13:26:34 2011 (r221296) +++ head/contrib/openresolv/resolvconf.conf.5.in Sun May 1 15:46:18 2011 (r221297) @@ -43,7 +43,7 @@ Listed below are the standard .Nm variables that may be set. .Pp -After updaing this file, you may wish to run +After updating this file, you may wish to run .Nm resolvconf -u to apply the new configuration. .Sh RESOLVCONF OPTIONS From owner-svn-src-all@FreeBSD.ORG Sun May 1 18:41:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7143106566C; Sun, 1 May 2011 18:41:57 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D55E58FC0A; Sun, 1 May 2011 18:41:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41IfvCf003165; Sun, 1 May 2011 18:41:57 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41IfvP3003163; Sun, 1 May 2011 18:41:57 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201105011841.p41IfvP3003163@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 1 May 2011 18:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221299 - head/sys/dev/wpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 18:41:58 -0000 Author: bschmidt Date: Sun May 1 18:41:57 2011 New Revision: 221299 URL: http://svn.freebsd.org/changeset/base/221299 Log: No need for htole32(), which is an uint8_t. Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun May 1 17:26:52 2011 (r221298) +++ head/sys/dev/wpi/if_wpi.c Sun May 1 18:41:57 2011 (r221299) @@ -2298,7 +2298,7 @@ wpi_mrr_setup(struct wpi_softc *sc) } /* setup MRR for control frames */ - mrr.which = htole32(WPI_MRR_CTL); + mrr.which = WPI_MRR_CTL; error = wpi_cmd(sc, WPI_CMD_MRR_SETUP, &mrr, sizeof mrr, 0); if (error != 0) { device_printf(sc->sc_dev, @@ -2307,7 +2307,7 @@ wpi_mrr_setup(struct wpi_softc *sc) } /* setup MRR for data frames */ - mrr.which = htole32(WPI_MRR_DATA); + mrr.which = WPI_MRR_DATA; error = wpi_cmd(sc, WPI_CMD_MRR_SETUP, &mrr, sizeof mrr, 0); if (error != 0) { device_printf(sc->sc_dev, From owner-svn-src-all@FreeBSD.ORG Sun May 1 18:42:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFB9A106564A; Sun, 1 May 2011 18:42:56 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E01368FC0A; Sun, 1 May 2011 18:42:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41IguCL003232; Sun, 1 May 2011 18:42:56 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41IguCd003230; Sun, 1 May 2011 18:42:56 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201105011842.p41IguCd003230@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 1 May 2011 18:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221300 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 18:42:57 -0000 Author: bschmidt Date: Sun May 1 18:42:56 2011 New Revision: 221300 URL: http://svn.freebsd.org/changeset/base/221300 Log: Add files for wpi(4) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun May 1 18:41:57 2011 (r221299) +++ head/sys/conf/files Sun May 1 18:42:56 2011 (r221300) @@ -1995,6 +1995,7 @@ dev/wi/if_wi.c optional wi dev/wi/if_wi_pccard.c optional wi pccard dev/wi/if_wi_pci.c optional wi pci dev/wl/if_wl.c optional wl isa +dev/wpi/if_wpi.c optional wpi pci wpifw.c optional wpifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk wpi.fw:wpifw:153229 -mwpi -c${.TARGET}" \ no-implicit-rule before-depend local \ From owner-svn-src-all@FreeBSD.ORG Sun May 1 19:05:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80D13106566C; Sun, 1 May 2011 19:05:54 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5716C8FC12; Sun, 1 May 2011 19:05:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41J5sNw003978; Sun, 1 May 2011 19:05:54 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41J5sGs003976; Sun, 1 May 2011 19:05:54 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201105011905.p41J5sGs003976@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 1 May 2011 19:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221301 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 19:05:54 -0000 Author: bschmidt Date: Sun May 1 19:05:54 2011 New Revision: 221301 URL: http://svn.freebsd.org/changeset/base/221301 Log: These are of course i386/amd64 only. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun May 1 18:42:56 2011 (r221300) +++ head/sys/conf/NOTES Sun May 1 19:05:54 2011 (r221301) @@ -1935,9 +1935,6 @@ device xmphy # XaQti XMAC II # (hint of prefer_iomap can be done to prefer I/O instead of Mem mapping) # gem: Apple GMAC/Sun ERI/Sun GEM # hme: Sun HME (Happy Meal Ethernet) -# ipw: Intel 2100 wireless NICs. -# iwi: Intel 2200BG/2225BG/2915ABG wireless NICs. -# iwn: Intel 4965/1000/5000/6000 wireless NICs. # jme: JMicron JMC260 Fast Ethernet/JMC250 Gigabit Ethernet based adapters. # le: AMD Am7900 LANCE and Am79C9xx PCnet # lge: Support for PCI gigabit ethernet adapters based on the Level 1 @@ -2016,7 +2013,6 @@ device xmphy # XaQti XMAC II # wi: Lucent WaveLAN/IEEE 802.11 PCMCIA adapters. Note: this supports both # the PCMCIA and ISA cards: the ISA card is really a PCMCIA to ISA # bridge with a PCMCIA adapter plugged into it. -# wpi: Intel 3945ABG wireless NICs. # xe: Xircom/Intel EtherExpress Pro100/16 PC Card ethernet controller, # Accton Fast EtherCard-16, Compaq Netelligent 10/100 PC Card, # Toshiba 10/100 Ethernet PC Card, Xircom 16-bit Ethernet + Modem 56 @@ -2137,13 +2133,9 @@ options AH_RXCFG_SDMAMW_4BYTES device ath_rate_sample # SampleRate tx rate control for ath device bwi # Broadcom BCM430* BCM431* device bwn # Broadcom BCM43xx -device ipw # Intel 2100 wireless NICs. -device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. -device iwn # Intel 4965/1000/5000/6000 wireless NICs. device malo # Marvell Libertas wireless NICs. device mwl # Marvell 88W8363 802.11n wireless NICs. device ral # Ralink Technology RT2500 wireless NICs. -device wpi # Intel 3945ABG wireless NICs. # Use "private" jumbo buffers allocated exclusively for the ti(4) driver. # This option is incompatible with the TI_JUMBO_HDRSPLIT option below. From owner-svn-src-all@FreeBSD.ORG Sun May 1 19:28:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F313106566B; Sun, 1 May 2011 19:28:30 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 4B7438FC08; Sun, 1 May 2011 19:28:30 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 63F2558137; Sun, 1 May 2011 14:28:29 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id 7xBzdC2L-T9i; Sun, 1 May 2011 14:28:29 -0500 (CDT) Received: from wanderer.tachypleus.net (unknown [205.213.213.34]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 25E7E58135; Sun, 1 May 2011 14:28:29 -0500 (CDT) Message-ID: <4DBDB45C.30906@freebsd.org> Date: Sun, 01 May 2011 14:28:28 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110317 Thunderbird/3.1.9 MIME-Version: 1.0 To: Bernhard Schmidt References: <201105011905.p41J5sGs003976@svn.freebsd.org> In-Reply-To: <201105011905.p41J5sGs003976@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221301 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 19:28:30 -0000 On 05/01/11 14:05, Bernhard Schmidt wrote: > Author: bschmidt > Date: Sun May 1 19:05:54 2011 > New Revision: 221301 > URL: http://svn.freebsd.org/changeset/base/221301 > > Log: > These are of course i386/amd64 only. I'm not sure that's intrinsically true. Even if they mostly only ship with Intel motherboards, many of these are Mini-PCI parts which could be put into non-x86 systems. -Nathan From owner-svn-src-all@FreeBSD.ORG Sun May 1 19:47:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E179F1065672; Sun, 1 May 2011 19:47:34 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D23658FC18; Sun, 1 May 2011 19:47:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41JlYYN005257; Sun, 1 May 2011 19:47:34 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41JlYps005255; Sun, 1 May 2011 19:47:34 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105011947.p41JlYps005255@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 1 May 2011 19:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221303 - head/usr.bin/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 19:47:35 -0000 Author: uqs Date: Sun May 1 19:47:34 2011 New Revision: 221303 URL: http://svn.freebsd.org/changeset/base/221303 Log: Let users' PATH decide which groff suite to pick up. Let groff pass the -c flag to grotty, which will turn off ANSI sequences. While these are not a problem for our more/less, they get mangled by col(1) and this will result in garbage output. This makes man(1) work together with textproc/groff, in case the user decided to delete the old groff from base (-DWITHOUT_GROFF). Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Sun May 1 19:24:51 2011 (r221302) +++ head/usr.bin/man/man.sh Sun May 1 19:47:34 2011 (r221303) @@ -889,16 +889,18 @@ do_whatis() { search_whatis whatis "$@" } -EQN=/usr/bin/eqn +# User's PATH setting decides on the groff-suite to pick up. +EQN=eqn +NROFF='groff -S -P-c -Wall -mtty-char -man' +PIC=pic +REFER=refer +TBL=tbl +TROFF='groff -S -P-c -man' +VGRIND=vgrind + COL=/usr/bin/col LOCALE=/usr/bin/locale -NROFF='/usr/bin/groff -S -Wall -mtty-char -man' -PIC=/usr/bin/pic SYSCTL=/sbin/sysctl -TBL=/usr/bin/tbl -TROFF='/usr/bin/groff -S -man' -REFER=/usr/bin/refer -VGRIND=/usr/bin/vgrind debug=0 man_default_sections='1:1aout:8:2:3:n:4:5:6:7:9:l' From owner-svn-src-all@FreeBSD.ORG Sun May 1 19:54:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 002D5106566B; Sun, 1 May 2011 19:54:46 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3DFCA8FC0A; Sun, 1 May 2011 19:54:45 +0000 (UTC) Received: by fxm11 with SMTP id 11so4943021fxm.13 for ; Sun, 01 May 2011 12:54:45 -0700 (PDT) Received: by 10.223.64.201 with SMTP id f9mr5562887fai.102.1304279684921; Sun, 01 May 2011 12:54:44 -0700 (PDT) Received: from amy.lab.techwires.net (dslb-088-067-204-093.pools.arcor-ip.net [88.67.204.93]) by mx.google.com with ESMTPS id d18sm79523fak.22.2011.05.01.12.54.39 (version=SSLv3 cipher=OTHER); Sun, 01 May 2011 12:54:44 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: Nathan Whitehorn Date: Sun, 1 May 2011 21:54:40 +0200 User-Agent: KMail/1.13.7 (FreeBSD/8.2-STABLE; KDE/4.6.2; amd64; ; ) References: <201105011905.p41J5sGs003976@svn.freebsd.org> <4DBDB45C.30906@freebsd.org> In-Reply-To: <4DBDB45C.30906@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201105012154.40835.bschmidt@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221301 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 19:54:47 -0000 On Sunday 01 May 2011 21:28:28 Nathan Whitehorn wrote: > On 05/01/11 14:05, Bernhard Schmidt wrote: > > Author: bschmidt > > Date: Sun May 1 19:05:54 2011 > > New Revision: 221301 > > URL: http://svn.freebsd.org/changeset/base/221301 > > > > Log: > > These are of course i386/amd64 only. > > > I'm not sure that's intrinsically true. Even if they mostly only ship > with Intel motherboards, many of these are Mini-PCI parts which could be > put into non-x86 systems. Yes, indeed. Those might of course be used on other platforms too (well at least it fits into the slot, I know that certain features are not even available on AMD platforms). I'm just not aware that anyone ever tried one of it on mips for example. I don't mind being proven wrong and if so move the entries back to a more generic location. Currently I'm just trying mimic the module behaviour in sys/modules/Makefile. -- Bernhard From owner-svn-src-all@FreeBSD.ORG Sun May 1 20:14:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBEA01065672; Sun, 1 May 2011 20:14:10 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB5408FC1B; Sun, 1 May 2011 20:14:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41KEANr006062; Sun, 1 May 2011 20:14:10 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41KEAIc006059; Sun, 1 May 2011 20:14:10 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201105012014.p41KEAIc006059@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 1 May 2011 20:14:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221304 - head/sbin/recoverdisk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 20:14:10 -0000 Author: uqs Date: Sun May 1 20:14:10 2011 New Revision: 221304 URL: http://svn.freebsd.org/changeset/base/221304 Log: recoverdisk(8): treat output file consistently and abort on EINVAL This improves usability a little as we no longer require using touch. Also reword the manpage wrt. parameters and fix usage() [1] With no media in a cd(4) drive, the reads will loop producing EINVAL, abort in that case [2]. Document the shortcoming of sectorsize and MAXPHYS (a quick solution to this might be having MAXPHYS as the "bigsize", in short testing it didn't make a difference on throughput). Submitted by: arundel [1] PR: bin/154528 [2] Modified: head/sbin/recoverdisk/recoverdisk.1 head/sbin/recoverdisk/recoverdisk.c Modified: head/sbin/recoverdisk/recoverdisk.1 ============================================================================== --- head/sbin/recoverdisk/recoverdisk.1 Sun May 1 19:47:34 2011 (r221303) +++ head/sbin/recoverdisk/recoverdisk.1 Sun May 1 20:14:10 2011 (r221304) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2006 +.Dd May 1, 2011 .Dt RECOVERDISK 1 .Os .Sh NAME @@ -33,17 +33,20 @@ .Sh SYNOPSIS .Nm .Op Fl b Ar bigsize -.Op Fl r Ar rlist -.Op Fl s Ar snapshot -.Op Fl w Ar wlist -.Ar special -.Op Ar file +.Op Fl r Ar readlist +.Op Fl s Ar interval +.Op Fl w Ar writelist +.Ar source +.Op Ar destination .Sh DESCRIPTION The .Nm utility reads data from the -.Ar special +.Ar source file until all blocks could be successfully read. +If +.Ar destination +was specified all data is being written to that file. It starts reading in multiples of the sector size. Whenever a block fails, it is put to the end of the working queue and will be read again, possibly with a smaller read size. @@ -59,13 +62,13 @@ The options are as follows: The size of reads attempted first. The middle pass is roughly the logarithmic average of the bigsize and the sectorsize. -.It Fl r Ar rlist +.It Fl r Ar readlist Read the list of blocks and block sizes to read from the specified file. -.It Fl s Ar snapshot -How often we should update the worklist file while things go OK. -The default is 60 and the units is "progress messages" so if things +.It Fl s Ar interval +How often we should update the writelist file while things go OK. +The default is 60 and the unit is "progress messages" so if things go well, this is the same as once per minute. -.It Fl w Ar wlist +.It Fl w Ar writelist Write the list of remaining blocks to read to the specified file if .Nm is aborted via @@ -102,20 +105,19 @@ Percent complete. .Sh EXAMPLES .Bd -literal # recover data from failing hard drive ad3 -touch /data/lots_of_space -recoverdisk /dev/ad3 /data/lots_of_space +recoverdisk /dev/ad3 /data/disk.img # clone a hard disk recoverdisk /dev/ad3 /dev/ad4 # read an ISO image from a CD-ROM -touch /data/cd.iso; recoverdisk /dev/acd0 /data/cd.iso +recoverdisk /dev/cd0 /data/cd.iso # continue reading from a broken CD and update the existing worklist -recoverdisk -r worklist -w worklist /dev/acd0 /data/cd.iso +recoverdisk -r worklist -w worklist /dev/cd0 /data/cd.iso # recover a single file from the unreadable media -touch file.avi; recoverdisk /cdrom/file.avi file.avi +recoverdisk /cdrom/file.avi file.avi # If the disk hangs the system on read-errors try: recoverdisk -b 0 /dev/ad3 /somewhere @@ -133,7 +135,7 @@ utility first appeared in The original implementation was done by .An Poul-Henning Kamp Aq phk@FreeBSD.org with minor improvements from -.An Ulrich Sp\(:orlein Aq uspoerlein@gmail.com . +.An Ulrich Sp\(:orlein Aq uqs@FreeBSD.org . .Pp This manual page was written by .An Ulrich Sp\(:orlein . @@ -144,4 +146,13 @@ This is due to the DMA reads being split These reads then fail if the sectorsize is not a divisor of 128kB. When reading a full raw audio CD, this leads to roughly 700 error messages flying by. -This is harmless. +This is harmless and can be avoided by setting +.Fl b +to no more than 128kB. +.\".Pp +.\"When reading from optical media, a bug in the GEOM framework will +.\"prevent it from seeing that the media has been removed. +.\"The device can still be opened, but all reads will fail. +.\"This is usually harmless, but will send +.\".Nm +.\"into an infinite loop. Modified: head/sbin/recoverdisk/recoverdisk.c ============================================================================== --- head/sbin/recoverdisk/recoverdisk.c Sun May 1 19:47:34 2011 (r221303) +++ head/sbin/recoverdisk/recoverdisk.c Sun May 1 20:14:10 2011 (r221304) @@ -86,7 +86,7 @@ save_worklist(void) if (file == NULL) err(1, "Error opening file %s", wworklist); - TAILQ_FOREACH(llp, &lumps, list) + TAILQ_FOREACH(llp, &lumps, list) fprintf(file, "%jd %jd %d\n", (intmax_t)llp->start, (intmax_t)llp->len, llp->state); @@ -134,8 +134,8 @@ read_worklist(off_t t) static void usage(void) { - (void)fprintf(stderr, - "usage: recoverdisk [-r worklist] [-w worklist] source-drive [destination]\n"); + (void)fprintf(stderr, "usage: recoverdisk [-b bigsize] [-r readlist] " + "[-s interval] [-w writelist] source [destination]\n"); exit(1); } @@ -153,7 +153,7 @@ main(int argc, char * const argv[]) int fdr, fdw; off_t t, d, start, len; size_t i, j; - int error, flags, state; + int error, state; u_char *buf; u_int sectorsize; time_t t1, t2; @@ -196,7 +196,6 @@ main(int argc, char * const argv[]) error = fstat(fdr, &sb); if (error < 0) err(1, "fstat failed"); - flags = O_WRONLY; if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) { error = ioctl(fdr, DIOCGSECTORSIZE, §orsize); if (error < 0) @@ -210,7 +209,6 @@ main(int argc, char * const argv[]) err(1, "DIOCGMEDIASIZE failed"); } else { t = sb.st_size; - flags |= O_CREAT | O_TRUNC; } if (bigsize < minsize) @@ -229,9 +227,12 @@ main(int argc, char * const argv[]) err(1, "Cannot allocate %zu bytes buffer", bigsize); if (argc > 1) { - fdw = open(argv[1], flags, DEFFILEMODE); + fdw = open(argv[1], O_WRONLY | O_CREAT, DEFFILEMODE); if (fdw < 0) err(1, "Cannot open write descriptor %s", argv[1]); + if (ftruncate(fdw, t) < 0) + err(1, "Cannot truncate output %s to %jd bytes", + argv[1], (intmax_t)t); } else fdw = -1; @@ -292,6 +293,10 @@ main(int argc, char * const argv[]) } printf("\n%jd %zu failed (%s)\n", lp->start, i, strerror(errno)); + if (errno == EINVAL) { + printf("read() size too big? Try with -b 131072"); + aborting = 1; + } if (errno == ENXIO) aborting = 1; new_lump(lp->start, i, lp->state + 1); From owner-svn-src-all@FreeBSD.ORG Sun May 1 20:46:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09B7E106564A; Sun, 1 May 2011 20:46:38 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDEF48FC0C; Sun, 1 May 2011 20:46:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41KkbQ8006987; Sun, 1 May 2011 20:46:37 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41KkbS8006985; Sun, 1 May 2011 20:46:37 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201105012046.p41KkbS8006985@svn.freebsd.org> From: Christian Brueffer Date: Sun, 1 May 2011 20:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221305 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 20:46:38 -0000 Author: brueffer Date: Sun May 1 20:46:37 2011 New Revision: 221305 URL: http://svn.freebsd.org/changeset/base/221305 Log: Minor cleanup. Modified: head/share/man/man4/vxge.4 Modified: head/share/man/man4/vxge.4 ============================================================================== --- head/share/man/man4/vxge.4 Sun May 1 20:14:10 2011 (r221304) +++ head/share/man/man4/vxge.4 Sun May 1 20:46:37 2011 (r221305) @@ -49,13 +49,12 @@ The .Nm driver provides support for Neterion X3100 adapters. The driver supports TCP Segmentation Offload (TSO/LSO), -Large Receive Offlaod (LRO), Jumbo Frames, Receive Traffic Hash (RTH), +Large Receive Offload (LRO), Jumbo Frames, Receive Traffic Hash (RTH), VLAN, Promiscuous mode and Multi function mode. .Pp - The .Nm -driver supports following function modes: +driver supports the following function modes: .Bd -ragged -offset indent .Cd "SF1_VP17 - 1 function with 17 VPATHs" .Ed From owner-svn-src-all@FreeBSD.ORG Sun May 1 22:19:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BA55106566B; Sun, 1 May 2011 22:19:53 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BFF08FC13; Sun, 1 May 2011 22:19:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41MJrFr009782; Sun, 1 May 2011 22:19:53 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41MJrBl009779; Sun, 1 May 2011 22:19:53 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105012219.p41MJrBl009779@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 22:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221306 - in head/sys: fs/nfs nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 22:19:53 -0000 Author: rmacklem Date: Sun May 1 22:19:52 2011 New Revision: 221306 URL: http://svn.freebsd.org/changeset/base/221306 Log: Add the kernel support needed to zero out the nfsstats structure for the new NFS subsystem. This will be used by nfsstats.c to implement the "-z" option. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/nfs/nfssvc.h Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Sun May 1 20:46:37 2011 (r221305) +++ head/sys/fs/nfs/nfs_commonport.c Sun May 1 22:19:52 2011 (r221306) @@ -404,6 +404,8 @@ nfssvc_call(struct thread *p, struct nfs } else if (uap->flag & NFSSVC_GETSTATS) { error = copyout(&newnfsstats, CAST_USER_ADDR_T(uap->argp), sizeof (newnfsstats)); + if ((uap->flag & NFSSVC_ZEROSTATS) != 0 && error == 0) + bzero(&newnfsstats, sizeof(newnfsstats)); return (error); } else if (uap->flag & NFSSVC_NFSUSERDPORT) { u_short sockport; Modified: head/sys/nfs/nfssvc.h ============================================================================== --- head/sys/nfs/nfssvc.h Sun May 1 20:46:37 2011 (r221305) +++ head/sys/nfs/nfssvc.h Sun May 1 22:19:52 2011 (r221306) @@ -64,5 +64,6 @@ #define NFSSVC_CBADDSOCK 0x00200000 #define NFSSVC_GETSTATS 0x00400000 #define NFSSVC_BACKUPSTABLE 0x00800000 +#define NFSSVC_ZEROSTATS 0x01000000 /* modifier for GETSTATS */ #endif /* _NFS_NFSSVC_H */ From owner-svn-src-all@FreeBSD.ORG Sun May 1 23:32:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28F0A106564A; Sun, 1 May 2011 23:32:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 193968FC18; Sun, 1 May 2011 23:32:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41NWbt9011856; Sun, 1 May 2011 23:32:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41NWbiJ011854; Sun, 1 May 2011 23:32:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105012332.p41NWbiJ011854@svn.freebsd.org> From: Adrian Chadd Date: Sun, 1 May 2011 23:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221307 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 23:32:38 -0000 Author: adrian Date: Sun May 1 23:32:37 2011 New Revision: 221307 URL: http://svn.freebsd.org/changeset/base/221307 Log: Some AR724x PCIe fixes, which should wrap up the first round of endian-ness issues with the AR724x. From Luiz: * Fix the bus space tag used so endian-ness is correctly handled; * Only do the workaround for the AR7240; AR7241/AR7242 (PB92) don't require this From me: * Add a read flush from openwrt Submitted by: Luiz Otavio O Souza Modified: head/sys/mips/atheros/ar724x_pci.c Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Sun May 1 22:19:52 2011 (r221306) +++ head/sys/mips/atheros/ar724x_pci.c Sun May 1 23:32:37 2011 (r221307) @@ -57,8 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include /* XXX */ -#include /* XXX */ +#include #include @@ -113,7 +112,7 @@ static uint32_t ar724x_pci_read_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, int bytes) { - uint32_t cmd, data, shift, mask; + uint32_t data, shift, mask; /* Register access is 32-bit aligned */ shift = (reg & 3) * 8; @@ -125,18 +124,9 @@ ar724x_pci_read_config(device_t dev, u_i dprintf("%s: tag (%x, %x, %x) reg %d(%d)\n", __func__, bus, slot, func, reg, bytes); - if ((bus == 0) && (slot == 0) && (func == 0)) { + if ((bus == 0) && (slot == 0) && (func == 0)) data = ATH_READ_REG(AR724X_PCI_CFG_BASE + (reg & ~3)); - /* - * WAR for BAR issue - We are unable to access the PCI device - * space if we set the BAR with proper base address. - */ - if (reg == PCIR_BAR(0) && bytes == 4) { - cmd = (ar71xx_soc == AR71XX_SOC_AR7240) ? - 0xffff : 0x1000ffff; - ar724x_pci_write(AR724X_PCI_CFG_BASE, reg, cmd, bytes); - } - } else + else data = -1; /* Get request bytes from 32-bit word */ @@ -158,14 +148,14 @@ ar724x_pci_write_config(device_t dev, u_ if ((bus != 0) || (slot != 0) || (func != 0)) return; - ar724x_pci_write(AR724X_PCI_CFG_BASE, reg, data, bytes); /* - * WAR for BAR issue - We are unable to access the PCI device space - * if we set the BAR with proper base address. - * Force a flush here (at register writing). + * WAR for BAR issue on AR7240 - We are unable to access the PCI device + * space if we set the BAR with proper base address. */ - if (reg == PCIR_BAR(0) && bytes == 4) - (void)ar724x_pci_read_config(dev, bus, slot, func, reg, bytes); + if (reg == PCIR_BAR(0) && bytes == 4 && ar71xx_soc == AR71XX_SOC_AR7240) + ar724x_pci_write(AR724X_PCI_CFG_BASE, reg, 0xffff, bytes); + else + ar724x_pci_write(AR724X_PCI_CFG_BASE, reg, data, bytes); } static void @@ -232,6 +222,9 @@ ar724x_pci_setup(device_t dev) else reg = 0x1ffc1; ATH_WRITE_REG(AR724X_PCI_APP, reg); + /* Flush write */ + (void) ATH_READ_REG(AR724X_PCI_APP); + DELAY(1000); reg = ATH_READ_REG(AR724X_PCI_RESET); @@ -457,10 +450,7 @@ ar724x_pci_activate_resource(device_t bu case SYS_RES_MEMORY: case SYS_RES_IOPORT: - /* XXX */ - //rman_set_bustag(r, ar71xx_bus_space_pcimem); - //rman_set_bustag(r, mips_bus_space_generic); - rman_set_bustag(r, ar71xx_bus_space_reversed); + rman_set_bustag(r, ar71xx_bus_space_pcimem); break; } } From owner-svn-src-all@FreeBSD.ORG Sun May 1 23:41:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F205A106564A; Sun, 1 May 2011 23:41:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E231E8FC08; Sun, 1 May 2011 23:41:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41NfZK5012156; Sun, 1 May 2011 23:41:35 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41NfZ2H012154; Sun, 1 May 2011 23:41:35 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105012341.p41NfZ2H012154@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 23:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221308 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 23:41:36 -0000 Author: rmacklem Date: Sun May 1 23:41:35 2011 New Revision: 221308 URL: http://svn.freebsd.org/changeset/base/221308 Log: Fix nfsstat so that the "-z" option works for the new NFS subsystem. MFC after: 2 weeks Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Sun May 1 23:32:37 2011 (r221307) +++ head/usr.bin/nfsstat/nfsstat.c Sun May 1 23:41:35 2011 (r221308) @@ -85,6 +85,7 @@ static int zflag = 0; static int run_v4 = 0; static int printtitle = 1; static struct ext_nfsstats ext_nfsstats; +static int nfssvc_flag; void intpr(int, int); void printhdr(int, int); @@ -107,6 +108,7 @@ main(int argc, char **argv) char *memf, *nlistf; char errbuf[_POSIX2_LINE_MAX]; + nfssvc_flag = NFSSVC_GETSTATS; interval = 0; memf = nlistf = NULL; while ((ch = getopt(argc, argv, "cesWM:N:w:z")) != -1) @@ -135,6 +137,7 @@ main(int argc, char **argv) break; case 'z': zflag = 1; + nfssvc_flag |= NFSSVC_ZEROSTATS; break; case 'e': run_v4 = 1; @@ -161,7 +164,7 @@ main(int argc, char **argv) errx(1, "experimental client/server not loaded"); if (run_v4 != 0) { - if (nfssvc(NFSSVC_GETSTATS, &ext_nfsstats) < 0) + if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) err(1, "Can't get stats"); } else if (nlistf != NULL || memf != NULL) { deadkernel = 1; @@ -793,13 +796,13 @@ exp_sidewaysintpr(u_int interval, int cl int hdrcnt = 1; ext_nfsstatsp = &lastst; - if (nfssvc(NFSSVC_GETSTATS, ext_nfsstatsp) < 0) + if (nfssvc(nfssvc_flag, ext_nfsstatsp) < 0) err(1, "Can't get stats"); sleep(interval); for (;;) { ext_nfsstatsp = &nfsstats; - if (nfssvc(NFSSVC_GETSTATS, ext_nfsstatsp) < 0) + if (nfssvc(nfssvc_flag, ext_nfsstatsp) < 0) err(1, "Can't get stats"); if (--hdrcnt == 0) { From owner-svn-src-all@FreeBSD.ORG Sun May 1 23:55:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F5681065670; Sun, 1 May 2011 23:55:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 801068FC08; Sun, 1 May 2011 23:55:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p41Ntu2D012610; Sun, 1 May 2011 23:55:56 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p41Ntugh012608; Sun, 1 May 2011 23:55:56 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105012355.p41Ntugh012608@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 May 2011 23:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221309 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2011 23:55:56 -0000 Author: rmacklem Date: Sun May 1 23:55:56 2011 New Revision: 221309 URL: http://svn.freebsd.org/changeset/base/221309 Log: Fix nfsstat.1 to indicate that "-z" now works for the new NFS subsystems after r221308. This is a content change. MFC after: 2 weeks Modified: head/usr.bin/nfsstat/nfsstat.1 Modified: head/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- head/usr.bin/nfsstat/nfsstat.1 Sun May 1 23:41:35 2011 (r221308) +++ head/usr.bin/nfsstat/nfsstat.1 Sun May 1 23:55:56 2011 (r221309) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd October 18, 2007 +.Dd May 1, 2011 .Dt NFSSTAT 1 .Os .Sh NAME @@ -78,7 +78,6 @@ activity for both the client and server second intervals. .It Fl z Reset statistics after displaying them. -(Not currently supported by the experimental nfs subsystem.) .It Fl e Gather statistics from the experimental nfs subsystem that includes support for NFSv4 instead of the regular nfs subsystem. From owner-svn-src-all@FreeBSD.ORG Mon May 2 00:49:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1742E1065673; Mon, 2 May 2011 00:49:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 078A78FC1B; Mon, 2 May 2011 00:49:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p420nl9s014706; Mon, 2 May 2011 00:49:47 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p420nlfD014704; Mon, 2 May 2011 00:49:47 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105020049.p420nlfD014704@svn.freebsd.org> From: Rick Macklem Date: Mon, 2 May 2011 00:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221310 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 00:49:48 -0000 Author: rmacklem Date: Mon May 2 00:49:47 2011 New Revision: 221310 URL: http://svn.freebsd.org/changeset/base/221310 Log: MFC: r220763 Add vput() calls in two places in the experimental NFS client that would be needed if, in the future, nfscl_loadattrcache() were to return an error. Currently nfscl_loadattrcache() never returns an error, so these cases never currently happen. Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.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/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun May 1 23:55:56 2011 (r221309) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Mon May 2 00:49:47 2011 (r221310) @@ -1404,9 +1404,12 @@ nfs_mknodrpc(struct vnode *dvp, struct v (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (!error) { newvp = NFSTOV(np); - if (attrflag) + if (attrflag != 0) { error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); + if (error != 0) + vput(newvp); + } } if (!error) { if ((cnp->cn_flags & MAKEENTRY)) @@ -1512,7 +1515,7 @@ again: } if (error) { if (newvp != NULL) { - vrele(newvp); + vput(newvp); newvp = NULL; } if (NFS_ISV34(dvp) && (fmode & O_EXCL) && From owner-svn-src-all@FreeBSD.ORG Mon May 2 01:01:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4744106566C; Mon, 2 May 2011 01:01:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A08A68FC08; Mon, 2 May 2011 01:01:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42113JN015082; Mon, 2 May 2011 01:01:03 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42113cE015081; Mon, 2 May 2011 01:01:03 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105020101.p42113cE015081@svn.freebsd.org> From: Rick Macklem Date: Mon, 2 May 2011 01:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221311 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 01:01:03 -0000 Author: rmacklem Date: Mon May 2 01:01:03 2011 New Revision: 221311 URL: http://svn.freebsd.org/changeset/base/221311 Log: MFC: r220764 Add a vput() to nfs_lookitup() in the experimental NFS client for a case that will probably never happen. It can only happen if a server were to successfully lookup a file, but not return attributes for that file. Although technically allowed by the NFSv3 RFC, I doubt any server would ever do this. However, if it did, the client would have not vput()'d the new vnode when it needed to do so. Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.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/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Mon May 2 00:49:47 2011 (r221310) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Mon May 2 01:01:03 2011 (r221311) @@ -2422,7 +2422,10 @@ printf("replace=%s\n",nnn); newvp = NFSTOV(np); } if (!attrflag && *npp == NULL) { - vrele(newvp); + if (newvp == dvp) + vrele(newvp); + else + vput(newvp); return (ENOENT); } if (attrflag) From owner-svn-src-all@FreeBSD.ORG Mon May 2 05:39:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C2611065673; Mon, 2 May 2011 05:39:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1B288FC12; Mon, 2 May 2011 05:39:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p425dh65023583; Mon, 2 May 2011 05:39:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p425dh1k023581; Mon, 2 May 2011 05:39:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105020539.p425dh1k023581@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 May 2011 05:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221312 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 05:39:44 -0000 Author: adrian Date: Mon May 2 05:39:43 2011 New Revision: 221312 URL: http://svn.freebsd.org/changeset/base/221312 Log: Add documentation to sys/conf/options pointing out that AH_SUPPORT_AR9130 shouldn't be enabled by default unless you're truely building for the AR913x platform. Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon May 2 01:01:03 2011 (r221311) +++ head/sys/conf/options Mon May 2 05:39:43 2011 (r221312) @@ -775,6 +775,8 @@ ATH_ENABLE_11N opt_ah.h # options for the Atheros hal AH_SUPPORT_AR5416 opt_ah.h +# XXX For now, this breaks non-AR9130 chipsets, so only use it +# XXX when actually targetting AR9130. AH_SUPPORT_AR9130 opt_ah.h AH_DEBUG opt_ah.h @@ -791,6 +793,7 @@ AH_MAXCHAN opt_ah.h AH_RXCFG_SDMAMW_4BYTES opt_ah.h # AR5416 and later interrupt mitigation +# XXX do not use this for AR9130 AH_AR5416_INTERRUPT_MITIGATION opt_ah.h # options for the Broadcom BCM43xx driver (bwi) From owner-svn-src-all@FreeBSD.ORG Mon May 2 05:48:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F329106566B; Mon, 2 May 2011 05:48:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 659E48FC20; Mon, 2 May 2011 05:48:12 +0000 (UTC) Received: by vws18 with SMTP id 18so5329453vws.13 for ; Sun, 01 May 2011 22:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=rmo+SB8WPxnry4C0kHv+WOM/lkNANyRnu2MlJGkeQRE=; b=LQp89XfMr5kuD0r8RFpsg7RRk+z9i789iznyEmd/yJC7ZwgVdznW1NVyFQPtpF9yHj Yxqhzp9U9++SPJ7hqx2Zt/5rKPcSKQ4lexHGvRaukaGySyy3Zu7R3vH7lIkYxCE/Tg4j FGXmaMaDNFhohav9dA4h5M5FH3+NI2RqoRQQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=i+JtjAKsOVCLhaTPde9daOtxxe6+V7NteiHgyIBZovIWlRcFZx/Vp+Ycl78j/1ms0/ pACOn/UBuFixZLDvw6sHZBpHaO0MKNRaV+ZF7bUfGKXrCW2NG++2k7LSPD74MOntp6dA StGUqB3/W1r/f0y8J4W6/3wQZYaCGlryImCYM= MIME-Version: 1.0 Received: by 10.52.69.69 with SMTP id c5mr4057962vdu.222.1304315291814; Sun, 01 May 2011 22:48:11 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.157.202 with HTTP; Sun, 1 May 2011 22:48:11 -0700 (PDT) In-Reply-To: <201105012154.40835.bschmidt@freebsd.org> References: <201105011905.p41J5sGs003976@svn.freebsd.org> <4DBDB45C.30906@freebsd.org> <201105012154.40835.bschmidt@freebsd.org> Date: Mon, 2 May 2011 13:48:11 +0800 X-Google-Sender-Auth: ZRw1gSdk4iXaAVwizy46EExGa68 Message-ID: From: Adrian Chadd To: Bernhard Schmidt Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Nathan Whitehorn Subject: Re: svn commit: r221301 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 05:48:13 -0000 On 2 May 2011 03:54, Bernhard Schmidt wrote: >> I'm not sure that's intrinsically true. Even if they mostly only ship >> with Intel motherboards, many of these are Mini-PCI parts which could be >> put into non-x86 systems. > > Yes, indeed. Those might of course be used on other platforms too > (well at least it fits into the slot, I know that certain features > are not even available on AMD platforms). I'm just not aware that > anyone ever tried one of it on mips for example. > > I don't mind being proven wrong and if so move the entries back to > a more generic location. Currently I'm just trying mimic the module > behaviour in sys/modules/Makefile. I'm likely to try the intel mini-pcie stuff on the atheros PB92 ref board (AR7242 MIPS). Just not yet. I'll let you know how it goes when i've done it. Adiran From owner-svn-src-all@FreeBSD.ORG Mon May 2 08:31:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D718D106566C; Mon, 2 May 2011 08:31:53 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C31E58FC0C; Mon, 2 May 2011 08:31:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p428VrFZ028846; Mon, 2 May 2011 08:31:53 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p428VroZ028836; Mon, 2 May 2011 08:31:53 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201105020831.p428VroZ028836@svn.freebsd.org> From: Martin Matuska Date: Mon, 2 May 2011 08:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221317 - in stable/7: contrib/gcc contrib/gcc/config/i386 contrib/gcc/config/mips contrib/gcc/config/rs6000 contrib/gcc/config/s390 contrib/gcc/cp contrib/gcc/doc contrib/libstdc++ con... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 08:31:53 -0000 Author: mm Date: Mon May 2 08:31:53 2011 New Revision: 221317 URL: http://svn.freebsd.org/changeset/base/221317 Log: MFC 218895, 218896, 219374, 219376, 219639, 219640, 219697, 219711, 220150: MFC r218895: Backport svn r124339 from gcc 4.3 and add opteron-sse3, athlon64-sse3 and k8-sse3 cpu-types for -march=/-mtune= gcc options. These new cpu-types include the SSE3 instruction set that is supported by all newer AMD Athlon 64 and Opteron processors. All three cpu-types are supported by clang and all gcc versions starting with 4.3 SVN rev 124339 (at that time GPLv2 licensed). Source: gcc-4_3-branch (rev. 124339; GPLv2) MFC r218896: Add opteron-sse3, athlon64-sse3 and k8-sse3 cpu types to bsd.cpu.mk. - add "sse3" to MACHINE_CPU for the new cpu types - for i386, default to CPUTYPE=prescott for the new cpu types MFC r219374: Backport Intel Core 2 and AMD Geode CPU types from gcc-4.3 (GPLv2) These options are supported in this shape in all newer GCC versions. Source: gcc-4_3-branch (rev. 118090, 118973, 120846; GPLv2) MFC r219376: Add AMD Geode CPU type to bsd.cpu.mk and examples/etc/make.conf For CPUTYPE=core2 use -march=core2 MFC r219639: Backport SSSE3 instruction set support to base gcc. Enabled by default for -march=core2 Source: gcc-4_3-branch (rev. 117958, 121687, 121726, 123639; GPLv2) MFC r219640: Add ssse3 capability for CPUTYPE=core2 to MACHINE_CPU in bsd.cpu.mk MFC r219697: Fix -march/-mtune=native autodetection for Intel Core 2 CPUs Source: gcc-4_3-branch (partial rev. 119454; GPLv2) MFC r219711: Backport missing tunings for -march=core2: - enable extra 80387 mathematical constants (ext_80387_constants) - enable compare and exchange 16 bytes (cmpxchg16b) Verified against llvm-gcc (and apple gcc) Source: gcc-4_3-branch (ref. svn revs. 119260, 121140; GPLv2) MFC r220150: Upgrade of base gcc and libstdc++ to the last GPLv2-licensed revision (rev. 127959 of gcc-4_2-branch). Resolved GCC bugs: c++: 17763, 29365, 30535, 30917, 31337, 31941, 32108, 32112, 32346, 32898, 32992 debug: 32610, 32914 libstdc++: 33084, 33128 middle-end: 32563 rtl-optimization: 33148 tree-optimization: 25413, 32723 target: 32218 Source: gcc-4_2-branch (up to rev. 127959) Obtained from: gcc (var. revs of gcc-4_2-branch and gcc-4_3-branch; GPLv2) PR: gnu/153298, gnu/153959, gnu/154385, gnu/155308, gnu/154906 Added: stable/7/contrib/gcc/config/i386/geode.md - copied unchanged from r219374, head/contrib/gcc/config/i386/geode.md stable/7/contrib/gcc/config/i386/tmmintrin.h - copied unchanged from r219639, head/contrib/gcc/config/i386/tmmintrin.h Modified: stable/7/contrib/gcc/BASE-VER stable/7/contrib/gcc/ChangeLog stable/7/contrib/gcc/DATESTAMP stable/7/contrib/gcc/DEV-PHASE stable/7/contrib/gcc/config.gcc stable/7/contrib/gcc/config/i386/driver-i386.c stable/7/contrib/gcc/config/i386/i386.c stable/7/contrib/gcc/config/i386/i386.h stable/7/contrib/gcc/config/i386/i386.md stable/7/contrib/gcc/config/i386/i386.opt stable/7/contrib/gcc/config/i386/sse.md stable/7/contrib/gcc/config/i386/xmmintrin.h stable/7/contrib/gcc/config/mips/predicates.md stable/7/contrib/gcc/config/rs6000/rs6000.c stable/7/contrib/gcc/config/s390/s390.md stable/7/contrib/gcc/cp/ChangeLog stable/7/contrib/gcc/cp/call.c stable/7/contrib/gcc/cp/cp-tree.h stable/7/contrib/gcc/cp/cxx-pretty-print.c stable/7/contrib/gcc/cp/decl.c stable/7/contrib/gcc/cp/decl2.c stable/7/contrib/gcc/cp/error.c stable/7/contrib/gcc/cp/lex.c stable/7/contrib/gcc/cp/name-lookup.c stable/7/contrib/gcc/cp/pt.c stable/7/contrib/gcc/cp/semantics.c stable/7/contrib/gcc/cp/typeck.c stable/7/contrib/gcc/doc/contrib.texi stable/7/contrib/gcc/doc/extend.texi stable/7/contrib/gcc/doc/gcc.1 stable/7/contrib/gcc/doc/invoke.texi stable/7/contrib/gcc/dwarf2out.c stable/7/contrib/gcc/expr.c stable/7/contrib/gcc/fold-const.c stable/7/contrib/gcc/gimplify.c stable/7/contrib/gcc/reload1.c stable/7/contrib/gcc/simplify-rtx.c stable/7/contrib/gcc/target-def.h stable/7/contrib/gcc/target.h stable/7/contrib/gcc/targhooks.c stable/7/contrib/gcc/targhooks.h stable/7/contrib/gcc/tree-if-conv.c stable/7/contrib/gcc/tree-ssa-structalias.c stable/7/contrib/gcc/tree-vect-analyze.c stable/7/contrib/gcc/tree-vect-patterns.c stable/7/contrib/gcc/tree.c stable/7/contrib/gcc/tree.h stable/7/contrib/libstdc++/ChangeLog stable/7/contrib/libstdc++/include/std/std_valarray.h stable/7/contrib/libstdc++/include/tr1/random stable/7/share/examples/etc/make.conf stable/7/share/mk/bsd.cpu.mk Directory Properties: stable/7/contrib/gcc/ (props changed) stable/7/contrib/libstdc++/ (props changed) stable/7/share/examples/ (props changed) stable/7/share/mk/ (props changed) Modified: stable/7/contrib/gcc/BASE-VER ============================================================================== --- stable/7/contrib/gcc/BASE-VER Mon May 2 06:59:09 2011 (r221316) +++ stable/7/contrib/gcc/BASE-VER Mon May 2 08:31:53 2011 (r221317) @@ -1 +1 @@ -4.2.1 +4.2.2 Modified: stable/7/contrib/gcc/ChangeLog ============================================================================== --- stable/7/contrib/gcc/ChangeLog Mon May 2 06:59:09 2011 (r221316) +++ stable/7/contrib/gcc/ChangeLog Mon May 2 08:31:53 2011 (r221317) @@ -1,3 +1,121 @@ +2007-08-31 Jakub Jelinek + + PR rtl-optimization/33148 + * simplify-rtx.c (simplify_unary_operation_1): Only optimize + (neg (lt X 0)) if X has scalar int mode. + + PR debug/32914 + * dwarf2out.c (rtl_for_decl_init): If vector decl has CONSTRUCTOR + initializer, use build_vector_from_ctor if possible to create + VECTOR_CST out of it. If vector initializer is not VECTOR_CST + even after this, return NULL. + +2007-08-27 Jason Merrill + + PR c++/31337 + * gimplify.c (gimplify_modify_expr): Discard the assignment of + zero-sized types after calling gimplify_modify_expr_rhs. + +2007-08-24 Jakub Jelinek + + PR debug/32610 + * dwarf2out.c (gen_decl_die): Don't call + gen_tagged_type_instantiation_die if decl doesn't have tagged type. + +2007-08-24 Richard Guenther + + * expr.c (get_inner_reference): Remove unused variable. + +2007-08-24 Richard Guenther + + * expr.c (get_inner_reference): Do computation of bitoffset + from offset in a way we can detect overflow reliably. + +2007-08-22 Richard Guenther + + PR middle-end/32563 + * tree.c (host_integerp): Treat sizetype as signed as it is + sign-extended. + +2007-08-20 Adam Nemet + + * config/mips/predicates.md (const_call_insn_operand): Invoke + SYMBOL_REF_LONG_CALL_P only on SYMBOL_REFs. + +2007-08-17 Chen liqin + + * config/score/score.md : Update pattern tablejump. + * config/score/score.c : Update score_initialize_trampoline + function. + * config/score/score.h (TRAMPOLINE_TEMPLATE): Added macro. + (TRAMPOLINE_INSNS, TRAMPOLINE_SIZE) Update macro. + * doc/contrib.texi: Add my entry. + +2007-08-02 Andreas Krebbel + + * config/s390/s390.md ("*xordi3_cconly"): Change xr to xg. + +2007-08-01 Andreas Krebbel + + * config/s390/s390.md (TF in GPR splitter): Change operand_subword + parameter to TFmode. + +2007-07-30 Mark Mitchell + + * BASE-VER: Bump. + * DEV-PHASE: Mark as prerelease. + +2007-07-25 Steve Ellcey + + PR target/32218 + * tree-vect-patterns.c (vect_pattern_recog_1): Check for valid type. + +2007-07-25 Dorit Nuzman + Devang Patel + + PR tree-optimization/25413 + * targhooks.c (default_builtin_vector_alignment_reachable): New. + * targhooks.h (default_builtin_vector_alignment_reachable): New. + * tree.h (contains_packed_reference): New. + * expr.c (contains_packed_reference): New. + * tree-vect-analyze.c (vector_alignment_reachable_p): New. + (vect_enhance_data_refs_alignment): Call + vector_alignment_reachable_p. + * target.h (vector_alignment_reachable): New builtin. + * target-def.h (TARGET_VECTOR_ALIGNMENT_REACHABLE): New. + * config/rs6000/rs6000.c (rs6000_vector_alignment_reachable): New. + (TARGET_VECTOR_ALIGNMENT_REACHABLE): Define. + +2007-07-24 Richard Guenther + + Backport from mainline: + 2007-07-16 Richard Guenther + Uros Bizjak + + * tree-if-conv.c (find_phi_replacement_condition): Unshare "*cond" + before forcing it to gimple operand. + +2007-07-24 Richard Guenther + + PR tree-optimization/32723 + Backport from mainline: + 2007-03-09 Daniel Berlin + + * tree-ssa-structalias.c (shared_bitmap_info_t): New structure. + (shared_bitmap_table): New variable. + (shared_bitmap_hash): New function. + (shared_bitmap_eq): Ditto + (shared_bitmap_lookup): Ditto. + (shared_bitmap_add): Ditto. + (find_what_p_points_to): Rewrite to use shared bitmap hashtable. + (init_alias_vars): Init shared bitmap hashtable. + (delete_points_to_sets): Delete shared bitmap hashtable. + +2007-07-23 Bernd Schmidt + + * reload1.c (choose_reload_regs): Set reload_spill_index for regs + chosen during find_reloads. + 2007-07-19 Release Manager * GCC 4.2.1 released. Modified: stable/7/contrib/gcc/DATESTAMP ============================================================================== --- stable/7/contrib/gcc/DATESTAMP Mon May 2 06:59:09 2011 (r221316) +++ stable/7/contrib/gcc/DATESTAMP Mon May 2 08:31:53 2011 (r221317) @@ -1 +1 @@ -20070719 +20070831 Modified: stable/7/contrib/gcc/DEV-PHASE ============================================================================== --- stable/7/contrib/gcc/DEV-PHASE Mon May 2 06:59:09 2011 (r221316) +++ stable/7/contrib/gcc/DEV-PHASE Mon May 2 08:31:53 2011 (r221317) @@ -0,0 +1 @@ +prerelease Modified: stable/7/contrib/gcc/config.gcc ============================================================================== --- stable/7/contrib/gcc/config.gcc Mon May 2 06:59:09 2011 (r221316) +++ stable/7/contrib/gcc/config.gcc Mon May 2 08:31:53 2011 (r221317) @@ -268,11 +268,13 @@ xscale-*-*) ;; i[34567]86-*-*) cpu_type=i386 - extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h pmmintrin.h" + extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h + pmmintrin.h tmmintrin.h" ;; x86_64-*-*) cpu_type=i386 - extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h pmmintrin.h" + extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h + pmmintrin.h tmmintrin.h" need_64bit_hwint=yes ;; ia64-*-*) @@ -1207,14 +1209,14 @@ i[34567]86-*-solaris2*) # FIXME: -m64 for i[34567]86-*-* should be allowed just # like -m32 for x86_64-*-*. case X"${with_cpu}" in - Xgeneric|Xnocona|Xx86-64|Xk8|Xopteron|Xathlon64|Xathlon-fx) + Xgeneric|Xcore2|Xnocona|Xx86-64|Xk8|Xopteron|Xathlon64|Xathlon-fx) ;; X) with_cpu=generic ;; *) echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2 - echo "generic nocona x86-64 k8 opteron athlon64 athlon-fx" 1>&2 + echo "generic core2 nocona x86-64 k8 opteron athlon64 athlon-fx" 1>&2 exit 1 ;; esac @@ -2537,6 +2539,9 @@ if test x$with_cpu = x ; then nocona-*) with_cpu=nocona ;; + core2-*) + with_cpu=core2 + ;; pentium_m-*) with_cpu=pentium-m ;; @@ -2556,6 +2561,9 @@ if test x$with_cpu = x ; then nocona-*) with_cpu=nocona ;; + core2-*) + with_cpu=core2 + ;; *) with_cpu=generic ;; @@ -2787,7 +2795,7 @@ case "${target}" in esac # OK ;; - "" | k8 | opteron | athlon64 | athlon-fx | nocona | generic) + "" | k8 | opteron | athlon64 | athlon-fx | nocona | core2 | generic) # OK ;; *) Modified: stable/7/contrib/gcc/config/i386/driver-i386.c ============================================================================== --- stable/7/contrib/gcc/config/i386/driver-i386.c Mon May 2 06:59:09 2011 (r221316) +++ stable/7/contrib/gcc/config/i386/driver-i386.c Mon May 2 08:31:53 2011 (r221317) @@ -39,6 +39,7 @@ const char *host_detect_local_cpu (int a #define bit_SSE2 (1 << 26) #define bit_SSE3 (1 << 0) +#define bit_SSSE3 (1 << 9) #define bit_CMPXCHG16B (1 << 13) #define bit_3DNOW (1 << 31) @@ -66,7 +67,7 @@ const char *host_detect_local_cpu (int a unsigned int vendor; unsigned int ext_level; unsigned char has_mmx = 0, has_3dnow = 0, has_3dnowp = 0, has_sse = 0; - unsigned char has_sse2 = 0, has_sse3 = 0, has_cmov = 0; + unsigned char has_sse2 = 0, has_sse3 = 0, has_ssse3 = 0, has_cmov = 0; unsigned char has_longmode = 0, has_cmpxchg8b = 0; unsigned char is_amd = 0; unsigned int family = 0; @@ -107,6 +108,7 @@ const char *host_detect_local_cpu (int a has_sse = !!(edx & bit_SSE); has_sse2 = !!(edx & bit_SSE2); has_sse3 = !!(ecx & bit_SSE3); + has_ssse3 = !!(ecx & bit_SSSE3); /* We don't care for extended family. */ family = (eax >> 8) & ~(1 << 4); @@ -148,7 +150,9 @@ const char *host_detect_local_cpu (int a /* We have no idea. Use something reasonable. */ if (arch) { - if (has_sse3) + if (has_ssse3) + cpu = "core2"; + else if (has_sse3) { if (has_longmode) cpu = "nocona"; @@ -230,6 +234,9 @@ const char *host_detect_local_cpu (int a cpu = "generic"; } break; + case PROCESSOR_GEODE: + cpu = "geode"; + break; case PROCESSOR_K6: if (has_3dnow) cpu = "k6-3"; Copied: stable/7/contrib/gcc/config/i386/geode.md (from r219374, head/contrib/gcc/config/i386/geode.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/contrib/gcc/config/i386/geode.md Mon May 2 08:31:53 2011 (r221317, copy of r219374, head/contrib/gcc/config/i386/geode.md) @@ -0,0 +1,153 @@ +;; Geode Scheduling +;; Copyright (C) 2006 +;; Free Software Foundation, Inc. +;; +;; This file is part of GCC. +;; +;; GCC is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. +;; +;; GCC is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GCC; see the file COPYING. If not, write to +;; the Free Software Foundation, 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. +;; +;; The Geode architecture is one insn issue processor. +;; +;; This description is based on data from the following documents: +;; +;; "AMD Geode GX Processor Data Book" +;; Advanced Micro Devices, Inc., Aug 2005. +;; +;; "AMD Geode LX Processor Data Book" +;; Advanced Micro Devices, Inc., Jan 2006. +;; +;; +;; CPU execution units of the Geode: +;; +;; issue describes the issue pipeline. +;; alu describes the Integer unit +;; fpu describes the FP unit +;; +;; The fp unit is out of order execution unit with register renaming. +;; There is also memory management unit and execution pipeline for +;; load/store operations. We ignore it and difference between insns +;; using memory and registers. + +(define_automaton "geode") + +(define_cpu_unit "geode_issue,geode_alu,geode_fpu" "geode") + +(define_insn_reservation "alu" 1 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "alu,alu1,negnot,icmp,lea,test,imov,imovx,icmov,incdec,setcc")) + "geode_issue,geode_alu") + +(define_insn_reservation "shift" 2 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "ishift,ishift1,rotate,rotate1,cld")) + "geode_issue,geode_alu*2") + +(define_insn_reservation "imul" 7 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "imul")) + "geode_issue,geode_alu*7") + +(define_insn_reservation "idiv" 40 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "idiv")) + "geode_issue,geode_alu*40") + +;; The branch unit. +(define_insn_reservation "call" 2 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "call,callv")) + "geode_issue,geode_alu*2") + +(define_insn_reservation "geode_branch" 1 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "ibr")) + "geode_issue,geode_alu") + +(define_insn_reservation "geode_pop_push" 1 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "pop,push")) + "geode_issue,geode_alu") + +(define_insn_reservation "geode_leave" 2 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "leave")) + "geode_issue,geode_alu*2") + +(define_insn_reservation "geode_load_str" 4 + (and (eq_attr "cpu" "geode") + (and (eq_attr "type" "str") + (eq_attr "memory" "load,both"))) + "geode_issue,geode_alu*4") + +(define_insn_reservation "geode_store_str" 2 + (and (eq_attr "cpu" "geode") + (and (eq_attr "type" "str") + (eq_attr "memory" "store"))) + "geode_issue,geode_alu*2") + +;; Be optimistic +(define_insn_reservation "geode_unknown" 1 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "multi,other")) + "geode_issue,geode_alu") + +;; FPU + +(define_insn_reservation "geode_fop" 6 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "fop,fcmp")) + "geode_issue,geode_fpu*6") + +(define_insn_reservation "geode_fsimple" 1 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "fmov,fcmov,fsgn,fxch")) + "geode_issue,geode_fpu") + +(define_insn_reservation "geode_fist" 4 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "fistp,fisttp")) + "geode_issue,geode_fpu*4") + +(define_insn_reservation "geode_fmul" 10 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "fmul")) + "geode_issue,geode_fpu*10") + +(define_insn_reservation "geode_fdiv" 47 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "fdiv")) + "geode_issue,geode_fpu*47") + +;; We use minimal latency (fsin) here +(define_insn_reservation "geode_fpspc" 54 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "fpspc")) + "geode_issue,geode_fpu*54") + +(define_insn_reservation "geode_frndint" 12 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "frndint")) + "geode_issue,geode_fpu*12") + +(define_insn_reservation "geode_mmxmov" 1 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "mmxmov")) + "geode_issue,geode_fpu") + +(define_insn_reservation "geode_mmx" 2 + (and (eq_attr "cpu" "geode") + (eq_attr "type" "mmx,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft")) + "geode_issue,geode_fpu*2") Modified: stable/7/contrib/gcc/config/i386/i386.c ============================================================================== --- stable/7/contrib/gcc/config/i386/i386.c Mon May 2 06:59:09 2011 (r221316) +++ stable/7/contrib/gcc/config/i386/i386.c Mon May 2 08:31:53 2011 (r221317) @@ -336,6 +336,60 @@ struct processor_costs pentiumpro_cost = }; static const +struct processor_costs geode_cost = { + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (1), /* cost of a lea instruction */ + COSTS_N_INSNS (2), /* variable shift costs */ + COSTS_N_INSNS (1), /* constant shift costs */ + {COSTS_N_INSNS (3), /* cost of starting multiply for QI */ + COSTS_N_INSNS (4), /* HI */ + COSTS_N_INSNS (7), /* SI */ + COSTS_N_INSNS (7), /* DI */ + COSTS_N_INSNS (7)}, /* other */ + 0, /* cost of multiply per each bit set */ + {COSTS_N_INSNS (15), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (23), /* HI */ + COSTS_N_INSNS (39), /* SI */ + COSTS_N_INSNS (39), /* DI */ + COSTS_N_INSNS (39)}, /* other */ + COSTS_N_INSNS (1), /* cost of movsx */ + COSTS_N_INSNS (1), /* cost of movzx */ + 8, /* "large" insn */ + 4, /* MOVE_RATIO */ + 1, /* cost for loading QImode using movzbl */ + {1, 1, 1}, /* cost of loading integer registers + in QImode, HImode and SImode. + Relative to reg-reg move (2). */ + {1, 1, 1}, /* cost of storing integer registers */ + 1, /* cost of reg,reg fld/fst */ + {1, 1, 1}, /* cost of loading fp registers + in SFmode, DFmode and XFmode */ + {4, 6, 6}, /* cost of storing fp registers + in SFmode, DFmode and XFmode */ + + 1, /* cost of moving MMX register */ + {1, 1}, /* cost of loading MMX registers + in SImode and DImode */ + {1, 1}, /* cost of storing MMX registers + in SImode and DImode */ + 1, /* cost of moving SSE register */ + {1, 1, 1}, /* cost of loading SSE registers + in SImode, DImode and TImode */ + {1, 1, 1}, /* cost of storing SSE registers + in SImode, DImode and TImode */ + 1, /* MMX or SSE register to integer */ + 32, /* size of prefetch block */ + 1, /* number of parallel prefetches */ + 1, /* Branch cost */ + COSTS_N_INSNS (6), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (11), /* cost of FMUL instruction. */ + COSTS_N_INSNS (47), /* cost of FDIV instruction. */ + COSTS_N_INSNS (1), /* cost of FABS instruction. */ + COSTS_N_INSNS (1), /* cost of FCHS instruction. */ + COSTS_N_INSNS (54), /* cost of FSQRT instruction. */ +}; + +static const struct processor_costs k6_cost = { COSTS_N_INSNS (1), /* cost of an add instruction */ COSTS_N_INSNS (2), /* cost of a lea instruction */ @@ -600,6 +654,58 @@ struct processor_costs nocona_cost = { COSTS_N_INSNS (44), /* cost of FSQRT instruction. */ }; +static const +struct processor_costs core2_cost = { + COSTS_N_INSNS (1), /* cost of an add instruction */ + COSTS_N_INSNS (1) + 1, /* cost of a lea instruction */ + COSTS_N_INSNS (1), /* variable shift costs */ + COSTS_N_INSNS (1), /* constant shift costs */ + {COSTS_N_INSNS (3), /* cost of starting multiply for QI */ + COSTS_N_INSNS (3), /* HI */ + COSTS_N_INSNS (3), /* SI */ + COSTS_N_INSNS (3), /* DI */ + COSTS_N_INSNS (3)}, /* other */ + 0, /* cost of multiply per each bit set */ + {COSTS_N_INSNS (22), /* cost of a divide/mod for QI */ + COSTS_N_INSNS (22), /* HI */ + COSTS_N_INSNS (22), /* SI */ + COSTS_N_INSNS (22), /* DI */ + COSTS_N_INSNS (22)}, /* other */ + COSTS_N_INSNS (1), /* cost of movsx */ + COSTS_N_INSNS (1), /* cost of movzx */ + 8, /* "large" insn */ + 16, /* MOVE_RATIO */ + 2, /* cost for loading QImode using movzbl */ + {6, 6, 6}, /* cost of loading integer registers + in QImode, HImode and SImode. + Relative to reg-reg move (2). */ + {4, 4, 4}, /* cost of storing integer registers */ + 2, /* cost of reg,reg fld/fst */ + {6, 6, 6}, /* cost of loading fp registers + in SFmode, DFmode and XFmode */ + {4, 4, 4}, /* cost of loading integer registers */ + 2, /* cost of moving MMX register */ + {6, 6}, /* cost of loading MMX registers + in SImode and DImode */ + {4, 4}, /* cost of storing MMX registers + in SImode and DImode */ + 2, /* cost of moving SSE register */ + {6, 6, 6}, /* cost of loading SSE registers + in SImode, DImode and TImode */ + {4, 4, 4}, /* cost of storing SSE registers + in SImode, DImode and TImode */ + 2, /* MMX or SSE register to integer */ + 128, /* size of prefetch block */ + 8, /* number of parallel prefetches */ + 3, /* Branch cost */ + COSTS_N_INSNS (3), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (5), /* cost of FMUL instruction. */ + COSTS_N_INSNS (32), /* cost of FDIV instruction. */ + COSTS_N_INSNS (1), /* cost of FABS instruction. */ + COSTS_N_INSNS (1), /* cost of FCHS instruction. */ + COSTS_N_INSNS (58), /* cost of FSQRT instruction. */ +}; + /* Generic64 should produce code tuned for Nocona and K8. */ static const struct processor_costs generic64_cost = { @@ -721,38 +827,41 @@ const struct processor_costs *ix86_cost #define m_486 (1<mask, d->name, type, d->code); } + /* Add all builtins that are more or less simple operations on 1 operand. */ + for (i = 0, d = bdesc_1arg; i < ARRAY_SIZE (bdesc_1arg); i++, d++) + { + enum machine_mode mode; + tree type; + + if (d->name == 0) + continue; + mode = insn_data[d->icode].operand[1].mode; + + switch (mode) + { + case V16QImode: + type = v16qi_ftype_v16qi; + break; + case V8HImode: + type = v8hi_ftype_v8hi; + break; + case V4SImode: + type = v4si_ftype_v4si; + break; + case V2DFmode: + type = v2df_ftype_v2df; + break; + case V4SFmode: + type = v4sf_ftype_v4sf; + break; + case V8QImode: + type = v8qi_ftype_v8qi; + break; + case V4HImode: + type = v4hi_ftype_v4hi; + break; + case V2SImode: + type = v2si_ftype_v2si; + break; + + default: + abort (); + } + + def_builtin (d->mask, d->name, type, d->code); + } + /* Add the remaining MMX insns with somewhat more complicated types. */ def_builtin (MASK_MMX, "__builtin_ia32_emms", void_ftype_void, IX86_BUILTIN_EMMS); def_builtin (MASK_MMX, "__builtin_ia32_psllw", v4hi_ftype_v4hi_di, IX86_BUILTIN_PSLLW); @@ -15522,6 +15798,12 @@ ix86_init_mmx_sse_builtins (void) def_builtin (MASK_SSE3, "__builtin_ia32_lddqu", v16qi_ftype_pcchar, IX86_BUILTIN_LDDQU); + /* SSSE3. */ + def_builtin (MASK_SSSE3, "__builtin_ia32_palignr128", + v2di_ftype_v2di_v2di_int, IX86_BUILTIN_PALIGNR128); + def_builtin (MASK_SSSE3, "__builtin_ia32_palignr", di_ftype_di_di_int, + IX86_BUILTIN_PALIGNR); + /* Access to the vec_init patterns. */ ftype = build_function_type_list (V2SI_type_node, integer_type_node, integer_type_node, NULL_TREE); @@ -16020,7 +16302,7 @@ ix86_expand_builtin (tree exp, rtx targe tree arglist = TREE_OPERAND (exp, 1); tree arg0, arg1, arg2; rtx op0, op1, op2, pat; - enum machine_mode tmode, mode0, mode1, mode2; + enum machine_mode tmode, mode0, mode1, mode2, mode3; unsigned int fcode = DECL_FUNCTION_CODE (fndecl); switch (fcode) @@ -16490,6 +16772,52 @@ ix86_expand_builtin (tree exp, rtx targe return ix86_expand_unop_builtin (CODE_FOR_sse3_lddqu, arglist, target, 1); + case IX86_BUILTIN_PALIGNR: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 2 08:33:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87C321065670; Mon, 2 May 2011 08:33:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 787238FC15; Mon, 2 May 2011 08:33:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p428XK54028946; Mon, 2 May 2011 08:33:20 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p428XKvd028944; Mon, 2 May 2011 08:33:20 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201105020833.p428XKvd028944@svn.freebsd.org> From: Martin Matuska Date: Mon, 2 May 2011 08:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221318 - stable/7/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 08:33:20 -0000 Author: mm Date: Mon May 2 08:33:20 2011 New Revision: 221318 URL: http://svn.freebsd.org/changeset/base/221318 Log: Bump __FreeBSD_version for the gcc MFC (r221317) Modified: stable/7/sys/sys/param.h Modified: stable/7/sys/sys/param.h ============================================================================== --- stable/7/sys/sys/param.h Mon May 2 08:31:53 2011 (r221317) +++ stable/7/sys/sys/param.h Mon May 2 08:33:20 2011 (r221318) @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 704100 /* Master, propagated to newvers */ +#define __FreeBSD_version 704101 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Mon May 2 09:47:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8E31106564A; Mon, 2 May 2011 09:47:13 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 993278FC0C; Mon, 2 May 2011 09:47:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p429lD9W031081; Mon, 2 May 2011 09:47:13 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p429lDsj031079; Mon, 2 May 2011 09:47:13 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201105020947.p429lDsj031079@svn.freebsd.org> From: Maxim Konovalov Date: Mon, 2 May 2011 09:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221319 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 09:47:13 -0000 Author: maxim Date: Mon May 2 09:47:13 2011 New Revision: 221319 URL: http://svn.freebsd.org/changeset/base/221319 Log: o OpenBSD 4.9 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Mon May 2 08:33:20 2011 (r221318) +++ head/share/misc/bsd-family-tree Mon May 2 09:47:13 2011 (r221319) @@ -246,7 +246,7 @@ FreeBSD 5.2 | | | | | | | NetBSD 5.1 | | | FreeBSD FreeBSD | | | | | 8.2 7.4 | | | DragonFly 2.10.1 - | v | | | | + | v | | OpenBSD 4.9 | | | | | | FreeBSD 9 -current | NetBSD -current OpenBSD -current | | | | | | @@ -533,6 +533,7 @@ NetBSD 5.1 2010-11-19 [NBD] FreeBSD 7.4 2011-02-24 [FBD] FreeBSD 8.2 2011-02-24 [FBD] DragonFly 2.10.1 2011-04-26 [DFB] +OpenBSD 4.9 2011-05-01 [OBD] Bibliography ------------------------ From owner-svn-src-all@FreeBSD.ORG Mon May 2 10:35:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51B97106564A; Mon, 2 May 2011 10:35:28 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 274398FC0C; Mon, 2 May 2011 10:35:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42AZS3B034885; Mon, 2 May 2011 10:35:28 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42AZSfp034883; Mon, 2 May 2011 10:35:28 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201105021035.p42AZSfp034883@svn.freebsd.org> From: Bruce Cran Date: Mon, 2 May 2011 10:35:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221320 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 10:35:28 -0000 Author: brucec Date: Mon May 2 10:35:27 2011 New Revision: 221320 URL: http://svn.freebsd.org/changeset/base/221320 Log: Add -Wmissing-include-dirs to CWARNFLAGS, so tinderbox will punish those developers committing new code with broken include directories. Fix a few whitespace issues. Improve a couple of comments. -W is now deprecated and is referred to as -Wextra (see gcc(1)). Submitted by: arundel Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon May 2 09:47:13 2011 (r221319) +++ head/sys/conf/kern.mk Mon May 2 10:35:27 2011 (r221320) @@ -3,24 +3,25 @@ # # Warning flags for compiling the kernel and components of the kernel. # -# Note that the newly added -Wcast-qual is responsible for generating +# Note that the newly added -Wcast-qual is responsible for generating # most of the remaining warnings. Warnings introduced with -Wall will # also pop up, but are easier to fix. CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -Wundef -Wno-pointer-sign -fformat-extensions + -Wundef -Wno-pointer-sign -fformat-extensions \ + -Wmissing-include-dirs # # The following flags are next up for working on: -# -W +# -Wextra # -# On the i386, do not align the stack to 16-byte boundaries. Otherwise GCC -# 2.95 adds code to the entry and exit point of every function to align the +# On i386, do not align the stack to 16-byte boundaries. Otherwise GCC 2.95 +# and above adds code to the entry and exit point of every function to align the # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack -# per function call. While the 16-byte alignment may benefit micro benchmarks, +# per function call. While the 16-byte alignment may benefit micro benchmarks, # it is probably an overall loss as it makes the code bigger (less efficient # use of code cache tag lines) and uses more stack (less efficient use of data -# cache tag lines). Explicitly prohibit the use of SSE and other SIMD +# cache tag lines). Explicitly prohibit the use of FPU, SSE and other SIMD # operations inside the kernel itself. These operations are exclusively # reserved for user applications. # @@ -35,6 +36,7 @@ INLINE_LIMIT?= 8000 .if ${MACHINE_CPUARCH} == "arm" INLINE_LIMIT?= 8000 .endif + # # For IA-64, we use r13 for the kernel globals pointer and we only use # a very small subset of float registers for integer divides. @@ -98,7 +100,7 @@ INLINE_LIMIT?= 8000 CFLAGS+= -ffreestanding # -# GCC SSP support. +# GCC SSP support # .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" @@ -106,9 +108,8 @@ CFLAGS+= -fstack-protector .endif # -# Enable CTF conversation on request. +# Enable CTF conversation on request # .if defined(WITH_CTF) .undef NO_CTF .endif - From owner-svn-src-all@FreeBSD.ORG Mon May 2 10:42:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89D6B1065672; Mon, 2 May 2011 10:42:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79CF58FC08; Mon, 2 May 2011 10:42:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42AgJf4035110; Mon, 2 May 2011 10:42:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42AgJMQ035108; Mon, 2 May 2011 10:42:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105021042.p42AgJMQ035108@svn.freebsd.org> From: Adrian Chadd Date: Mon, 2 May 2011 10:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221321 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 10:42:19 -0000 Author: adrian Date: Mon May 2 10:42:19 2011 New Revision: 221321 URL: http://svn.freebsd.org/changeset/base/221321 Log: Add in the work-around for the AR8316 gige switch PHY. This allows the ethernet to function on the PB92 board. Submitted by: Luiz Otavio O Souza Modified: head/sys/mips/conf/PB92.hints Modified: head/sys/mips/conf/PB92.hints ============================================================================== --- head/sys/mips/conf/PB92.hints Mon May 2 10:35:27 2011 (r221320) +++ head/sys/mips/conf/PB92.hints Mon May 2 10:42:19 2011 (r221321) @@ -30,7 +30,11 @@ hint.arge.0.at="nexus0" hint.arge.0.maddr=0x19000000 hint.arge.0.msize=0x1000 hint.arge.0.irq=2 -hint.arge.0.phymask=0x1 + +# AR8316 workaround for now +hint.arge.0.media=1000 +hint.arge.0.fduplex=1 +hint.arge.0.phymask=0x3 # GPIO hint.gpio.0.at="apb0" From owner-svn-src-all@FreeBSD.ORG Mon May 2 10:43:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 12A931065670; Mon, 2 May 2011 10:43:44 +0000 (UTC) Date: Mon, 2 May 2011 10:43:44 +0000 From: Alexander Best To: Bruce Cran Message-ID: <20110502104344.GA85667@freebsd.org> References: <201105021035.p42AZSfp034883@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105021035.p42AZSfp034883@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221320 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 10:43:44 -0000 On Mon May 2 11, Bruce Cran wrote: > Author: brucec > Date: Mon May 2 10:35:27 2011 > New Revision: 221320 > URL: http://svn.freebsd.org/changeset/base/221320 > > Log: > Add -Wmissing-include-dirs to CWARNFLAGS, so tinderbox will punish those > developers committing new code with broken include directories. Bruce already committed r220712 in order to make the current tree work with -Wmissing-include-dirs. So hopefully tinderbox will not complain for any ARCH. Please also note that currently -Wmissing-include-dirs is a noop in clang. Once it gets implemented we will hopefully benefit from it via the vendor import. Thanks again Bruce for taking care! :) > Fix a few whitespace issues. > Improve a couple of comments. > -W is now deprecated and is referred to as -Wextra (see gcc(1)). > > Submitted by: arundel > > Modified: > head/sys/conf/kern.mk > > Modified: head/sys/conf/kern.mk > ============================================================================== > --- head/sys/conf/kern.mk Mon May 2 09:47:13 2011 (r221319) > +++ head/sys/conf/kern.mk Mon May 2 10:35:27 2011 (r221320) > @@ -3,24 +3,25 @@ > # > # Warning flags for compiling the kernel and components of the kernel. > # > -# Note that the newly added -Wcast-qual is responsible for generating > +# Note that the newly added -Wcast-qual is responsible for generating > # most of the remaining warnings. Warnings introduced with -Wall will > # also pop up, but are easier to fix. > CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ > - -Wundef -Wno-pointer-sign -fformat-extensions > + -Wundef -Wno-pointer-sign -fformat-extensions \ > + -Wmissing-include-dirs > # > # The following flags are next up for working on: > -# -W > +# -Wextra > > # > -# On the i386, do not align the stack to 16-byte boundaries. Otherwise GCC > -# 2.95 adds code to the entry and exit point of every function to align the > +# On i386, do not align the stack to 16-byte boundaries. Otherwise GCC 2.95 > +# and above adds code to the entry and exit point of every function to align the > # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack > -# per function call. While the 16-byte alignment may benefit micro benchmarks, > +# per function call. While the 16-byte alignment may benefit micro benchmarks, > # it is probably an overall loss as it makes the code bigger (less efficient > # use of code cache tag lines) and uses more stack (less efficient use of data > -# cache tag lines). Explicitly prohibit the use of SSE and other SIMD > +# cache tag lines). Explicitly prohibit the use of FPU, SSE and other SIMD > # operations inside the kernel itself. These operations are exclusively > # reserved for user applications. > # > @@ -35,6 +36,7 @@ INLINE_LIMIT?= 8000 > .if ${MACHINE_CPUARCH} == "arm" > INLINE_LIMIT?= 8000 > .endif > + > # > # For IA-64, we use r13 for the kernel globals pointer and we only use > # a very small subset of float registers for integer divides. > @@ -98,7 +100,7 @@ INLINE_LIMIT?= 8000 > CFLAGS+= -ffreestanding > > # > -# GCC SSP support. > +# GCC SSP support > # > .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ > ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" > @@ -106,9 +108,8 @@ CFLAGS+= -fstack-protector > .endif > > # > -# Enable CTF conversation on request. > +# Enable CTF conversation on request > # > .if defined(WITH_CTF) > .undef NO_CTF > .endif > - -- a13x From owner-svn-src-all@FreeBSD.ORG Mon May 2 11:08:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89CBE106566B; Mon, 2 May 2011 11:08:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 49D528FC29; Mon, 2 May 2011 11:08:20 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a950:cfe0:24ac:52fd] (unknown [IPv6:2001:7b8:3a7:0:a950:cfe0:24ac:52fd]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 812165C59; Mon, 2 May 2011 13:08:19 +0200 (CEST) Message-ID: <4DBE90A3.50102@FreeBSD.org> Date: Mon, 02 May 2011 13:08:19 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110415 Lanikai/3.1.11pre MIME-Version: 1.0 To: Jung-uk Kim References: <201104291820.p3TIKCv7009883@svn.freebsd.org> In-Reply-To: <201104291820.p3TIKCv7009883@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221214 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 11:08:20 -0000 On 2011-04-29 20:20, Jung-uk Kim wrote: ... > +static __inline void > +vmware_hvcall(u_int cmd, u_int *p) > +{ > + > + __asm __volatile("inl (%%dx)" > + : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) > + : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) > + : "memory"); > +} This upsets clang's integrated assembler, and I think it's right in this case: sys/x86/x86/tsc.c:103:19: error: invalid operand for instruction __asm __volatile("inl (%%dx)" ^ :1:6: note: instantiated into assembly here inl (%dx) ^ Can we please add an explicit %%eax as second argument here? E.g.: diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index 0b7510c..9638167 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -100,7 +100,7 @@ static __inline void vmware_hvcall(u_int cmd, u_int *p) { - __asm __volatile("inl (%%dx)" + __asm __volatile("inl (%%dx), %%eax" : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) : "memory"); From owner-svn-src-all@FreeBSD.ORG Mon May 2 13:58:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 706C4106566C; Mon, 2 May 2011 13:58:41 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 445618FC15; Mon, 2 May 2011 13:58:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42DwfWk040915; Mon, 2 May 2011 13:58:41 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42DwfHv040911; Mon, 2 May 2011 13:58:41 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201105021358.p42DwfHv040911@svn.freebsd.org> From: Jaakko Heinonen Date: Mon, 2 May 2011 13:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221323 - stable/8/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 13:58:41 -0000 Author: jh Date: Mon May 2 13:58:40 2011 New Revision: 221323 URL: http://svn.freebsd.org/changeset/base/221323 Log: MFC r216461: - Assert that dm_lock is exclusively held in devfs_rules_apply() and in devfs_vmkdir() while adding the entry to de_list of the parent. - Apply devfs rules to newly created directories and symbolic links. PR: kern/125034 Modified: stable/8/sys/fs/devfs/devfs_devs.c stable/8/sys/fs/devfs/devfs_rule.c stable/8/sys/fs/devfs/devfs_vnops.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/fs/devfs/devfs_devs.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_devs.c Mon May 2 13:56:47 2011 (r221322) +++ stable/8/sys/fs/devfs/devfs_devs.c Mon May 2 13:58:40 2011 (r221323) @@ -248,8 +248,10 @@ devfs_vmkdir(struct devfs_mount *dmp, ch de->de_dir = dd; } else { de->de_dir = dotdot; + sx_assert(&dmp->dm_lock, SX_XLOCKED); TAILQ_INSERT_TAIL(&dotdot->de_dlist, dd, de_list); dotdot->de_links++; + devfs_rules_apply(dmp, dd); } #ifdef MAC Modified: stable/8/sys/fs/devfs/devfs_rule.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_rule.c Mon May 2 13:56:47 2011 (r221322) +++ stable/8/sys/fs/devfs/devfs_rule.c Mon May 2 13:58:40 2011 (r221323) @@ -139,6 +139,8 @@ devfs_rules_apply(struct devfs_mount *dm { struct devfs_ruleset *ds; + sx_assert(&dm->dm_lock, SX_XLOCKED); + if (dm->dm_ruleset == 0) return; sx_slock(&sx_rules); Modified: stable/8/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_vnops.c Mon May 2 13:56:47 2011 (r221322) +++ stable/8/sys/fs/devfs/devfs_vnops.c Mon May 2 13:58:40 2011 (r221323) @@ -1493,6 +1493,7 @@ devfs_symlink(struct vop_symlink_args *a mac_devfs_create_symlink(ap->a_cnp->cn_cred, dmp->dm_mount, dd, de); #endif TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list); + devfs_rules_apply(dmp, de); return (devfs_allocv(de, ap->a_dvp->v_mount, LK_EXCLUSIVE, ap->a_vpp)); } From owner-svn-src-all@FreeBSD.ORG Mon May 2 14:13:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F38EB106564A; Mon, 2 May 2011 14:13:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E14778FC14; Mon, 2 May 2011 14:13:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42EDCjK041429; Mon, 2 May 2011 14:13:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42EDCpt041421; Mon, 2 May 2011 14:13:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105021413.p42EDCpt041421@svn.freebsd.org> From: John Baldwin Date: Mon, 2 May 2011 14:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221324 - in head/sys: amd64/pci dev/acpica dev/pci i386/pci x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 14:13:13 -0000 Author: jhb Date: Mon May 2 14:13:12 2011 New Revision: 221324 URL: http://svn.freebsd.org/changeset/base/221324 Log: Add implementations of BUS_ADJUST_RESOURCE() to the PCI bus driver, generic PCI-PCI bridge driver, x86 nexus driver, and x86 Host to PCI bridge drivers. Modified: head/sys/amd64/pci/pci_bus.c head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_pci.c head/sys/i386/pci/pci_bus.c head/sys/x86/x86/mptable_pci.c head/sys/x86/x86/nexus.c Modified: head/sys/amd64/pci/pci_bus.c ============================================================================== --- head/sys/amd64/pci/pci_bus.c Mon May 2 13:58:40 2011 (r221323) +++ head/sys/amd64/pci/pci_bus.c Mon May 2 14:13:12 2011 (r221324) @@ -348,6 +348,7 @@ static device_method_t legacy_pcib_metho DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Mon May 2 13:58:40 2011 (r221323) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Mon May 2 14:13:12 2011 (r221324) @@ -100,6 +100,7 @@ static device_method_t acpi_pcib_acpi_me DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar), DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, acpi_pcib_acpi_alloc_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Mon May 2 13:58:40 2011 (r221323) +++ head/sys/dev/pci/pci.c Mon May 2 14:13:12 2011 (r221324) @@ -142,6 +142,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_delete_resource, pci_delete_resource), DEVMETHOD(bus_alloc_resource, pci_alloc_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), DEVMETHOD(bus_activate_resource, pci_activate_resource), DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource), Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Mon May 2 13:58:40 2011 (r221323) +++ head/sys/dev/pci/pci_pci.c Mon May 2 14:13:12 2011 (r221324) @@ -73,6 +73,7 @@ static device_method_t pcib_methods[] = DEVMETHOD(bus_read_ivar, pcib_read_ivar), DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), Modified: head/sys/i386/pci/pci_bus.c ============================================================================== --- head/sys/i386/pci/pci_bus.c Mon May 2 13:58:40 2011 (r221323) +++ head/sys/i386/pci/pci_bus.c Mon May 2 14:13:12 2011 (r221324) @@ -565,6 +565,7 @@ static device_method_t legacy_pcib_metho DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), Modified: head/sys/x86/x86/mptable_pci.c ============================================================================== --- head/sys/x86/x86/mptable_pci.c Mon May 2 13:58:40 2011 (r221323) +++ head/sys/x86/x86/mptable_pci.c Mon May 2 14:13:12 2011 (r221324) @@ -116,6 +116,7 @@ static device_method_t mptable_hostb_met DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), Modified: head/sys/x86/x86/nexus.c ============================================================================== --- head/sys/x86/x86/nexus.c Mon May 2 13:58:40 2011 (r221323) +++ head/sys/x86/x86/nexus.c Mon May 2 14:13:12 2011 (r221324) @@ -100,6 +100,8 @@ static device_t nexus_add_child(device_t int unit); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); +static int nexus_adjust_resource(device_t, device_t, int, struct resource *, + u_long, u_long); #ifdef SMP static int nexus_bind_intr(device_t, device_t, struct resource *, int); #endif @@ -144,6 +146,7 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), + DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), @@ -332,6 +335,23 @@ nexus_add_child(device_t bus, u_int orde return(child); } +static struct rman * +nexus_rman(int type) +{ + switch (type) { + case SYS_RES_IRQ: + return (&irq_rman); + case SYS_RES_DRQ: + return (&drq_rman); + case SYS_RES_IOPORT: + return (&port_rman); + case SYS_RES_MEMORY: + return (&mem_rman); + default: + return (NULL); + } +} + /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. @@ -364,27 +384,9 @@ nexus_alloc_resource(device_t bus, devic } flags &= ~RF_ACTIVE; - - switch (type) { - case SYS_RES_IRQ: - rm = &irq_rman; - break; - - case SYS_RES_DRQ: - rm = &drq_rman; - break; - - case SYS_RES_IOPORT: - rm = &port_rman; - break; - - case SYS_RES_MEMORY: - rm = &mem_rman; - break; - - default: - return 0; - } + rm = nexus_rman(type); + if (rm == NULL) + return (NULL); rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == 0) @@ -402,6 +404,20 @@ nexus_alloc_resource(device_t bus, devic } static int +nexus_adjust_resource(device_t bus, device_t child, int type, + struct resource *r, u_long start, u_long end) +{ + struct rman *rm; + + rm = nexus_rman(type); + if (rm == NULL) + return (ENXIO); + if (!rman_is_region_manager(r, rm)) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); +} + +static int nexus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { From owner-svn-src-all@FreeBSD.ORG Mon May 2 14:34:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E61F1106566C; Mon, 2 May 2011 14:34:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEF498FC08; Mon, 2 May 2011 14:34:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42EY3Kc042192; Mon, 2 May 2011 14:34:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42EY3kA042190; Mon, 2 May 2011 14:34:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105021434.p42EY3kA042190@svn.freebsd.org> From: John Baldwin Date: Mon, 2 May 2011 14:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221326 - head/sys/dev/puc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 14:34:04 -0000 Author: jhb Date: Mon May 2 14:34:03 2011 New Revision: 221326 URL: http://svn.freebsd.org/changeset/base/221326 Log: Add an entry for the Kuroutoshikou SERIAL4P-LPPCI2 which uses an Oxford 4 port chip but with a nonstandard clock. PR: kern/104212 Submitted by: Shuichi KITAGUCHI kit of ysnb net MFC after: 1 week Modified: head/sys/dev/puc/pucdata.c Modified: head/sys/dev/puc/pucdata.c ============================================================================== --- head/sys/dev/puc/pucdata.c Mon May 2 14:23:36 2011 (r221325) +++ head/sys/dev/puc/pucdata.c Mon May 2 14:34:03 2011 (r221326) @@ -638,6 +638,12 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_4S, 0x10, 0, 8, }, + { 0x1415, 0x9501, 0x14db, 0x2150, + "Kuroutoshikou SERIAL4P-LPPCI2", + DEFAULT_RCLK * 10, + PUC_PORT_4S, 0x10, 0, 8, + }, + { 0x1415, 0x9501, 0xffff, 0, "Oxford Semiconductor OX16PCI954 UARTs", DEFAULT_RCLK, From owner-svn-src-all@FreeBSD.ORG Mon May 2 14:36:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F661106564A; Mon, 2 May 2011 14:36:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 45FDA8FC18; Mon, 2 May 2011 14:36:32 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D951946B2D; Mon, 2 May 2011 10:36:31 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6F5548A01B; Mon, 2 May 2011 10:36:31 -0400 (EDT) From: John Baldwin To: Bernhard Schmidt Date: Mon, 2 May 2011 08:39:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201105011905.p41J5sGs003976@svn.freebsd.org> In-Reply-To: <201105011905.p41J5sGs003976@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201105020839.57556.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 02 May 2011 10:36:31 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221301 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 14:36:32 -0000 On Sunday, May 01, 2011 3:05:54 pm Bernhard Schmidt wrote: > Author: bschmidt > Date: Sun May 1 19:05:54 2011 > New Revision: 221301 > URL: http://svn.freebsd.org/changeset/base/221301 > > Log: > These are of course i386/amd64 only. > > Modified: > head/sys/conf/NOTES Please put them in i386/conf/NOTES and amd64/conf/NOTES. All drivers should be in appropriate NOTES files. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon May 2 15:01:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF4C9106564A; Mon, 2 May 2011 15:01:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E51A8FC16; Mon, 2 May 2011 15:01:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42F1Shr042993; Mon, 2 May 2011 15:01:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42F1SFb042991; Mon, 2 May 2011 15:01:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105021501.p42F1SFb042991@svn.freebsd.org> From: John Baldwin Date: Mon, 2 May 2011 15:01:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221327 - head/sys/dev/cardbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 15:01:28 -0000 Author: jhb Date: Mon May 2 15:01:28 2011 New Revision: 221327 URL: http://svn.freebsd.org/changeset/base/221327 Log: Don't explicitly list pci_write_ivar() for bus_write_ivar, the method is already inherited from the PCI bus driver. Modified: head/sys/dev/cardbus/cardbus.c Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Mon May 2 14:34:03 2011 (r221326) +++ head/sys/dev/cardbus/cardbus.c Mon May 2 15:01:28 2011 (r221327) @@ -317,7 +317,6 @@ static device_method_t cardbus_methods[] /* Bus interface */ DEVMETHOD(bus_read_ivar, cardbus_read_ivar), - DEVMETHOD(bus_write_ivar, pci_write_ivar), DEVMETHOD(bus_driver_added, cardbus_driver_added), /* Card Interface */ From owner-svn-src-all@FreeBSD.ORG Mon May 2 15:53:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE044106564A; Mon, 2 May 2011 15:53:00 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC3DC8FC14; Mon, 2 May 2011 15:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42Fr01x044507; Mon, 2 May 2011 15:53:00 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42Fr0bX044503; Mon, 2 May 2011 15:53:00 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201105021553.p42Fr0bX044503@svn.freebsd.org> From: Michael Tuexen Date: Mon, 2 May 2011 15:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221328 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 15:53:00 -0000 Author: tuexen Date: Mon May 2 15:53:00 2011 New Revision: 221328 URL: http://svn.freebsd.org/changeset/base/221328 Log: Some more cleanups related to an kernel without INET. MFC after: 1 week Modified: head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon May 2 15:01:28 2011 (r221327) +++ head/sys/netinet/sctputil.c Mon May 2 15:53:00 2011 (r221328) @@ -2844,9 +2844,11 @@ sctp_notify_peer_addr_change(struct sctp spc->spc_flags = 0; spc->spc_length = sizeof(struct sctp_paddr_change); switch (sa->sa_family) { +#ifdef INET case AF_INET: memcpy(&spc->spc_aaddr, sa, sizeof(struct sockaddr_in)); break; +#endif #ifdef INET6 case AF_INET6: { @@ -4084,6 +4086,7 @@ sctp_cmpaddr(struct sockaddr *sa1, struc sin6_2)); } #endif +#ifdef INET case AF_INET: { /* IPv4 addresses */ @@ -4093,6 +4096,7 @@ sctp_cmpaddr(struct sockaddr *sa1, struc sin_2 = (struct sockaddr_in *)sa2; return (sin_1->sin_addr.s_addr == sin_2->sin_addr.s_addr); } +#endif default: /* we don't do these... */ return (0); @@ -4122,6 +4126,7 @@ sctp_print_address(struct sockaddr *sa) break; } #endif +#ifdef INET case AF_INET: { struct sockaddr_in *sin; @@ -4133,6 +4138,7 @@ sctp_print_address(struct sockaddr *sa) p[0], p[1], p[2], p[3], ntohs(sin->sin_port)); break; } +#endif default: SCTP_PRINTF("?\n"); break; @@ -4143,6 +4149,7 @@ void sctp_print_address_pkt(struct ip *iph, struct sctphdr *sh) { switch (iph->ip_v) { +#ifdef INET case IPVERSION: { struct sockaddr_in lsa, fsa; @@ -4163,6 +4170,7 @@ sctp_print_address_pkt(struct ip *iph, s sctp_print_address((struct sockaddr *)&fsa); break; } +#endif #ifdef INET6 case IPV6_VERSION >> 4: { @@ -4862,22 +4870,33 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *i uint32_t sctp_get_ifa_hash_val(struct sockaddr *addr) { - if (addr->sa_family == AF_INET) { - struct sockaddr_in *sin; + switch (addr->sa_family) { +#ifdef INET + case AF_INET: + { + struct sockaddr_in *sin; - sin = (struct sockaddr_in *)addr; - return (sin->sin_addr.s_addr ^ (sin->sin_addr.s_addr >> 16)); - } else if (addr->sa_family == AF_INET6) { - struct sockaddr_in6 *sin6; - uint32_t hash_of_addr; + sin = (struct sockaddr_in *)addr; + return (sin->sin_addr.s_addr ^ (sin->sin_addr.s_addr >> 16)); + } +#endif +#ifdef INET6 + case INET6: + { + struct sockaddr_in6 *sin6; + uint32_t hash_of_addr; - sin6 = (struct sockaddr_in6 *)addr; - hash_of_addr = (sin6->sin6_addr.s6_addr32[0] + - sin6->sin6_addr.s6_addr32[1] + - sin6->sin6_addr.s6_addr32[2] + - sin6->sin6_addr.s6_addr32[3]); - hash_of_addr = (hash_of_addr ^ (hash_of_addr >> 16)); - return (hash_of_addr); + sin6 = (struct sockaddr_in6 *)addr; + hash_of_addr = (sin6->sin6_addr.s6_addr32[0] + + sin6->sin6_addr.s6_addr32[1] + + sin6->sin6_addr.s6_addr32[2] + + sin6->sin6_addr.s6_addr32[3]); + hash_of_addr = (hash_of_addr ^ (hash_of_addr >> 16)); + return (hash_of_addr); + } +#endif + default: + break; } return (0); } @@ -6250,7 +6269,9 @@ sctp_connectx_helper_add(struct sctp_tcb inp = stcb->sctp_ep; *error = 0; for (i = 0; i < totaddr; i++) { - if (sa->sa_family == AF_INET) { + switch (sa->sa_family) { +#ifdef INET + case AF_INET: incr = sizeof(struct sockaddr_in); if (sctp_add_remote_addr(stcb, sa, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ @@ -6260,7 +6281,10 @@ sctp_connectx_helper_add(struct sctp_tcb goto out_now; } added++; - } else if (sa->sa_family == AF_INET6) { + break; +#endif +#ifdef INET6 + case AF_INET6: incr = sizeof(struct sockaddr_in6); if (sctp_add_remote_addr(stcb, sa, SCTP_DONOT_SETSCOPE, SCTP_ADDR_IS_CONFIRMED)) { /* assoc gone no un-lock */ @@ -6270,6 +6294,10 @@ sctp_connectx_helper_add(struct sctp_tcb goto out_now; } added++; + break; +#endif + default: + break; } sa = (struct sockaddr *)((caddr_t)sa + incr); } @@ -6288,10 +6316,13 @@ sctp_connectx_helper_find(struct sctp_in at = incr = 0; sa = addr; + *error = *num_v6 = *num_v4 = 0; /* account and validate addresses */ for (i = 0; i < (size_t)*totaddr; i++) { - if (sa->sa_family == AF_INET) { + switch (sa->sa_family) { +#ifdef INET + case AF_INET: (*num_v4) += 1; incr = sizeof(struct sockaddr_in); if (sa->sa_len != incr) { @@ -6300,30 +6331,40 @@ sctp_connectx_helper_find(struct sctp_in *bad_addr = 1; return (NULL); } - } else if (sa->sa_family == AF_INET6) { - struct sockaddr_in6 *sin6; - - sin6 = (struct sockaddr_in6 *)sa; - if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { - /* Must be non-mapped for connectx */ - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - *error = EINVAL; - *bad_addr = 1; - return (NULL); - } - (*num_v6) += 1; - incr = sizeof(struct sockaddr_in6); - if (sa->sa_len != incr) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); - *error = EINVAL; - *bad_addr = 1; - return (NULL); + break; +#endif +#ifdef INET6 + case AF_INET6: + { + struct sockaddr_in6 *sin6; + + sin6 = (struct sockaddr_in6 *)sa; + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { + /* Must be non-mapped for connectx */ + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); + *error = EINVAL; + *bad_addr = 1; + return (NULL); + } + (*num_v6) += 1; + incr = sizeof(struct sockaddr_in6); + if (sa->sa_len != incr) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); + *error = EINVAL; + *bad_addr = 1; + return (NULL); + } + break; } - } else { +#endif + default: *totaddr = i; /* we are done */ break; } + if (i == (size_t)*totaddr) { + break; + } SCTP_INP_INCR_REF(inp); stcb = sctp_findassociation_ep_addr(&inp, sa, NULL, NULL, NULL); if (stcb != NULL) { @@ -6364,7 +6405,7 @@ sctp_bindx_add_address(struct socket *so return; } addr_touse = sa; -#if defined(INET6) && !defined(__Userspace__) /* TODO port in6_sin6_2_sin */ +#ifdef INET6 if (sa->sa_family == AF_INET6) { struct sockaddr_in6 *sin6; @@ -6393,6 +6434,7 @@ sctp_bindx_add_address(struct socket *so } } #endif +#ifdef INET if (sa->sa_family == AF_INET) { if (sa->sa_len != sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); @@ -6407,6 +6449,7 @@ sctp_bindx_add_address(struct socket *so return; } } +#endif if (inp->sctp_flags & SCTP_PCB_FLAGS_UNBOUND) { if (p == NULL) { /* Can't get proc for Net/Open BSD */ @@ -6519,6 +6562,7 @@ sctp_bindx_delete_address(struct socket } } #endif +#ifdef INET if (sa->sa_family == AF_INET) { if (sa->sa_len != sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, EINVAL); @@ -6533,6 +6577,7 @@ sctp_bindx_delete_address(struct socket return; } } +#endif /* * No lock required mgmt_ep_sa does its own locking. If the FIX: * below is ever changed we may need to lock before calling @@ -6599,6 +6644,7 @@ sctp_local_addr_count(struct sctp_tcb *s if (sctp_is_addr_restricted(stcb, sctp_ifa)) continue; switch (sctp_ifa->address.sa.sa_family) { +#ifdef INET case AF_INET: if (ipv4_addr_legal) { struct sockaddr_in *sin; @@ -6621,6 +6667,7 @@ sctp_local_addr_count(struct sctp_tcb *s continue; } break; +#endif #ifdef INET6 case AF_INET6: if (ipv6_addr_legal) { @@ -6715,6 +6762,8 @@ sctp_log_trace(uint32_t subsys, const ch } #endif +/* XXX: Remove the #ifdef after tunneling over IPv6 works also on FreeBSD. */ +#ifdef INET /* We will need to add support * to bind the ports and such here * so we can do UDP tunneling. In @@ -6816,7 +6865,7 @@ out: m_freem(m); } -void +void sctp_over_udp_stop(void) { struct socket *sop; @@ -6833,7 +6882,8 @@ sctp_over_udp_stop(void) soclose(sop); SCTP_BASE_INFO(udp_tun_socket) = NULL; } -int + +int sctp_over_udp_start(void) { uint16_t port; @@ -6886,3 +6936,5 @@ exit_stage_left: */ return (0); } + +#endif Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Mon May 2 15:01:28 2011 (r221327) +++ head/sys/netinet/sctputil.h Mon May 2 15:53:00 2011 (r221328) @@ -313,10 +313,14 @@ do { \ } \ } while (0) -/* new functions to start/stop udp tunneling */ +/* functions to start/stop udp tunneling */ +/* XXX: Remove the #ifdef after tunneling over IPv6 works also on FreeBSD. */ +#ifdef INET void sctp_over_udp_stop(void); int sctp_over_udp_start(void); +#endif + int sctp_soreceive(struct socket *so, struct sockaddr **psa, struct uio *uio, From owner-svn-src-all@FreeBSD.ORG Mon May 2 16:51:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ABF5106566C; Mon, 2 May 2011 16:51:02 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A34C8FC34; Mon, 2 May 2011 16:51:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42Gp2US046255; Mon, 2 May 2011 16:51:02 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42Gp2m2046253; Mon, 2 May 2011 16:51:02 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201105021651.p42Gp2m2046253@svn.freebsd.org> From: Bernhard Schmidt Date: Mon, 2 May 2011 16:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221329 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 16:51:02 -0000 Author: bschmidt Date: Mon May 2 16:51:02 2011 New Revision: 221329 URL: http://svn.freebsd.org/changeset/base/221329 Log: All PCI based wireless drivers seem to be explicitly removed from the PAE kernel config, do that also for those added to GENERIC lately. Modified: head/sys/i386/conf/PAE Modified: head/sys/i386/conf/PAE ============================================================================== --- head/sys/i386/conf/PAE Mon May 2 15:53:00 2011 (r221328) +++ head/sys/i386/conf/PAE Mon May 2 16:51:02 2011 (r221329) @@ -77,5 +77,11 @@ nodevice ath # Atheros pci/cardbus NIC' nodevice ath_pci nodevice ath_hal nodevice ath_rate_sample # SampleRate tx rate control for ath +nodevice ipw +nodevice iwi +nodevice iwn +nodevice malo +nodevice mwl nodevice ral nodevice wi +nodevice wpi From owner-svn-src-all@FreeBSD.ORG Mon May 2 16:55:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5306A1065670; Mon, 2 May 2011 16:55:07 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 661A38FC14; Mon, 2 May 2011 16:55:05 +0000 (UTC) Received: by fxm11 with SMTP id 11so5473519fxm.13 for ; Mon, 02 May 2011 09:55:05 -0700 (PDT) Received: by 10.223.66.200 with SMTP id o8mr274462fai.38.1304355194649; Mon, 02 May 2011 09:53:14 -0700 (PDT) Received: from amy.lab.techwires.net (p54B4AA32.dip.t-dialin.net [84.180.170.50]) by mx.google.com with ESMTPS id 5sm741794faz.2.2011.05.02.09.53.12 (version=SSLv3 cipher=OTHER); Mon, 02 May 2011 09:53:13 -0700 (PDT) Sender: Bernhard Schmidt From: Bernhard Schmidt To: John Baldwin Date: Mon, 2 May 2011 18:53:22 +0200 User-Agent: KMail/1.13.7 (FreeBSD/8.2-STABLE; KDE/4.6.2; amd64; ; ) References: <201105011905.p41J5sGs003976@svn.freebsd.org> <201105020839.57556.jhb@freebsd.org> In-Reply-To: <201105020839.57556.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201105021853.23130.bschmidt@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221301 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 16:55:07 -0000 On Monday 02 May 2011 14:39:57 John Baldwin wrote: > On Sunday, May 01, 2011 3:05:54 pm Bernhard Schmidt wrote: > > Author: bschmidt > > Date: Sun May 1 19:05:54 2011 > > New Revision: 221301 > > URL: http://svn.freebsd.org/changeset/base/221301 > > > > Log: > > These are of course i386/amd64 only. > > > > Modified: > > head/sys/conf/NOTES > > Please put them in i386/conf/NOTES and amd64/conf/NOTES. All drivers should > be in appropriate NOTES files. They actually are. My fault was to not check those 2 files in the first place. Sorry the noise this has caused. -- Bernhard From owner-svn-src-all@FreeBSD.ORG Mon May 2 17:08:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99C55106564A; Mon, 2 May 2011 17:08:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 884F38FC08; Mon, 2 May 2011 17:08:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42H8aME046825; Mon, 2 May 2011 17:08:36 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42H8auB046822; Mon, 2 May 2011 17:08:36 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201105021708.p42H8auB046822@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 May 2011 17:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221331 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 17:08:36 -0000 Author: jkim Date: Mon May 2 17:08:36 2011 New Revision: 221331 URL: http://svn.freebsd.org/changeset/base/221331 Log: Fix build with clang. Please note there is an LLVM/Clang PR: http://llvm.org/bugs/show_bug.cgi?id=9379 Reported by: rpaulo, dim Modified: head/sys/x86/x86/tsc.c Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Mon May 2 17:04:09 2011 (r221330) +++ head/sys/x86/x86/tsc.c Mon May 2 17:08:36 2011 (r221331) @@ -100,7 +100,7 @@ static __inline void vmware_hvcall(u_int cmd, u_int *p) { - __asm __volatile("inl (%%dx)" + __asm __volatile("inl %w3, %0" : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) : "memory"); From owner-svn-src-all@FreeBSD.ORG Mon May 2 17:11:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 359721065670; Mon, 2 May 2011 17:11:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Dimitry Andric Date: Mon, 2 May 2011 13:11:21 -0400 User-Agent: KMail/1.6.2 References: <201104291820.p3TIKCv7009883@svn.freebsd.org> <4DBE90A3.50102@FreeBSD.org> In-Reply-To: <4DBE90A3.50102@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105021311.24782.jkim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221214 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 17:11:38 -0000 On Monday 02 May 2011 07:08 am, Dimitry Andric wrote: > On 2011-04-29 20:20, Jung-uk Kim wrote: > ... > > > +static __inline void > > +vmware_hvcall(u_int cmd, u_int *p) > > +{ > > + > > + __asm __volatile("inl (%%dx)" > > + : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) > > + : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" > > (VMW_HVPORT) + : "memory"); > > +} > > This upsets clang's integrated assembler, and I think it's right in > this case: > > sys/x86/x86/tsc.c:103:19: error: invalid operand for instruction > __asm __volatile("inl (%%dx)" > ^ > :1:6: note: instantiated into assembly here > inl (%dx) > ^ > > Can we please add an explicit %%eax as second argument here? E.g.: > > diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c > index 0b7510c..9638167 100644 > --- a/sys/x86/x86/tsc.c > +++ b/sys/x86/x86/tsc.c > @@ -100,7 +100,7 @@ static __inline void > vmware_hvcall(u_int cmd, u_int *p) > { > > - __asm __volatile("inl (%%dx)" > + __asm __volatile("inl (%%dx), %%eax" > > : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) > : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) > : "memory"); Fixed in r221331. Sorry for the breakage. Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Mon May 2 17:29:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D3AC106564A; Mon, 2 May 2011 17:29:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 61D508FC16; Mon, 2 May 2011 17:29:45 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 12AA546B23; Mon, 2 May 2011 13:29:45 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 96E0A8A01B; Mon, 2 May 2011 13:29:44 -0400 (EDT) From: John Baldwin To: Bernhard Schmidt Date: Mon, 2 May 2011 13:29:43 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201105011905.p41J5sGs003976@svn.freebsd.org> <201105020839.57556.jhb@freebsd.org> <201105021853.23130.bschmidt@freebsd.org> In-Reply-To: <201105021853.23130.bschmidt@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201105021329.44027.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 02 May 2011 13:29:44 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221301 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 17:29:45 -0000 On Monday, May 02, 2011 12:53:22 pm Bernhard Schmidt wrote: > On Monday 02 May 2011 14:39:57 John Baldwin wrote: > > On Sunday, May 01, 2011 3:05:54 pm Bernhard Schmidt wrote: > > > Author: bschmidt > > > Date: Sun May 1 19:05:54 2011 > > > New Revision: 221301 > > > URL: http://svn.freebsd.org/changeset/base/221301 > > > > > > Log: > > > These are of course i386/amd64 only. > > > > > > Modified: > > > head/sys/conf/NOTES > > > > Please put them in i386/conf/NOTES and amd64/conf/NOTES. All drivers should > > be in appropriate NOTES files. > > They actually are. My fault was to not check those 2 files in the > first place. > > Sorry the noise this has caused. Ah, whoops. :) There are many drivers missing from the NOTES files, so I just assumed they had been missing. :-P I wrote a python script to look for missing drivers and options, it's at src/tools/tools/notescheck/notescheck.py. I haven't had time to sit down and fix all the missing entries though. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon May 2 17:46:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACB711065672; Mon, 2 May 2011 17:46:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BE128FC16; Mon, 2 May 2011 17:46:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42Hkxs8048033; Mon, 2 May 2011 17:46:59 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42Hkxl3048031; Mon, 2 May 2011 17:46:59 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105021746.p42Hkxl3048031@svn.freebsd.org> From: Dimitry Andric Date: Mon, 2 May 2011 17:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221333 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 17:46:59 -0000 Author: dim Date: Mon May 2 17:46:59 2011 New Revision: 221333 URL: http://svn.freebsd.org/changeset/base/221333 Log: Remove usr/include/nfs/krpc.h and usr/include/nfs/nfsdiskless.h from ObsoleteFiles.inc, since these files have been reincarnated in the new NFS implementation. Reviewed by: rmacklem Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon May 2 17:13:40 2011 (r221332) +++ head/ObsoleteFiles.inc Mon May 2 17:46:59 2011 (r221333) @@ -4874,9 +4874,7 @@ OLD_FILES+=usr/include/netns/spidp.h OLD_FILES+=usr/include/netns/spp_debug.h OLD_FILES+=usr/include/netns/spp_timer.h OLD_FILES+=usr/include/netns/spp_var.h -OLD_FILES+=usr/include/nfs/krpc.h OLD_FILES+=usr/include/nfs/nfs.h -OLD_FILES+=usr/include/nfs/nfsdiskless.h OLD_FILES+=usr/include/nfs/nfsm_subs.h OLD_FILES+=usr/include/nfs/nfsmount.h OLD_FILES+=usr/include/nfs/nfsnode.h From owner-svn-src-all@FreeBSD.ORG Mon May 2 17:49:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19C1F106564A; Mon, 2 May 2011 17:49:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0863D8FC18; Mon, 2 May 2011 17:49:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42Hn5c7048134; Mon, 2 May 2011 17:49:05 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42Hn53t048132; Mon, 2 May 2011 17:49:05 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105021749.p42Hn53t048132@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 May 2011 17:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221334 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 17:49:06 -0000 Author: marcel Date: Mon May 2 17:49:05 2011 New Revision: 221334 URL: http://svn.freebsd.org/changeset/base/221334 Log: Don't use the whole region 5 for KVA, because the CPU may not implement all of the 61 bits available within the region for virtual addressing. Since there's no good way for us to map out the gap in the virtual address space, limit KVA to the architectural minimum implemented address bits. This still gives us 1 petabyte of KVA, so no worries. Modified: head/sys/ia64/include/vmparam.h Modified: head/sys/ia64/include/vmparam.h ============================================================================== --- head/sys/ia64/include/vmparam.h Mon May 2 17:46:59 2011 (r221333) +++ head/sys/ia64/include/vmparam.h Mon May 2 17:49:05 2011 (r221334) @@ -182,7 +182,8 @@ #define VM_MIN_ADDRESS 0 #define VM_MAXUSER_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION) #define VM_MIN_KERNEL_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1) -#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(IA64_VM_MINKERN_REGION + 2) - 1) +#define VM_MAX_KERNEL_ADDRESS \ + (VM_MIN_KERNEL_ADDRESS + IA64_REGION_GAP_START - 1) #define VM_MAX_ADDRESS ~0UL #define KERNBASE VM_MAXUSER_ADDRESS From owner-svn-src-all@FreeBSD.ORG Mon May 2 18:41:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DE1B106564A; Mon, 2 May 2011 18:41:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D1FE8FC12; Mon, 2 May 2011 18:41:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42IfsLE049725; Mon, 2 May 2011 18:41:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42Ifs08049723; Mon, 2 May 2011 18:41:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105021841.p42Ifs08049723@svn.freebsd.org> From: Xin LI Date: Mon, 2 May 2011 18:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221335 - head/sys/dev/coretemp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 18:41:54 -0000 Author: delphij Date: Mon May 2 18:41:54 2011 New Revision: 221335 URL: http://svn.freebsd.org/changeset/base/221335 Log: Correct a typo. According to Intel document 318914, the Tj(max) for Core 2 Duo Mobile CPUs should be 105. Noticed by: Mark Johnston MFC after: 3 days Modified: head/sys/dev/coretemp/coretemp.c Modified: head/sys/dev/coretemp/coretemp.c ============================================================================== --- head/sys/dev/coretemp/coretemp.c Mon May 2 17:49:05 2011 (r221334) +++ head/sys/dev/coretemp/coretemp.c Mon May 2 18:41:54 2011 (r221335) @@ -192,7 +192,7 @@ coretemp_attach(device_t dev) } else if (cpu_model == 0x17) { switch (cpu_stepping) { case 0x6: /* Mobile Core 2 Duo */ - sc->sc_tjmax = 104; + sc->sc_tjmax = 105; break; default: /* Unknown stepping */ break; From owner-svn-src-all@FreeBSD.ORG Mon May 2 19:02:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6F3E106566C; Mon, 2 May 2011 19:02:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A68078FC1C; Mon, 2 May 2011 19:02:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42J2U06050384; Mon, 2 May 2011 19:02:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42J2UVd050382; Mon, 2 May 2011 19:02:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105021902.p42J2UVd050382@svn.freebsd.org> From: John Baldwin Date: Mon, 2 May 2011 19:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221336 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 19:02:30 -0000 Author: jhb Date: Mon May 2 19:02:30 2011 New Revision: 221336 URL: http://svn.freebsd.org/changeset/base/221336 Log: The ACPI Host-PCI bridge driver actually supports multiple domains via the optional _SEG function. Return that value (ap->segment) rather than 0 for the pcib domain ivar. Modified: head/sys/dev/acpica/acpi_pcib_acpi.c Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Mon May 2 18:41:54 2011 (r221335) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Mon May 2 19:02:30 2011 (r221336) @@ -268,7 +268,7 @@ acpi_pcib_read_ivar(device_t dev, device switch (which) { case PCIB_IVAR_DOMAIN: - *result = 0; + *result = sc->ap_segment; return (0); case PCIB_IVAR_BUS: *result = sc->ap_bus; From owner-svn-src-all@FreeBSD.ORG Mon May 2 19:16:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 567911065677; Mon, 2 May 2011 19:16:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 7B19D150407; Mon, 2 May 2011 19:16:02 +0000 (UTC) Message-ID: <4DBF02F1.7050407@FreeBSD.org> Date: Mon, 02 May 2011 12:16:01 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Bruce Cran References: <201105021035.p42AZSfp034883@svn.freebsd.org> In-Reply-To: <201105021035.p42AZSfp034883@svn.freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221320 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 19:16:05 -0000 On 05/02/2011 03:35, Bruce Cran wrote: > Fix a few whitespace issues. Please do not mix whitespace changes with substantive changes, in any file. The same reasons this is annoying apply whether it is source code or not. I realize that it is a tiny bit of extra work for the person doing the change, but it makes reviewing the diffs MUCH easier, both now, and more importantly years from now. Thanks, Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon May 2 19:34:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDF1C1065675; Mon, 2 May 2011 19:34:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 743708FC18; Mon, 2 May 2011 19:34:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42JYkQC051387; Mon, 2 May 2011 19:34:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42JYkMN051371; Mon, 2 May 2011 19:34:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105021934.p42JYkMN051371@svn.freebsd.org> From: Dimitry Andric Date: Mon, 2 May 2011 19:34:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221337 - in vendor/llvm/dist: . autoconf autoconf/m4 cmake cmake/modules docs docs/CommandGuide docs/HistoricalNotes docs/tutorial examples/BrainF examples/ExceptionDemo examples/Kalei... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 19:34:46 -0000 Author: dim Date: Mon May 2 19:34:44 2011 New Revision: 221337 URL: http://svn.freebsd.org/changeset/base/221337 Log: Vendor import of llvm trunk r130700: http://llvm.org/svn/llvm-project/llvm/trunk@130700 Added: vendor/llvm/dist/cmake/modules/LLVM-Config.cmake (contents, props changed) vendor/llvm/dist/cmake/modules/LLVMConfig.cmake.in vendor/llvm/dist/cmake/modules/LLVMConfigVersion.cmake.in vendor/llvm/dist/include/llvm-c/Disassembler.h vendor/llvm/dist/include/llvm-c/Object.h vendor/llvm/dist/include/llvm/DebugInfoProbe.h vendor/llvm/dist/include/llvm/ExecutionEngine/RuntimeDyld.h vendor/llvm/dist/include/llvm/IntrinsicsPTX.td vendor/llvm/dist/lib/CodeGen/AsmPrinter/ARMException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h vendor/llvm/dist/lib/CodeGen/InterferenceCache.cpp vendor/llvm/dist/lib/CodeGen/InterferenceCache.h vendor/llvm/dist/lib/ExecutionEngine/MCJIT/Intercept.cpp vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/ vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Makefile vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp vendor/llvm/dist/lib/MC/ELFObjectWriter.h vendor/llvm/dist/lib/MC/MCDisassembler/Disassembler.cpp vendor/llvm/dist/lib/MC/MCDisassembler/Disassembler.h vendor/llvm/dist/lib/MC/MCELF.cpp vendor/llvm/dist/lib/MC/MCELF.h vendor/llvm/dist/lib/MC/MCELFStreamer.h vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/Object.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeSchedule3.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeSchedule5.td vendor/llvm/dist/lib/Target/Mips/MipsExpandPseudo.cpp vendor/llvm/dist/lib/Target/PTX/PTXIntrinsicInstrInfo.td vendor/llvm/dist/lib/Transforms/Instrumentation/GCOVProfiling.cpp vendor/llvm/dist/lib/VMCore/DebugInfoProbe.cpp vendor/llvm/dist/runtime/CMakeLists.txt vendor/llvm/dist/runtime/libprofile/CMakeLists.txt vendor/llvm/dist/runtime/libprofile/GCDAProfiling.c vendor/llvm/dist/test/Analysis/BasicAA/intrinsics.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2011-03-09-ExactNoMaxBECount.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/2011-04-26-FoldAddRec.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll vendor/llvm/dist/test/CodeGen/ARM/2011-03-10-DAGCombineCrash.ll vendor/llvm/dist/test/CodeGen/ARM/2011-03-15-LdStMultipleBug.ll vendor/llvm/dist/test/CodeGen/ARM/2011-03-23-PeepholeBug.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-07-schediv.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-11-MachineLICMBug.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-12-AlignBug.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-12-FastRegAlloc.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-15-AndVFlagPeepholeBug.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-15-RegisterCmpPeephole.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-26-SchedTweak.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-27-IfCvtBug.ll vendor/llvm/dist/test/CodeGen/ARM/avoid-cpsr-rmw.ll vendor/llvm/dist/test/CodeGen/ARM/crash-greedy.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-d16-reg.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-qreg.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-s16-reg.ll vendor/llvm/dist/test/CodeGen/ARM/divmod.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-pred.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-redefinition.ll vendor/llvm/dist/test/CodeGen/ARM/fp-arg-shuffle.ll vendor/llvm/dist/test/CodeGen/ARM/int-to-fp.ll vendor/llvm/dist/test/CodeGen/ARM/neon_shift.ll vendor/llvm/dist/test/CodeGen/ARM/peephole-bitcast.ll vendor/llvm/dist/test/CodeGen/ARM/shuffle.ll vendor/llvm/dist/test/CodeGen/ARM/undef-sext.ll vendor/llvm/dist/test/CodeGen/ARM/vbsl-constant.ll vendor/llvm/dist/test/CodeGen/Mips/addc.ll vendor/llvm/dist/test/CodeGen/Mips/analyzebranch.ll vendor/llvm/dist/test/CodeGen/Mips/blockaddr.ll vendor/llvm/dist/test/CodeGen/Mips/buildpairextractelementf64.ll vendor/llvm/dist/test/CodeGen/Mips/divrem.ll vendor/llvm/dist/test/CodeGen/Mips/fpbr.ll vendor/llvm/dist/test/CodeGen/Mips/fpcmp.ll vendor/llvm/dist/test/CodeGen/Mips/internalfunc.ll vendor/llvm/dist/test/CodeGen/Mips/largeimm1.ll vendor/llvm/dist/test/CodeGen/Mips/o32_cc_vararg.ll vendor/llvm/dist/test/CodeGen/Mips/select.ll vendor/llvm/dist/test/CodeGen/PTX/bitwise.ll vendor/llvm/dist/test/CodeGen/PTX/bra.ll vendor/llvm/dist/test/CodeGen/PTX/fdiv-sm10.ll vendor/llvm/dist/test/CodeGen/PTX/fdiv-sm13.ll vendor/llvm/dist/test/CodeGen/PTX/intrinsic.ll vendor/llvm/dist/test/CodeGen/PTX/llvm-intrinsic.ll vendor/llvm/dist/test/CodeGen/PTX/mad.ll vendor/llvm/dist/test/CodeGen/PTX/mul.ll vendor/llvm/dist/test/CodeGen/PTX/parameter-order.ll vendor/llvm/dist/test/CodeGen/PTX/setp.ll vendor/llvm/dist/test/CodeGen/Thumb/rev.ll vendor/llvm/dist/test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll vendor/llvm/dist/test/CodeGen/X86/2011-02-27-Fpextend.ll vendor/llvm/dist/test/CodeGen/X86/2011-03-02-DAGCombiner.ll vendor/llvm/dist/test/CodeGen/X86/2011-03-08-Sched-crash.ll vendor/llvm/dist/test/CodeGen/X86/2011-03-09-Physreg-Coalescing.ll vendor/llvm/dist/test/CodeGen/X86/2011-03-30-CreateFixedObjCrash.ll vendor/llvm/dist/test/CodeGen/X86/2011-04-13-SchedCmpJmp.ll vendor/llvm/dist/test/CodeGen/X86/3dnow-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/SIMD/ vendor/llvm/dist/test/CodeGen/X86/SIMD/dg.exp vendor/llvm/dist/test/CodeGen/X86/SIMD/notvunpcklpd.ll vendor/llvm/dist/test/CodeGen/X86/SIMD/notvunpcklps.ll vendor/llvm/dist/test/CodeGen/X86/SIMD/vunpcklpd.ll vendor/llvm/dist/test/CodeGen/X86/SIMD/vunpcklps.ll vendor/llvm/dist/test/CodeGen/X86/adde-carry.ll vendor/llvm/dist/test/CodeGen/X86/bool-zext.ll vendor/llvm/dist/test/CodeGen/X86/dbg-declare-arg.ll vendor/llvm/dist/test/CodeGen/X86/dbg-file-name.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-x86-64.ll vendor/llvm/dist/test/CodeGen/X86/fold-zext-trunc.ll vendor/llvm/dist/test/CodeGen/X86/fp-trunc.ll vendor/llvm/dist/test/CodeGen/X86/lsr-quadratic-expand.ll vendor/llvm/dist/test/CodeGen/X86/lsr-redundant-addressing.ll vendor/llvm/dist/test/CodeGen/X86/narrow-shl-cst.ll vendor/llvm/dist/test/CodeGen/X86/no-cfi.ll vendor/llvm/dist/test/CodeGen/X86/phi-bit-propagation.ll vendor/llvm/dist/test/CodeGen/X86/pr9743.ll vendor/llvm/dist/test/CodeGen/X86/shrink-compare.ll vendor/llvm/dist/test/CodeGen/X86/tailcall-returndup-void.ll vendor/llvm/dist/test/CodeGen/X86/unreachable-stack-protector.ll vendor/llvm/dist/test/CodeGen/X86/vec_uint_to_fp.ll vendor/llvm/dist/test/CodeGen/X86/win64_alloca_dynalloca.ll vendor/llvm/dist/test/CodeGen/XCore/ps-intrinsics.ll vendor/llvm/dist/test/CodeGen/XCore/scavenging.ll vendor/llvm/dist/test/CodeGen/XCore/sr-intrinsics.ll vendor/llvm/dist/test/CodeGen/XCore/threads.ll vendor/llvm/dist/test/DebugInfo/array.ll vendor/llvm/dist/test/FrontendC/2011-03-02-UnionInitializer.c vendor/llvm/dist/test/FrontendC/2011-03-08-ZeroFieldUnionInitializer.c vendor/llvm/dist/test/FrontendC/2011-03-31-ArrayRefFolding.c vendor/llvm/dist/test/FrontendC/mmx-inline-asm.c vendor/llvm/dist/test/FrontendC/vla-3.c vendor/llvm/dist/test/FrontendObjC/2011-03-02-ConstCFStringLiteralAlign.m vendor/llvm/dist/test/FrontendObjC/2011-03-08-IVarLookup.m vendor/llvm/dist/test/MC/ARM/arm_addrmode2.s vendor/llvm/dist/test/MC/ARM/arm_addrmode3.s vendor/llvm/dist/test/MC/AsmParser/dot-symbol.s vendor/llvm/dist/test/MC/COFF/diff.s vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-BFI-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-Bcc-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-CPS2p-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-CPS3p-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-DMB-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-DSB-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-LDC-form-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-LDRB_POST-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-LDRD_PRE-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-LDRT-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-LDR_POST-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-LDR_PRE-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-LDRrs-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-LSL-regform.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-MCR-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-MOVTi16-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-MOVr-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-MOVs-LSL-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-MOVs-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-MSRi-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-RFEorLDMIA-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-RSC-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-SBFX-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-SMLAD-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-SRS-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-SSAT-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-STMIA_UPD-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-STRBrs-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-SXTB-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-UMAAL-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-UQADD8-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-VLD1DUPq8_UPD-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-VLD3DUPd32_UPD-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-VLDMSDB_UPD-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-VQADD-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-VST2b32_UPD-arm.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2Bcc-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2LDRBT-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2LDREXD-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2LDRSHi12-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2LDRSHi8-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2STRD_PRE-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2STREXB-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2STREXD-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-t2STR_POST-thumb.txt vendor/llvm/dist/test/MC/Disassembler/ARM/thumb-printf.txt vendor/llvm/dist/test/MC/ELF/cfi-adjust-cfa-offset.s vendor/llvm/dist/test/MC/ELF/cfi-rel-offset.s vendor/llvm/dist/test/MC/ELF/cfi-rel-offset2.s vendor/llvm/dist/test/MC/ELF/cfi-same-value.s vendor/llvm/dist/test/MC/ELF/section-quoting.s vendor/llvm/dist/test/MC/ELF/weak-relocation.s vendor/llvm/dist/test/MC/MachO/section-attributes.s vendor/llvm/dist/test/MC/MachO/temp-labels.s vendor/llvm/dist/test/MC/MachO/variable-errors.s vendor/llvm/dist/test/MC/MachO/variable-exprs.s vendor/llvm/dist/test/MC/X86/padlock.s vendor/llvm/dist/test/Transforms/DeadStoreElimination/2011-03-25-DSEMiscompile.ll vendor/llvm/dist/test/Transforms/GlobalOpt/2011-04-09-EmptyGlobalCtors.ll vendor/llvm/dist/test/Transforms/GlobalOpt/cxx-dtor.ll vendor/llvm/dist/test/Transforms/InstCombine/2011-03-08-SRemMinusOneBadOpt.ll vendor/llvm/dist/test/Transforms/InstCombine/ExtractCast.ll vendor/llvm/dist/test/Transforms/InstCombine/debuginfo.ll vendor/llvm/dist/test/Transforms/InstCombine/fcmp.ll vendor/llvm/dist/test/Transforms/InstCombine/fdiv.ll vendor/llvm/dist/test/Transforms/InstCombine/gep-addrspace.ll vendor/llvm/dist/test/Transforms/InstCombine/merge-icmp.ll vendor/llvm/dist/test/Transforms/InstCombine/sign-test-and-or.ll vendor/llvm/dist/test/Transforms/InstCombine/strcpy_chk-64.ll vendor/llvm/dist/test/Transforms/InstSimplify/rem.ll vendor/llvm/dist/test/Transforms/Internalize/available_externally.ll vendor/llvm/dist/test/Transforms/JumpThreading/2011-04-02-SimplifyDeadBlock.ll vendor/llvm/dist/test/Transforms/JumpThreading/2011-04-14-InfLoop.ll vendor/llvm/dist/test/Transforms/JumpThreading/pr9331.ll vendor/llvm/dist/test/Transforms/LCSSA/unused-phis.ll vendor/llvm/dist/test/Transforms/LICM/2011-04-06-HoistMissedASTUpdate.ll vendor/llvm/dist/test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll vendor/llvm/dist/test/Transforms/LICM/2011-04-09-RAUW-AST.ll vendor/llvm/dist/test/Transforms/LICM/debug-value.ll vendor/llvm/dist/test/Transforms/LoopIdiom/debug-line.ll vendor/llvm/dist/test/Transforms/PhaseOrdering/ vendor/llvm/dist/test/Transforms/PhaseOrdering/basic.ll vendor/llvm/dist/test/Transforms/Reassociate/secondary.ll vendor/llvm/dist/test/Transforms/ScalarRepl/inline-vector.ll vendor/llvm/dist/test/Transforms/ScalarRepl/only-memcpy-uses.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/2011-03-08-UnreachableUse.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/PhiEliminate3.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/branch-fold-dbg.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/switch-on-const-select.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/trap-debugloc.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/debug-line.ll vendor/llvm/dist/test/Transforms/SimplifyLibCalls/iprintf.ll vendor/llvm/dist/tools/gold/CMakeLists.txt vendor/llvm/dist/tools/llvm-diff/DiffConsumer.cpp vendor/llvm/dist/tools/llvm-diff/DiffConsumer.h vendor/llvm/dist/tools/llvm-diff/DiffLog.cpp vendor/llvm/dist/tools/llvm-diff/DiffLog.h vendor/llvm/dist/tools/llvm-rtdyld/ vendor/llvm/dist/tools/llvm-rtdyld/CMakeLists.txt vendor/llvm/dist/tools/llvm-rtdyld/Makefile vendor/llvm/dist/tools/llvm-rtdyld/llvm-rtdyld.cpp vendor/llvm/dist/tools/lto/CMakeLists.txt vendor/llvm/dist/utils/release/findRegressions.py (contents, props changed) vendor/llvm/dist/utils/show-diagnostics (contents, props changed) Deleted: vendor/llvm/dist/cmake/modules/LLVM.cmake vendor/llvm/dist/cmake/modules/LLVMConfig.cmake vendor/llvm/dist/include/llvm/Analysis/LiveValues.h vendor/llvm/dist/lib/Analysis/LiveValues.cpp vendor/llvm/dist/lib/Transforms/IPO/StructRetPromotion.cpp vendor/llvm/dist/lib/Transforms/Scalar/GEPSplitter.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp vendor/llvm/dist/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll vendor/llvm/dist/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll vendor/llvm/dist/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll vendor/llvm/dist/test/CodeGen/ARM/2010-12-13-reloc-pic.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-01-15-local-alloc-spill-physical.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ror2.ll vendor/llvm/dist/test/CodeGen/X86/2008-08-05-SpillerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-03-11-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-shift-imm.ll vendor/llvm/dist/test/CodeGen/X86/mcinst-lowering-cmp0.ll vendor/llvm/dist/test/CodeGen/X86/phi-constants.ll vendor/llvm/dist/test/CodeGen/X86/umulo-64.ll vendor/llvm/dist/test/FrontendC++/2009-07-15-LineNumbers.cpp vendor/llvm/dist/test/FrontendC/cstring-align.c vendor/llvm/dist/test/Transforms/GVN/invariant-simple.ll vendor/llvm/dist/test/Transforms/SRETPromotion/ vendor/llvm/dist/test/Transforms/SimplifyLibCalls/half-powr.ll vendor/llvm/dist/utils/CollectDebugInfoUsingLLDB.py vendor/llvm/dist/utils/CompareDebugInfo.py Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/Makefile vendor/llvm/dist/Makefile.rules vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/autoconf/m4/libtool.m4 vendor/llvm/dist/autoconf/m4/ltdl.m4 vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/cmake/modules/CMakeLists.txt vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/AliasAnalysis.html vendor/llvm/dist/docs/BitCodeFormat.html vendor/llvm/dist/docs/Bugpoint.html vendor/llvm/dist/docs/CFEBuildInstrs.html vendor/llvm/dist/docs/CMake.html vendor/llvm/dist/docs/CodeGenerator.html vendor/llvm/dist/docs/CodingStandards.html vendor/llvm/dist/docs/CommandGuide/FileCheck.pod vendor/llvm/dist/docs/CommandGuide/bugpoint.pod vendor/llvm/dist/docs/CommandGuide/index.html vendor/llvm/dist/docs/CommandGuide/lit.pod vendor/llvm/dist/docs/CommandGuide/llc.pod vendor/llvm/dist/docs/CommandGuide/lli.pod vendor/llvm/dist/docs/CommandGuide/llvm-ar.pod vendor/llvm/dist/docs/CommandGuide/llvm-as.pod vendor/llvm/dist/docs/CommandGuide/llvm-bcanalyzer.pod vendor/llvm/dist/docs/CommandGuide/llvm-config.pod vendor/llvm/dist/docs/CommandGuide/llvm-diff.pod vendor/llvm/dist/docs/CommandGuide/llvm-dis.pod vendor/llvm/dist/docs/CommandGuide/llvm-extract.pod vendor/llvm/dist/docs/CommandGuide/llvm-ld.pod vendor/llvm/dist/docs/CommandGuide/llvm-link.pod vendor/llvm/dist/docs/CommandGuide/llvm-nm.pod vendor/llvm/dist/docs/CommandGuide/llvm-prof.pod vendor/llvm/dist/docs/CommandGuide/llvm-ranlib.pod vendor/llvm/dist/docs/CommandGuide/llvmc.pod vendor/llvm/dist/docs/CommandGuide/llvmgcc.pod vendor/llvm/dist/docs/CommandGuide/llvmgxx.pod vendor/llvm/dist/docs/CommandGuide/opt.pod vendor/llvm/dist/docs/CommandGuide/tblgen.pod vendor/llvm/dist/docs/CommandLine.html vendor/llvm/dist/docs/CompilerDriver.html vendor/llvm/dist/docs/CompilerDriverTutorial.html vendor/llvm/dist/docs/CompilerWriterInfo.html vendor/llvm/dist/docs/DebuggingJITedCode.html vendor/llvm/dist/docs/DeveloperPolicy.html vendor/llvm/dist/docs/ExceptionHandling.html vendor/llvm/dist/docs/ExtendingLLVM.html vendor/llvm/dist/docs/FAQ.html vendor/llvm/dist/docs/GCCFEBuildInstrs.html vendor/llvm/dist/docs/GarbageCollection.html vendor/llvm/dist/docs/GetElementPtr.html vendor/llvm/dist/docs/GettingStarted.html vendor/llvm/dist/docs/GettingStartedVS.html vendor/llvm/dist/docs/GoldPlugin.html vendor/llvm/dist/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt vendor/llvm/dist/docs/HistoricalNotes/2000-12-06-MeetingSummary.txt vendor/llvm/dist/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp4.txt vendor/llvm/dist/docs/HistoricalNotes/2001-02-09-AdveCommentsResponse.txt vendor/llvm/dist/docs/HistoricalNotes/2001-06-01-GCCOptimizations2.txt vendor/llvm/dist/docs/HistoricalNotes/2002-05-12-InstListChange.txt vendor/llvm/dist/docs/HowToReleaseLLVM.html vendor/llvm/dist/docs/HowToSubmitABug.html vendor/llvm/dist/docs/LangRef.html vendor/llvm/dist/docs/Lexicon.html vendor/llvm/dist/docs/LinkTimeOptimization.html vendor/llvm/dist/docs/MakefileGuide.html vendor/llvm/dist/docs/Packaging.html vendor/llvm/dist/docs/Passes.html vendor/llvm/dist/docs/ProgrammersManual.html vendor/llvm/dist/docs/Projects.html vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/docs/SourceLevelDebugging.html vendor/llvm/dist/docs/SystemLibrary.html vendor/llvm/dist/docs/TableGenFundamentals.html vendor/llvm/dist/docs/TestingGuide.html vendor/llvm/dist/docs/UsingLibraries.html vendor/llvm/dist/docs/WritingAnLLVMBackend.html vendor/llvm/dist/docs/WritingAnLLVMPass.html vendor/llvm/dist/docs/doxygen.css vendor/llvm/dist/docs/doxygen.footer vendor/llvm/dist/docs/index.html vendor/llvm/dist/docs/llvm.css vendor/llvm/dist/docs/tutorial/LangImpl1.html vendor/llvm/dist/docs/tutorial/LangImpl2.html vendor/llvm/dist/docs/tutorial/LangImpl3.html vendor/llvm/dist/docs/tutorial/LangImpl4.html vendor/llvm/dist/docs/tutorial/LangImpl5.html vendor/llvm/dist/docs/tutorial/LangImpl6.html vendor/llvm/dist/docs/tutorial/LangImpl7.html vendor/llvm/dist/docs/tutorial/LangImpl8.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl1.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl2.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl3.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl4.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl5.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl6.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl7.html vendor/llvm/dist/docs/tutorial/OCamlLangImpl8.html vendor/llvm/dist/docs/tutorial/index.html vendor/llvm/dist/examples/BrainF/BrainF.cpp vendor/llvm/dist/examples/ExceptionDemo/ExceptionDemo.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter5/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter6/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter7/toy.cpp vendor/llvm/dist/include/llvm-c/EnhancedDisassembly.h vendor/llvm/dist/include/llvm-c/Transforms/Scalar.h vendor/llvm/dist/include/llvm-c/lto.h vendor/llvm/dist/include/llvm/ADT/APFloat.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/ArrayRef.h vendor/llvm/dist/include/llvm/ADT/DenseMap.h vendor/llvm/dist/include/llvm/ADT/DenseMapInfo.h vendor/llvm/dist/include/llvm/ADT/DepthFirstIterator.h vendor/llvm/dist/include/llvm/ADT/FoldingSet.h vendor/llvm/dist/include/llvm/ADT/ImmutableIntervalMap.h vendor/llvm/dist/include/llvm/ADT/IntervalMap.h vendor/llvm/dist/include/llvm/ADT/IntrusiveRefCntPtr.h vendor/llvm/dist/include/llvm/ADT/PointerUnion.h vendor/llvm/dist/include/llvm/ADT/ScopedHashTable.h vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h vendor/llvm/dist/include/llvm/ADT/Statistic.h vendor/llvm/dist/include/llvm/ADT/StringExtras.h vendor/llvm/dist/include/llvm/ADT/StringMap.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/ADT/ilist.h vendor/llvm/dist/include/llvm/Analysis/AliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h vendor/llvm/dist/include/llvm/Analysis/CFGPrinter.h vendor/llvm/dist/include/llvm/Analysis/DIBuilder.h vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/InlineCost.h vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h vendor/llvm/dist/include/llvm/Analysis/Lint.h vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h vendor/llvm/dist/include/llvm/Analysis/Passes.h vendor/llvm/dist/include/llvm/Analysis/PathProfileInfo.h vendor/llvm/dist/include/llvm/Analysis/PostDominators.h vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h vendor/llvm/dist/include/llvm/Analysis/RegionIterator.h vendor/llvm/dist/include/llvm/Analysis/RegionPass.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Bitcode/Archive.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/CalcSpillWeights.h vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h vendor/llvm/dist/include/llvm/CodeGen/EdgeBundles.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/CodeGen/JITCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/MachineConstantPool.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/Graph.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/Heuristics/Briggs.h vendor/llvm/dist/include/llvm/CodeGen/ProcessImplicitDefs.h vendor/llvm/dist/include/llvm/CodeGen/RegisterScavenging.h vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h vendor/llvm/dist/include/llvm/CodeGen/ScoreboardHazardRecognizer.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h vendor/llvm/dist/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h vendor/llvm/dist/include/llvm/CompilerDriver/CompilationGraph.h vendor/llvm/dist/include/llvm/CompilerDriver/Tool.h vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/Config/llvm-config.h.cmake vendor/llvm/dist/include/llvm/Config/llvm-config.h.in vendor/llvm/dist/include/llvm/Constant.h vendor/llvm/dist/include/llvm/Constants.h vendor/llvm/dist/include/llvm/DerivedTypes.h vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h vendor/llvm/dist/include/llvm/ExecutionEngine/JITMemoryManager.h vendor/llvm/dist/include/llvm/GlobalVariable.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/InstrTypes.h vendor/llvm/dist/include/llvm/Instructions.h vendor/llvm/dist/include/llvm/Intrinsics.td vendor/llvm/dist/include/llvm/IntrinsicsARM.td vendor/llvm/dist/include/llvm/IntrinsicsX86.td vendor/llvm/dist/include/llvm/IntrinsicsXCore.td vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCAsmLayout.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCDisassembler.h vendor/llvm/dist/include/llvm/MC/MCDwarf.h vendor/llvm/dist/include/llvm/MC/MCExpr.h vendor/llvm/dist/include/llvm/MC/MCInstPrinter.h vendor/llvm/dist/include/llvm/MC/MCObjectStreamer.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmLexer.h vendor/llvm/dist/include/llvm/MC/MCSection.h vendor/llvm/dist/include/llvm/MC/MCSectionMachO.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MCSymbol.h vendor/llvm/dist/include/llvm/Metadata.h vendor/llvm/dist/include/llvm/Module.h vendor/llvm/dist/include/llvm/Object/MachOObject.h vendor/llvm/dist/include/llvm/Pass.h vendor/llvm/dist/include/llvm/PassAnalysisSupport.h vendor/llvm/dist/include/llvm/Support/Allocator.h vendor/llvm/dist/include/llvm/Support/CFG.h vendor/llvm/dist/include/llvm/Support/Casting.h vendor/llvm/dist/include/llvm/Support/CommandLine.h vendor/llvm/dist/include/llvm/Support/Compiler.h vendor/llvm/dist/include/llvm/Support/ConstantFolder.h vendor/llvm/dist/include/llvm/Support/CrashRecoveryContext.h vendor/llvm/dist/include/llvm/Support/DOTGraphTraits.h vendor/llvm/dist/include/llvm/Support/DebugLoc.h vendor/llvm/dist/include/llvm/Support/Dwarf.h vendor/llvm/dist/include/llvm/Support/ErrorHandling.h vendor/llvm/dist/include/llvm/Support/FileSystem.h vendor/llvm/dist/include/llvm/Support/FileUtilities.h vendor/llvm/dist/include/llvm/Support/GraphWriter.h vendor/llvm/dist/include/llvm/Support/IRBuilder.h vendor/llvm/dist/include/llvm/Support/Memory.h vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h vendor/llvm/dist/include/llvm/Support/NoFolder.h vendor/llvm/dist/include/llvm/Support/PathV1.h vendor/llvm/dist/include/llvm/Support/PatternMatch.h vendor/llvm/dist/include/llvm/Support/PrettyStackTrace.h vendor/llvm/dist/include/llvm/Support/Program.h vendor/llvm/dist/include/llvm/Support/Regex.h vendor/llvm/dist/include/llvm/Support/Signals.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/StandardPasses.h vendor/llvm/dist/include/llvm/Support/TimeValue.h vendor/llvm/dist/include/llvm/Support/system_error.h vendor/llvm/dist/include/llvm/Target/SubtargetFeature.h vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetAsmBackend.h vendor/llvm/dist/include/llvm/Target/TargetAsmInfo.h vendor/llvm/dist/include/llvm/Target/TargetData.h vendor/llvm/dist/include/llvm/Target/TargetInstrDesc.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetInstrItineraries.h vendor/llvm/dist/include/llvm/Target/TargetLibraryInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetLoweringObjectFile.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetOptions.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetRegistry.h vendor/llvm/dist/include/llvm/Target/TargetSelect.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td vendor/llvm/dist/include/llvm/Transforms/IPO.h vendor/llvm/dist/include/llvm/Transforms/Instrumentation.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Utils/BasicBlockUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/TypeSymbolTable.h vendor/llvm/dist/include/llvm/User.h vendor/llvm/dist/include/llvm/Value.h vendor/llvm/dist/lib/Analysis/AliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp vendor/llvm/dist/lib/Analysis/Analysis.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/CMakeLists.txt vendor/llvm/dist/lib/Analysis/CaptureTracking.cpp vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/DIBuilder.cpp vendor/llvm/dist/lib/Analysis/DebugInfo.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/Loads.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/PHITransAddr.cpp vendor/llvm/dist/lib/Analysis/PathNumbering.cpp vendor/llvm/dist/lib/Analysis/PathProfileVerifier.cpp vendor/llvm/dist/lib/Analysis/PostDominators.cpp vendor/llvm/dist/lib/Analysis/ProfileEstimatorPass.cpp vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp vendor/llvm/dist/lib/Analysis/ProfileInfoLoader.cpp vendor/llvm/dist/lib/Analysis/RegionInfo.cpp vendor/llvm/dist/lib/Analysis/RegionPrinter.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionNormalization.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Archive/ArchiveWriter.cpp vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.h vendor/llvm/dist/lib/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/Analysis.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfTableException.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CalcSpillWeights.cpp vendor/llvm/dist/lib/CodeGen/CallingConvLower.cpp vendor/llvm/dist/lib/CodeGen/CodePlacementOpt.cpp vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/ELF.h vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/EdgeBundles.cpp vendor/llvm/dist/lib/CodeGen/ExpandISelPseudos.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/InlineSpiller.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.cpp vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalUnion.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalUnion.h vendor/llvm/dist/lib/CodeGen/LiveRangeEdit.cpp vendor/llvm/dist/lib/CodeGen/LiveRangeEdit.h vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/Passes.cpp vendor/llvm/dist/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/README.txt vendor/llvm/dist/lib/CodeGen/RegAllocBase.h vendor/llvm/dist/lib/CodeGen/RegAllocBasic.cpp vendor/llvm/dist/lib/CodeGen/RegAllocFast.cpp vendor/llvm/dist/lib/CodeGen/RegAllocGreedy.cpp vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/RenderMachineFunction.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAG.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/ShrinkWrapping.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.h vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp vendor/llvm/dist/lib/CodeGen/SpillPlacement.cpp vendor/llvm/dist/lib/CodeGen/SpillPlacement.h vendor/llvm/dist/lib/CodeGen/Spiller.cpp vendor/llvm/dist/lib/CodeGen/Spiller.h vendor/llvm/dist/lib/CodeGen/SplitKit.cpp vendor/llvm/dist/lib/CodeGen/SplitKit.h vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/StrongPHIElimination.cpp vendor/llvm/dist/lib/CodeGen/TargetInstrInfoImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp vendor/llvm/dist/lib/CodeGen/VirtRegRewriter.cpp vendor/llvm/dist/lib/CompilerDriver/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/Intercept.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.h vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDwarfEmitter.h vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/TargetSelect.cpp vendor/llvm/dist/lib/ExecutionEngine/MCJIT/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJIT.cpp vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJIT.h vendor/llvm/dist/lib/ExecutionEngine/Makefile vendor/llvm/dist/lib/Linker/LinkModules.cpp vendor/llvm/dist/lib/MC/CMakeLists.txt vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCDisassembler/CMakeLists.txt vendor/llvm/dist/lib/MC/MCDisassembler/EDDisassembler.cpp vendor/llvm/dist/lib/MC/MCDisassembler/EDDisassembler.h vendor/llvm/dist/lib/MC/MCDisassembler/EDInfo.h vendor/llvm/dist/lib/MC/MCDisassembler/EDInst.cpp vendor/llvm/dist/lib/MC/MCDisassembler/EDOperand.cpp vendor/llvm/dist/lib/MC/MCDwarf.cpp vendor/llvm/dist/lib/MC/MCELFStreamer.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCInstPrinter.cpp vendor/llvm/dist/lib/MC/MCLoggingStreamer.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCNullStreamer.cpp vendor/llvm/dist/lib/MC/MCObjectStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/DarwinAsmParser.cpp vendor/llvm/dist/lib/MC/MCSectionELF.cpp vendor/llvm/dist/lib/MC/MCSectionMachO.cpp vendor/llvm/dist/lib/MC/MCStreamer.cpp vendor/llvm/dist/lib/MC/MCSymbol.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/Object/CMakeLists.txt vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/ELFObjectFile.cpp vendor/llvm/dist/lib/Object/MachOObject.cpp vendor/llvm/dist/lib/Object/ObjectFile.cpp vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/Allocator.cpp vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/CrashRecoveryContext.cpp vendor/llvm/dist/lib/Support/Dwarf.cpp vendor/llvm/dist/lib/Support/ErrorHandling.cpp vendor/llvm/dist/lib/Support/FileUtilities.cpp vendor/llvm/dist/lib/Support/FoldingSet.cpp vendor/llvm/dist/lib/Support/Host.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/Path.cpp vendor/llvm/dist/lib/Support/PrettyStackTrace.cpp vendor/llvm/dist/lib/Support/Regex.cpp vendor/llvm/dist/lib/Support/Signals.cpp vendor/llvm/dist/lib/Support/SmallPtrSet.cpp vendor/llvm/dist/lib/Support/Statistic.cpp vendor/llvm/dist/lib/Support/StringMap.cpp vendor/llvm/dist/lib/Support/StringRef.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/Unix/Host.inc vendor/llvm/dist/lib/Support/Unix/Memory.inc vendor/llvm/dist/lib/Support/Unix/Path.inc vendor/llvm/dist/lib/Support/Unix/Program.inc vendor/llvm/dist/lib/Support/Unix/Signals.inc vendor/llvm/dist/lib/Support/Windows/DynamicLibrary.inc vendor/llvm/dist/lib/Support/Windows/Path.inc vendor/llvm/dist/lib/Support/Windows/PathV2.inc vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/Support/regcomp.c vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMAddressingModes.h vendor/llvm/dist/lib/Target/ARM/ARMAsmBackend.cpp vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.h vendor/llvm/dist/lib/Target/ARM/ARMBaseInfo.h vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.h vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.td vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/ARM/ARMFastISel.cpp vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.h vendor/llvm/dist/lib/Target/ARM/ARMHazardRecognizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMMCAsmInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMMCExpr.h vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td vendor/llvm/dist/lib/Target/ARM/ARMScheduleA9.td vendor/llvm/dist/lib/Target/ARM/ARMSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h vendor/llvm/dist/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/InstPrinter/ARMInstPrinter.h vendor/llvm/dist/lib/Target/ARM/MLxExpansionPass.cpp vendor/llvm/dist/lib/Target/ARM/README.txt vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.h vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/Alpha/Alpha.td vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp vendor/llvm/dist/lib/Target/Alpha/AlphaInstrInfo.td vendor/llvm/dist/lib/Target/Alpha/README.txt vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelLowering.cpp vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp vendor/llvm/dist/lib/Target/CellSPU/SPU64InstrInfo.td vendor/llvm/dist/lib/Target/CellSPU/SPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.h vendor/llvm/dist/lib/Target/CellSPU/SPUInstrFormats.td vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.cpp vendor/llvm/dist/lib/Target/CellSPU/SPUInstrInfo.td vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.h vendor/llvm/dist/lib/Target/CppBackend/CPPBackend.cpp vendor/llvm/dist/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp vendor/llvm/dist/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.h vendor/llvm/dist/lib/Target/MBlaze/MBlaze.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeAsmBackend.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeAsmPrinter.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeISelLowering.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrFPU.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrFSL.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrFormats.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeInstrInfo.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeRegisterInfo.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeSchedule.td vendor/llvm/dist/lib/Target/MBlaze/MBlazeSubtarget.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeSubtarget.h vendor/llvm/dist/lib/Target/MBlaze/MBlazeTargetMachine.cpp vendor/llvm/dist/lib/Target/MBlaze/MBlazeTargetMachine.h vendor/llvm/dist/lib/Target/MBlaze/TODO vendor/llvm/dist/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h vendor/llvm/dist/lib/Target/MSP430/MSP430AsmPrinter.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/Mips.h vendor/llvm/dist/lib/Target/Mips/Mips.td vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/MipsCallingConv.td vendor/llvm/dist/lib/Target/Mips/MipsFrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsFrameLowering.h vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.h vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsMCAsmInfo.h vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.h vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.td vendor/llvm/dist/lib/Target/Mips/MipsSchedule.td vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.cpp vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.h vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.h vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.h vendor/llvm/dist/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp vendor/llvm/dist/lib/Target/PTX/PTX.h vendor/llvm/dist/lib/Target/PTX/PTX.td vendor/llvm/dist/lib/Target/PTX/PTXAsmPrinter.cpp vendor/llvm/dist/lib/Target/PTX/PTXFrameLowering.h vendor/llvm/dist/lib/Target/PTX/PTXISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PTX/PTXISelLowering.cpp vendor/llvm/dist/lib/Target/PTX/PTXISelLowering.h vendor/llvm/dist/lib/Target/PTX/PTXInstrInfo.cpp vendor/llvm/dist/lib/Target/PTX/PTXInstrInfo.h vendor/llvm/dist/lib/Target/PTX/PTXInstrInfo.td vendor/llvm/dist/lib/Target/PTX/PTXMCAsmStreamer.cpp vendor/llvm/dist/lib/Target/PTX/PTXMFInfoExtract.cpp vendor/llvm/dist/lib/Target/PTX/PTXMachineFunctionInfo.h vendor/llvm/dist/lib/Target/PTX/PTXRegisterInfo.td vendor/llvm/dist/lib/Target/PTX/PTXSubtarget.cpp vendor/llvm/dist/lib/Target/PTX/PTXSubtarget.h vendor/llvm/dist/lib/Target/PTX/PTXTargetMachine.cpp vendor/llvm/dist/lib/Target/PTX/PTXTargetMachine.h vendor/llvm/dist/lib/Target/PTX/TargetInfo/PTXTargetInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h vendor/llvm/dist/lib/Target/PowerPC/PPCAsmBackend.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCMCAsmInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp vendor/llvm/dist/lib/Target/SubtargetFeature.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/TargetData.cpp vendor/llvm/dist/lib/Target/TargetInstrInfo.cpp vendor/llvm/dist/lib/Target/TargetLibraryInfo.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h vendor/llvm/dist/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h vendor/llvm/dist/lib/Target/X86/InstPrinter/X86InstComments.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h vendor/llvm/dist/lib/Target/X86/README-X86-64.txt vendor/llvm/dist/lib/Target/X86/README.txt vendor/llvm/dist/lib/Target/X86/Utils/X86ShuffleDecode.cpp vendor/llvm/dist/lib/Target/X86/Utils/X86ShuffleDecode.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/X86CallingConv.td vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86Instr3DNow.td vendor/llvm/dist/lib/Target/X86/X86InstrArithmetic.td vendor/llvm/dist/lib/Target/X86/X86InstrControl.td vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86InstrSystem.td vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.h vendor/llvm/dist/lib/Target/X86/X86MCCodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86SelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.cpp vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.h vendor/llvm/dist/lib/Target/XCore/XCoreISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.h vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/CMakeLists.txt vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/IPConstantPropagation.cpp vendor/llvm/dist/lib/Transforms/IPO/IPO.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp vendor/llvm/dist/lib/Transforms/IPO/LowerSetJmp.cpp vendor/llvm/dist/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist/lib/Transforms/IPO/PartialInlining.cpp vendor/llvm/dist/lib/Transforms/IPO/PruneEH.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombine.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombinePHI.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineVectorOps.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineWorklist.h vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Instrumentation/Instrumentation.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/MaximumSpanningTree.h vendor/llvm/dist/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/PathProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/ProfilingUtils.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/ProfilingUtils.h vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp vendor/llvm/dist/lib/Transforms/Scalar/DCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalar.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Utils/CodeExtractor.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/LCSSA.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerSwitch.cpp vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/VMCore/AsmWriter.cpp vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp vendor/llvm/dist/lib/VMCore/CMakeLists.txt vendor/llvm/dist/lib/VMCore/ConstantFold.cpp vendor/llvm/dist/lib/VMCore/Constants.cpp vendor/llvm/dist/lib/VMCore/ConstantsContext.h vendor/llvm/dist/lib/VMCore/Core.cpp vendor/llvm/dist/lib/VMCore/DebugLoc.cpp vendor/llvm/dist/lib/VMCore/Dominators.cpp vendor/llvm/dist/lib/VMCore/Function.cpp vendor/llvm/dist/lib/VMCore/IRBuilder.cpp vendor/llvm/dist/lib/VMCore/Instructions.cpp vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h vendor/llvm/dist/lib/VMCore/Metadata.cpp vendor/llvm/dist/lib/VMCore/PassManager.cpp vendor/llvm/dist/lib/VMCore/PassRegistry.cpp vendor/llvm/dist/lib/VMCore/Type.cpp vendor/llvm/dist/lib/VMCore/TypesContext.h vendor/llvm/dist/lib/VMCore/Verifier.cpp vendor/llvm/dist/projects/sample/autoconf/configure.ac vendor/llvm/dist/runtime/libprofile/CommonProfiling.c vendor/llvm/dist/runtime/libprofile/Makefile vendor/llvm/dist/runtime/libprofile/OptimalEdgeProfiling.c vendor/llvm/dist/runtime/libprofile/PathProfiling.c vendor/llvm/dist/runtime/libprofile/libprofile.exports vendor/llvm/dist/test/Analysis/BasicAA/store-promote.ll vendor/llvm/dist/test/Analysis/RegionInfo/next.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw-offset.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-iv-0.ll vendor/llvm/dist/test/Assembler/AutoUpgradeIntrinsics.ll vendor/llvm/dist/test/Assembler/aggregate-return-single-value.ll vendor/llvm/dist/test/Assembler/comment.ll vendor/llvm/dist/test/Bitcode/neon-intrinsics.ll vendor/llvm/dist/test/CMakeLists.txt vendor/llvm/dist/test/CodeGen/ARM/2009-10-27-double-align.ll vendor/llvm/dist/test/CodeGen/ARM/2010-03-18-ldm-rtrn.ll vendor/llvm/dist/test/CodeGen/ARM/2010-05-18-PostIndexBug.ll vendor/llvm/dist/test/CodeGen/ARM/2010-08-04-StackVariable.ll vendor/llvm/dist/test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll vendor/llvm/dist/test/CodeGen/ARM/2010-11-29-PrologueBug.ll vendor/llvm/dist/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll vendor/llvm/dist/test/CodeGen/ARM/align.ll vendor/llvm/dist/test/CodeGen/ARM/arguments.ll vendor/llvm/dist/test/CodeGen/ARM/arm-and-tst-peephole.ll vendor/llvm/dist/test/CodeGen/ARM/arm-returnaddr.ll vendor/llvm/dist/test/CodeGen/ARM/bx_fold.ll vendor/llvm/dist/test/CodeGen/ARM/call-tc.ll vendor/llvm/dist/test/CodeGen/ARM/carry.ll vendor/llvm/dist/test/CodeGen/ARM/code-placement.ll vendor/llvm/dist/test/CodeGen/ARM/constants.ll vendor/llvm/dist/test/CodeGen/ARM/fabss.ll vendor/llvm/dist/test/CodeGen/ARM/fadds.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-static.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel.ll vendor/llvm/dist/test/CodeGen/ARM/fcopysign.ll vendor/llvm/dist/test/CodeGen/ARM/fdivs.ll vendor/llvm/dist/test/CodeGen/ARM/fmacs.ll vendor/llvm/dist/test/CodeGen/ARM/fmuls.ll vendor/llvm/dist/test/CodeGen/ARM/fnmscs.ll vendor/llvm/dist/test/CodeGen/ARM/fp.ll vendor/llvm/dist/test/CodeGen/ARM/fp_convert.ll vendor/llvm/dist/test/CodeGen/ARM/fpcmp-opt.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt10.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt5.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt6.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt7.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt8.ll vendor/llvm/dist/test/CodeGen/ARM/indirectbr.ll vendor/llvm/dist/test/CodeGen/ARM/inlineasm3.ll vendor/llvm/dist/test/CodeGen/ARM/ldm.ll vendor/llvm/dist/test/CodeGen/ARM/ldrd.ll vendor/llvm/dist/test/CodeGen/ARM/long.ll vendor/llvm/dist/test/CodeGen/ARM/long_shift.ll vendor/llvm/dist/test/CodeGen/ARM/lsr-code-insertion.ll vendor/llvm/dist/test/CodeGen/ARM/lsr-on-unrolled-loops.ll vendor/llvm/dist/test/CodeGen/ARM/memcpy-inline.ll vendor/llvm/dist/test/CodeGen/ARM/neon_div.ll vendor/llvm/dist/test/CodeGen/ARM/prefetch.ll vendor/llvm/dist/test/CodeGen/ARM/reg_sequence.ll vendor/llvm/dist/test/CodeGen/ARM/rev.ll vendor/llvm/dist/test/CodeGen/ARM/select-imm.ll vendor/llvm/dist/test/CodeGen/ARM/select.ll vendor/llvm/dist/test/CodeGen/ARM/select_xform.ll vendor/llvm/dist/test/CodeGen/ARM/shifter_operand.ll vendor/llvm/dist/test/CodeGen/ARM/smul.ll vendor/llvm/dist/test/CodeGen/ARM/str_pre-2.ll vendor/llvm/dist/test/CodeGen/ARM/sub.ll vendor/llvm/dist/test/CodeGen/ARM/thumb1-varalloc.ll vendor/llvm/dist/test/CodeGen/ARM/trap.ll vendor/llvm/dist/test/CodeGen/ARM/umulo-32.ll vendor/llvm/dist/test/CodeGen/ARM/unaligned_load_store.ll vendor/llvm/dist/test/CodeGen/ARM/va_arg.ll vendor/llvm/dist/test/CodeGen/ARM/vcgt.ll vendor/llvm/dist/test/CodeGen/ARM/vector-DAGCombine.ll vendor/llvm/dist/test/CodeGen/ARM/vext.ll vendor/llvm/dist/test/CodeGen/ARM/vfp.ll vendor/llvm/dist/test/CodeGen/ARM/vld1.ll vendor/llvm/dist/test/CodeGen/ARM/vld3.ll vendor/llvm/dist/test/CodeGen/ARM/vldlane.ll vendor/llvm/dist/test/CodeGen/ARM/vmul.ll vendor/llvm/dist/test/CodeGen/ARM/vst3.ll vendor/llvm/dist/test/CodeGen/Blackfin/2009-08-04-LowerExtract-Live.ll vendor/llvm/dist/test/CodeGen/CellSPU/jumptable.ll vendor/llvm/dist/test/CodeGen/CellSPU/loads.ll vendor/llvm/dist/test/CodeGen/CellSPU/rotate_ops.ll vendor/llvm/dist/test/CodeGen/CellSPU/shift_ops.ll vendor/llvm/dist/test/CodeGen/CellSPU/stores.ll vendor/llvm/dist/test/CodeGen/CellSPU/v2f32.ll vendor/llvm/dist/test/CodeGen/Generic/crash.ll vendor/llvm/dist/test/CodeGen/MBlaze/fsl.ll vendor/llvm/dist/test/CodeGen/MBlaze/loop.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-22-Cstpool.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-23-fpcmp.ll vendor/llvm/dist/test/CodeGen/Mips/2008-07-29-icmp.ll vendor/llvm/dist/test/CodeGen/Mips/2008-08-06-Alloca.ll vendor/llvm/dist/test/CodeGen/Mips/2010-07-20-Select.ll vendor/llvm/dist/test/CodeGen/Mips/cmov.ll vendor/llvm/dist/test/CodeGen/Mips/o32_cc.ll vendor/llvm/dist/test/CodeGen/PTX/add.ll vendor/llvm/dist/test/CodeGen/PTX/exit.ll vendor/llvm/dist/test/CodeGen/PTX/ld.ll vendor/llvm/dist/test/CodeGen/PTX/mov.ll vendor/llvm/dist/test/CodeGen/PTX/options.ll vendor/llvm/dist/test/CodeGen/PTX/ret.ll vendor/llvm/dist/test/CodeGen/PTX/shl.ll vendor/llvm/dist/test/CodeGen/PTX/shr.ll vendor/llvm/dist/test/CodeGen/PTX/st.ll vendor/llvm/dist/test/CodeGen/PTX/sub.ll vendor/llvm/dist/test/CodeGen/PowerPC/2008-12-12-EH.ll vendor/llvm/dist/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll vendor/llvm/dist/test/CodeGen/PowerPC/Atomics-64.ll vendor/llvm/dist/test/CodeGen/PowerPC/Frames-small.ll vendor/llvm/dist/test/CodeGen/PowerPC/indirectbr.ll vendor/llvm/dist/test/CodeGen/PowerPC/mulhs.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc-prologue.ll vendor/llvm/dist/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll vendor/llvm/dist/test/CodeGen/SystemZ/2009-07-10-BadIncomingArgOffset.ll vendor/llvm/dist/test/CodeGen/Thumb/2009-08-20-ISelBug.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll vendor/llvm/dist/test/CodeGen/Thumb/dyn-stackalloc.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll vendor/llvm/dist/test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/bfi.ll vendor/llvm/dist/test/CodeGen/Thumb2/cross-rc-coalescing-2.ll vendor/llvm/dist/test/CodeGen/Thumb2/ldr-str-imm12.ll vendor/llvm/dist/test/CodeGen/Thumb2/machine-licm.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ldrd.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-lsr3.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-ror.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sbc.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sub3.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sub5.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-uxtb.ll vendor/llvm/dist/test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll vendor/llvm/dist/test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll vendor/llvm/dist/test/CodeGen/X86/2007-05-05-Personality.ll vendor/llvm/dist/test/CodeGen/X86/2007-07-03-GR64ToVR64.ll vendor/llvm/dist/test/CodeGen/X86/2007-07-18-Vector-Extract.ll vendor/llvm/dist/test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll vendor/llvm/dist/test/CodeGen/X86/2007-09-27-LDIntrinsics.ll vendor/llvm/dist/test/CodeGen/X86/2008-02-22-ReMatBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-03-18-CoalescerBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-04-02-unnamedEH.ll vendor/llvm/dist/test/CodeGen/X86/2008-04-16-ReMatBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-07-11-SpillerBug.ll vendor/llvm/dist/test/CodeGen/X86/2008-07-19-movups-spills.ll vendor/llvm/dist/test/CodeGen/X86/2008-09-18-inline-asm-2.ll vendor/llvm/dist/test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-20-PreAllocSplit-Crash.ll vendor/llvm/dist/test/CodeGen/X86/2009-03-16-SpillerBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-20-LinearScanOpt.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-24.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-28-Crash.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll vendor/llvm/dist/test/CodeGen/X86/2010-08-04-StackVariable.ll vendor/llvm/dist/test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll vendor/llvm/dist/test/CodeGen/X86/2010-09-30-CMOV-JumpTable-PHI.ll vendor/llvm/dist/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll vendor/llvm/dist/test/CodeGen/X86/MachineSink-PHIUse.ll vendor/llvm/dist/test/CodeGen/X86/abi-isel.ll vendor/llvm/dist/test/CodeGen/X86/add.ll vendor/llvm/dist/test/CodeGen/X86/aliases.ll vendor/llvm/dist/test/CodeGen/X86/alignment.ll vendor/llvm/dist/test/CodeGen/X86/apm.ll vendor/llvm/dist/test/CodeGen/X86/avoid-lea-scale2.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/break-anti-dependencies.ll vendor/llvm/dist/test/CodeGen/X86/byval.ll vendor/llvm/dist/test/CodeGen/X86/byval2.ll vendor/llvm/dist/test/CodeGen/X86/byval3.ll vendor/llvm/dist/test/CodeGen/X86/byval4.ll vendor/llvm/dist/test/CodeGen/X86/byval5.ll vendor/llvm/dist/test/CodeGen/X86/call-push.ll vendor/llvm/dist/test/CodeGen/X86/coalesce-esp.ll vendor/llvm/dist/test/CodeGen/X86/coalescer-commute2.ll vendor/llvm/dist/test/CodeGen/X86/coalescer-cross.ll vendor/llvm/dist/test/CodeGen/X86/commute-two-addr.ll vendor/llvm/dist/test/CodeGen/X86/constant-pool-remat-0.ll vendor/llvm/dist/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll vendor/llvm/dist/test/CodeGen/X86/crash.ll vendor/llvm/dist/test/CodeGen/X86/dbg-merge-loc-entry.ll vendor/llvm/dist/test/CodeGen/X86/dbg-value-inlined-parameter.ll vendor/llvm/dist/test/CodeGen/X86/dbg-value-location.ll vendor/llvm/dist/test/CodeGen/X86/dbg-value-range.ll vendor/llvm/dist/test/CodeGen/X86/divide-by-constant.ll vendor/llvm/dist/test/CodeGen/X86/dyn-stackalloc.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-gep.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-i1.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-x86.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/fold-mul-lohi.ll vendor/llvm/dist/test/CodeGen/X86/fold-pcmpeqd-0.ll vendor/llvm/dist/test/CodeGen/X86/fold-pcmpeqd-2.ll vendor/llvm/dist/test/CodeGen/X86/fp-stack-compare.ll vendor/llvm/dist/test/CodeGen/X86/global-sections-tls.ll vendor/llvm/dist/test/CodeGen/X86/global-sections.ll vendor/llvm/dist/test/CodeGen/X86/h-register-store.ll vendor/llvm/dist/test/CodeGen/X86/h-registers-0.ll vendor/llvm/dist/test/CodeGen/X86/h-registers-1.ll vendor/llvm/dist/test/CodeGen/X86/hidden-vis-pic.ll vendor/llvm/dist/test/CodeGen/X86/i64-mem-copy.ll vendor/llvm/dist/test/CodeGen/X86/iabs.ll vendor/llvm/dist/test/CodeGen/X86/isel-sink3.ll vendor/llvm/dist/test/CodeGen/X86/lea-3.ll vendor/llvm/dist/test/CodeGen/X86/lock-inst-encoding.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce4.ll vendor/llvm/dist/test/CodeGen/X86/lsr-interesting-step.ll vendor/llvm/dist/test/CodeGen/X86/lsr-reuse-trunc.ll vendor/llvm/dist/test/CodeGen/X86/lsr-reuse.ll vendor/llvm/dist/test/CodeGen/X86/machine-cse.ll vendor/llvm/dist/test/CodeGen/X86/mmx-copy-gprs.ll vendor/llvm/dist/test/CodeGen/X86/optimize-max-3.ll vendor/llvm/dist/test/CodeGen/X86/or-address.ll vendor/llvm/dist/test/CodeGen/X86/peep-vector-extract-concat.ll vendor/llvm/dist/test/CodeGen/X86/personality.ll vendor/llvm/dist/test/CodeGen/X86/pic.ll vendor/llvm/dist/test/CodeGen/X86/pmulld.ll vendor/llvm/dist/test/CodeGen/X86/postra-licm.ll vendor/llvm/dist/test/CodeGen/X86/pr2659.ll vendor/llvm/dist/test/CodeGen/X86/pr3366.ll vendor/llvm/dist/test/CodeGen/X86/pr3495-2.ll vendor/llvm/dist/test/CodeGen/X86/pr3495.ll vendor/llvm/dist/test/CodeGen/X86/pre-split1.ll vendor/llvm/dist/test/CodeGen/X86/pre-split10.ll vendor/llvm/dist/test/CodeGen/X86/pre-split11.ll vendor/llvm/dist/test/CodeGen/X86/pre-split2.ll vendor/llvm/dist/test/CodeGen/X86/pre-split3.ll vendor/llvm/dist/test/CodeGen/X86/pre-split4.ll vendor/llvm/dist/test/CodeGen/X86/pre-split5.ll vendor/llvm/dist/test/CodeGen/X86/pre-split6.ll vendor/llvm/dist/test/CodeGen/X86/pre-split7.ll vendor/llvm/dist/test/CodeGen/X86/pre-split8.ll vendor/llvm/dist/test/CodeGen/X86/pre-split9.ll vendor/llvm/dist/test/CodeGen/X86/remat-scalar-zero.ll vendor/llvm/dist/test/CodeGen/X86/scalar-min-max-fill-operand.ll vendor/llvm/dist/test/CodeGen/X86/sext-i1.ll vendor/llvm/dist/test/CodeGen/X86/sse-align-0.ll vendor/llvm/dist/test/CodeGen/X86/sse-align-3.ll vendor/llvm/dist/test/CodeGen/X86/sse-align-7.ll vendor/llvm/dist/test/CodeGen/X86/sse-commute.ll vendor/llvm/dist/test/CodeGen/X86/sse2.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/sse_reload_fold.ll vendor/llvm/dist/test/CodeGen/X86/stdarg.ll vendor/llvm/dist/test/CodeGen/X86/stride-nine-with-base-reg.ll vendor/llvm/dist/test/CodeGen/X86/stride-reuse.ll vendor/llvm/dist/test/CodeGen/X86/sub-with-overflow.ll vendor/llvm/dist/test/CodeGen/X86/tail-opts.ll vendor/llvm/dist/test/CodeGen/X86/tailcallbyval64.ll vendor/llvm/dist/test/CodeGen/X86/tailcallstack64.ll vendor/llvm/dist/test/CodeGen/X86/test-nofold.ll vendor/llvm/dist/test/CodeGen/X86/twoaddr-lea.ll vendor/llvm/dist/test/CodeGen/X86/unaligned-load.ll vendor/llvm/dist/test/CodeGen/X86/unknown-location.ll vendor/llvm/dist/test/CodeGen/X86/v2f32.ll vendor/llvm/dist/test/CodeGen/X86/vec_cast.ll vendor/llvm/dist/test/CodeGen/X86/vec_set-8.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-16.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-17.ll vendor/llvm/dist/test/CodeGen/X86/visibility.ll vendor/llvm/dist/test/CodeGen/X86/widen_load-0.ll vendor/llvm/dist/test/CodeGen/X86/win64_vararg.ll vendor/llvm/dist/test/CodeGen/X86/win_chkstk.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-malloc.ll vendor/llvm/dist/test/CodeGen/X86/zext-extract_subreg.ll vendor/llvm/dist/test/CodeGen/X86/zext-sext.ll vendor/llvm/dist/test/CodeGen/XCore/events.ll vendor/llvm/dist/test/CodeGen/XCore/mul64.ll vendor/llvm/dist/test/CodeGen/XCore/resources.ll vendor/llvm/dist/test/CodeGen/XCore/trampoline.ll vendor/llvm/dist/test/DebugInfo/2010-04-13-PubType.ll vendor/llvm/dist/test/FrontendAda/real_cst.adb vendor/llvm/dist/test/FrontendC/2006-05-01-AppleAlignmentPragma.c vendor/llvm/dist/test/FrontendC/2010-07-27-MinNoFoldConst.c vendor/llvm/dist/test/MC/ARM/arm_instructions.s vendor/llvm/dist/test/MC/ARM/elf-reloc-01.ll vendor/llvm/dist/test/MC/ARM/elf-reloc-02.ll vendor/llvm/dist/test/MC/ARM/elf-reloc-03.ll vendor/llvm/dist/test/MC/ARM/neon-shift-encoding.s vendor/llvm/dist/test/MC/ARM/simple-encoding.ll vendor/llvm/dist/test/MC/ARM/thumb2.s vendor/llvm/dist/test/MC/AsmParser/directive_space.s vendor/llvm/dist/test/MC/AsmParser/exprs-invalid.s vendor/llvm/dist/test/MC/AsmParser/floating-literals.s vendor/llvm/dist/test/MC/AsmParser/rename.s vendor/llvm/dist/test/MC/AsmParser/section.s vendor/llvm/dist/test/MC/COFF/basic-coff.s vendor/llvm/dist/test/MC/COFF/bss.s vendor/llvm/dist/test/MC/COFF/simple-fixups.s vendor/llvm/dist/test/MC/COFF/symbol-alias.s vendor/llvm/dist/test/MC/COFF/symbol-fragment-offset.s vendor/llvm/dist/test/MC/COFF/weak.s vendor/llvm/dist/test/MC/Disassembler/ARM/arm-tests.txt vendor/llvm/dist/test/MC/Disassembler/ARM/neon-tests.txt vendor/llvm/dist/test/MC/Disassembler/ARM/thumb-tests.txt vendor/llvm/dist/test/MC/Disassembler/X86/simple-tests.txt vendor/llvm/dist/test/MC/ELF/alias-reloc.s vendor/llvm/dist/test/MC/ELF/align-bss.s vendor/llvm/dist/test/MC/ELF/align-nops.s vendor/llvm/dist/test/MC/ELF/align.s vendor/llvm/dist/test/MC/ELF/basic-elf-32.s vendor/llvm/dist/test/MC/ELF/basic-elf-64.s vendor/llvm/dist/test/MC/ELF/cfi-advance-loc2.s vendor/llvm/dist/test/MC/ELF/cfi-def-cfa-offset.s vendor/llvm/dist/test/MC/ELF/cfi-def-cfa-register.s vendor/llvm/dist/test/MC/ELF/cfi-def-cfa.s vendor/llvm/dist/test/MC/ELF/cfi-offset.s vendor/llvm/dist/test/MC/ELF/cfi-remember.s vendor/llvm/dist/test/MC/ELF/cfi-zero-addr-delta.s vendor/llvm/dist/test/MC/ELF/cfi.s vendor/llvm/dist/test/MC/ELF/comdat.s vendor/llvm/dist/test/MC/ELF/common.s vendor/llvm/dist/test/MC/ELF/common2.s vendor/llvm/dist/test/MC/ELF/debug-line.s vendor/llvm/dist/test/MC/ELF/debug-loc.s vendor/llvm/dist/test/MC/ELF/empty-dwarf-lines.s vendor/llvm/dist/test/MC/ELF/empty.s vendor/llvm/dist/test/MC/ELF/entsize.ll vendor/llvm/dist/test/MC/ELF/entsize.s vendor/llvm/dist/test/MC/ELF/global-offset.s vendor/llvm/dist/test/MC/ELF/got.s vendor/llvm/dist/test/MC/ELF/ident.s vendor/llvm/dist/test/MC/ELF/local-reloc.s vendor/llvm/dist/test/MC/ELF/merge.s vendor/llvm/dist/test/MC/ELF/noexec.s vendor/llvm/dist/test/MC/ELF/pic-diff.s vendor/llvm/dist/test/MC/ELF/relocation-386.s vendor/llvm/dist/test/MC/ELF/relocation-pc.s vendor/llvm/dist/test/MC/ELF/relocation.s vendor/llvm/dist/test/MC/ELF/rename.s vendor/llvm/dist/test/MC/ELF/section.s vendor/llvm/dist/test/MC/ELF/symref.s vendor/llvm/dist/test/MC/ELF/tls-i386.s vendor/llvm/dist/test/MC/ELF/tls.s vendor/llvm/dist/test/MC/ELF/undef2.s vendor/llvm/dist/test/MC/ELF/weakref-reloc.s vendor/llvm/dist/test/MC/ELF/weakref.s vendor/llvm/dist/test/MC/MachO/darwin-x86_64-diff-relocs.s vendor/llvm/dist/test/MC/X86/x86-32-coverage.s vendor/llvm/dist/test/MC/X86/x86-32.s vendor/llvm/dist/test/MC/X86/x86-64.s vendor/llvm/dist/test/MC/X86/x86_64-encoding.s vendor/llvm/dist/test/Makefile vendor/llvm/dist/test/TableGen/TargetInstrInfo.td vendor/llvm/dist/test/Transforms/CodeGenPrepare/basic.ll vendor/llvm/dist/test/Transforms/ConstProp/2002-05-03-NotOperator.ll vendor/llvm/dist/test/Transforms/ConstProp/basictest.ll vendor/llvm/dist/test/Transforms/ConstProp/logicaltest.ll vendor/llvm/dist/test/Transforms/ConstProp/overflow-ops.ll vendor/llvm/dist/test/Transforms/ConstProp/phi.ll vendor/llvm/dist/test/Transforms/DeadArgElim/deadexternal.ll vendor/llvm/dist/test/Transforms/GVN/rle.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2009-04-14-shorten_iv_vars.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2009-04-27-Floating.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/ada-loops.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/addrec-gep.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/ashr-tripcount.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/iv-sext.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/iv-zext.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/max-pointer.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/pointer.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/preserve-gep-nested.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/preserve-gep-remainder.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/preserve-gep.ll vendor/llvm/dist/test/Transforms/InstCombine/and-or-not.ll vendor/llvm/dist/test/Transforms/InstCombine/and2.ll vendor/llvm/dist/test/Transforms/InstCombine/div.ll vendor/llvm/dist/test/Transforms/InstCombine/fold-bin-operand.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/InstCombine/or.ll vendor/llvm/dist/test/Transforms/InstCombine/phi.ll vendor/llvm/dist/test/Transforms/InstCombine/select.ll vendor/llvm/dist/test/Transforms/InstCombine/sext.ll vendor/llvm/dist/test/Transforms/InstCombine/shift.ll vendor/llvm/dist/test/Transforms/InstCombine/udivrem-change-width.ll vendor/llvm/dist/test/Transforms/InstSimplify/compare.ll vendor/llvm/dist/test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll vendor/llvm/dist/test/Transforms/LICM/2007-10-01-PromoteSafeValue.ll vendor/llvm/dist/test/Transforms/LoopRotate/crash.ll vendor/llvm/dist/test/Transforms/LoopSimplify/merge-exits.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/invariant_value_first.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/ops_after_indvar.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll vendor/llvm/dist/test/Transforms/Reassociate/crash.ll vendor/llvm/dist/test/Transforms/SCCP/apint-basictest.ll vendor/llvm/dist/test/Transforms/SCCP/apint-basictest2.ll vendor/llvm/dist/test/Transforms/SCCP/apint-basictest3.ll vendor/llvm/dist/test/Transforms/SCCP/apint-basictest4.ll vendor/llvm/dist/test/Transforms/ScalarRepl/2008-01-29-PromoteBug.ll vendor/llvm/dist/test/Transforms/ScalarRepl/2008-06-05-loadstore-agg.ll vendor/llvm/dist/test/Transforms/ScalarRepl/dg.exp vendor/llvm/dist/test/Transforms/ScalarRepl/union-pointer.ll vendor/llvm/dist/test/Transforms/ScalarRepl/vector_promote.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/2006-08-03-Crash.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/PhiBlockMerge.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/PhiEliminate2.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/UnreachableEliminate.ll vendor/llvm/dist/tools/CMakeLists.txt vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/bugpoint/BugDriver.cpp vendor/llvm/dist/tools/bugpoint/ExecutionDriver.cpp vendor/llvm/dist/tools/bugpoint/Miscompilation.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.cpp vendor/llvm/dist/tools/edis/CMakeLists.txt vendor/llvm/dist/tools/gold/gold-plugin.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/lli/lli.cpp vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvm-config/CMakeLists.txt vendor/llvm/dist/tools/llvm-diff/CMakeLists.txt vendor/llvm/dist/tools/llvm-diff/DifferenceEngine.cpp vendor/llvm/dist/tools/llvm-diff/DifferenceEngine.h vendor/llvm/dist/tools/llvm-diff/llvm-diff.cpp vendor/llvm/dist/tools/llvm-dis/CMakeLists.txt vendor/llvm/dist/tools/llvm-dis/Makefile vendor/llvm/dist/tools/llvm-dis/llvm-dis.cpp vendor/llvm/dist/tools/llvm-ld/llvm-ld.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.h vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-objdump/llvm-objdump.cpp vendor/llvm/dist/tools/llvm-stub/llvm-stub.c vendor/llvm/dist/tools/llvmc/doc/LLVMC-Reference.rst vendor/llvm/dist/tools/llvmc/doc/LLVMC-Tutorial.rst vendor/llvm/dist/tools/llvmc/examples/Skeleton/README vendor/llvm/dist/tools/llvmc/src/Base.td.in vendor/llvm/dist/tools/lto/LTOCodeGenerator.cpp vendor/llvm/dist/tools/lto/LTOCodeGenerator.h vendor/llvm/dist/tools/lto/LTOModule.cpp vendor/llvm/dist/tools/lto/LTOModule.h vendor/llvm/dist/tools/lto/Makefile vendor/llvm/dist/tools/lto/lto.cpp vendor/llvm/dist/tools/lto/lto.exports vendor/llvm/dist/tools/macho-dump/macho-dump.cpp vendor/llvm/dist/tools/opt/GraphPrinters.cpp vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/unittests/ADT/APFloatTest.cpp vendor/llvm/dist/unittests/ADT/APIntTest.cpp vendor/llvm/dist/unittests/Support/MathExtrasTest.cpp vendor/llvm/dist/unittests/Transforms/Utils/Cloning.cpp vendor/llvm/dist/unittests/Transforms/Utils/Local.cpp vendor/llvm/dist/unittests/VMCore/DerivedTypesTest.cpp vendor/llvm/dist/unittests/VMCore/InstructionsTest.cpp vendor/llvm/dist/unittests/VMCore/MetadataTest.cpp vendor/llvm/dist/unittests/VMCore/PassManagerTest.cpp vendor/llvm/dist/unittests/VMCore/ValueMapTest.cpp vendor/llvm/dist/utils/DSAextract.py vendor/llvm/dist/utils/FileCheck/FileCheck.cpp vendor/llvm/dist/utils/GenLibDeps.pl vendor/llvm/dist/utils/KillTheDoctor/KillTheDoctor.cpp vendor/llvm/dist/utils/NewNightlyTest.pl vendor/llvm/dist/utils/TableGen/ARMDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.h vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.h vendor/llvm/dist/utils/TableGen/CallingConvEmitter.h vendor/llvm/dist/utils/TableGen/ClangASTNodesEmitter.cpp vendor/llvm/dist/utils/TableGen/ClangAttrEmitter.cpp vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.cpp vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.h vendor/llvm/dist/utils/TableGen/ClangSACheckersEmitter.cpp vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.h vendor/llvm/dist/utils/TableGen/CodeGenRegisters.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/CodeGenTarget.h vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelEmitter.h vendor/llvm/dist/utils/TableGen/DAGISelMatcher.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.h vendor/llvm/dist/utils/TableGen/DAGISelMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherOpt.cpp vendor/llvm/dist/utils/TableGen/DisassemblerEmitter.cpp vendor/llvm/dist/utils/TableGen/EDEmitter.cpp vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/FixedLenDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/LLVMCConfigurationEmitter.cpp vendor/llvm/dist/utils/TableGen/NeonEmitter.cpp vendor/llvm/dist/utils/TableGen/NeonEmitter.h vendor/llvm/dist/utils/TableGen/OptParserEmitter.cpp vendor/llvm/dist/utils/TableGen/Record.h vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp vendor/llvm/dist/utils/TableGen/SubtargetEmitter.h vendor/llvm/dist/utils/TableGen/TGLexer.h vendor/llvm/dist/utils/TableGen/TGParser.cpp vendor/llvm/dist/utils/TableGen/TGValueTypes.cpp vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/TableGen/X86DisassemblerTables.cpp vendor/llvm/dist/utils/TableGen/X86DisassemblerTables.h vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.h vendor/llvm/dist/utils/buildit/GNUmakefile vendor/llvm/dist/utils/buildit/build_llvm vendor/llvm/dist/utils/lit/lit/ProgressBar.py vendor/llvm/dist/utils/lit/lit/TestRunner.py vendor/llvm/dist/utils/lit/lit/TestingConfig.py vendor/llvm/dist/utils/lit/setup.py vendor/llvm/dist/utils/llvm-lit/Makefile vendor/llvm/dist/utils/llvmbuild vendor/llvm/dist/utils/profile.pl vendor/llvm/dist/utils/release/test-release.sh vendor/llvm/dist/utils/unittest/UnitTestMain/Makefile vendor/llvm/dist/utils/unittest/googletest/gtest-filepath.cc vendor/llvm/dist/utils/unittest/googletest/gtest.cc vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/CMakeLists.txt Mon May 2 19:34:44 2011 (r221337) @@ -10,7 +10,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ) -set(PACKAGE_VERSION "2.9") +set(PACKAGE_VERSION "3.0") set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -81,6 +81,9 @@ set(LLVM_ALL_TARGETS XCore ) +# List of targets with JIT support: +set(LLVM_TARGETS_WITH_JIT X86 PowerPC ARM) + if( MSVC ) set(LLVM_TARGETS_TO_BUILD X86 CACHE STRING "Semicolon-separated list of targets to build, or \"all\".") @@ -135,9 +138,15 @@ include(AddLLVMDefinitions) option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON) -include(config-ix) +# MSVC has a gazillion warnings with this. +if( MSVC ) + option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." OFF) +else( MSVC ) + option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON) +endif() -include(HandleLLVMOptions) +option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) +option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF) if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" ) option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF) @@ -145,6 +154,12 @@ else() option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON) endif() +# All options referred to from HandleLLVMOptions have to be specified +# BEFORE this include, otherwise options will not be correctly set on +# first cmake run +include(config-ix) +include(HandleLLVMOptions) + configure_file( ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake ${LLVM_BINARY_DIR}/include/llvm/Config/config.h) @@ -161,16 +176,6 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LL set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib ) set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib ) -# MSVC has a gazillion warnings with this. -if( MSVC ) - option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." OFF) -else( MSVC ) - option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON) -endif() - -option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) -option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF) - set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR}) @@ -183,15 +188,6 @@ include(AddLLVM) include(TableGen) if( MINGW ) - get_system_libs(LLVM_SYSTEM_LIBS_LIST) - foreach(l ${LLVM_SYSTEM_LIBS_LIST}) - set(LLVM_SYSTEM_LIBS "${LLVM_SYSTEM_LIBS} -l${l}") - endforeach() - set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES}${LLVM_SYSTEM_LIBS}") - set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}${LLVM_SYSTEM_LIBS}") -endif() - -if( MINGW ) # People report that -O3 is unreliable on MinGW. The traditional # build also uses -O2 for that reason: llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2") @@ -231,6 +227,13 @@ if( LLVM_INCLUDE_TOOLS ) add_subdirectory(tools) endif() +option(LLVM_BUILD_RUNTIME + "Build the LLVM runtime libraries. If OFF, just generate build targets." ON) +option(LLVM_INCLUDE_RUNTIME "Generate build targets for the LLVM runtimes" ON) +if( LLVM_INCLUDE_RUNTIME ) + add_subdirectory(runtime) +endif() + option(LLVM_BUILD_EXAMPLES "Build the LLVM example programs. If OFF, just generate build targets." OFF) option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON) @@ -239,7 +242,7 @@ if( LLVM_INCLUDE_EXAMPLES ) endif() option(LLVM_BUILD_TESTS - "Build LLVM unit tests. If OFF, just generate build targes." OFF) + "Build LLVM unit tests. If OFF, just generate build targets." OFF) if( LLVM_INCLUDE_TESTS ) add_subdirectory(test) add_subdirectory(utils/unittest) @@ -260,6 +263,7 @@ install(DIRECTORY include/ PATTERN "*.h" PATTERN "*.td" PATTERN "*.inc" + PATTERN "LICENSE.TXT" PATTERN ".svn" EXCLUDE ) Modified: vendor/llvm/dist/Makefile ============================================================================== --- vendor/llvm/dist/Makefile Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/Makefile Mon May 2 19:34:44 2011 (r221337) @@ -168,6 +168,15 @@ install-clang: install install-clang-c: install install-libs: install +# If SHOW_DIAGNOSTICS is enabled, clear the diagnostics file first. +ifeq ($(SHOW_DIAGNOSTICS),1) +clean-diagnostics: + $(Verb) rm -f $(LLVM_OBJ_ROOT)/$(BuildMode)/diags +.PHONY: clean-diagnostics + +all-local:: clean-diagnostics +endif + #------------------------------------------------------------------------ # Make sure the generated headers are up-to-date. This must be kept in # sync with the AC_CONFIG_HEADER invocations in autoconf/configure.ac @@ -198,6 +207,12 @@ ifneq ($(ENABLE_OPTIMIZED),1) $(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to $(Echo) '*****' make an optimized build. Alternatively you can $(Echo) '*****' configure with --enable-optimized. +ifeq ($(SHOW_DIAGNOSTICS),1) + $(Verb) if test -s $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; then \ + $(LLVM_SRC_ROOT)/utils/show-diagnostics \ + $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; \ + fi +endif endif endif Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/Makefile.rules Mon May 2 19:34:44 2011 (r221337) @@ -444,11 +444,11 @@ endif # LLVM Capable Compiler #-------------------------------------------------------------------- -ifeq ($(LLVMCC_OPTION),llvm-gcc) +ifneq ($(findstring llvm-gcc,$(LLVMCC_OPTION)),) LLVMCC := $(LLVMGCC) LLVMCXX := $(LLVMGXX) else - ifeq ($(LLVMCC_OPTION),clang) + ifneq ($(findstring clang,$(LLVMCC_OPTION)),) ifneq ($(CLANGPATH),) LLVMCC := $(CLANGPATH) LLVMCXX := $(CLANGXXPATH) @@ -646,26 +646,42 @@ CPP.Flags += $(sort -I$(PROJ_OBJ_DIR $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \ $(CPP.BaseFlags) +# SHOW_DIAGNOSTICS support. +ifeq ($(SHOW_DIAGNOSTICS),1) + Compile.Wrapper := env CC_LOG_DIAGNOSTICS=1 \ + CC_LOG_DIAGNOSTICS_FILE="$(LLVM_OBJ_ROOT)/$(BuildMode)/diags" +else + Compile.Wrapper := +endif + ifeq ($(BUILD_COMPONENT), 1) - Compile.C = $(BUILD_CC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ + Compile.C = $(Compile.Wrapper) \ + $(BUILD_CC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) -c - Compile.CXX = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) \ + Compile.CXX = $(Compile.Wrapper) \ + $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) \ $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) -c - Preprocess.CXX= $(BUILD_CXX) $(CPP.Flags) $(CPPFLAGS) $(TargetCommonOpts) \ + Preprocess.CXX= $(Compile.Wrapper) \ + $(BUILD_CXX) $(CPP.Flags) $(CPPFLAGS) $(TargetCommonOpts) \ $(CompileCommonOpts) $(CXX.Flags) -E - Link = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) \ - $(LDFLAGS) \ - $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip) + Link = $(Compile.Wrapper) \ + $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) \ + $(LD.Flags) $(LDFLAGS) \ + $(TargetCommonOpts) $(CompileCommonOpts) $(Strip) else - Compile.C = $(CC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ + Compile.C = $(Compile.Wrapper) \ + $(CC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) -c - Compile.CXX = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(CPPFLAGS) \ + Compile.CXX = $(Compile.Wrapper) \ + $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(CPPFLAGS) \ $(TargetCommonOpts) $(CompileCommonOpts) -c - Preprocess.CXX= $(CXX) $(CPP.Flags) $(TargetCommonOpts) $(CPPFLAGS) \ + Preprocess.CXX= $(Compile.Wrapper) \ + $(CXX) $(CPP.Flags) $(TargetCommonOpts) $(CPPFLAGS) \ $(CompileCommonOpts) $(CXX.Flags) -E - Link = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(LDFLAGS) \ - $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip) + Link = $(Compile.Wrapper) \ + $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(LD.Flags) \ + $(LDFLAGS) $(TargetCommonOpts) $(CompileCommonOpts) $(Strip) endif BCCompile.C = $(LLVMCC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ @@ -719,6 +735,24 @@ BaseNameSources := $(sort $(basename $(S ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o) ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc) +#---------------------------------------------------------- +# For Mingw MSYS bash and Python/w32: +# +# $(ECHOPATH) prints DOSish pathstring. +# ex) $(ECHOPATH) /include/sys/types.h +# --> C:/mingw/include/sys/types.h +# built-in "echo" does not transform path to DOSish path. +# +# FIXME: It would not be needed when MSYS's python +# were provided. +#---------------------------------------------------------- + +ifeq (-mingw32,$(findstring -mingw32,$(BUILD_TRIPLE))) + ECHOPATH := $(Verb)python -u -c "import sys;print ' '.join(sys.argv[1:])" +else + ECHOPATH := $(Verb)$(ECHO) +endif + ############################################################################### # DIRECTORIES: Handle recursive descent of directory structure ############################################################################### @@ -1510,31 +1544,31 @@ BC_DEPEND_MOVEFILE = then $(MV) -f "$(Ob $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.mm for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.C) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) $(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.m for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.C) $(BC_DEPEND_OPTIONS) \ - $< -o $(ObjDir)/$*.ll -S -$(LLVMCC_EMITIR_FLAG) ; \ + $< -o $(ObjDir)/$*.ll -S $(LLVMCC_EMITIR_FLAG) ; \ $(BC_DEPEND_MOVEFILE) # Provide alternate rule sets if dependencies are disabled @@ -1562,23 +1596,23 @@ $(ObjDir)/%.o: %.m $(ObjDir)/.dir $(BUIL $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" - $(BCCompile.CXX) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) $(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.mm for $(BuildMode) build (bytecode)" - $(BCCompile.CXX) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" - $(BCCompile.CXX) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.CXX) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" - $(BCCompile.C) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.C) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) $(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) $(Echo) "Compiling $*.m for $(BuildMode) build (bytecode)" - $(BCCompile.C) $< -o $@ -S -$(LLVMCC_EMITIR_FLAG) + $(BCCompile.C) $< -o $@ -S $(LLVMCC_EMITIR_FLAG) endif @@ -1990,7 +2024,7 @@ $(DistZip) : $(TopDistDir)/.makedistdir $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName) dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip) - $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL ===== + $(Echo) ===== DISTRIBUTION PACKAGING SUCCESSFUL ===== DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir @@ -2139,8 +2173,13 @@ install-local:: $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir) $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \ cd $(PROJ_SRC_ROOT)/include && \ - for hdr in `find . -type f '!' '(' -name '*~' \ - -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS | \ + for hdr in `find . -type f \ + '(' -name LICENSE.TXT \ + -o -name '*.def' \ + -o -name '*.h' \ + -o -name '*.inc' \ + -o -name '*.td' \ + ')' -print | grep -v CVS | \ grep -v .svn` ; do \ instdir=`dirname "$(DESTDIR)$(PROJ_includedir)/$$hdr"` ; \ if test \! -d "$$instdir" ; then \ @@ -2153,7 +2192,19 @@ install-local:: ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \ cd $(PROJ_OBJ_ROOT)/include && \ - for hdr in `find . -type f -print | grep -v CVS` ; do \ + for hdr in `find . -type f \ + '(' -name LICENSE.TXT \ + -o -name '*.def' \ + -o -name '*.h' \ + -o -name '*.inc' \ + -o -name '*.td' \ + ')' -print | grep -v CVS | \ + grep -v .svn` ; do \ + instdir=`dirname "$(DESTDIR)$(PROJ_includedir)/$$hdr"` ; \ + if test \! -d "$$instdir" ; then \ + $(EchoCmd) Making install directory $$instdir ; \ + $(MKDIR) $$instdir ;\ + fi ; \ $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ done ; \ fi Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/autoconf/configure.ac Mon May 2 19:34:44 2011 (r221337) @@ -31,7 +31,7 @@ dnl=== dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[2.9svn]],[llvmbugs@cs.uiuc.edu]) +AC_INIT([[llvm]],[[3.0svn]],[llvmbugs@cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. @@ -657,12 +657,19 @@ for a_target in $TARGETS_TO_BUILD; do LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target" LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo" LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then + LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser" + fi AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGET, $LLVM_NATIVE_TARGET, [LLVM name for the native Target init function, if available]) AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETINFO, $LLVM_NATIVE_TARGETINFO, [LLVM name for the native TargetInfo init function, if available]) AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER, [LLVM name for the native AsmPrinter init function, if available]) + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPARSER, $LLVM_NATIVE_ASMPARSER, + [LLVM name for the native AsmParser init function, if available]) + fi fi done @@ -1422,6 +1429,24 @@ if test "$llvm_cv_os_type" = "MingW" ; t AC_CHECK_LIB(gcc,__cmpdi2,AC_DEFINE([HAVE___CMPDI2],[1],[Have host's __cmpdi2])) fi +dnl Check Win32 API EnumerateLoadedModules. +if test "$llvm_cv_os_type" = "MingW" ; then + AC_MSG_CHECKING([whether EnumerateLoadedModules() accepts new decl]) + AC_COMPILE_IFELSE([[#include +#include +extern void foo(PENUMLOADED_MODULES_CALLBACK); +extern void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID));]], +[ + AC_MSG_RESULT([yes]) + llvm_cv_win32_elmcb_pcstr="PCSTR" +], +[ + AC_MSG_RESULT([no]) + llvm_cv_win32_elmcb_pcstr="PSTR" +]) + AC_DEFINE_UNQUOTED([WIN32_ELMCB_PCSTR],$llvm_cv_win32_elmcb_pcstr,[Type of 1st arg on ELM Callback]) +fi + dnl Check for variations in the Standard C++ library and STL. These macros are dnl provided by LLVM in the autoconf/m4 directory. AC_FUNC_ISNAN Modified: vendor/llvm/dist/autoconf/m4/libtool.m4 ============================================================================== --- vendor/llvm/dist/autoconf/m4/libtool.m4 Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/autoconf/m4/libtool.m4 Mon May 2 19:34:44 2011 (r221337) @@ -1118,7 +1118,7 @@ if test -n "$_LT_AC_TAGVAR(hardcode_libd test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - # We can hardcode non-existant directories. + # We can hardcode non-existent directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library Modified: vendor/llvm/dist/autoconf/m4/ltdl.m4 ============================================================================== --- vendor/llvm/dist/autoconf/m4/ltdl.m4 Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/autoconf/m4/ltdl.m4 Mon May 2 19:34:44 2011 (r221337) @@ -156,7 +156,7 @@ AC_CACHE_CHECK([whether deplibs are load osf[[1234]]*) # dlopen did load deplibs (at least at 4.x), but until the 5.x series, # it did *not* use an RPATH in a shared library to find objects the - # library depends on, so we explictly say `no'. + # library depends on, so we explicitly say `no'. libltdl_cv_sys_dlopen_deplibs=no ;; osf5.0|osf5.0a|osf5.1) Modified: vendor/llvm/dist/cmake/config-ix.cmake ============================================================================== --- vendor/llvm/dist/cmake/config-ix.cmake Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/cmake/config-ix.cmake Mon May 2 19:34:44 2011 (r221337) @@ -224,6 +224,7 @@ check_type_exists(error_t errno.h HAVE_E # available programs checks function(llvm_find_program name) string(TOUPPER ${name} NAME) + string(REGEX REPLACE "\\." "_" NAME ${NAME}) find_program(LLVM_PATH_${NAME} ${name}) mark_as_advanced(LLVM_PATH_${NAME}) if(LLVM_PATH_${NAME}) @@ -241,6 +242,7 @@ llvm_find_program(neato) llvm_find_program(fdp) llvm_find_program(dot) llvm_find_program(dotty) +llvm_find_program(xdot.py) if( LLVM_ENABLE_FFI ) find_path(FFI_INCLUDE_PATH ffi.h PATHS ${FFI_INCLUDE_DIR}) @@ -269,6 +271,10 @@ if( LLVM_ENABLE_FFI ) check_symbol_exists(ffi_call ${FFI_HEADER} HAVE_FFI_CALL) list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${FFI_INCLUDE_PATH}) list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${FFI_LIBRARY_PATH}) +else() + unset(HAVE_FFI_FFI_H CACHE) + unset(HAVE_FFI_H CACHE) + unset(HAVE_FFI_CALL CACHE) endif( LLVM_ENABLE_FFI ) # Define LLVM_MULTITHREADED if gcc atomic builtins exists. @@ -319,24 +325,19 @@ elseif (LLVM_NATIVE_ARCH MATCHES "xcore" elseif (LLVM_NATIVE_ARCH MATCHES "msp430") set(LLVM_NATIVE_ARCH MSP430) else () - message(STATUS - "Unknown architecture ${LLVM_NATIVE_ARCH}; lli will not JIT code") - set(LLVM_NATIVE_ARCH) + message(FATAL_ERROR "Unknown architecture ${LLVM_NATIVE_ARCH}") endif () -if (LLVM_NATIVE_ARCH) - list(FIND LLVM_TARGETS_TO_BUILD ${LLVM_NATIVE_ARCH} NATIVE_ARCH_IDX) - if (NATIVE_ARCH_IDX EQUAL -1) - message(STATUS - "Native target ${LLVM_NATIVE_ARCH} is not selected; lli will not JIT code") - set(LLVM_NATIVE_ARCH) - else () - message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}") - set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target) - set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo) - set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter) - endif () -endif() +list(FIND LLVM_TARGETS_TO_BUILD ${LLVM_NATIVE_ARCH} NATIVE_ARCH_IDX) +if (NATIVE_ARCH_IDX EQUAL -1) + message(STATUS + "Native target ${LLVM_NATIVE_ARCH} is not selected; lli will not JIT code") +else () + message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}") + set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target) + set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo) + set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter) +endif () if( MINGW ) set(HAVE_LIBIMAGEHLP 1) @@ -365,6 +366,21 @@ else( MSVC ) set(LTDL_DLOPEN_DEPLIBS 0) # TODO endif( MSVC ) +if( PURE_WINDOWS ) + CHECK_CXX_SOURCE_COMPILES(" + #include + #include + extern \"C\" void foo(PENUMLOADED_MODULES_CALLBACK); + extern \"C\" void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID)); + int main(){return 0;}" + HAVE_ELMCB_PCSTR) + if( HAVE_ELMCB_PCSTR ) + set(WIN32_ELMCB_PCSTR "PCSTR") + else() + set(WIN32_ELMCB_PCSTR "PSTR") + endif() +endif( PURE_WINDOWS ) + # FIXME: Signal handler return type, currently hardcoded to 'void' set(RETSIGTYPE void) Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/AddLLVM.cmake Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake Mon May 2 19:34:44 2011 (r221337) @@ -1,5 +1,5 @@ include(LLVMProcessSources) -include(LLVMConfig) +include(LLVM-Config) macro(add_llvm_library name) llvm_process_sources( ALL_FILES ${ARGN} ) @@ -10,13 +10,20 @@ macro(add_llvm_library name) endif( LLVM_COMMON_DEPENDS ) if( BUILD_SHARED_LIBS ) - get_system_libs(sl) - target_link_libraries( ${name} ${sl} ) + llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) endif() - install(TARGETS ${name} - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + # Ensure that the system libraries always comes last on the + # list. Without this, linking the unit tests on MinGW fails. + link_system_libs( ${name} ) + + if( EXCLUDE_FROM_ALL ) + set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON) + else() + install(TARGETS ${name} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + endif() # The LLVM Target library shall be built before its sublibraries # (asmprinter, etc) because those may use tablegenned files which # generation is triggered by the main LLVM target library. Necessary @@ -45,15 +52,22 @@ ${name} ignored.") add_library( ${name} ${libkind} ${ALL_FILES} ) set_target_properties( ${name} PROPERTIES PREFIX "" ) + llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) + link_system_libs( ${name} ) + if (APPLE) # Darwin-specific linker flags for loadable modules. set_target_properties(${name} PROPERTIES LINK_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress") endif() - install(TARGETS ${name} - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + if( EXCLUDE_FROM_ALL ) + set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON) + else() + install(TARGETS ${name} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + endif() endif() set_target_properties(${name} PROPERTIES FOLDER "Loadable modules") @@ -68,23 +82,12 @@ macro(add_llvm_executable name) add_executable(${name} ${ALL_FILES}) endif() set(EXCLUDE_FROM_ALL OFF) - if( LLVM_USED_LIBS ) - foreach(lib ${LLVM_USED_LIBS}) - target_link_libraries( ${name} ${lib} ) - endforeach(lib) - endif( LLVM_USED_LIBS ) - if( LLVM_LINK_COMPONENTS ) - llvm_config(${name} ${LLVM_LINK_COMPONENTS}) - endif( LLVM_LINK_COMPONENTS ) + target_link_libraries( ${name} ${LLVM_USED_LIBS} ) + llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) if( LLVM_COMMON_DEPENDS ) add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} ) endif( LLVM_COMMON_DEPENDS ) - if( NOT MINGW ) - get_system_libs(llvm_system_libs) - if( llvm_system_libs ) - target_link_libraries(${name} ${llvm_system_libs}) - endif() - endif() + link_system_libs( ${name} ) endmacro(add_llvm_executable name) Modified: vendor/llvm/dist/cmake/modules/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/cmake/modules/CMakeLists.txt Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/cmake/modules/CMakeLists.txt Mon May 2 19:34:44 2011 (r221337) @@ -1,15 +1,22 @@ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake") +set(LLVM_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS) configure_file( - LLVM.cmake - ${llvm_cmake_builddir}/LLVM.cmake + LLVMConfig.cmake.in + ${llvm_cmake_builddir}/LLVMConfig.cmake + @ONLY) + +configure_file( + LLVMConfigVersion.cmake.in + ${llvm_cmake_builddir}/LLVMConfigVersion.cmake @ONLY) install(FILES - ${llvm_cmake_builddir}/LLVM.cmake - LLVMConfig.cmake + ${llvm_cmake_builddir}/LLVMConfig.cmake + ${llvm_cmake_builddir}/LLVMConfigVersion.cmake + LLVM-Config.cmake LLVMLibDeps.cmake DESTINATION share/llvm/cmake) @@ -17,16 +24,11 @@ install(DIRECTORY . DESTINATION share/llvm/cmake FILES_MATCHING PATTERN *.cmake PATTERN .svn EXCLUDE - PATTERN LLVM.cmake EXCLUDE PATTERN LLVMConfig.cmake EXCLUDE + PATTERN LLVMConfigVersion.cmake EXCLUDE + PATTERN LLVM-Config.cmake EXCLUDE PATTERN LLVMLibDeps.cmake EXCLUDE PATTERN FindBison.cmake EXCLUDE PATTERN GetTargetTriple.cmake EXCLUDE PATTERN VersionFromVCS.cmake EXCLUDE PATTERN CheckAtomic.cmake EXCLUDE) - -install(FILES - ${llvm_cmake_builddir}/LLVM.cmake - LLVMConfig.cmake - LLVMLibDeps.cmake - DESTINATION share/llvm/cmake) Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Mon May 2 19:34:44 2011 (r221337) @@ -84,7 +84,7 @@ if( LLVM_ENABLE_PIC ) if( SUPPORTS_FPIC_FLAG ) message(STATUS "Building with -fPIC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") else( SUPPORTS_FPIC_FLAG ) message(WARNING "-fPIC not supported.") endif() @@ -102,6 +102,29 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT endif( LLVM_BUILD_32_BITS ) endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) +if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) ) + # Only Visual Studio 2008 and 2010 officially supports /MP. + # Visual Studio 2005 do support it but it's experimental there. + set(LLVM_COMPILER_JOBS "0" CACHE STRING + "Number of parallel compiler jobs. 0 means use all processors. Default is 0.") + if( NOT LLVM_COMPILER_JOBS STREQUAL "1" ) + if( LLVM_COMPILER_JOBS STREQUAL "0" ) + add_llvm_definitions( /MP ) + else() + if (MSVC10) + message(FATAL_ERROR + "Due to a bug in CMake only 0 and 1 is supported for " + "LLVM_COMPILER_JOBS when generating for Visual Studio 2010") + else() + message(STATUS "Number of parallel compiler jobs set to " ${LLVM_COMPILER_JOBS}) + add_llvm_definitions( /MP${LLVM_COMPILER_JOBS} ) + endif() + endif() + else() + message(STATUS "Parallel compilation disabled") + endif() +endif() + if( MSVC ) include(ChooseMSVCCRT) @@ -130,7 +153,7 @@ if( MSVC ) -wd4715 # Suppress ''function' : not all control paths return a value' -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)' -wd4065 # Suppress 'switch statement contains 'default' but no 'case' labels' - + -wd4181 # Suppress 'qualifier applied to reference type; ignored' -w14062 # Promote "enumerator in switch of enum is not handled" to level 1 warning. ) Added: vendor/llvm/dist/cmake/modules/LLVM-Config.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/cmake/modules/LLVM-Config.cmake Mon May 2 19:34:44 2011 (r221337) @@ -0,0 +1,203 @@ +function(get_system_libs return_var) + # Returns in `return_var' a list of system libraries used by LLVM. + if( NOT MSVC ) + if( MINGW ) + set(system_libs ${system_libs} imagehlp psapi) + elseif( CMAKE_HOST_UNIX ) + if( HAVE_LIBDL ) + set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) + endif() + if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) + set(system_libs ${system_libs} pthread) + endif() + endif( MINGW ) + endif( NOT MSVC ) + set(${return_var} ${system_libs} PARENT_SCOPE) +endfunction(get_system_libs) + + +function(link_system_libs target) + get_system_libs(llvm_system_libs) + target_link_libraries(${target} ${llvm_system_libs}) +endfunction(link_system_libs) + + +function(is_llvm_target_library library return_var) + # Sets variable `return_var' to ON if `library' corresponds to a + # LLVM supported target. To OFF if it doesn't. + set(${return_var} OFF PARENT_SCOPE) + string(TOUPPER "${library}" capitalized_lib) + string(TOUPPER "${LLVM_ALL_TARGETS}" targets) + foreach(t ${targets}) + if( capitalized_lib STREQUAL t OR + capitalized_lib STREQUAL "LLVM${t}" OR + capitalized_lib STREQUAL "LLVM${t}CODEGEN" OR + capitalized_lib STREQUAL "LLVM${t}ASMPARSER" OR + capitalized_lib STREQUAL "LLVM${t}ASMPRINTER" OR + capitalized_lib STREQUAL "LLVM${t}DISASSEMBLER" OR + capitalized_lib STREQUAL "LLVM${t}INFO" ) + set(${return_var} ON PARENT_SCOPE) + break() + endif() + endforeach() +endfunction(is_llvm_target_library) + + +macro(llvm_config executable) + explicit_llvm_config(${executable} ${ARGN}) +endmacro(llvm_config) + + +function(explicit_llvm_config executable) + set( link_components ${ARGN} ) + + explicit_map_components_to_libraries(LIBRARIES ${link_components}) + target_link_libraries(${executable} ${LIBRARIES}) +endfunction(explicit_llvm_config) + + +# This is a variant intended for the final user: +function(llvm_map_components_to_libraries OUT_VAR) + explicit_map_components_to_libraries(result ${ARGN}) + get_system_libs(sys_result) + set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE ) +endfunction(llvm_map_components_to_libraries) + + +function(explicit_map_components_to_libraries out_libs) + set( link_components ${ARGN} ) + get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS) + string(TOUPPER "${llvm_libs}" capitalized_libs) + + # Expand some keywords: + list(FIND LLVM_TARGETS_TO_BUILD "${LLVM_NATIVE_ARCH}" have_native_backend) + list(FIND link_components "engine" engine_required) + if( NOT engine_required EQUAL -1 ) + list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" have_jit) + if( NOT have_native_backend EQUAL -1 AND NOT have_jit EQUAL -1 ) + list(APPEND link_components "jit") + list(APPEND link_components "native") + else() + list(APPEND link_components "interpreter") + endif() + endif() + list(FIND link_components "native" native_required) + if( NOT native_required EQUAL -1 ) + if( NOT have_native_backend EQUAL -1 ) + list(APPEND link_components ${LLVM_NATIVE_ARCH}) + endif() + endif() + + # Translate symbolic component names to real libraries: + foreach(c ${link_components}) + # add codegen, asmprinter, asmparser, disassembler + list(FIND LLVM_TARGETS_TO_BUILD ${c} idx) + if( NOT idx LESS 0 ) + list(FIND llvm_libs "LLVM${c}CodeGen" idx) + if( NOT idx LESS 0 ) + list(APPEND expanded_components "LLVM${c}CodeGen") + else() + list(FIND llvm_libs "LLVM${c}" idx) + if( NOT idx LESS 0 ) + list(APPEND expanded_components "LLVM${c}") + else() + message(FATAL_ERROR "Target ${c} is not in the set of libraries.") + endif() + endif() + list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}AsmPrinter") + endif() + list(FIND llvm_libs "LLVM${c}AsmParser" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}AsmParser") + endif() + list(FIND llvm_libs "LLVM${c}Info" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}Info") + endif() + list(FIND llvm_libs "LLVM${c}Disassembler" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}Disassembler") + endif() + elseif( c STREQUAL "native" ) + # already processed + elseif( c STREQUAL "nativecodegen" ) + list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen") + elseif( c STREQUAL "backend" ) + # same case as in `native'. + elseif( c STREQUAL "engine" ) + # already processed + elseif( c STREQUAL "all" ) + list(APPEND expanded_components ${llvm_libs}) + else( NOT idx LESS 0 ) + # Canonize the component name: + string(TOUPPER "${c}" capitalized) + list(FIND capitalized_libs LLVM${capitalized} lib_idx) + if( lib_idx LESS 0 ) + # The component is unknown. Maybe is an omitted target? + is_llvm_target_library(${c} iltl_result) + if( NOT iltl_result ) + message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.") + endif() + else( lib_idx LESS 0 ) + list(GET llvm_libs ${lib_idx} canonical_lib) + list(APPEND expanded_components ${canonical_lib}) + endif( lib_idx LESS 0 ) + endif( NOT idx LESS 0 ) + endforeach(c) + # Expand dependencies while topologically sorting the list of libraries: + list(LENGTH expanded_components lst_size) + set(cursor 0) + set(processed) + while( cursor LESS lst_size ) + list(GET expanded_components ${cursor} lib) + list(APPEND expanded_components ${MSVC_LIB_DEPS_${lib}}) + # Remove duplicates at the front: + list(REVERSE expanded_components) + list(REMOVE_DUPLICATES expanded_components) + list(REVERSE expanded_components) + list(APPEND processed ${lib}) + # Find the maximum index that doesn't have to be re-processed: + while(NOT "${expanded_components}" MATCHES "^${processed}.*" ) + list(REMOVE_AT processed -1) + endwhile() + list(LENGTH processed cursor) + list(LENGTH expanded_components lst_size) + endwhile( cursor LESS lst_size ) + # Return just the libraries included in this build: + set(result) + foreach(c ${expanded_components}) + list(FIND llvm_libs ${c} lib_idx) + if( NOT lib_idx LESS 0 ) + set(result ${result} ${c}) + endif() + endforeach(c) + set(${out_libs} ${result} PARENT_SCOPE) +endfunction(explicit_map_components_to_libraries) + + +# The library dependency data is contained in the file +# LLVMLibDeps.cmake on this directory. It is automatically generated +# by tools/llvm-config/CMakeLists.txt when the build comprises all the +# targets and we are on a environment Posix enough to build the +# llvm-config script. This, in practice, just excludes MSVC. + +# When you remove or rename a library from the build, be sure to +# remove its file from lib/ as well, or the GenLibDeps.pl script will +# include it on its analysis! + +# The format generated by GenLibDeps.pl + +# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a + +# is translated to: + +# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget) + +# It is necessary to remove the `lib' prefix and the `.a'. + +# This 'sed' script should do the trick: +# sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: # #' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt + +include(LLVMLibDeps) Added: vendor/llvm/dist/cmake/modules/LLVMConfig.cmake.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/cmake/modules/LLVMConfig.cmake.in Mon May 2 19:34:44 2011 (r221337) @@ -0,0 +1,47 @@ +# This file provides information and services to the final user. + +set(LLVM_PACKAGE_VERSION @PACKAGE_VERSION@) + +set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@) + +set_property( GLOBAL PROPERTY LLVM_LIBS "@llvm_libs@") + +set(LLVM_ALL_TARGETS @LLVM_ALL_TARGETS@) + +set(LLVM_TARGETS_TO_BUILD @LLVM_TARGETS_TO_BUILD@) + +set(LLVM_TARGETS_WITH_JIT @LLVM_TARGETS_WITH_JIT@) + +set(TARGET_TRIPLE "@TARGET_TRIPLE@") + +set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@) + +set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@) + +set(LLVM_NATIVE_ARCH @LLVM_NATIVE_ARCH@) + +set(LLVM_ENABLE_PIC @LLVM_ENABLE_PIC@) + +set(HAVE_LIBDL @HAVE_LIBDL@) +set(HAVE_LIBPTHREAD @HAVE_LIBPTHREAD@) +set(LLVM_ON_UNIX @LLVM_ON_UNIX@) +set(LLVM_ON_WIN32 @LLVM_ON_WIN32@) + +set(LLVM_INSTALL_PREFIX @LLVM_INSTALL_PREFIX@) +set(LLVM_INCLUDE_DIRS ${LLVM_INSTALL_PREFIX}/include) +set(LLVM_LIBRARY_DIRS ${LLVM_INSTALL_PREFIX}/lib) +set(LLVM_DEFINITIONS "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS") + +# We try to include using the current setting of CMAKE_MODULE_PATH, +# which suppossedly was filled by the user with the directory where +# this file was installed: +include( LLVM-Config OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED ) + +# If failed, we assume that this is an un-installed build: +if( NOT LLVMCONFIG_INCLUDED ) + set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "@LLVM_SOURCE_DIR@/cmake/modules") + include( LLVM-Config ) +endif() + Added: vendor/llvm/dist/cmake/modules/LLVMConfigVersion.cmake.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/cmake/modules/LLVMConfigVersion.cmake.in Mon May 2 19:34:44 2011 (r221337) @@ -0,0 +1 @@ +set(PACKAGE_VERSION "@PACKAGE_VERSION@") \ No newline at end of file Modified: vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Mon May 2 19:02:30 2011 (r221336) +++ vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Mon May 2 19:34:44 2011 (r221337) @@ -30,11 +30,11 @@ set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeAsmPrinter LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget) -set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport) +set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC) set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMMC LLVMSupport) -set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo) -set(MSVC_LIB_DEPS_LLVMMCJIT LLVMExecutionEngine LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZInfo LLVMTarget LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo) +set(MSVC_LIB_DEPS_LLVMMCJIT LLVMCore LLVMExecutionEngine LLVMRuntimeDyld LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMTarget) @@ -47,6 +47,7 @@ set(MSVC_LIB_DEPS_LLVMPTXInfo LLVMMC LLV set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCAsmPrinter LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMMC LLVMSupport) +set(MSVC_LIB_DEPS_LLVMRuntimeDyld LLVMObject LLVMSupport) set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMTarget LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMTarget) @@ -61,7 +62,7 @@ set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVM set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMX86AsmPrinter LLVMX86Info LLVMX86Utils) set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Info LLVMMC LLVMSupport) -set(MSVC_LIB_DEPS_LLVMX86Utils LLVMSupport) +set(MSVC_LIB_DEPS_LLVMX86Utils LLVMCore LLVMSupport) set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 2 19:37:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79643106566B; Mon, 2 May 2011 19:37:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F5DF8FC1D; Mon, 2 May 2011 19:37:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42JbXH0051497; Mon, 2 May 2011 19:37:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42JbX3C051496; Mon, 2 May 2011 19:37:33 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105021937.p42JbX3C051496@svn.freebsd.org> From: Dimitry Andric Date: Mon, 2 May 2011 19:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221338 - vendor/llvm/llvm-r130700 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 19:37:33 -0000 Author: dim Date: Mon May 2 19:37:33 2011 New Revision: 221338 URL: http://svn.freebsd.org/changeset/base/221338 Log: Tag llvm r130700. Added: vendor/llvm/llvm-r130700/ - copied from r221337, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Mon May 2 19:39:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE760106564A; Mon, 2 May 2011 19:39:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA0758FC1E; Mon, 2 May 2011 19:39:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42Jds5L051634; Mon, 2 May 2011 19:39:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42Jdsv0051618; Mon, 2 May 2011 19:39:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105021939.p42Jdsv0051618@svn.freebsd.org> From: Dimitry Andric Date: Mon, 2 May 2011 19:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221339 - in vendor/clang/dist: . docs docs/tools examples examples/Tooling examples/clang-interpreter include/clang include/clang-c include/clang/AST include/clang/Analysis include/cla... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 19:39:55 -0000 Author: dim Date: Mon May 2 19:39:53 2011 New Revision: 221339 URL: http://svn.freebsd.org/changeset/base/221339 Log: Vendor import of clang trunk r130700: http://llvm.org/svn/llvm-project/cfe/trunk@130700 Added: vendor/clang/dist/examples/Tooling/ vendor/clang/dist/examples/Tooling/CMakeLists.txt vendor/clang/dist/examples/Tooling/ClangCheck.cpp vendor/clang/dist/examples/Tooling/Makefile vendor/clang/dist/include/clang/Basic/AddressSpaces.h vendor/clang/dist/include/clang/Basic/BuiltinsPTX.def vendor/clang/dist/include/clang/Basic/ExceptionSpecificationType.h vendor/clang/dist/include/clang/Basic/ExpressionTraits.h vendor/clang/dist/include/clang/Basic/OpenCL.h vendor/clang/dist/include/clang/Basic/VersionTuple.h vendor/clang/dist/include/clang/Frontend/LogDiagnosticPrinter.h vendor/clang/dist/include/clang/Serialization/ChainedIncludesSource.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/Checker.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h vendor/clang/dist/include/clang/Tooling/ vendor/clang/dist/include/clang/Tooling/Tooling.h vendor/clang/dist/lib/AST/ExternalASTSource.cpp vendor/clang/dist/lib/Basic/VersionTuple.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp vendor/clang/dist/lib/Frontend/LogDiagnosticPrinter.cpp vendor/clang/dist/lib/Headers/mm3dnow.h vendor/clang/dist/lib/Sema/DelayedDiagnostic.cpp vendor/clang/dist/lib/Sema/Scope.cpp vendor/clang/dist/lib/Serialization/ChainedIncludesSource.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CheckerContext.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngine.cpp vendor/clang/dist/lib/Tooling/ vendor/clang/dist/lib/Tooling/CMakeLists.txt vendor/clang/dist/lib/Tooling/JsonCompileCommandLineDatabase.cpp vendor/clang/dist/lib/Tooling/JsonCompileCommandLineDatabase.h vendor/clang/dist/lib/Tooling/Makefile vendor/clang/dist/lib/Tooling/Tooling.cpp vendor/clang/dist/runtime/compiler-rt/ vendor/clang/dist/runtime/compiler-rt/Makefile vendor/clang/dist/test/AST/ vendor/clang/dist/test/Analysis/OSAtomic_mac.cpp vendor/clang/dist/test/Analysis/PR9741.cpp vendor/clang/dist/test/Analysis/iterators.cpp vendor/clang/dist/test/Analysis/method-arg-decay.m vendor/clang/dist/test/Analysis/nullptr.cpp vendor/clang/dist/test/Analysis/variadic-method-types.m vendor/clang/dist/test/CXX/basic/basic.scope/basic.scope.local/p4-0x.cpp vendor/clang/dist/test/CXX/basic/basic.scope/basic.scope.pdecl/p3.cpp vendor/clang/dist/test/CXX/class/class.mem/p2.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.string/p2.cpp vendor/clang/dist/test/CXX/except/except.spec/p1.cpp vendor/clang/dist/test/CXX/except/except.spec/p11.cpp vendor/clang/dist/test/CXX/except/except.spec/p15.cpp vendor/clang/dist/test/CXX/except/except.spec/p2-dynamic-types.cpp vendor/clang/dist/test/CXX/except/except.spec/p2-places.cpp vendor/clang/dist/test/CXX/except/except.spec/p3.cpp vendor/clang/dist/test/CXX/except/except.spec/p5-pointers.cpp vendor/clang/dist/test/CXX/except/except.spec/p5-virtual.cpp vendor/clang/dist/test/CXX/except/except.spec/p9-dynamic.cpp vendor/clang/dist/test/CXX/except/except.spec/p9-noexcept.cpp vendor/clang/dist/test/CXX/except/except.spec/template.cpp vendor/clang/dist/test/CXX/lex/lex.pptoken/p3-0x.cpp vendor/clang/dist/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p3-0x.cpp vendor/clang/dist/test/CodeCompletion/PR9728.cpp vendor/clang/dist/test/CodeGen/arm-clear.c vendor/clang/dist/test/CodeGen/arm-pcs.c vendor/clang/dist/test/CodeGen/arm-vector-align.c vendor/clang/dist/test/CodeGen/attr-availability.c vendor/clang/dist/test/CodeGen/block-byref-aggr.c vendor/clang/dist/test/CodeGen/builtins-ptx.c vendor/clang/dist/test/CodeGen/debug-info-line2.c vendor/clang/dist/test/CodeGen/mmx-inline-asm.c vendor/clang/dist/test/CodeGen/mrtd.c vendor/clang/dist/test/CodeGen/ms_struct-bitfield-init.c vendor/clang/dist/test/CodeGen/ms_struct-bitfield.c vendor/clang/dist/test/CodeGen/packed-arrays.c vendor/clang/dist/test/CodeGen/ptx-cc.c vendor/clang/dist/test/CodeGen/switch-dce.c vendor/clang/dist/test/CodeGen/x86_64-arguments-darwin.c vendor/clang/dist/test/CodeGenCXX/apple-kext-guard-variable.cpp vendor/clang/dist/test/CodeGenCXX/cxx0x-delegating-ctors.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-cxx0x.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-fn-template.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-method-spec.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-this.cpp vendor/clang/dist/test/CodeGenCXX/dynamic-cast-always-null.cpp vendor/clang/dist/test/CodeGenCXX/for-range-temporaries.cpp vendor/clang/dist/test/CodeGenCXX/for-range.cpp vendor/clang/dist/test/CodeGenCXX/typeid.cpp vendor/clang/dist/test/CodeGenCXX/unknown-anytype.cpp vendor/clang/dist/test/CodeGenObjC/attr-availability.m vendor/clang/dist/test/CodeGenObjC/debug-info-property.m vendor/clang/dist/test/CodeGenObjC/instance-method-metadata.m vendor/clang/dist/test/CodeGenObjC/misc-atomic-property.m vendor/clang/dist/test/CodeGenObjC/no-vararg-messaging.m vendor/clang/dist/test/CodeGenObjC/simplify-exceptions.mm vendor/clang/dist/test/CodeGenObjCXX/message-reference.mm vendor/clang/dist/test/CodeGenObjCXX/property-reference.mm vendor/clang/dist/test/CodeGenOpenCL/2011-04-15-vec-init-from-vec.cl vendor/clang/dist/test/CodeGenOpenCL/address-spaces.cl vendor/clang/dist/test/Driver/apple-kext-i386.cpp vendor/clang/dist/test/Driver/cc-log-diagnostics.c vendor/clang/dist/test/Driver/clang-exception-flags.cpp vendor/clang/dist/test/Driver/clang_wrapv_opts.c vendor/clang/dist/test/Driver/exceptions.m vendor/clang/dist/test/FixIt/no-macro-fixit.c vendor/clang/dist/test/Frontend/dependency-generation-crash.c vendor/clang/dist/test/Frontend/diagnostic-name.c vendor/clang/dist/test/Index/annotate-context-sensitive.cpp vendor/clang/dist/test/Index/initializer-memory.cpp vendor/clang/dist/test/Index/pragma-diag-reparse.c vendor/clang/dist/test/Misc/Inputs/include.h vendor/clang/dist/test/Misc/include-stack-for-note-flag.cpp vendor/clang/dist/test/Misc/warn-in-system-header.c vendor/clang/dist/test/Misc/warn-in-system-header.h vendor/clang/dist/test/PCH/Inputs/working-directory-1.h vendor/clang/dist/test/PCH/chain-empty-initial-namespace.cpp vendor/clang/dist/test/PCH/chain-implicit-definition.cpp vendor/clang/dist/test/PCH/chain-late-anonymous-namespace.cpp vendor/clang/dist/test/PCH/chain-pending-instantiations.cpp vendor/clang/dist/test/PCH/cxx-chain-function-template.cpp vendor/clang/dist/test/PCH/cxx-for-range.cpp vendor/clang/dist/test/PCH/cxx-for-range.h vendor/clang/dist/test/PCH/cxx-reference.cpp vendor/clang/dist/test/PCH/cxx-reference.h vendor/clang/dist/test/PCH/modified-header-crash.c vendor/clang/dist/test/PCH/modified-header-crash.h vendor/clang/dist/test/PCH/working-directory.cpp vendor/clang/dist/test/PCH/working-directory.h vendor/clang/dist/test/Parser/DelayedTemplateParsing.cpp vendor/clang/dist/test/Parser/attr-availability.c vendor/clang/dist/test/Parser/c1x-generic-selection.c vendor/clang/dist/test/Parser/cxx-member-crash.cpp vendor/clang/dist/test/Parser/objcxx-at.mm vendor/clang/dist/test/Parser/opencl-image-access.cl vendor/clang/dist/test/Parser/recovery.m vendor/clang/dist/test/Preprocessor/traditional-cpp.c vendor/clang/dist/test/Rewriter/rewrite-block-literal-1.mm vendor/clang/dist/test/Sema/__try.c vendor/clang/dist/test/Sema/attr-args.c vendor/clang/dist/test/Sema/attr-availability-ios.c vendor/clang/dist/test/Sema/attr-availability-macosx.c vendor/clang/dist/test/Sema/attr-availability.c vendor/clang/dist/test/Sema/builtins-decl.c vendor/clang/dist/test/Sema/generic-selection.c vendor/clang/dist/test/Sema/memset-invalid.c vendor/clang/dist/test/Sema/overloaded-func-transparent-union.c vendor/clang/dist/test/Sema/pragma-ms_struct.c vendor/clang/dist/test/Sema/static-assert.c vendor/clang/dist/test/Sema/uninit-variables-vectors.c vendor/clang/dist/test/SemaCXX/PR9459.cpp vendor/clang/dist/test/SemaCXX/PR9460.cpp vendor/clang/dist/test/SemaCXX/PR9461.cpp vendor/clang/dist/test/SemaCXX/PR9572.cpp vendor/clang/dist/test/SemaCXX/__try.cpp vendor/clang/dist/test/SemaCXX/address-space-conversion.cpp vendor/clang/dist/test/SemaCXX/address-space-newdelete.cpp vendor/clang/dist/test/SemaCXX/address-space-references.cpp vendor/clang/dist/test/SemaCXX/auto-subst-failure.cpp vendor/clang/dist/test/SemaCXX/cxx0x-constexpr-const.cpp vendor/clang/dist/test/SemaCXX/cxx0x-delegating-ctors.cpp vendor/clang/dist/test/SemaCXX/cxx0x-return-init-list.cpp vendor/clang/dist/test/SemaCXX/decltype-98.cpp vendor/clang/dist/test/SemaCXX/expression-traits.cpp vendor/clang/dist/test/SemaCXX/for-range-examples.cpp vendor/clang/dist/test/SemaCXX/for-range-no-std.cpp vendor/clang/dist/test/SemaCXX/generic-selection.cpp vendor/clang/dist/test/SemaCXX/goto.cpp vendor/clang/dist/test/SemaCXX/goto2.cpp vendor/clang/dist/test/SemaCXX/neon-vector-types.cpp vendor/clang/dist/test/SemaCXX/operator-arrow-temporary.cpp vendor/clang/dist/test/SemaCXX/pascal-strings.cpp vendor/clang/dist/test/SemaCXX/short-enums.cpp vendor/clang/dist/test/SemaCXX/short-wchar-sign.cpp vendor/clang/dist/test/SemaCXX/uninit-variables-conditional.cpp vendor/clang/dist/test/SemaCXX/unknown-anytype.cpp vendor/clang/dist/test/SemaCXX/warn-bool-conversion.cpp vendor/clang/dist/test/SemaCXX/warn-deprecated-header.cpp vendor/clang/dist/test/SemaCXX/warn-exit-time-destructors.cpp vendor/clang/dist/test/SemaCXX/warn-non-pod-memset.cpp vendor/clang/dist/test/SemaCXX/warn-using-namespace-in-header.cpp vendor/clang/dist/test/SemaCXX/warn-using-namespace-in-header.h vendor/clang/dist/test/SemaObjC/assign-rvalue-message.m vendor/clang/dist/test/SemaObjC/class-message-protocol-lookup.m vendor/clang/dist/test/SemaObjC/class-unavail-warning.m vendor/clang/dist/test/SemaObjC/conditional-expr-8.m vendor/clang/dist/test/SemaObjC/missing-atend-metadata.m vendor/clang/dist/test/SemaObjC/objc-qualified-property-lookup.m vendor/clang/dist/test/SemaObjC/property-lookup-in-id.m vendor/clang/dist/test/SemaObjC/self-declared-in-block.m vendor/clang/dist/test/SemaObjC/self-in-function.m vendor/clang/dist/test/SemaObjC/unqualified-to-qualified-class-warn.m vendor/clang/dist/test/SemaObjCXX/argument-dependent-lookup.mm vendor/clang/dist/test/SemaObjCXX/goto.mm vendor/clang/dist/test/SemaObjCXX/overload-gc.mm vendor/clang/dist/test/SemaObjCXX/property-reference.mm vendor/clang/dist/test/SemaOpenCL/vec_step.cl vendor/clang/dist/test/SemaTemplate/address-spaces.cpp vendor/clang/dist/test/SemaTemplate/issue150.cpp vendor/clang/dist/test/SemaTemplate/resolve-single-template-id.cpp vendor/clang/dist/unittests/Tooling/ vendor/clang/dist/unittests/Tooling/JsonCompileCommandLineDatabaseTest.cpp vendor/clang/dist/unittests/Tooling/ToolingTest.cpp vendor/clang/dist/www/libstdc++4.4-clang0x.patch Deleted: vendor/clang/dist/include/clang/Analysis/Analyses/UninitializedValuesV2.h vendor/clang/dist/include/clang/Frontend/DeclContextXML.def vendor/clang/dist/include/clang/Frontend/DeclXML.def vendor/clang/dist/include/clang/Frontend/DocumentXML.def vendor/clang/dist/include/clang/Frontend/DocumentXML.h vendor/clang/dist/include/clang/Frontend/StmtXML.def vendor/clang/dist/include/clang/Frontend/TypeXML.def vendor/clang/dist/include/clang/StaticAnalyzer/Core/CheckerV2.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/Checker.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.def vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.h vendor/clang/dist/lib/Analysis/UninitializedValuesV2.cpp vendor/clang/dist/lib/Frontend/DeclXML.cpp vendor/clang/dist/lib/Frontend/DocumentXML.cpp vendor/clang/dist/lib/Frontend/StmtXML.cpp vendor/clang/dist/lib/Frontend/TypeXML.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.h vendor/clang/dist/lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ExperimentalChecks.h vendor/clang/dist/lib/StaticAnalyzer/Checkers/ExprEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/InternalChecks.h vendor/clang/dist/lib/StaticAnalyzer/Core/Checker.cpp vendor/clang/dist/runtime/libcxx/ vendor/clang/dist/test/Analysis/conditional-op-missing-lhs.c vendor/clang/dist/test/Analysis/uninit-vals.c vendor/clang/dist/test/CXX/class.derived/p8-0x.cpp vendor/clang/dist/test/CXX/class/class.mem/p8-0x-pedantic.cpp vendor/clang/dist/test/CodeGen/builtinmemcpy.c vendor/clang/dist/test/CodeGenCXX/dyncast.cpp vendor/clang/dist/test/CodeGenObjC/missing-atend-metadata.m vendor/clang/dist/test/Parser/cxx-exception-spec.cpp vendor/clang/dist/test/SemaCXX/exception-spec.cpp vendor/clang/dist/test/SemaCXX/warn_false_to_pointer.cpp vendor/clang/dist/test/SemaObjC/auto-objective-c.m vendor/clang/dist/test/SemaObjC/method-arg-decay.m Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/Makefile vendor/clang/dist/docs/DriverInternals.html vendor/clang/dist/docs/InternalsManual.html vendor/clang/dist/docs/LanguageExtensions.html vendor/clang/dist/docs/UsersManual.html vendor/clang/dist/docs/tools/clang.pod vendor/clang/dist/examples/CMakeLists.txt vendor/clang/dist/examples/clang-interpreter/Makefile vendor/clang/dist/examples/clang-interpreter/main.cpp vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/ASTConsumer.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/ASTDiagnostic.h vendor/clang/dist/include/clang/AST/ASTMutationListener.h vendor/clang/dist/include/clang/AST/Attr.h vendor/clang/dist/include/clang/AST/CXXInheritance.h vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/CharUnits.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclFriend.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/EvaluatedExprVisitor.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/ExprObjC.h vendor/clang/dist/include/clang/AST/ExternalASTSource.h vendor/clang/dist/include/clang/AST/NestedNameSpecifier.h vendor/clang/dist/include/clang/AST/PrettyPrinter.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/StmtCXX.h vendor/clang/dist/include/clang/AST/StmtIterator.h vendor/clang/dist/include/clang/AST/TemplateBase.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h vendor/clang/dist/include/clang/Analysis/Analyses/UninitializedValues.h vendor/clang/dist/include/clang/Analysis/AnalysisContext.h vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h vendor/clang/dist/include/clang/Analysis/CFG.h vendor/clang/dist/include/clang/Analysis/DomainSpecific/CocoaConventions.h vendor/clang/dist/include/clang/Analysis/FlowSensitive/DataflowSolver.h vendor/clang/dist/include/clang/Analysis/ProgramPoint.h vendor/clang/dist/include/clang/Analysis/Visitors/CFGStmtVisitor.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrKinds.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/CMakeLists.txt vendor/clang/dist/include/clang/Basic/ConvertUTF.h vendor/clang/dist/include/clang/Basic/DeclNodes.td vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/Diagnostic.td vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/FileManager.h vendor/clang/dist/include/clang/Basic/IdentifierTable.h vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/Makefile vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/Specifiers.h vendor/clang/dist/include/clang/Basic/StmtNodes.td vendor/clang/dist/include/clang/Basic/TargetBuiltins.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Basic/TypeTraits.h vendor/clang/dist/include/clang/Basic/Version.h vendor/clang/dist/include/clang/Basic/arm_neon.td vendor/clang/dist/include/clang/Driver/Arg.h vendor/clang/dist/include/clang/Driver/CC1AsOptions.td vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/DriverDiagnostic.h vendor/clang/dist/include/clang/Driver/OptParser.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/Analyses.def vendor/clang/dist/include/clang/Frontend/AnalyzerOptions.h vendor/clang/dist/include/clang/Frontend/ChainedDiagnosticClient.h vendor/clang/dist/include/clang/Frontend/CodeGenOptions.h vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/CompilerInvocation.h vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/FrontendDiagnostic.h vendor/clang/dist/include/clang/Frontend/FrontendOptions.h vendor/clang/dist/include/clang/Frontend/LangStandard.h vendor/clang/dist/include/clang/Frontend/LangStandards.def vendor/clang/dist/include/clang/Frontend/MultiplexConsumer.h vendor/clang/dist/include/clang/Frontend/PreprocessorOptions.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Lex/DirectoryLookup.h vendor/clang/dist/include/clang/Lex/HeaderMap.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/LexDiagnostic.h vendor/clang/dist/include/clang/Lex/Lexer.h vendor/clang/dist/include/clang/Lex/LiteralSupport.h vendor/clang/dist/include/clang/Lex/MacroInfo.h vendor/clang/dist/include/clang/Lex/MultipleIncludeOpt.h vendor/clang/dist/include/clang/Lex/PPCallbacks.h vendor/clang/dist/include/clang/Lex/PTHLexer.h vendor/clang/dist/include/clang/Lex/Pragma.h vendor/clang/dist/include/clang/Lex/PreprocessingRecord.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorLexer.h vendor/clang/dist/include/clang/Makefile vendor/clang/dist/include/clang/Parse/ParseDiagnostic.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Rewrite/FrontendActions.h vendor/clang/dist/include/clang/Rewrite/Rewriter.h vendor/clang/dist/include/clang/Sema/AttributeList.h vendor/clang/dist/include/clang/Sema/DeclSpec.h vendor/clang/dist/include/clang/Sema/DelayedDiagnostic.h vendor/clang/dist/include/clang/Sema/IdentifierResolver.h vendor/clang/dist/include/clang/Sema/Initialization.h vendor/clang/dist/include/clang/Sema/Lookup.h vendor/clang/dist/include/clang/Sema/Overload.h vendor/clang/dist/include/clang/Sema/Ownership.h vendor/clang/dist/include/clang/Sema/ParsedTemplate.h vendor/clang/dist/include/clang/Sema/Scope.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Sema/SemaDiagnostic.h vendor/clang/dist/include/clang/Sema/Template.h vendor/clang/dist/include/clang/Sema/TemplateDeduction.h vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/Serialization/ASTWriter.h vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/CheckerBase.td vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/LocalCheckers.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/CheckerManager.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/CheckerProvider.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathDiagnosticClients.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDiagnostic.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/CXXInheritance.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/DumpXML.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprClassification.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/InheritViz.cpp vendor/clang/dist/lib/AST/ItaniumCXXABI.cpp vendor/clang/dist/lib/AST/ItaniumMangle.cpp vendor/clang/dist/lib/AST/MicrosoftCXXABI.cpp vendor/clang/dist/lib/AST/MicrosoftMangle.cpp vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtDumper.cpp vendor/clang/dist/lib/AST/StmtIterator.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/TemplateBase.cpp vendor/clang/dist/lib/AST/TemplateName.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypeLoc.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Analysis/AnalysisContext.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/CFGReachabilityAnalysis.cpp vendor/clang/dist/lib/Analysis/CFGStmtMap.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Analysis/CocoaConventions.cpp vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Analysis/ReachableCode.cpp vendor/clang/dist/lib/Analysis/UninitializedValues.cpp vendor/clang/dist/lib/Basic/CMakeLists.txt vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp vendor/clang/dist/lib/Basic/FileManager.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CMakeLists.txt vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCXXABI.cpp vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGCall.h vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGCleanup.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CGException.h vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGRTTI.cpp vendor/clang/dist/lib/CodeGen/CGRecordLayout.h vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGVTT.cpp vendor/clang/dist/lib/CodeGen/CGVTables.cpp vendor/clang/dist/lib/CodeGen/CGVTables.h vendor/clang/dist/lib/CodeGen/CMakeLists.txt vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenTBAA.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/HostInfo.cpp vendor/clang/dist/lib/Driver/OptTable.cpp vendor/clang/dist/lib/Driver/ToolChain.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CMakeLists.txt vendor/clang/dist/lib/Frontend/CacheTokens.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/DependencyFile.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/HeaderIncludeGen.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/MultiplexConsumer.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp vendor/clang/dist/lib/FrontendTool/ExecuteCompilerInvocation.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/avxintrin.h vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/mm_malloc.h vendor/clang/dist/lib/Headers/stddef.h vendor/clang/dist/lib/Headers/stdint.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Index/DeclReferenceMap.cpp vendor/clang/dist/lib/Index/Entity.cpp vendor/clang/dist/lib/Lex/HeaderMap.cpp vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/MacroArgs.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPExpressions.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/PTHLexer.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/PreprocessingRecord.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Lex/PreprocessorLexer.cpp vendor/clang/dist/lib/Lex/TokenLexer.cpp vendor/clang/dist/lib/Makefile vendor/clang/dist/lib/Parse/ParseAST.cpp vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseInit.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParsePragma.cpp vendor/clang/dist/lib/Parse/ParsePragma.h vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Parse/RAIIObjectsForParser.h vendor/clang/dist/lib/Rewrite/RewriteObjC.cpp vendor/clang/dist/lib/Rewrite/Rewriter.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/AttributeList.cpp vendor/clang/dist/lib/Sema/CMakeLists.txt vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/DeclSpec.cpp vendor/clang/dist/lib/Sema/IdentifierResolver.cpp vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaAttr.cpp vendor/clang/dist/lib/Sema/SemaCXXCast.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaTemplateVariadic.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TargetAttributesSema.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/lib/Sema/TypeLocBuilder.h vendor/clang/dist/lib/Serialization/ASTCommon.cpp vendor/clang/dist/lib/Serialization/ASTCommon.h vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriterStmt.cpp vendor/clang/dist/lib/Serialization/CMakeLists.txt vendor/clang/dist/lib/StaticAnalyzer/Checkers/AdjustedReturnValueChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CMakeLists.txt vendor/clang/dist/lib/StaticAnalyzer/Checkers/CStringChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/Checkers.td vendor/clang/dist/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ClangSACheckerProvider.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ClangSACheckers.h vendor/clang/dist/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/MallocChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/StreamChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/AggExprVisitor.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BasicStore.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BasicValueFactory.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporter.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CFRefCount.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CMakeLists.txt vendor/clang/dist/lib/StaticAnalyzer/Core/CXXExprEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CheckerManager.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CoreEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/Environment.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExplodedGraph.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/FlatStore.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ObjCMessage.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/RegionStore.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/SValBuilder.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/Store.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp vendor/clang/dist/runtime/CMakeLists.txt vendor/clang/dist/runtime/Makefile vendor/clang/dist/test/ASTMerge/var.c vendor/clang/dist/test/Analysis/CFDateGC.m vendor/clang/dist/test/Analysis/CFNumber.c vendor/clang/dist/test/Analysis/CFRetainRelease_NSAssertionHandler.m vendor/clang/dist/test/Analysis/CGColorSpace.c vendor/clang/dist/test/Analysis/CheckNSError.m vendor/clang/dist/test/Analysis/MissingDealloc.m vendor/clang/dist/test/Analysis/NSPanel.m vendor/clang/dist/test/Analysis/NSString.m vendor/clang/dist/test/Analysis/NSWindow.m vendor/clang/dist/test/Analysis/NoReturn.m vendor/clang/dist/test/Analysis/ObjCProperties.m vendor/clang/dist/test/Analysis/ObjCRetSigs.m vendor/clang/dist/test/Analysis/PR2599.m vendor/clang/dist/test/Analysis/PR2978.m vendor/clang/dist/test/Analysis/PR3991.m vendor/clang/dist/test/Analysis/PR7218.c vendor/clang/dist/test/Analysis/additive-folding-range-constraints.c vendor/clang/dist/test/Analysis/additive-folding.c vendor/clang/dist/test/Analysis/analyzer-stats.c vendor/clang/dist/test/Analysis/array-struct-region.c vendor/clang/dist/test/Analysis/array-struct.c vendor/clang/dist/test/Analysis/auto-obj-dtors-cfg-output.cpp vendor/clang/dist/test/Analysis/base-init.cpp vendor/clang/dist/test/Analysis/blocks.m vendor/clang/dist/test/Analysis/bstring.c vendor/clang/dist/test/Analysis/casts.c vendor/clang/dist/test/Analysis/casts.m vendor/clang/dist/test/Analysis/cfref_PR2519.c vendor/clang/dist/test/Analysis/cfref_rdar6080742.c vendor/clang/dist/test/Analysis/chroot.c vendor/clang/dist/test/Analysis/complex.c vendor/clang/dist/test/Analysis/concrete-address.c vendor/clang/dist/test/Analysis/constant-folding.c vendor/clang/dist/test/Analysis/cxx-crashes.cpp vendor/clang/dist/test/Analysis/dead-stores.c vendor/clang/dist/test/Analysis/dead-stores.cpp vendor/clang/dist/test/Analysis/dead-stores.m vendor/clang/dist/test/Analysis/delegates.m vendor/clang/dist/test/Analysis/derived-to-base.cpp vendor/clang/dist/test/Analysis/dtor.cpp vendor/clang/dist/test/Analysis/elementtype.c vendor/clang/dist/test/Analysis/exercise-ps.c vendor/clang/dist/test/Analysis/fields.c vendor/clang/dist/test/Analysis/flat-store.c vendor/clang/dist/test/Analysis/free.c vendor/clang/dist/test/Analysis/func.c vendor/clang/dist/test/Analysis/idempotent-operations-limited-loops.c vendor/clang/dist/test/Analysis/idempotent-operations.c vendor/clang/dist/test/Analysis/idempotent-operations.cpp vendor/clang/dist/test/Analysis/idempotent-operations.m vendor/clang/dist/test/Analysis/initializer.cpp vendor/clang/dist/test/Analysis/inline.c vendor/clang/dist/test/Analysis/inline2.c vendor/clang/dist/test/Analysis/inline3.c vendor/clang/dist/test/Analysis/inline4.c vendor/clang/dist/test/Analysis/lvalue.cpp vendor/clang/dist/test/Analysis/malloc.c vendor/clang/dist/test/Analysis/method-call.cpp vendor/clang/dist/test/Analysis/misc-ps-64.m vendor/clang/dist/test/Analysis/misc-ps-basic-store.m vendor/clang/dist/test/Analysis/misc-ps-eager-assume.m vendor/clang/dist/test/Analysis/misc-ps-flat-store.c vendor/clang/dist/test/Analysis/misc-ps-ranges.m vendor/clang/dist/test/Analysis/misc-ps-region-store-i386.m vendor/clang/dist/test/Analysis/misc-ps-region-store-x86_64.m vendor/clang/dist/test/Analysis/misc-ps-region-store.cpp vendor/clang/dist/test/Analysis/misc-ps-region-store.m vendor/clang/dist/test/Analysis/misc-ps-region-store.mm vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/new.cpp vendor/clang/dist/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m vendor/clang/dist/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m vendor/clang/dist/test/Analysis/no-exit-cfg.c vendor/clang/dist/test/Analysis/no-outofbounds.c vendor/clang/dist/test/Analysis/null-deref-ps-region.c vendor/clang/dist/test/Analysis/null-deref-ps.c vendor/clang/dist/test/Analysis/operator-calls.cpp vendor/clang/dist/test/Analysis/out-of-bounds.c vendor/clang/dist/test/Analysis/outofbound.c vendor/clang/dist/test/Analysis/override-werror.c vendor/clang/dist/test/Analysis/plist-output-alternate.m vendor/clang/dist/test/Analysis/plist-output.m vendor/clang/dist/test/Analysis/pr4209.m vendor/clang/dist/test/Analysis/pr_2542_rdar_6793404.m vendor/clang/dist/test/Analysis/pr_4164.c vendor/clang/dist/test/Analysis/properties.m vendor/clang/dist/test/Analysis/ptr-arith.c vendor/clang/dist/test/Analysis/rdar-6442306-1.m vendor/clang/dist/test/Analysis/rdar-6540084.m vendor/clang/dist/test/Analysis/rdar-6541136-region.c vendor/clang/dist/test/Analysis/rdar-6541136.c vendor/clang/dist/test/Analysis/rdar-6562655.m vendor/clang/dist/test/Analysis/rdar-6582778-basic-store.c vendor/clang/dist/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m vendor/clang/dist/test/Analysis/rdar-7168531.m vendor/clang/dist/test/Analysis/refcnt_naming.m vendor/clang/dist/test/Analysis/reference.cpp vendor/clang/dist/test/Analysis/region-1.m vendor/clang/dist/test/Analysis/retain-release-basic-store.m vendor/clang/dist/test/Analysis/retain-release-gc-only.m vendor/clang/dist/test/Analysis/retain-release-region-store.m vendor/clang/dist/test/Analysis/retain-release.m vendor/clang/dist/test/Analysis/security-syntax-checks-no-emit.c vendor/clang/dist/test/Analysis/security-syntax-checks.m vendor/clang/dist/test/Analysis/self-init.m vendor/clang/dist/test/Analysis/stack-addr-ps.c vendor/clang/dist/test/Analysis/stackaddrleak.c vendor/clang/dist/test/Analysis/stream.c vendor/clang/dist/test/Analysis/string.c vendor/clang/dist/test/Analysis/undef-buffers.c vendor/clang/dist/test/Analysis/uninit-msg-expr.m vendor/clang/dist/test/Analysis/uninit-ps-rdar6145427.m vendor/clang/dist/test/Analysis/uninit-vals-ps-region.m vendor/clang/dist/test/Analysis/uninit-vals-ps.c vendor/clang/dist/test/Analysis/uninit-vals.m vendor/clang/dist/test/Analysis/unions-region.m vendor/clang/dist/test/Analysis/unix-fns.c vendor/clang/dist/test/Analysis/unreachable-code-path.c vendor/clang/dist/test/Analysis/unused-ivars.m vendor/clang/dist/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp vendor/clang/dist/test/CXX/basic/basic.stc/basic.stc.dynamic/p2.cpp vendor/clang/dist/test/CXX/class.access/p4.cpp vendor/clang/dist/test/CXX/class/class.mem/p8-0x.cpp vendor/clang/dist/test/CXX/class/class.mfct/class.mfct.non-static/p3.cpp vendor/clang/dist/test/CXX/class/class.union/p1.cpp vendor/clang/dist/test/CXX/class/p1-0x.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.def/p8.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p2.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p5.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp vendor/clang/dist/test/CXX/except/except.handle/p16.cpp vendor/clang/dist/test/CXX/except/except.spec/p14.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp vendor/clang/dist/test/CXX/over/over.over/p2-resolve-single-template-id.cpp vendor/clang/dist/test/CXX/special/class.copy/p33-0x.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.variadic/multi-level-substitution.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.variadic/p4.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.variadic/p5.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.arg.explicit/p3-nodeduct.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp vendor/clang/dist/test/CodeCompletion/ordinary-name.cpp vendor/clang/dist/test/CodeGen/2008-07-17-no-emit-on-error.c vendor/clang/dist/test/CodeGen/altivec.c vendor/clang/dist/test/CodeGen/atomic.c vendor/clang/dist/test/CodeGen/builtin-attributes.c vendor/clang/dist/test/CodeGen/builtin-expect.c vendor/clang/dist/test/CodeGen/builtin-memfns.c vendor/clang/dist/test/CodeGen/builtins-ppc-altivec.c vendor/clang/dist/test/CodeGen/builtins-x86.c vendor/clang/dist/test/CodeGen/builtins.c vendor/clang/dist/test/CodeGen/char-literal.c vendor/clang/dist/test/CodeGen/conditional.c vendor/clang/dist/test/CodeGen/const-init.c vendor/clang/dist/test/CodeGen/darwin-string-literals.c vendor/clang/dist/test/CodeGen/decl.c vendor/clang/dist/test/CodeGen/ext-vector.c vendor/clang/dist/test/CodeGen/integer-overflow.c vendor/clang/dist/test/CodeGen/mangle.c vendor/clang/dist/test/CodeGen/mult-alt-x86.c vendor/clang/dist/test/CodeGen/regparm-flag.c vendor/clang/dist/test/CodeGen/union.c vendor/clang/dist/test/CodeGen/x86_64-arguments.c vendor/clang/dist/test/CodeGenCXX/PR5863-unreachable-block.cpp vendor/clang/dist/test/CodeGenCXX/anonymous-namespaces.cpp vendor/clang/dist/test/CodeGenCXX/anonymous-union-member-initializer.cpp vendor/clang/dist/test/CodeGenCXX/arm.cpp vendor/clang/dist/test/CodeGenCXX/blocks.cpp vendor/clang/dist/test/CodeGenCXX/class-layout.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-byval.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-template.cpp vendor/clang/dist/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp vendor/clang/dist/test/CodeGenCXX/destructors.cpp vendor/clang/dist/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp vendor/clang/dist/test/CodeGenCXX/dynamic-cast.cpp vendor/clang/dist/test/CodeGenCXX/eh.cpp vendor/clang/dist/test/CodeGenCXX/exceptions-no-rtti.cpp vendor/clang/dist/test/CodeGenCXX/exceptions.cpp vendor/clang/dist/test/CodeGenCXX/explicit-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/global-init.cpp vendor/clang/dist/test/CodeGenCXX/goto.cpp vendor/clang/dist/test/CodeGenCXX/mangle-exprs.cpp vendor/clang/dist/test/CodeGenCXX/mangle-subst-std.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/member-function-pointers.cpp vendor/clang/dist/test/CodeGenCXX/nrvo.cpp vendor/clang/dist/test/CodeGenCXX/pointers-to-data-members.cpp vendor/clang/dist/test/CodeGenCXX/pragma-pack.cpp vendor/clang/dist/test/CodeGenCXX/references.cpp vendor/clang/dist/test/CodeGenCXX/specialized-static-data-mem-init.cpp vendor/clang/dist/test/CodeGenCXX/static-data-member.cpp vendor/clang/dist/test/CodeGenCXX/static-init-3.cpp vendor/clang/dist/test/CodeGenCXX/static-init.cpp vendor/clang/dist/test/CodeGenCXX/template-inner-struct-visibility-hidden.cpp vendor/clang/dist/test/CodeGenCXX/threadsafe-statics-exceptions.cpp vendor/clang/dist/test/CodeGenCXX/threadsafe-statics.cpp vendor/clang/dist/test/CodeGenCXX/throw-expression-dtor.cpp vendor/clang/dist/test/CodeGenCXX/throw-expressions.cpp vendor/clang/dist/test/CodeGenCXX/try-catch.cpp vendor/clang/dist/test/CodeGenCXX/value-init.cpp vendor/clang/dist/test/CodeGenCXX/visibility.cpp vendor/clang/dist/test/CodeGenCXX/vtable-debug-info.cpp vendor/clang/dist/test/CodeGenCXX/vtable-layout.cpp vendor/clang/dist/test/CodeGenCXX/vtable-linkage.cpp vendor/clang/dist/test/CodeGenCXX/x86_64-arguments.cpp vendor/clang/dist/test/CodeGenObjC/atomic-aggregate-property.m vendor/clang/dist/test/CodeGenObjC/bitfield-access.m vendor/clang/dist/test/CodeGenObjC/blocks.m vendor/clang/dist/test/CodeGenObjC/constant-strings.m vendor/clang/dist/test/CodeGenObjC/debug-info-foreach.m vendor/clang/dist/test/CodeGenObjC/debug-info-getter-name.m vendor/clang/dist/test/CodeGenObjC/fpret.m vendor/clang/dist/test/CodeGenObjC/messages.m vendor/clang/dist/test/CodeGenObjC/metadata-symbols-64.m vendor/clang/dist/test/CodeGenObjC/metadata_symbols.m vendor/clang/dist/test/CodeGenObjC/property-agrr-getter.m vendor/clang/dist/test/CodeGenObjCXX/exceptions.mm vendor/clang/dist/test/CodeGenObjCXX/ivar-objects.mm vendor/clang/dist/test/CodeGenObjCXX/references.mm vendor/clang/dist/test/Coverage/ast-printing.c vendor/clang/dist/test/Coverage/ast-printing.cpp vendor/clang/dist/test/Coverage/html-diagnostics.c vendor/clang/dist/test/Driver/apple-kext-mkernel.c vendor/clang/dist/test/Driver/ast.c vendor/clang/dist/test/Driver/cc-print-options.c vendor/clang/dist/test/Driver/clang-translation.c vendor/clang/dist/test/Driver/clang_f_opts.c vendor/clang/dist/test/Driver/darwin-cc.c vendor/clang/dist/test/Driver/darwin-dsymutil.c vendor/clang/dist/test/Driver/darwin-ld.c vendor/clang/dist/test/Driver/darwin-version.c vendor/clang/dist/test/Driver/darwin-xarch.c vendor/clang/dist/test/Driver/hello.c vendor/clang/dist/test/Driver/sysroot-flags.c vendor/clang/dist/test/FixIt/fixit-cxx0x.cpp vendor/clang/dist/test/FixIt/fixit-unrecoverable.c vendor/clang/dist/test/FixIt/fixit.c vendor/clang/dist/test/FixIt/fixit.cpp vendor/clang/dist/test/FixIt/typo.c vendor/clang/dist/test/FixIt/typo.cpp vendor/clang/dist/test/FixIt/typo.m vendor/clang/dist/test/Frontend/dependency-gen.c vendor/clang/dist/test/Index/TestClassDecl.m vendor/clang/dist/test/Index/annotate-nested-name-specifier.cpp vendor/clang/dist/test/Index/annotate-tokens.c vendor/clang/dist/test/Index/annotate-tokens.cpp vendor/clang/dist/test/Index/annotate-tokens.m vendor/clang/dist/test/Index/blocks.c vendor/clang/dist/test/Index/c-index-api-loadTU-test.m vendor/clang/dist/test/Index/c-index-getCursor-test.m vendor/clang/dist/test/Index/cindex-on-invalid.m vendor/clang/dist/test/Index/complete-objc-message.m vendor/clang/dist/test/Index/complete-properties.m vendor/clang/dist/test/Index/index-templates.cpp vendor/clang/dist/test/Index/invalid-rdar-8236270.cpp vendor/clang/dist/test/Index/load-classes.cpp vendor/clang/dist/test/Index/load-exprs.c vendor/clang/dist/test/Index/load-namespaces.cpp vendor/clang/dist/test/Index/load-stmts.cpp vendor/clang/dist/test/Index/local-symbols.m vendor/clang/dist/test/Index/nested-binaryoperators.cpp vendor/clang/dist/test/Index/overrides.cpp vendor/clang/dist/test/Index/preamble-reparse-chained.c vendor/clang/dist/test/Index/preamble.c vendor/clang/dist/test/Index/rdar-8288645-invalid-code.mm vendor/clang/dist/test/Index/recursive-cxx-member-calls.cpp vendor/clang/dist/test/Index/recursive-member-access.c vendor/clang/dist/test/Index/remap-load.c vendor/clang/dist/test/Index/usrs-cxx0x.cpp vendor/clang/dist/test/Index/usrs.cpp vendor/clang/dist/test/Index/usrs.m vendor/clang/dist/test/Lexer/has_feature_cxx0x.cpp vendor/clang/dist/test/Lexer/pragma-message.c vendor/clang/dist/test/Makefile vendor/clang/dist/test/Misc/caret-diags-macros.c vendor/clang/dist/test/PCH/chain-cxx.cpp vendor/clang/dist/test/PCH/cxx-templates.cpp vendor/clang/dist/test/PCH/cxx-templates.h vendor/clang/dist/test/PCH/cxx_exprs.cpp vendor/clang/dist/test/PCH/exprs.c vendor/clang/dist/test/PCH/exprs.h vendor/clang/dist/test/PCH/headersearch.cpp vendor/clang/dist/test/PCH/objcxx-ivar-class.h vendor/clang/dist/test/PCH/pragma-diag-section.cpp vendor/clang/dist/test/PCH/pragma-diag.c vendor/clang/dist/test/PCH/rdar8852495.c vendor/clang/dist/test/PCH/reloc.c vendor/clang/dist/test/PCH/source-manager-stack.c vendor/clang/dist/test/Parser/MicrosoftExtensions.c vendor/clang/dist/test/Parser/MicrosoftExtensions.cpp vendor/clang/dist/test/Parser/altivec.c vendor/clang/dist/test/Parser/cxx-casting.cpp vendor/clang/dist/test/Parser/cxx-decl.cpp vendor/clang/dist/test/Parser/cxx-stmt.cpp vendor/clang/dist/test/Parser/cxx-throw.cpp vendor/clang/dist/test/Parser/cxx0x-attributes.cpp vendor/clang/dist/test/Parser/cxx0x-override-control-keywords.cpp vendor/clang/dist/test/Parser/expressions.c vendor/clang/dist/test/Parser/objc-missing-impl.m vendor/clang/dist/test/Parser/selector-1.m vendor/clang/dist/test/Parser/switch-recovery.cpp vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/pragma-pushpop-macro.c vendor/clang/dist/test/Preprocessor/pragma_diagnostic_sections.cpp vendor/clang/dist/test/Preprocessor/pragma_unknown.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Rewriter/rewrite-block-pointer.mm vendor/clang/dist/test/Sema/align-x86-64.c vendor/clang/dist/test/Sema/align-x86.c vendor/clang/dist/test/Sema/altivec-init.c vendor/clang/dist/test/Sema/annotate.c vendor/clang/dist/test/Sema/anonymous-struct-union.c vendor/clang/dist/test/Sema/arm-layout.c vendor/clang/dist/test/Sema/attr-cleanup.c vendor/clang/dist/test/Sema/attr-naked.c vendor/clang/dist/test/Sema/attr-nodebug.c vendor/clang/dist/test/Sema/attr-noinline.c vendor/clang/dist/test/Sema/attr-noreturn.c vendor/clang/dist/test/Sema/attr-regparm.c vendor/clang/dist/test/Sema/attr-unused.c vendor/clang/dist/test/Sema/block-args.c vendor/clang/dist/test/Sema/builtins.c vendor/clang/dist/test/Sema/c89.c vendor/clang/dist/test/Sema/callingconv.c vendor/clang/dist/test/Sema/const-eval.c vendor/clang/dist/test/Sema/constructor-attribute.c vendor/clang/dist/test/Sema/conversion.c vendor/clang/dist/test/Sema/expr-address-of.c vendor/clang/dist/test/Sema/exprs.c vendor/clang/dist/test/Sema/format-strings-fixit.c vendor/clang/dist/test/Sema/function-redecl.c vendor/clang/dist/test/Sema/incomplete-call.c vendor/clang/dist/test/Sema/knr-def-call.c vendor/clang/dist/test/Sema/missing-field-initializers.c vendor/clang/dist/test/Sema/neon-vector-types.c vendor/clang/dist/test/Sema/parentheses.c vendor/clang/dist/test/Sema/sentinel-attribute.c vendor/clang/dist/test/Sema/shift.c vendor/clang/dist/test/Sema/struct-decl.c vendor/clang/dist/test/Sema/uninit-variables.c vendor/clang/dist/test/Sema/vector-ops.c vendor/clang/dist/test/Sema/warn-gnu-designators.c vendor/clang/dist/test/Sema/warn-unused-function.c vendor/clang/dist/test/Sema/warn-unused-value.c vendor/clang/dist/test/Sema/warn-write-strings.c vendor/clang/dist/test/SemaCXX/MicrosoftExtensions.cpp vendor/clang/dist/test/SemaCXX/addr-of-overloaded-function.cpp vendor/clang/dist/test/SemaCXX/alignof-sizeof-reference.cpp vendor/clang/dist/test/SemaCXX/altivec.cpp vendor/clang/dist/test/SemaCXX/array-bounds.cpp vendor/clang/dist/test/SemaCXX/attr-nonnull.cpp vendor/clang/dist/test/SemaCXX/attr-unavailable.cpp vendor/clang/dist/test/SemaCXX/conditional-expr.cpp vendor/clang/dist/test/SemaCXX/conversion-function.cpp vendor/clang/dist/test/SemaCXX/decltype-overloaded-functions.cpp vendor/clang/dist/test/SemaCXX/destructor.cpp vendor/clang/dist/test/SemaCXX/enum-scoped.cpp vendor/clang/dist/test/SemaCXX/exception-spec-no-exceptions.cpp vendor/clang/dist/test/SemaCXX/exceptions.cpp vendor/clang/dist/test/SemaCXX/flexible-array-test.cpp vendor/clang/dist/test/SemaCXX/friend.cpp vendor/clang/dist/test/SemaCXX/init-priority-attr.cpp vendor/clang/dist/test/SemaCXX/libstdcxx_is_pod_hack.cpp vendor/clang/dist/test/SemaCXX/literal-type.cpp vendor/clang/dist/test/SemaCXX/member-expr.cpp vendor/clang/dist/test/SemaCXX/member-pointers-2.cpp vendor/clang/dist/test/SemaCXX/nested-name-spec-locations.cpp vendor/clang/dist/test/SemaCXX/nullptr.cpp vendor/clang/dist/test/SemaCXX/overloaded-name.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/pseudo-destructors.cpp vendor/clang/dist/test/SemaCXX/ptrtomember.cpp vendor/clang/dist/test/SemaCXX/reinterpret-cast.cpp vendor/clang/dist/test/SemaCXX/return-noreturn.cpp vendor/clang/dist/test/SemaCXX/return.cpp vendor/clang/dist/test/SemaCXX/rval-references.cpp vendor/clang/dist/test/SemaCXX/scope-check.cpp vendor/clang/dist/test/SemaCXX/sourceranges.cpp vendor/clang/dist/test/SemaCXX/static-cast.cpp vendor/clang/dist/test/SemaCXX/storage-class.cpp vendor/clang/dist/test/SemaCXX/type-traits.cpp vendor/clang/dist/test/SemaCXX/uninit-variables.cpp vendor/clang/dist/test/SemaCXX/uninitialized.cpp vendor/clang/dist/test/SemaCXX/unreachable-catch-clauses.cpp vendor/clang/dist/test/SemaCXX/unreachable-code.cpp vendor/clang/dist/test/SemaCXX/unused-functions.cpp vendor/clang/dist/test/SemaCXX/vtable-instantiation.cc vendor/clang/dist/test/SemaCXX/warn-assignment-condition.cpp vendor/clang/dist/test/SemaCXX/warn-global-constructors.cpp vendor/clang/dist/test/SemaCXX/warn-literal-conversion.cpp vendor/clang/dist/test/SemaCXX/warn-missing-prototypes.cpp vendor/clang/dist/test/SemaCXX/warn-overloaded-virtual.cpp vendor/clang/dist/test/SemaCXX/warn-shadow.cpp vendor/clang/dist/test/SemaCXX/warn-unreachable.cpp vendor/clang/dist/test/SemaCXX/warn-unused-filescoped.cpp vendor/clang/dist/test/SemaCXX/writable-strings-deprecated.cpp vendor/clang/dist/test/SemaObjC/attr-objc-gc.m vendor/clang/dist/test/SemaObjC/block-type-safety.m vendor/clang/dist/test/SemaObjC/call-super-2.m vendor/clang/dist/test/SemaObjC/comptypes-4.m vendor/clang/dist/test/SemaObjC/exprs.m vendor/clang/dist/test/SemaObjC/foreach.m vendor/clang/dist/test/SemaObjC/format-arg-attribute.m vendor/clang/dist/test/SemaObjC/iboutletcollection-attr.m vendor/clang/dist/test/SemaObjC/idiomatic-parentheses.m vendor/clang/dist/test/SemaObjC/ignore-weakimport-method.m vendor/clang/dist/test/SemaObjC/ivar-lookup.m vendor/clang/dist/test/SemaObjC/method-bad-param.m vendor/clang/dist/test/SemaObjC/method-not-defined.m vendor/clang/dist/test/SemaObjC/method-prototype-scope.m vendor/clang/dist/test/SemaObjC/method-sentinel-attr.m vendor/clang/dist/test/SemaObjC/nonnull.m vendor/clang/dist/test/SemaObjC/property-13.m vendor/clang/dist/test/SemaObjC/protocol-attribute.m vendor/clang/dist/test/SemaObjC/sizeof-interface.m vendor/clang/dist/test/SemaObjC/special-dep-unavail-warning.m vendor/clang/dist/test/SemaObjC/uninit-variables.m vendor/clang/dist/test/SemaObjC/warn-write-strings.m vendor/clang/dist/test/SemaObjC/weak-attr-ivar.m vendor/clang/dist/test/SemaObjCXX/exceptions-fragile.mm vendor/clang/dist/test/SemaObjCXX/objc-pointer-conv.mm vendor/clang/dist/test/SemaObjCXX/overload.mm vendor/clang/dist/test/SemaObjCXX/parameters.mm vendor/clang/dist/test/SemaObjCXX/propert-dot-error.mm vendor/clang/dist/test/SemaObjCXX/references.mm vendor/clang/dist/test/SemaOpenCL/extension-fp64.cl vendor/clang/dist/test/SemaTemplate/deduction-crash.cpp vendor/clang/dist/test/SemaTemplate/dependent-template-recover.cpp vendor/clang/dist/test/SemaTemplate/destructor-template.cpp vendor/clang/dist/test/SemaTemplate/explicit-instantiation.cpp vendor/clang/dist/test/SemaTemplate/instantiate-cast.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-4.cpp vendor/clang/dist/test/SemaTemplate/instantiate-function-1.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-class.cpp vendor/clang/dist/test/SemaTemplate/instantiate-member-template.cpp vendor/clang/dist/test/SemaTemplate/instantiate-try-catch.cpp vendor/clang/dist/test/SemaTemplate/nested-name-spec-template.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_template.cpp vendor/clang/dist/test/SemaTemplate/typename-specifier-4.cpp vendor/clang/dist/test/lit.cfg vendor/clang/dist/tools/c-index-test/Makefile vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/tools/driver/Makefile vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CIndexCodeCompletion.cpp vendor/clang/dist/tools/libclang/CIndexInclusionStack.cpp vendor/clang/dist/tools/libclang/CIndexUSRs.cpp vendor/clang/dist/tools/libclang/CIndexer.cpp vendor/clang/dist/tools/libclang/CMakeLists.txt vendor/clang/dist/tools/libclang/CXCursor.cpp vendor/clang/dist/tools/libclang/libclang.darwin.exports vendor/clang/dist/tools/libclang/libclang.exports vendor/clang/dist/tools/scan-build/ccc-analyzer vendor/clang/dist/tools/scan-build/scan-build vendor/clang/dist/unittests/CMakeLists.txt vendor/clang/dist/utils/CmpDriver vendor/clang/dist/utils/OptionalTests/Extra/Runtime/darwin-clang_rt.c vendor/clang/dist/www/OpenProjects.html vendor/clang/dist/www/analyzer/latest_checker.html.incl vendor/clang/dist/www/analyzer/release_notes.html vendor/clang/dist/www/analyzer/scan-build.html vendor/clang/dist/www/cxx_status.html vendor/clang/dist/www/get_started.html vendor/clang/dist/www/hacking.html Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/CMakeLists.txt Mon May 2 19:39:53 2011 (r221339) @@ -30,7 +30,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR include(AddLLVM) include(TableGen) - include("${CLANG_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVM.cmake") + include("${CLANG_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake") include(HandleLLVMOptions) set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") @@ -40,9 +40,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories("${PATH_TO_LLVM_BUILD}/include" "${LLVM_MAIN_INCLUDE_DIR}") - if( NOT PATH_TO_LLVM_BUILD STREQUAL LLVM_MAIN_SRC_DIR ) - include_directories("${LLVM_MAIN_INCLUDE_DIR}") - endif() link_directories("${PATH_TO_LLVM_BUILD}/lib") set(LLVM_TABLEGEN_EXE "${PATH_TO_LLVM_BUILD}/bin/tblgen") @@ -174,23 +171,12 @@ macro(add_clang_library name) if( LLVM_COMMON_DEPENDS ) add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} ) endif( LLVM_COMMON_DEPENDS ) - if( LLVM_USED_LIBS ) - foreach(lib ${LLVM_USED_LIBS}) - target_link_libraries( ${name} ${lib} ) - endforeach(lib) - endif( LLVM_USED_LIBS ) - if( LLVM_LINK_COMPONENTS ) - llvm_config(${name} ${LLVM_LINK_COMPONENTS}) - endif( LLVM_LINK_COMPONENTS ) - if (LLVM_COMMON_LIBS) - target_link_libraries(${name} ${LLVM_COMMON_LIBS}) - endif() - if( NOT MINGW ) - get_system_libs(llvm_system_libs) - if( llvm_system_libs ) - target_link_libraries(${name} ${llvm_system_libs}) - endif() - endif() + + target_link_libraries( ${name} ${LLVM_USED_LIBS} ) + llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) + target_link_libraries( ${name} ${LLVM_COMMON_LIBS} ) + link_system_libs( ${name} ) + add_dependencies(${name} ClangDiagnosticCommon) if(MSVC) get_target_property(cflag ${name} COMPILE_FLAGS) @@ -211,9 +197,9 @@ macro(add_clang_executable name) set_target_properties(${name} PROPERTIES FOLDER "Clang executables") endmacro(add_clang_executable) -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/include +include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include ) install(DIRECTORY include/ @@ -221,7 +207,6 @@ install(DIRECTORY include/ FILES_MATCHING PATTERN "*.def" PATTERN "*.h" - PATTERN "*.td" PATTERN ".svn" EXCLUDE ) Modified: vendor/clang/dist/Makefile ============================================================================== --- vendor/clang/dist/Makefile Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/Makefile Mon May 2 19:39:53 2011 (r221339) @@ -46,6 +46,9 @@ CPP.Flags += -I$(PROJ_SRC_DIR)/$(CLANG_L ifdef CLANG_VENDOR CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "' endif +ifdef CLANG_REPOSITORY_STRING +CPP.Flags += -DCLANG_REPOSITORY_STRING='"$(CLANG_REPOSITORY_STRING)"' +endif # Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't # work with it enabled with GCC), Clang/llvm-gcc don't support it yet, and newer Modified: vendor/clang/dist/docs/DriverInternals.html ============================================================================== --- vendor/clang/dist/docs/DriverInternals.html Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/docs/DriverInternals.html Mon May 2 19:39:53 2011 (r221339) @@ -88,7 +88,7 @@

Flexible

-

The driver was designed to be flexible and easily accomodate +

The driver was designed to be flexible and easily accommodate new uses as we grow the clang and LLVM infrastructure. As one example, the driver can easily support the introduction of tools which have an integrated assembler; something we hope to @@ -218,7 +218,7 @@

The clang driver can dump the results of this stage using the -ccc-print-options flag (which - must preceed any actual command line arguments). For + must precede any actual command line arguments). For example:

             $ clang -ccc-print-options -Xarch_i386 -fomit-frame-pointer -Wa,-fast -Ifoo -I foo t.c
@@ -490,7 +490,7 @@
 
         
  • Specs -

    The clang driver has no direct correspondant for +

    The clang driver has no direct correspondent for "specs". The majority of the functionality that is embedded in specs is in the Tool specific argument translation routines. The parts of specs which control the Modified: vendor/clang/dist/docs/InternalsManual.html ============================================================================== --- vendor/clang/dist/docs/InternalsManual.html Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/docs/InternalsManual.html Mon May 2 19:39:53 2011 (r221339) @@ -412,7 +412,7 @@ it is rendered.

    -

    Code Modification Hints

    +

    Fix-It Hints

    In some cases, the front end emits diagnostics when it is clear @@ -422,14 +422,14 @@ deprecated syntax that is easily rewritt Clang tries very hard to emit the diagnostic and recover gracefully in these and other cases.

    -

    However, for these cases where the fix is obvious, the diagnostic -can be annotated with a code -modification "hint" that describes how to change the code referenced -by the diagnostic to fix the problem. For example, it might add the -missing semicolon at the end of the statement or rewrite the use of a -deprecated construct into something more palatable. Here is one such -example C++ front end, where we warn about the right-shift operator -changing meaning from C++98 to C++0x:

    +

    However, for these cases where the fix is obvious, the diagnostic +can be annotated with a hint (referred to as a "fix-it hint") that +describes how to change the code referenced by the diagnostic to fix +the problem. For example, it might add the missing semicolon at the +end of the statement or rewrite the use of a deprecated construct +into something more palatable. Here is one such example from the C++ +front end, where we warn about the right-shift operator changing +meaning from C++98 to C++0x:

     test.cpp:3:7: warning: use of right-shift operator ('>>') in template argument will require parentheses in C++0x
    @@ -438,33 +438,31 @@ A<100 >> 2> *a;
       (       )
     
    -

    Here, the code modification hint is suggesting that parentheses be -added, and showing exactly where those parentheses would be inserted -into the source code. The code modification hints themselves describe -what changes to make to the source code in an abstract manner, which -the text diagnostic printer renders as a line of "insertions" below -the caret line. Other diagnostic -clients might choose to render the code differently (e.g., as -markup inline) or even give the user the ability to automatically fix -the problem.

    - -

    All code modification hints are described by the -CodeModificationHint class, instances of which should be -attached to the diagnostic using the << operator in the same way -that highlighted source ranges and arguments are passed to the -diagnostic. Code modification hints can be created with one of three -constructors:

    +

    Here, the fix-it hint is suggesting that parentheses be added, +and showing exactly where those parentheses would be inserted into the +source code. The fix-it hints themselves describe what changes to make +to the source code in an abstract manner, which the text diagnostic +printer renders as a line of "insertions" below the caret line. Other diagnostic clients might choose +to render the code differently (e.g., as markup inline) or even give +the user the ability to automatically fix the problem.

    + +

    All fix-it hints are described by the FixItHint class, +instances of which should be attached to the diagnostic using the +<< operator in the same way that highlighted source ranges and +arguments are passed to the diagnostic. Fix-it hints can be created +with one of three constructors:

    -
    CodeModificationHint::CreateInsertion(Loc, Code)
    +
    FixItHint::CreateInsertion(Loc, Code)
    Specifies that the given Code (a string) should be inserted before the source location Loc.
    -
    CodeModificationHint::CreateRemoval(Range)
    +
    FixItHint::CreateRemoval(Range)
    Specifies that the code in the given source Range should be removed.
    -
    CodeModificationHint::CreateReplacement(Range, Code)
    +
    FixItHint::CreateReplacement(Range, Code)
    Specifies that the code in the given source Range should be removed, and replaced with the given Code string.
    @@ -821,7 +819,7 @@ code is vectorized on X86 and PowerPC ho within the filename.
  • When parsing a preprocessor directive (after "#") the ParsingPreprocessorDirective mode is entered. This changes the parser to - return EOM at a newline.
  • + return EOD at a newline.
  • The Lexer uses a LangOptions object to know whether trigraphs are enabled, whether C++ or ObjC keywords are recognized, etc.
  • Modified: vendor/clang/dist/docs/LanguageExtensions.html ============================================================================== --- vendor/clang/dist/docs/LanguageExtensions.html Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/docs/LanguageExtensions.html Mon May 2 19:39:53 2011 (r221339) @@ -38,6 +38,8 @@ td {
  • C++0x deleted functions
  • C++0x lambdas
  • C++0x nullptr
  • +
  • C++0x override control
  • +
  • C++0x range-based for loop
  • C++0x rvalue references
  • C++0x reference-qualified functions
  • C++0x static_assert()
  • @@ -46,14 +48,17 @@ td {
  • C++0x inline namespaces
  • C++0x strongly-typed enumerations
  • C++0x trailing return type
  • +
  • C++0x noexcept specification
  • Checks for Type Traits
  • Blocks
  • Function Overloading in C
  • +
  • Generic Selections
  • Builtin Functions
  • Target-Specific Extensions @@ -61,11 +66,7 @@ td {
  • X86/X86-64 Language Extensions
  • -
  • Static Analysis-Specific Extensions - -
  • +
  • Static Analysis-Specific Extensions
  • @@ -83,7 +84,7 @@ more information on these extensions.

    Language extensions can be very useful, but only if you know you can depend -on them. In order to allow fine-grain features checks, we support two builtin +on them. In order to allow fine-grain features checks, we support three builtin function-like macros. This allows you to directly test for a feature in your code without having to resort to something like autoconf or fragile "compiler version checks".

    @@ -402,9 +403,19 @@ lambdas is enabled. clang does not curre nullptr is enabled. clang does not yet fully implement this feature.

    +

    C++0x override control

    + +

    Use __has_feature(cxx_override_control) to determine if support for +the override control keywords is enabled.

    +

    C++0x reference-qualified functions

    Use __has_feature(cxx_reference_qualified_functions) to determine if support for reference-qualified functions (e.g., member functions with & or && applied to *this) is enabled.

    +

    C++0x range-based for loop

    + +

    Use __has_feature(cxx_range_for) to determine if support for +the range-based for loop is enabled.

    +

    C++0x rvalue references

    Use __has_feature(cxx_rvalue_references) to determine if support for @@ -436,6 +447,11 @@ inline namespaces is enabled.

    Use __has_feature(cxx_trailing_return) to determine if support for the alternate function declaration syntax with trailing return type is enabled.

    +

    C++0x noexcept

    + +

    Use __has_feature(cxx_noexcept) to determine if support for +noexcept exception specifications is enabled.

    +

    C++0x strongly typed enumerations

    Use __has_feature(cxx_strong_enums) to determine if support for @@ -595,6 +611,20 @@ caveats to this use of name mangling:

    +

    Generic Selections

    + + +

    The C1X generic selection expression is available in all languages +supported by Clang. The syntax is the same as that given in the C1X draft +standard.

    + +

    In C, type compatibility is decided according to the rules given in the +appropriate standard, but in C++, which lacks the type compatibility rules +used in C, types are considered compatible only if they are equivalent.

    + +

    Query for this feature with __has_feature(generic_selections).

    + +

    Builtin Functions

    @@ -703,6 +733,36 @@ no arguments and produces a void result.

    Query for this feature with __has_builtin(__builtin_unreachable).

    + +

    __sync_swap

    + + +

    __sync_swap is used to atomically swap integers or pointers in +memory. +

    + +

    Syntax:

    + +
    +type __sync_swap(type *ptr, type value, ...)
    +
    + +

    Example of Use:

    + +
    +int old_value = __sync_swap(&value, new_value);
    +
    + +

    Description:

    + +

    The __sync_swap() builtin extends the existing __sync_*() family of atomic +intrinsics to allow code to atomically swap the current value with the new +value. More importantly, it helps developers write more efficient and correct +code by avoiding expensive loops around __sync_bool_compare_and_swap() or +relying on the platform specific implementation details of +__sync_lock_test_and_set(). The __sync_swap() builtin is a full barrier. +

    +

    Target-Specific Extensions

    @@ -754,11 +814,7 @@ are used by the path-sensitive static analyzer engine that is part of Clang's Analysis library.

    - -

    Analyzer Attributes

    - - -

    analyzer_noreturn

    +

    The analyzer_noreturn attribute

    Clang's static analysis engine understands the standard noreturn attribute. This attribute, which is typically affixed to a function prototype, @@ -786,16 +842,47 @@ placed at the end of function prototypes void foo() __attribute__((analyzer_noreturn));

    -

    Query for this feature with __has_feature(attribute_analyzer_noreturn).

    +

    Query for this feature with +__has_attribute(analyzer_noreturn).

    + +

    The objc_method_family attribute

    -

    Objective-C retaining behavior attributes

    +

    Many methods in Objective-C have conventional meanings determined +by their selectors. For the purposes of static analysis, it is +sometimes useful to be able to mark a method as having a particular +conventional meaning despite not having the right selector, or as not +having the conventional meaning that its selector would suggest. +For these use cases, we provide an attribute to specifically describe +the method family that a method belongs to.

    + +

    Usage: __attribute__((objc_method_family(X))), +where X is one of none, alloc, copy, +init, mutableCopy, or new. This attribute +can only be placed at the end of a method declaration:

    + +
    +  - (NSString*) initMyStringValue __attribute__((objc_method_family(none)));
    +
    + +

    Users who do not wish to change the conventional meaning of a +method, and who merely want to document its non-standard retain and +release semantics, should use the +retaining behavior attributes +described below.

    + +

    Query for this feature with +__has_attribute(objc_method_family).

    + +

    Objective-C retaining behavior attributes

    In Objective-C, functions and methods are generally assumed to take and return objects with +0 retain counts, with some exceptions for special methods like +alloc and init. However, there are exceptions, and so Clang provides attributes to allow these exceptions to be documented, which helps the analyzer find leaks (and -ignore non-leaks).

    +ignore non-leaks). Some exceptions may be better described using +the objc_method_family +attribute instead.

    Usage: The ns_returns_retained, ns_returns_not_retained, ns_returns_autoreleased, cf_returns_retained, @@ -834,6 +921,9 @@ balance in some way.

    - (void) baz: (id) __attribute__((ns_consumed)) x; +

    Query for these features with __has_attribute(ns_consumed), +__has_attribute(ns_returns_retained), etc.

    + Modified: vendor/clang/dist/docs/UsersManual.html ============================================================================== --- vendor/clang/dist/docs/UsersManual.html Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/docs/UsersManual.html Mon May 2 19:39:53 2011 (r221339) @@ -32,7 +32,7 @@ td {
  • Language and Target-Independent Features +
  • C Language Features
  • @@ -205,7 +206,7 @@ diagnostics that it generates.

    diagnostic.
    This option, which defaults to on, controls whether or not Clang prints the column number of a diagnostic. For example, when this is enabled, Clang will -print something like:

    +print something like:
       test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
    @@ -223,7 +224,7 @@ column number.

    source file/line/column information in diagnostic.
    This option, which defaults to on, controls whether or not Clang prints the filename, line number and column number of a diagnostic. For example, -when this is enabled, Clang will print something like:

    +when this is enabled, Clang will print something like:
       test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
    @@ -240,7 +241,7 @@ when this is enabled, Clang will print s
     line and ranges from source code in diagnostic.
     
    This option, which defaults to on, controls whether or not Clang prints the source line, source ranges, and caret when emitting a diagnostic. For example, -when this is enabled, Clang will print something like:

    +when this is enabled, Clang will print something like:
       test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
    @@ -277,7 +278,7 @@ Enable [-Woption] information i
     
    This option, which defaults to on, controls whether or not Clang prints the associated warning group option name when outputting -a warning diagnostic. For example, in this output:

    +a warning diagnostic. For example, in this output:
       test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
    @@ -299,7 +300,7 @@ Enable printing category information in 
     controls whether or not Clang prints the category associated with a diagnostic
     when emitting it.  Each diagnostic may or many not have an associated category,
     if it has one, it is listed in the diagnostic categorization field of the
    -diagnostic line (in the []'s).

    +diagnostic line (in the []'s).

    For example, a format string warning will produce these three renditions based on the setting of this option:

    @@ -322,7 +323,7 @@ hundreds or thousands of them.

    Enable "FixIt" information in the diagnostics output.
    This option, which defaults to on, controls whether or not Clang prints the information on how to fix a specific diagnostic underneath it when it knows. -For example, in this output:

    +For example, in this output:
       test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
    @@ -345,7 +346,7 @@ Print machine parsable information about
     information about source ranges in a machine parsable format after the
     file/line/column number information.  The information is a simple sequence of
     brace enclosed ranges, where each range lists the start and end line/column
    -locations.  For example, in this output:

    +locations. For example, in this output:
     exprs.c:47:15:{47:8-47:14}{47:17-47:24}: error: invalid operands to binary expression ('int *' and '_Complex float')
    @@ -366,7 +367,14 @@ Print Fix-Its in a machine parseable for
      fix-it:"t.cpp":{7:25-7:29}:"Gamma"
     
    -

    The range printed is a half-open range, so in this example the characters at column 25 up to but not including column 29 on line 7 in t.cpp should be replaced with the string "Gamma". Either the range or the replacement string may be empty (representing strict insertions and strict erasures, respectively). Both the file name and the insertion string escape backslash (as "\\"), tabs (as "\t"), newlines (as "\n"), double quotes(as "\"") and non-printable characters (as octal "\xxx").

    +

    The range printed is a half-open range, so in this example the characters at +column 25 up to but not including column 29 on line 7 in t.cpp should be +replaced with the string "Gamma". Either the range or the replacement +string may be empty (representing strict insertions and strict erasures, +respectively). Both the file name and the insertion string escape backslash (as +"\\"), tabs (as "\t"), newlines (as "\n"), double +quotes(as "\"") and non-printable characters (as octal +"\xxx").

    @@ -388,7 +396,7 @@ Print Fix-Its in a machine parseable for
    -Wextra-tokens: Warn about excess tokens at the end of a preprocessor directive.
    This option, which defaults to on, enables warnings about extra tokens at -the end of preprocessor directives. For example:

    +the end of preprocessor directives. For example:
       test.c:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
    @@ -408,7 +416,7 @@ by commenting them out.

    Warn about unqualified uses of a member template whose name resolves to another template at the location of the use.
    This option, which defaults to on, enables a warning in the -following code:

    +following code:
     template<typename T> struct set{};
    @@ -432,7 +440,7 @@ an extension.

    an unusable copy constructor when binding a reference to a temporary.
    This option, which defaults to on, enables warnings about binding a reference to a temporary when the temporary doesn't have a usable copy -constructor. For example:

    +constructor. For example:
       struct NonCopyable {
    @@ -484,7 +492,6 @@ and gives you fine-grain control over wh
     the ability to print this information, and these are the options that control
     it:

    -

    1. A file/line/column indicator that shows exactly where the diagnostic occurs in your code [-fshow-column,
    2. A machine-parsable representation of the ranges involved (off by default) [-fdiagnostics-print-source-range-info].
    3. -

    +

    For more information please see Formatting of Diagnostics.

    @@ -518,14 +525,13 @@ Diagnostics.

    All diagnostics are mapped into one of these 5 classes:

    -

    • Ignored
    • Note
    • Warning
    • Error
    • Fatal
    • -

    +

    Diagnostic Categories

    @@ -735,6 +741,7 @@ likely to affect PCH files that referenc

    Clang provides a number of ways to control code generation. The options are listed below.

    +
    -fcatch-undefined-behavior: Turn on runtime code generation to check for undefined behavior.
    @@ -742,7 +749,7 @@ on runtime code generation to check for adds runtime checks for undefined runtime behavior. If a check fails, __builtin_trap() is used to indicate failure. The checks are: -

    +

    • Subscripting where the static type of one operand is a variable which is decayed from an array type and the other operand is greater than the size of the array or less than zero.
    • @@ -752,7 +759,7 @@ The checks are:
    • When llvm implements more __builtin_object_size support, reads and writes for objects that __builtin_object_size indicates we aren't accessing valid memory. Bit-fields and vectors are not yet checked. -

      +
    -fno-assume-sane-operator-new: @@ -761,6 +768,19 @@ Don't assume that the C++'s new operator operator will always return a pointer that does not alias any other pointer when the function returns.
    +
    -ftrap-function=[name]: Instruct code +generator to emit a function call to the specified function name for +__builtin_trap().
    + +
    LLVM code generator translates __builtin_trap() to a trap +instruction if it is supported by the target ISA. Otherwise, the builtin is +translated into a call to abort. If this option is set, then the code +generator will always lower the builtin to a call to the specified function +regardless of whether the target ISA has a trap instruction. This option is +useful for environments (e.g. deeply embedded) where a trap cannot be properly +handled, or when some custom behavior is desired.
    + +

    C Language Features

    @@ -917,6 +937,7 @@ support is incomplete; enabling Microsof certain constructs (including __declspec and Microsoft-style asm statements).

    +
    • clang allows setting _MSC_VER with -fmsc-version=. It defaults to 1300 which is the same as Visual C/C++ 2003. Any number is supported and can greatly affect what Windows SDK and c++stdlib headers clang can compile. This option will be @@ -930,6 +951,7 @@ record members can be declared using use controlling record layout. GCC also contains support for this feature, however where MSVC and GCC are incompatible clang follows the MSVC definition.
    • +

    Target-Specific Features and Limitations

    @@ -948,6 +970,10 @@ definition. (Mac OS/X), Linux, FreeBSD, and Dragonfly BSD: it has been tested to correctly compile many large C, C++, Objective-C, and Objective-C++ codebases.

    +

    On x86_64-mingw32, passing i128(by value) is incompatible to Microsoft x64 +calling conversion. You might need to tweak WinX86_64ABIInfo::classify() +in lib/CodeGen/TargetInfo.cpp.

    +

    ARM

    @@ -985,6 +1011,44 @@ Generating assembly requires a suitable

    No __thread support, 64-bit ObjC support requires SL tools.

    + +

    Windows

    + + +

    Experimental supports are on Cygming.

    + +
    Cygwin
    + +

    Clang works on Cygwin-1.7.

    + +
    MinGW32
    + +

    Clang works on some mingw32 distributions. +Clang assumes directories as below;

    + +
      +
    • C:/mingw/include
    • +
    • C:/mingw/lib
    • +
    • C:/mingw/lib/gcc/mingw32/4.[3-5].0/include/c++
    • +
    + +

    On MSYS, a few tests might fail. It is due to Bug 8520 and is fixed in LLVM's r127724.

    + +
    MinGW-w64
    + +

    For x32(i686-w64-mingw32), it is not supported yet.

    + +

    For x64(x86_64-w64-mingw32), an essential patch(LLVM's r128206) would be needed. It is incompatible to TDM-GCC due to the definition of symbol "___chkstk". Clang assumes as below;

    + +

      +
    • C:/mingw/x86_64-w64-mingw32/include
    • +
    • C:/mingw/x86_64-w64-mingw32/include/c++/4.5.[23]
    • +
    • GCC driver "gcc.exe" to build x86_64-w64-mingw32 binary.
    • +
    + +

    Some tests might fail +on x64.

    + Modified: vendor/clang/dist/docs/tools/clang.pod ============================================================================== --- vendor/clang/dist/docs/tools/clang.pod Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/docs/tools/clang.pod Mon May 2 19:39:53 2011 (r221339) @@ -7,7 +7,7 @@ clang - the Clang C, C++, and Objective- =head1 SYNOPSIS B [B<-c>|B<-S>|B<-E>] B<-std=>I B<-g> - [B<-O0>|B<-O1>|B<-O2>|B<-Os>|B<-O3>|B<-O4>] + [B<-O0>|B<-O1>|B<-O2>|B<-Os>|B<-Oz>|B<-O3>|B<-O4>] B<-W>I B<-pedantic> B<-I>I B<-L>I B<-D>I @@ -53,7 +53,7 @@ parse errors. The output of this stage This stage translates an AST into low-level intermediate code (known as "LLVM IR") and ultimately to machine code. This phase is responsible for optimizing -the generated code and handling target-specfic code generation. The output of +the generated code and handling target-specific code generation. The output of this stage is typically called a ".s" file or "assembly" file. Clang also supports the use of an integrated assembler, in which the code @@ -263,12 +263,13 @@ may not exist on earlier ones. =over -=item B<-O0> B<-O1> B<-O2> B<-Os> B<-O3> B<-O4> +=item B<-O0> B<-O1> B<-O2> B<-Os> B<-Oz> B<-O3> B<-O4> Specify which optimization level to use. B<-O0> means "no optimization": this level compiles the fastest and generates the most debuggable code. B<-O2> is a moderate level of optimization which enables most optimizations. B<-Os> is like -B<-O2> with extra optimizations to reduce code size. B<-O3> is like B<-O2>, +B<-O2> with extra optimizations to reduce code size. B<-Oz> is like B<-Os> +(and thus B<-O2>), but reduces code size further. B<-O3> is like B<-O2>, except that it enables optimizations that take longer to perform or that may generate larger code (in an attempt to make the program run faster). On supported platforms, B<-O4> enables link-time optimization; object files are @@ -356,18 +357,10 @@ Pass I to the static analyzer. Pass I to the assembler. -=item B<-Xclang> I - -Pass I to the clang compiler frontend. - =item B<-Xlinker> I Pass I to the linker. -=item B<-mllvm> I - -Pass I to the LLVM backend. - =item B<-Xpreprocessor> I Pass I to the preprocessor. Modified: vendor/clang/dist/examples/CMakeLists.txt ============================================================================== --- vendor/clang/dist/examples/CMakeLists.txt Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/examples/CMakeLists.txt Mon May 2 19:39:53 2011 (r221339) @@ -1,3 +1,3 @@ add_subdirectory(clang-interpreter) add_subdirectory(PrintFunctionNames) - +add_subdirectory(Tooling) Added: vendor/clang/dist/examples/Tooling/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/examples/Tooling/CMakeLists.txt Mon May 2 19:39:53 2011 (r221339) @@ -0,0 +1,6 @@ +set(LLVM_USED_LIBS clangTooling clangBasic) + +add_clang_executable(clang-check + ClangCheck.cpp + ) + Added: vendor/clang/dist/examples/Tooling/ClangCheck.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/examples/Tooling/ClangCheck.cpp Mon May 2 19:39:53 2011 (r221339) @@ -0,0 +1,108 @@ +//===- examples/Tooling/ClangCheck.cpp - Clang check tool -----------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements a clang-check tool that runs the +// clang::SyntaxOnlyAction over a number of translation units. +// +// Usage: +// clang-check ... +// +// Where is a CMake build directory in which a file named +// compile_commands.json exists (enable -DCMAKE_EXPORT_COMPILE_COMMANDS in +// CMake to get this output). +// +// ... specify the paths of files in the CMake source tree. This path +// is looked up in the compile command database. If the path of a file is +// absolute, it needs to point into CMake's source tree. If the path is +// relative, the current working directory needs to be in the CMake source +// tree and the file must be in a subdirectory of the current working +// directory. "./" prefixes in the relative files will be automatically +// removed, but the rest of a relative path must be a suffix of a path in +// the compile command line database. +// +// For example, to use clang-check on all files in a subtree of the source +// tree, use: +// +// /path/in/subtree $ find . -name '*.cpp'| xargs clang-check /path/to/source +// +//===----------------------------------------------------------------------===// + +#include "clang/Frontend/FrontendActions.h" +#include "clang/Tooling/Tooling.h" +#include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/Twine.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/system_error.h" + +/// \brief Returns the absolute path of 'File', by prepending it with +/// 'BaseDirectory' if 'File' is not absolute. Otherwise returns 'File'. +/// If 'File' starts with "./", the returned path will not contain the "./". +/// Otherwise, the returned path will contain the literal path-concatenation of +/// 'BaseDirectory' and 'File'. +/// +/// \param File Either an absolute or relative path. +/// \param BaseDirectory An absolute path. +/// +/// FIXME: Put this somewhere where it is more generally available. +static std::string GetAbsolutePath( + llvm::StringRef File, llvm::StringRef BaseDirectory) { + assert(llvm::sys::path::is_absolute(BaseDirectory)); + if (llvm::sys::path::is_absolute(File)) { + return File; + } + llvm::StringRef RelativePath(File); + if (RelativePath.startswith("./")) { + RelativePath = RelativePath.substr(strlen("./")); + } + llvm::SmallString<1024> AbsolutePath(BaseDirectory); + llvm::sys::path::append(AbsolutePath, RelativePath); + return AbsolutePath.str(); +} + +int main(int argc, char **argv) { + if (argc < 3) { + llvm::outs() << "Usage: " << argv[0] << " " + << " ...\n"; + return 1; + } + // FIXME: We should pull how to find the database into the Tooling package. + llvm::OwningPtr JsonDatabase; + llvm::SmallString<1024> JsonDatabasePath(argv[1]); + llvm::sys::path::append(JsonDatabasePath, "compile_commands.json"); + llvm::error_code Result = + llvm::MemoryBuffer::getFile(JsonDatabasePath, JsonDatabase); + if (Result != 0) { + llvm::outs() << "Error while opening JSON database: " << Result.message() + << "\n"; + return 1; + } + llvm::StringRef BaseDirectory(::getenv("PWD")); + for (int I = 2; I < argc; ++I) { + llvm::SmallString<1024> File(GetAbsolutePath(argv[I], BaseDirectory)); + llvm::outs() << "Processing " << File << ".\n"; + std::string ErrorMessage; + clang::tooling::CompileCommand LookupResult = + clang::tooling::FindCompileArgsInJsonDatabase( + File.str(), JsonDatabase->getBuffer(), ErrorMessage); + if (!LookupResult.CommandLine.empty()) { + if (!clang::tooling::RunToolWithFlags( + new clang::SyntaxOnlyAction, + LookupResult.CommandLine.size(), + clang::tooling::CommandLineToArgv( + &LookupResult.CommandLine).data())) { + llvm::outs() << "Error while processing " << File << ".\n"; + } + } else { + llvm::outs() << "Skipping " << File << ". Command line not found.\n"; + } + } + return 0; +} Added: vendor/clang/dist/examples/Tooling/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/examples/Tooling/Makefile Mon May 2 19:39:53 2011 (r221339) @@ -0,0 +1,24 @@ +##===- examples/Tooling/Makefile ---------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +CLANG_LEVEL := ../.. + +TOOLNAME = clang-check +NO_INSTALL = 1 + +# No plugins, optimize startup time. +TOOL_NO_EXPORTS = 1 + +LINK_COMPONENTS := support mc +USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a \ + clangTooling.a clangSema.a clangAnalysis.a \ + clangAST.a clangParse.a clangLex.a clangBasic.a + +include $(CLANG_LEVEL)/Makefile + Modified: vendor/clang/dist/examples/clang-interpreter/Makefile ============================================================================== --- vendor/clang/dist/examples/clang-interpreter/Makefile Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/examples/clang-interpreter/Makefile Mon May 2 19:39:53 2011 (r221339) @@ -16,7 +16,7 @@ NO_INSTALL = 1 TOOL_NO_EXPORTS = 1 LINK_COMPONENTS := jit interpreter nativecodegen bitreader bitwriter ipo \ - selectiondag asmparser + selectiondag asmparser instrumentation USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a clangCodeGen.a \ clangSema.a clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a clangAnalysis.a clangRewrite.a \ clangAST.a clangParse.a clangLex.a clangBasic.a Modified: vendor/clang/dist/examples/clang-interpreter/main.cpp ============================================================================== --- vendor/clang/dist/examples/clang-interpreter/main.cpp Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/examples/clang-interpreter/main.cpp Mon May 2 19:39:53 2011 (r221339) @@ -85,8 +85,7 @@ int main(int argc, const char **argv, ch // (basically, exactly one input, and the operation mode is hard wired). llvm::SmallVector Args(argv, argv + argc); Args.push_back("-fsyntax-only"); - llvm::OwningPtr C(TheDriver.BuildCompilation(Args.size(), - Args.data())); + llvm::OwningPtr C(TheDriver.BuildCompilation(Args)); if (!C) return 0; Modified: vendor/clang/dist/include/clang-c/Index.h ============================================================================== --- vendor/clang/dist/include/clang-c/Index.h Mon May 2 19:37:33 2011 (r221338) +++ vendor/clang/dist/include/clang-c/Index.h Mon May 2 19:39:53 2011 (r221339) @@ -1012,7 +1012,68 @@ CINDEX_LINKAGE int clang_reparseTranslat unsigned num_unsaved_files, struct CXUnsavedFile *unsaved_files, unsigned options); - + +/** + * \brief Categorizes how memory is being used by a translation unit. + */ +enum CXTUResourceUsageKind { + CXTUResourceUsage_AST = 1, + CXTUResourceUsage_Identifiers = 2, + CXTUResourceUsage_Selectors = 3, + CXTUResourceUsage_GlobalCompletionResults = 4, + CXTUResourceUsage_SourceManagerContentCache = 5, + CXTUResourceUsage_AST_SideTables = 6, + CXTUResourceUsage_SourceManager_Membuffer_Malloc = 7, + CXTUResourceUsage_SourceManager_Membuffer_MMap = 8, + CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9, + CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10, + CXTUResourceUsage_MEMORY_IN_BYTES_BEGIN = CXTUResourceUsage_AST, + CXTUResourceUsage_MEMORY_IN_BYTES_END = + CXTUResourceUsage_ExternalASTSource_Membuffer_MMap, + + CXTUResourceUsage_First = CXTUResourceUsage_AST, + CXTUResourceUsage_Last = CXTUResourceUsage_ExternalASTSource_Membuffer_MMap +}; + +/** + * \brief Returns the human-readable null-terminated C string that represents + * the name of the memory category. This string should never be freed. + */ +CINDEX_LINKAGE +const char *clang_getTUResourceUsageName(enum CXTUResourceUsageKind kind); + +typedef struct CXTUResourceUsageEntry { + /* \brief The memory usage category. */ + enum CXTUResourceUsageKind kind; + /* \brief Amount of resources used. + The units will depend on the resource kind. */ + unsigned long amount; +} CXTUResourceUsageEntry; + +/** + * \brief The memory usage of a CXTranslationUnit, broken into categories. + */ +typedef struct CXTUResourceUsage { + /* \brief Private data member, used for queries. */ + void *data; + + /* \brief The number of entries in the 'entries' array. */ + unsigned numEntries; + + /* \brief An array of key-value pairs, representing the breakdown of memory + usage. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 2 19:40:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 778E4106566C; Mon, 2 May 2011 19:40:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D81E8FC19; Mon, 2 May 2011 19:40:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42JeqeN051700; Mon, 2 May 2011 19:40:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42Jeqku051699; Mon, 2 May 2011 19:40:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105021940.p42Jeqku051699@svn.freebsd.org> From: Dimitry Andric Date: Mon, 2 May 2011 19:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221340 - vendor/clang/clang-r130700 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 19:40:52 -0000 Author: dim Date: Mon May 2 19:40:52 2011 New Revision: 221340 URL: http://svn.freebsd.org/changeset/base/221340 Log: Tag clang r130700. Added: vendor/clang/clang-r130700/ - copied from r221339, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Mon May 2 20:37:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E4581065672; Mon, 2 May 2011 20:37:30 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F5E48FC18; Mon, 2 May 2011 20:37:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42KbUSx053438; Mon, 2 May 2011 20:37:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42KbU7B053435; Mon, 2 May 2011 20:37:30 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105022037.p42KbU7B053435@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 May 2011 20:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221341 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 20:37:30 -0000 Author: marius Date: Mon May 2 20:37:30 2011 New Revision: 221341 URL: http://svn.freebsd.org/changeset/base/221341 Log: Probe the PHY accompanying BCM57765. Tested by: Paul Thornton MFC after: 1 week Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/miidevs Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Mon May 2 19:40:52 2011 (r221340) +++ head/sys/dev/mii/brgphy.c Mon May 2 20:37:30 2011 (r221341) @@ -143,6 +143,7 @@ static const struct mii_phydesc brgphys[ MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S), MII_PHY_DESC(xxBROADCOM_ALT2, BCM5717C), + MII_PHY_DESC(xxBROADCOM_ALT2, BCM57765), MII_PHY_DESC(BROADCOM2, BCM5906), MII_PHY_END }; Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Mon May 2 19:40:52 2011 (r221340) +++ head/sys/dev/mii/miidevs Mon May 2 20:37:30 2011 (r221341) @@ -159,6 +159,7 @@ model xxBROADCOM_ALT1 BCM5709C 0x003c BC model xxBROADCOM_ALT1 BCM5761 0x003d BCM5761 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5709S 0x003f BCM5709S 1000/2500baseSX PHY model xxBROADCOM_ALT2 BCM5717C 0x0020 BCM5717C 10/100/1000baseTX PHY +model xxBROADCOM_ALT2 BCM57765 0x0024 BCM57765 10/100/1000baseTX PHY model BROADCOM2 BCM5906 0x0004 BCM5906 10/100baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ From owner-svn-src-all@FreeBSD.ORG Mon May 2 20:43:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FB6F106566C; Mon, 2 May 2011 20:43:24 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60B808FC1A; Mon, 2 May 2011 20:43:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42KhOvI053654; Mon, 2 May 2011 20:43:24 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42KhOcj053651; Mon, 2 May 2011 20:43:24 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201105022043.p42KhOcj053651@svn.freebsd.org> From: David Christensen Date: Mon, 2 May 2011 20:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221342 - head/sys/dev/bxe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 20:43:24 -0000 Author: davidch Date: Mon May 2 20:43:24 2011 New Revision: 221342 URL: http://svn.freebsd.org/changeset/base/221342 Log: - Re-committed r220603 which was accidentally backed out by an earlier commit. - Fixed a bug in an unused debug macro. MFC after: One week. Modified: head/sys/dev/bxe/bxe_debug.h head/sys/dev/bxe/if_bxe.h Modified: head/sys/dev/bxe/bxe_debug.h ============================================================================== --- head/sys/dev/bxe/bxe_debug.h Mon May 2 20:37:30 2011 (r221341) +++ head/sys/dev/bxe/bxe_debug.h Mon May 2 20:43:24 2011 (r221342) @@ -210,7 +210,7 @@ extern uint32_t bxe_debug; /* Returns FALSE in "defects" per 2^31 - 1 calls, otherwise returns TRUE. */ #define DB_RANDOMFALSE(defects) (random() > defects) #define DB_OR_RANDOMFALSE(defects) || (random() > defects) -#define DB_AND_RANDOMFALSE(defects) && (random() > ddfects) +#define DB_AND_RANDOMFALSE(defects) && (random() > defects) /* Returns TRUE in "defects" per 2^31 - 1 calls, otherwise returns FALSE. */ #define DB_RANDOMTRUE(defects) (random() < defects) Modified: head/sys/dev/bxe/if_bxe.h ============================================================================== --- head/sys/dev/bxe/if_bxe.h Mon May 2 20:37:30 2011 (r221341) +++ head/sys/dev/bxe/if_bxe.h Mon May 2 20:43:24 2011 (r221342) @@ -1150,9 +1150,6 @@ struct bxe_fastpath { /* ToDo: Audit this structure for unused varaibles. */ struct bxe_softc { - /* - * MUST start with ifnet pointer (see definition of miibus_statchg()). - */ struct ifnet *bxe_ifp; int media; From owner-svn-src-all@FreeBSD.ORG Mon May 2 20:45:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 806A4106566C; Mon, 2 May 2011 20:45:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 719D98FC08; Mon, 2 May 2011 20:45:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42KjJsH053757; Mon, 2 May 2011 20:45:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42KjJL4053755; Mon, 2 May 2011 20:45:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105022045.p42KjJL4053755@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 May 2011 20:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221343 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 20:45:19 -0000 Author: marius Date: Mon May 2 20:45:19 2011 New Revision: 221343 URL: http://svn.freebsd.org/changeset/base/221343 Log: Fix an logic bug which caused jumbo buffers to not be synced. Reported and tested by: Michael Moll MFC after: 3 days Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon May 2 20:43:24 2011 (r221342) +++ head/sys/dev/bge/if_bge.c Mon May 2 20:45:19 2011 (r221343) @@ -1022,7 +1022,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, i return (error); } - if (sc->bge_cdata.bge_rx_jumbo_chain[i] == NULL) { + if (sc->bge_cdata.bge_rx_jumbo_chain[i] != NULL) { bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->bge_cdata.bge_mtag_jumbo, From owner-svn-src-all@FreeBSD.ORG Mon May 2 21:04:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9A86106564A; Mon, 2 May 2011 21:04:23 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAE958FC08; Mon, 2 May 2011 21:04:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42L4N7Z054374; Mon, 2 May 2011 21:04:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42L4NTw054372; Mon, 2 May 2011 21:04:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105022104.p42L4NTw054372@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 May 2011 21:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221344 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 21:04:23 -0000 Author: marius Date: Mon May 2 21:04:23 2011 New Revision: 221344 URL: http://svn.freebsd.org/changeset/base/221344 Log: Correct spelling in comments. Submitted by: brucec Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon May 2 20:45:19 2011 (r221343) +++ head/sys/dev/bge/if_bge.c Mon May 2 21:04:23 2011 (r221344) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); * * The Broadcom BCM5700 is based on technology originally developed by * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet - * MAC chips. The BCM5700, sometimes refered to as the Tigon III, has + * MAC chips. The BCM5700, sometimes referred to as the Tigon III, has * two on-board MIPS R4000 CPUs and can have as much as 16MB of external * SSRAM. The BCM5700 supports TCP, UDP and IP checksum offload, jumbo * frames, highly configurable RX filtering, and 16 RX and TX queues @@ -3419,7 +3419,7 @@ bge_reset(struct bge_softc *sc) pci_write_config(dev, sc->bge_pcixcap + PCIXR_COMMAND, devctl, 2); } - /* Re-enable MSI, if neccesary, and enable the memory arbiter. */ + /* Re-enable MSI, if necessary, and enable the memory arbiter. */ if (BGE_IS_5714_FAMILY(sc)) { /* This chip disables MSI on reset. */ if (sc->bge_flags & BGE_FLAG_MSI) { From owner-svn-src-all@FreeBSD.ORG Mon May 2 21:04:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 757D3106568A; Mon, 2 May 2011 21:04:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6116F8FC1F; Mon, 2 May 2011 21:04:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42L4cle054428; Mon, 2 May 2011 21:04:38 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42L4cR8054410; Mon, 2 May 2011 21:04:38 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105022104.p42L4cR8054410@svn.freebsd.org> From: Dimitry Andric Date: Mon, 2 May 2011 21:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221345 - in head: . contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/llvm/include/llvm/Analysis contri... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 21:04:38 -0000 Author: dim Date: Mon May 2 21:04:37 2011 New Revision: 221345 URL: http://svn.freebsd.org/changeset/base/221345 Log: Upgrade our copy of llvm/clang to r130700, from upstream's trunk. Added: head/contrib/llvm/include/llvm-c/Disassembler.h - copied unchanged from r221340, vendor/llvm/dist/include/llvm-c/Disassembler.h head/contrib/llvm/include/llvm-c/Object.h - copied unchanged from r221340, vendor/llvm/dist/include/llvm-c/Object.h head/contrib/llvm/include/llvm/DebugInfoProbe.h - copied unchanged from r221340, vendor/llvm/dist/include/llvm/DebugInfoProbe.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h - copied unchanged from r221340, vendor/llvm/dist/include/llvm/ExecutionEngine/RuntimeDyld.h head/contrib/llvm/include/llvm/IntrinsicsPTX.td - copied unchanged from r221340, vendor/llvm/dist/include/llvm/IntrinsicsPTX.td head/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/CodeGen/AsmPrinter/ARMException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h - copied unchanged from r221340, vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h head/contrib/llvm/lib/CodeGen/InterferenceCache.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/CodeGen/InterferenceCache.cpp head/contrib/llvm/lib/CodeGen/InterferenceCache.h - copied unchanged from r221340, vendor/llvm/dist/lib/CodeGen/InterferenceCache.h head/contrib/llvm/lib/ExecutionEngine/MCJIT/Intercept.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/ExecutionEngine/MCJIT/Intercept.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h - copied unchanged from r221340, vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ - copied from r221340, vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/ head/contrib/llvm/lib/MC/ELFObjectWriter.h - copied unchanged from r221340, vendor/llvm/dist/lib/MC/ELFObjectWriter.h head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/MC/MCDisassembler/Disassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h - copied unchanged from r221340, vendor/llvm/dist/lib/MC/MCDisassembler/Disassembler.h head/contrib/llvm/lib/MC/MCELF.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/MC/MCELF.cpp head/contrib/llvm/lib/MC/MCELF.h - copied unchanged from r221340, vendor/llvm/dist/lib/MC/MCELF.h head/contrib/llvm/lib/MC/MCELFStreamer.h - copied unchanged from r221340, vendor/llvm/dist/lib/MC/MCELFStreamer.h head/contrib/llvm/lib/Object/MachOObjectFile.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/Object/MachOObjectFile.cpp head/contrib/llvm/lib/Object/Object.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/Object/Object.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeSchedule3.td - copied unchanged from r221340, vendor/llvm/dist/lib/Target/MBlaze/MBlazeSchedule3.td head/contrib/llvm/lib/Target/MBlaze/MBlazeSchedule5.td - copied unchanged from r221340, vendor/llvm/dist/lib/Target/MBlaze/MBlazeSchedule5.td head/contrib/llvm/lib/Target/Mips/MipsExpandPseudo.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/Target/Mips/MipsExpandPseudo.cpp head/contrib/llvm/lib/Target/PTX/PTXIntrinsicInstrInfo.td - copied unchanged from r221340, vendor/llvm/dist/lib/Target/PTX/PTXIntrinsicInstrInfo.td head/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/Transforms/Instrumentation/GCOVProfiling.cpp head/contrib/llvm/lib/VMCore/DebugInfoProbe.cpp - copied unchanged from r221340, vendor/llvm/dist/lib/VMCore/DebugInfoProbe.cpp head/contrib/llvm/tools/clang/include/clang/Basic/AddressSpaces.h - copied unchanged from r221340, vendor/clang/dist/include/clang/Basic/AddressSpaces.h head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPTX.def - copied unchanged from r221340, vendor/clang/dist/include/clang/Basic/BuiltinsPTX.def head/contrib/llvm/tools/clang/include/clang/Basic/ExceptionSpecificationType.h - copied unchanged from r221340, vendor/clang/dist/include/clang/Basic/ExceptionSpecificationType.h head/contrib/llvm/tools/clang/include/clang/Basic/ExpressionTraits.h - copied unchanged from r221340, vendor/clang/dist/include/clang/Basic/ExpressionTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/OpenCL.h - copied unchanged from r221340, vendor/clang/dist/include/clang/Basic/OpenCL.h head/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h - copied unchanged from r221340, vendor/clang/dist/include/clang/Basic/VersionTuple.h head/contrib/llvm/tools/clang/include/clang/Frontend/LogDiagnosticPrinter.h - copied unchanged from r221340, vendor/clang/dist/include/clang/Frontend/LogDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Serialization/ChainedIncludesSource.h - copied unchanged from r221340, vendor/clang/dist/include/clang/Serialization/ChainedIncludesSource.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h - copied unchanged from r221340, vendor/clang/dist/include/clang/StaticAnalyzer/Core/Checker.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h - copied unchanged from r221340, vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h head/contrib/llvm/tools/clang/include/clang/Tooling/ - copied from r221340, vendor/clang/dist/include/clang/Tooling/ head/contrib/llvm/tools/clang/lib/AST/ExternalASTSource.cpp - copied unchanged from r221340, vendor/clang/dist/lib/AST/ExternalASTSource.cpp head/contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp - copied unchanged from r221340, vendor/clang/dist/lib/Basic/VersionTuple.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp - copied unchanged from r221340, vendor/clang/dist/lib/CodeGen/CGObjCRuntime.cpp head/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp - copied unchanged from r221340, vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp head/contrib/llvm/tools/clang/lib/Frontend/LogDiagnosticPrinter.cpp - copied unchanged from r221340, vendor/clang/dist/lib/Frontend/LogDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h - copied unchanged from r221340, vendor/clang/dist/lib/Headers/mm3dnow.h head/contrib/llvm/tools/clang/lib/Sema/DelayedDiagnostic.cpp - copied unchanged from r221340, vendor/clang/dist/lib/Sema/DelayedDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Sema/Scope.cpp - copied unchanged from r221340, vendor/clang/dist/lib/Sema/Scope.cpp head/contrib/llvm/tools/clang/lib/Serialization/ChainedIncludesSource.cpp - copied unchanged from r221340, vendor/clang/dist/lib/Serialization/ChainedIncludesSource.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp - copied unchanged from r221340, vendor/clang/dist/lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp - copied unchanged from r221340, vendor/clang/dist/lib/StaticAnalyzer/Core/CheckerContext.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp - copied unchanged from r221340, vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/Tooling/ - copied from r221340, vendor/clang/dist/lib/Tooling/ head/lib/clang/include/clang/Basic/DiagnosticIndexName.inc (contents, props changed) head/lib/clang/libllvminstrumentation/ head/lib/clang/libllvminstrumentation/Makefile (contents, props changed) Deleted: head/contrib/llvm/include/llvm/Analysis/LiveValues.h head/contrib/llvm/lib/Analysis/LiveValues.cpp head/contrib/llvm/lib/Target/PTX/Makefile head/contrib/llvm/lib/Transforms/IPO/StructRetPromotion.cpp head/contrib/llvm/lib/Transforms/Scalar/GEPSplitter.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValuesV2.h head/contrib/llvm/tools/clang/include/clang/Frontend/DeclContextXML.def head/contrib/llvm/tools/clang/include/clang/Frontend/DeclXML.def head/contrib/llvm/tools/clang/include/clang/Frontend/DocumentXML.def head/contrib/llvm/tools/clang/include/clang/Frontend/DocumentXML.h head/contrib/llvm/tools/clang/include/clang/Frontend/StmtXML.def head/contrib/llvm/tools/clang/include/clang/Frontend/TypeXML.def head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerV2.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Checker.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.def head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.h head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValuesV2.cpp head/contrib/llvm/tools/clang/lib/Frontend/DeclXML.cpp head/contrib/llvm/tools/clang/lib/Frontend/DocumentXML.cpp head/contrib/llvm/tools/clang/lib/Frontend/StmtXML.cpp head/contrib/llvm/tools/clang/lib/Frontend/TypeXML.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExperimentalChecks.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/InternalChecks.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Checker.cpp Modified: head/ObsoleteFiles.inc head/contrib/llvm/include/llvm-c/EnhancedDisassembly.h head/contrib/llvm/include/llvm-c/Transforms/Scalar.h head/contrib/llvm/include/llvm-c/lto.h head/contrib/llvm/include/llvm/ADT/APFloat.h head/contrib/llvm/include/llvm/ADT/APInt.h head/contrib/llvm/include/llvm/ADT/ArrayRef.h head/contrib/llvm/include/llvm/ADT/DenseMap.h head/contrib/llvm/include/llvm/ADT/DenseMapInfo.h head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h head/contrib/llvm/include/llvm/ADT/FoldingSet.h head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h head/contrib/llvm/include/llvm/ADT/IntervalMap.h head/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h head/contrib/llvm/include/llvm/ADT/PointerUnion.h head/contrib/llvm/include/llvm/ADT/ScopedHashTable.h head/contrib/llvm/include/llvm/ADT/SmallPtrSet.h head/contrib/llvm/include/llvm/ADT/Statistic.h head/contrib/llvm/include/llvm/ADT/StringExtras.h head/contrib/llvm/include/llvm/ADT/StringMap.h head/contrib/llvm/include/llvm/ADT/Triple.h head/contrib/llvm/include/llvm/ADT/ilist.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h head/contrib/llvm/include/llvm/Analysis/CFGPrinter.h head/contrib/llvm/include/llvm/Analysis/DIBuilder.h head/contrib/llvm/include/llvm/Analysis/DebugInfo.h head/contrib/llvm/include/llvm/Analysis/IVUsers.h head/contrib/llvm/include/llvm/Analysis/InlineCost.h head/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h head/contrib/llvm/include/llvm/Analysis/Lint.h head/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/Passes.h head/contrib/llvm/include/llvm/Analysis/PathProfileInfo.h head/contrib/llvm/include/llvm/Analysis/PostDominators.h head/contrib/llvm/include/llvm/Analysis/RegionInfo.h head/contrib/llvm/include/llvm/Analysis/RegionIterator.h head/contrib/llvm/include/llvm/Analysis/RegionPass.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h head/contrib/llvm/include/llvm/Bitcode/Archive.h head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h head/contrib/llvm/include/llvm/CodeGen/CalcSpillWeights.h head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/include/llvm/CodeGen/EdgeBundles.h head/contrib/llvm/include/llvm/CodeGen/FastISel.h head/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h head/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h head/contrib/llvm/include/llvm/CodeGen/JITCodeEmitter.h head/contrib/llvm/include/llvm/CodeGen/LiveInterval.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/include/llvm/CodeGen/MachineCodeEmitter.h head/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h head/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineInstr.h head/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Heuristics/Briggs.h head/contrib/llvm/include/llvm/CodeGen/ProcessImplicitDefs.h head/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h head/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h head/contrib/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h head/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h head/contrib/llvm/include/llvm/CompilerDriver/CompilationGraph.h head/contrib/llvm/include/llvm/CompilerDriver/Tool.h head/contrib/llvm/include/llvm/Constant.h head/contrib/llvm/include/llvm/Constants.h head/contrib/llvm/include/llvm/DerivedTypes.h head/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h head/contrib/llvm/include/llvm/ExecutionEngine/JITMemoryManager.h head/contrib/llvm/include/llvm/GlobalVariable.h head/contrib/llvm/include/llvm/InitializePasses.h head/contrib/llvm/include/llvm/InstrTypes.h head/contrib/llvm/include/llvm/Instructions.h head/contrib/llvm/include/llvm/Intrinsics.td head/contrib/llvm/include/llvm/IntrinsicsARM.td head/contrib/llvm/include/llvm/IntrinsicsX86.td head/contrib/llvm/include/llvm/IntrinsicsXCore.td head/contrib/llvm/include/llvm/LinkAllPasses.h head/contrib/llvm/include/llvm/MC/MCAsmInfo.h head/contrib/llvm/include/llvm/MC/MCAsmLayout.h head/contrib/llvm/include/llvm/MC/MCAssembler.h head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCDisassembler.h head/contrib/llvm/include/llvm/MC/MCDwarf.h head/contrib/llvm/include/llvm/MC/MCExpr.h head/contrib/llvm/include/llvm/MC/MCInstPrinter.h head/contrib/llvm/include/llvm/MC/MCObjectStreamer.h head/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h head/contrib/llvm/include/llvm/MC/MCSection.h head/contrib/llvm/include/llvm/MC/MCSectionMachO.h head/contrib/llvm/include/llvm/MC/MCStreamer.h head/contrib/llvm/include/llvm/MC/MCSymbol.h head/contrib/llvm/include/llvm/Metadata.h head/contrib/llvm/include/llvm/Module.h head/contrib/llvm/include/llvm/Object/MachOObject.h head/contrib/llvm/include/llvm/Pass.h head/contrib/llvm/include/llvm/PassAnalysisSupport.h head/contrib/llvm/include/llvm/Support/Allocator.h head/contrib/llvm/include/llvm/Support/CFG.h head/contrib/llvm/include/llvm/Support/Casting.h head/contrib/llvm/include/llvm/Support/CommandLine.h head/contrib/llvm/include/llvm/Support/Compiler.h head/contrib/llvm/include/llvm/Support/ConstantFolder.h head/contrib/llvm/include/llvm/Support/CrashRecoveryContext.h head/contrib/llvm/include/llvm/Support/DOTGraphTraits.h head/contrib/llvm/include/llvm/Support/DebugLoc.h head/contrib/llvm/include/llvm/Support/Dwarf.h head/contrib/llvm/include/llvm/Support/ErrorHandling.h head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/include/llvm/Support/FileUtilities.h head/contrib/llvm/include/llvm/Support/GraphWriter.h head/contrib/llvm/include/llvm/Support/IRBuilder.h head/contrib/llvm/include/llvm/Support/Memory.h head/contrib/llvm/include/llvm/Support/MemoryBuffer.h head/contrib/llvm/include/llvm/Support/NoFolder.h head/contrib/llvm/include/llvm/Support/PathV1.h head/contrib/llvm/include/llvm/Support/PatternMatch.h head/contrib/llvm/include/llvm/Support/PrettyStackTrace.h head/contrib/llvm/include/llvm/Support/Program.h head/contrib/llvm/include/llvm/Support/Regex.h head/contrib/llvm/include/llvm/Support/Signals.h head/contrib/llvm/include/llvm/Support/SourceMgr.h head/contrib/llvm/include/llvm/Support/StandardPasses.h head/contrib/llvm/include/llvm/Support/TimeValue.h head/contrib/llvm/include/llvm/Support/system_error.h head/contrib/llvm/include/llvm/Target/SubtargetFeature.h head/contrib/llvm/include/llvm/Target/Target.td head/contrib/llvm/include/llvm/Target/TargetAsmBackend.h head/contrib/llvm/include/llvm/Target/TargetAsmInfo.h head/contrib/llvm/include/llvm/Target/TargetData.h head/contrib/llvm/include/llvm/Target/TargetInstrDesc.h head/contrib/llvm/include/llvm/Target/TargetInstrInfo.h head/contrib/llvm/include/llvm/Target/TargetInstrItineraries.h head/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h head/contrib/llvm/include/llvm/Target/TargetLowering.h head/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h head/contrib/llvm/include/llvm/Target/TargetMachine.h head/contrib/llvm/include/llvm/Target/TargetOptions.h head/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h head/contrib/llvm/include/llvm/Target/TargetRegistry.h head/contrib/llvm/include/llvm/Target/TargetSelect.h head/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td head/contrib/llvm/include/llvm/Transforms/IPO.h head/contrib/llvm/include/llvm/Transforms/Instrumentation.h head/contrib/llvm/include/llvm/Transforms/Scalar.h head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h head/contrib/llvm/include/llvm/Transforms/Utils/Local.h head/contrib/llvm/include/llvm/TypeSymbolTable.h head/contrib/llvm/include/llvm/User.h head/contrib/llvm/include/llvm/Value.h head/contrib/llvm/lib/Analysis/AliasAnalysis.cpp head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp head/contrib/llvm/lib/Analysis/Analysis.cpp head/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/CaptureTracking.cpp head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/DIBuilder.cpp head/contrib/llvm/lib/Analysis/DebugInfo.cpp head/contrib/llvm/lib/Analysis/IPA/GlobalsModRef.cpp head/contrib/llvm/lib/Analysis/IVUsers.cpp head/contrib/llvm/lib/Analysis/InlineCost.cpp head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/Analysis/LazyValueInfo.cpp head/contrib/llvm/lib/Analysis/Lint.cpp head/contrib/llvm/lib/Analysis/Loads.cpp head/contrib/llvm/lib/Analysis/LoopPass.cpp head/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp head/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/PHITransAddr.cpp head/contrib/llvm/lib/Analysis/PathNumbering.cpp head/contrib/llvm/lib/Analysis/PathProfileVerifier.cpp head/contrib/llvm/lib/Analysis/PostDominators.cpp head/contrib/llvm/lib/Analysis/ProfileEstimatorPass.cpp head/contrib/llvm/lib/Analysis/ProfileInfo.cpp head/contrib/llvm/lib/Analysis/ProfileInfoLoader.cpp head/contrib/llvm/lib/Analysis/RegionInfo.cpp head/contrib/llvm/lib/Analysis/RegionPrinter.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp head/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/Archive/ArchiveWriter.cpp head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/Analysis.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfTableException.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.cpp head/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp head/contrib/llvm/lib/CodeGen/CallingConvLower.cpp head/contrib/llvm/lib/CodeGen/CodePlacementOpt.cpp head/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp head/contrib/llvm/lib/CodeGen/ELF.h head/contrib/llvm/lib/CodeGen/ELFWriter.cpp head/contrib/llvm/lib/CodeGen/EdgeBundles.cpp head/contrib/llvm/lib/CodeGen/ExpandISelPseudos.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp head/contrib/llvm/lib/CodeGen/LiveInterval.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalUnion.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalUnion.h head/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp head/contrib/llvm/lib/CodeGen/LiveRangeEdit.h head/contrib/llvm/lib/CodeGen/LiveVariables.cpp head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineCSE.cpp head/contrib/llvm/lib/CodeGen/MachineInstr.cpp head/contrib/llvm/lib/CodeGen/MachineLICM.cpp head/contrib/llvm/lib/CodeGen/MachineSink.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/CodeGen/PHIElimination.cpp head/contrib/llvm/lib/CodeGen/Passes.cpp head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp head/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.h head/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp head/contrib/llvm/lib/CodeGen/RegAllocFast.cpp head/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp head/contrib/llvm/lib/CodeGen/RegAllocLinearScan.cpp head/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp head/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp head/contrib/llvm/lib/CodeGen/RenderMachineFunction.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/ShrinkWrapping.cpp head/contrib/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp head/contrib/llvm/lib/CodeGen/SimpleRegisterCoalescing.h head/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp head/contrib/llvm/lib/CodeGen/SlotIndexes.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.h head/contrib/llvm/lib/CodeGen/Spiller.cpp head/contrib/llvm/lib/CodeGen/Spiller.h head/contrib/llvm/lib/CodeGen/SplitKit.cpp head/contrib/llvm/lib/CodeGen/SplitKit.h head/contrib/llvm/lib/CodeGen/StackProtector.cpp head/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp head/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp head/contrib/llvm/lib/CodeGen/VirtRegMap.cpp head/contrib/llvm/lib/CodeGen/VirtRegRewriter.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/Intercept.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.h head/contrib/llvm/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.h head/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/TargetSelect.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h head/contrib/llvm/lib/Linker/LinkModules.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/MCAsmInfo.cpp head/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp head/contrib/llvm/lib/MC/MCAsmStreamer.cpp head/contrib/llvm/lib/MC/MCAssembler.cpp head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.h head/contrib/llvm/lib/MC/MCDisassembler/EDInfo.h head/contrib/llvm/lib/MC/MCDisassembler/EDInst.cpp head/contrib/llvm/lib/MC/MCDisassembler/EDOperand.cpp head/contrib/llvm/lib/MC/MCDwarf.cpp head/contrib/llvm/lib/MC/MCELFStreamer.cpp head/contrib/llvm/lib/MC/MCExpr.cpp head/contrib/llvm/lib/MC/MCInstPrinter.cpp head/contrib/llvm/lib/MC/MCLoggingStreamer.cpp head/contrib/llvm/lib/MC/MCMachOStreamer.cpp head/contrib/llvm/lib/MC/MCNullStreamer.cpp head/contrib/llvm/lib/MC/MCObjectStreamer.cpp head/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp head/contrib/llvm/lib/MC/MCSectionELF.cpp head/contrib/llvm/lib/MC/MCSectionMachO.cpp head/contrib/llvm/lib/MC/MCStreamer.cpp head/contrib/llvm/lib/MC/MCSymbol.cpp head/contrib/llvm/lib/MC/MachObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp head/contrib/llvm/lib/Object/COFFObjectFile.cpp head/contrib/llvm/lib/Object/ELFObjectFile.cpp head/contrib/llvm/lib/Object/MachOObject.cpp head/contrib/llvm/lib/Object/ObjectFile.cpp head/contrib/llvm/lib/Support/APFloat.cpp head/contrib/llvm/lib/Support/APInt.cpp head/contrib/llvm/lib/Support/Allocator.cpp head/contrib/llvm/lib/Support/CommandLine.cpp head/contrib/llvm/lib/Support/CrashRecoveryContext.cpp head/contrib/llvm/lib/Support/Dwarf.cpp head/contrib/llvm/lib/Support/ErrorHandling.cpp head/contrib/llvm/lib/Support/FileUtilities.cpp head/contrib/llvm/lib/Support/FoldingSet.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Support/MemoryBuffer.cpp head/contrib/llvm/lib/Support/Path.cpp head/contrib/llvm/lib/Support/PrettyStackTrace.cpp head/contrib/llvm/lib/Support/Regex.cpp head/contrib/llvm/lib/Support/Signals.cpp head/contrib/llvm/lib/Support/SmallPtrSet.cpp head/contrib/llvm/lib/Support/Statistic.cpp head/contrib/llvm/lib/Support/StringMap.cpp head/contrib/llvm/lib/Support/StringRef.cpp head/contrib/llvm/lib/Support/Triple.cpp head/contrib/llvm/lib/Support/Unix/Host.inc head/contrib/llvm/lib/Support/Unix/Memory.inc head/contrib/llvm/lib/Support/Unix/Path.inc head/contrib/llvm/lib/Support/Unix/Program.inc head/contrib/llvm/lib/Support/Unix/Signals.inc head/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc head/contrib/llvm/lib/Support/Windows/Path.inc head/contrib/llvm/lib/Support/Windows/PathV2.inc head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/Support/regcomp.c head/contrib/llvm/lib/Target/ARM/ARM.td head/contrib/llvm/lib/Target/ARM/ARMAddressingModes.h head/contrib/llvm/lib/Target/ARM/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h head/contrib/llvm/lib/Target/ARM/ARMBaseInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td head/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h head/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h head/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td head/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMMCAsmInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/ARMMCExpr.h head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td head/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h head/contrib/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h head/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.h head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2RegisterInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp head/contrib/llvm/lib/Target/Alpha/Alpha.td head/contrib/llvm/lib/Target/Alpha/AlphaISelLowering.cpp head/contrib/llvm/lib/Target/Alpha/AlphaInstrInfo.td head/contrib/llvm/lib/Target/Blackfin/BlackfinISelLowering.cpp head/contrib/llvm/lib/Target/CBackend/CBackend.cpp head/contrib/llvm/lib/Target/CellSPU/SPU64InstrInfo.td head/contrib/llvm/lib/Target/CellSPU/SPUAsmPrinter.cpp head/contrib/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp head/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.cpp head/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.h head/contrib/llvm/lib/Target/CellSPU/SPUInstrFormats.td head/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp head/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.td head/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.h head/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp head/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp head/contrib/llvm/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.h head/contrib/llvm/lib/Target/MBlaze/MBlaze.td head/contrib/llvm/lib/Target/MBlaze/MBlazeAsmBackend.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeAsmPrinter.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrFPU.td head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrFSL.td head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrFormats.td head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.td head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.td head/contrib/llvm/lib/Target/MBlaze/MBlazeSchedule.td head/contrib/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeSubtarget.h head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.h head/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h head/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips.h head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsCallingConv.td head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsMCAsmInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td head/contrib/llvm/lib/Target/Mips/MipsSchedule.td head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.h head/contrib/llvm/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp head/contrib/llvm/lib/Target/PTX/PTX.h head/contrib/llvm/lib/Target/PTX/PTX.td head/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.cpp head/contrib/llvm/lib/Target/PTX/PTXFrameLowering.h head/contrib/llvm/lib/Target/PTX/PTXISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PTX/PTXISelLowering.cpp head/contrib/llvm/lib/Target/PTX/PTXISelLowering.h head/contrib/llvm/lib/Target/PTX/PTXInstrInfo.cpp head/contrib/llvm/lib/Target/PTX/PTXInstrInfo.h head/contrib/llvm/lib/Target/PTX/PTXInstrInfo.td head/contrib/llvm/lib/Target/PTX/PTXMCAsmStreamer.cpp head/contrib/llvm/lib/Target/PTX/PTXMFInfoExtract.cpp head/contrib/llvm/lib/Target/PTX/PTXMachineFunctionInfo.h head/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.td head/contrib/llvm/lib/Target/PTX/PTXSubtarget.cpp head/contrib/llvm/lib/Target/PTX/PTXSubtarget.h head/contrib/llvm/lib/Target/PTX/PTXTargetMachine.cpp head/contrib/llvm/lib/Target/PTX/PTXTargetMachine.h head/contrib/llvm/lib/Target/PTX/TargetInfo/PTXTargetInfo.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h head/contrib/llvm/lib/Target/PowerPC/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCMCAsmInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp head/contrib/llvm/lib/Target/SubtargetFeature.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp head/contrib/llvm/lib/Target/TargetData.cpp head/contrib/llvm/lib/Target/TargetInstrInfo.cpp head/contrib/llvm/lib/Target/TargetLibraryInfo.cpp head/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp head/contrib/llvm/lib/Target/TargetMachine.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h head/contrib/llvm/lib/Target/X86/X86.td head/contrib/llvm/lib/Target/X86/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp head/contrib/llvm/lib/Target/X86/X86CallingConv.td head/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86Instr3DNow.td head/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td head/contrib/llvm/lib/Target/X86/X86InstrControl.td head/contrib/llvm/lib/Target/X86/X86InstrFormats.td head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.h head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86InstrSystem.td head/contrib/llvm/lib/Target/X86/X86MCAsmInfo.cpp head/contrib/llvm/lib/Target/X86/X86MCAsmInfo.h head/contrib/llvm/lib/Target/X86/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.h head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h head/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp head/contrib/llvm/lib/Transforms/IPO/IPO.cpp head/contrib/llvm/lib/Transforms/IPO/Inliner.cpp head/contrib/llvm/lib/Transforms/IPO/Internalize.cpp head/contrib/llvm/lib/Transforms/IPO/LowerSetJmp.cpp head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp head/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineWorklist.h head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp head/contrib/llvm/lib/Transforms/Instrumentation/MaximumSpanningTree.h head/contrib/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.h head/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp head/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp head/contrib/llvm/lib/Transforms/Scalar/DCE.cpp head/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/LICM.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/Reg2Mem.cpp head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp head/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp head/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp head/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp head/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp head/contrib/llvm/lib/Transforms/Utils/Local.cpp head/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp head/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp head/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp head/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp head/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp head/contrib/llvm/lib/VMCore/AsmWriter.cpp head/contrib/llvm/lib/VMCore/AutoUpgrade.cpp head/contrib/llvm/lib/VMCore/ConstantFold.cpp head/contrib/llvm/lib/VMCore/Constants.cpp head/contrib/llvm/lib/VMCore/ConstantsContext.h head/contrib/llvm/lib/VMCore/Core.cpp head/contrib/llvm/lib/VMCore/DebugLoc.cpp head/contrib/llvm/lib/VMCore/Dominators.cpp head/contrib/llvm/lib/VMCore/Function.cpp head/contrib/llvm/lib/VMCore/IRBuilder.cpp head/contrib/llvm/lib/VMCore/Instructions.cpp head/contrib/llvm/lib/VMCore/LLVMContextImpl.h head/contrib/llvm/lib/VMCore/Metadata.cpp head/contrib/llvm/lib/VMCore/PassManager.cpp head/contrib/llvm/lib/VMCore/PassRegistry.cpp head/contrib/llvm/lib/VMCore/Type.cpp head/contrib/llvm/lib/VMCore/TypesContext.h head/contrib/llvm/lib/VMCore/Verifier.cpp head/contrib/llvm/tools/clang/include/clang-c/Index.h head/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h head/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h head/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h head/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h head/contrib/llvm/tools/clang/include/clang/AST/Attr.h head/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h head/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h head/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h head/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h head/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h head/contrib/llvm/tools/clang/include/clang/AST/EvaluatedExprVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h head/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h head/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h head/contrib/llvm/tools/clang/include/clang/AST/StmtIterator.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h head/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h head/contrib/llvm/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h head/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h head/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGStmtVisitor.h head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def head/contrib/llvm/tools/clang/include/clang/Basic/ConvertUTF.h head/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h head/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h head/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h head/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/TargetBuiltins.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/Version.h head/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td head/contrib/llvm/tools/clang/include/clang/Driver/Arg.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1AsOptions.td head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/Driver.h head/contrib/llvm/tools/clang/include/clang/Driver/DriverDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Driver/OptParser.td head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h head/contrib/llvm/tools/clang/include/clang/Frontend/Analyses.def head/contrib/llvm/tools/clang/include/clang/Frontend/AnalyzerOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticClient.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h head/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandard.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def head/contrib/llvm/tools/clang/include/clang/Frontend/MultiplexConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/PreprocessorOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h head/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderMap.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h head/contrib/llvm/tools/clang/include/clang/Lex/LexDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h head/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h head/contrib/llvm/tools/clang/include/clang/Lex/MultipleIncludeOpt.h head/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h head/contrib/llvm/tools/clang/include/clang/Lex/PTHLexer.h head/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h head/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h head/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h head/contrib/llvm/tools/clang/include/clang/Parse/ParseDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Rewrite/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriter.h head/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h head/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h head/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h head/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h head/contrib/llvm/tools/clang/include/clang/Sema/Overload.h head/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h head/contrib/llvm/tools/clang/include/clang/Sema/ParsedTemplate.h head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Sema/Template.h head/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/CheckerBase.td head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/LocalCheckers.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerProvider.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticClients.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp head/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp head/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp head/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp head/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp head/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp head/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp head/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/InheritViz.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp head/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtDumper.cpp head/contrib/llvm/tools/clang/lib/AST/StmtIterator.cpp head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateName.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp head/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp head/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFGReachabilityAnalysis.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFGStmtMap.cpp head/contrib/llvm/tools/clang/lib/Analysis/CocoaConventions.cpp head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp head/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp head/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp head/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.h head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/HostInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/OptTable.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.h head/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp head/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Headers/avxintrin.h head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h head/contrib/llvm/tools/clang/lib/Headers/mm_malloc.h head/contrib/llvm/tools/clang/lib/Headers/stddef.h head/contrib/llvm/tools/clang/lib/Headers/stdint.h head/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h head/contrib/llvm/tools/clang/lib/Index/DeclReferenceMap.cpp head/contrib/llvm/tools/clang/lib/Index/Entity.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp head/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp head/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp head/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp head/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp head/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp head/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp head/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp head/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.h head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h head/contrib/llvm/tools/clang/lib/Rewrite/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp head/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp head/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp head/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp head/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXCast.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.h head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AdjustedReturnValueChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckerProvider.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AggExprVisitor.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CXXExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Environment.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/FlatStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ObjCMessage.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp head/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/clang/tools/driver/driver.cpp head/contrib/llvm/utils/TableGen/ARMDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.h head/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterEmitter.h head/contrib/llvm/utils/TableGen/CallingConvEmitter.h head/contrib/llvm/utils/TableGen/ClangASTNodesEmitter.cpp head/contrib/llvm/utils/TableGen/ClangAttrEmitter.cpp head/contrib/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp head/contrib/llvm/utils/TableGen/ClangDiagnosticsEmitter.h head/contrib/llvm/utils/TableGen/ClangSACheckersEmitter.cpp head/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h head/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.h head/contrib/llvm/utils/TableGen/CodeGenRegisters.h head/contrib/llvm/utils/TableGen/CodeGenTarget.cpp head/contrib/llvm/utils/TableGen/CodeGenTarget.h head/contrib/llvm/utils/TableGen/DAGISelEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelEmitter.h head/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcher.h head/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherOpt.cpp head/contrib/llvm/utils/TableGen/DisassemblerEmitter.cpp head/contrib/llvm/utils/TableGen/EDEmitter.cpp head/contrib/llvm/utils/TableGen/FastISelEmitter.cpp head/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp head/contrib/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp head/contrib/llvm/utils/TableGen/NeonEmitter.cpp head/contrib/llvm/utils/TableGen/NeonEmitter.h head/contrib/llvm/utils/TableGen/OptParserEmitter.cpp head/contrib/llvm/utils/TableGen/Record.h head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp head/contrib/llvm/utils/TableGen/SubtargetEmitter.h head/contrib/llvm/utils/TableGen/TGLexer.h head/contrib/llvm/utils/TableGen/TGParser.cpp head/contrib/llvm/utils/TableGen/TGValueTypes.cpp head/contrib/llvm/utils/TableGen/TableGen.cpp head/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp head/contrib/llvm/utils/TableGen/X86DisassemblerTables.h head/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.h head/etc/mtree/BSD.include.dist head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/include/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/llvm/Config/config.h head/lib/clang/libclanganalysis/Makefile head/lib/clang/libclangast/Makefile head/lib/clang/libclangbasic/Makefile head/lib/clang/libclangcodegen/Makefile head/lib/clang/libclangfrontend/Makefile head/lib/clang/libclangsema/Makefile head/lib/clang/libclangserialization/Makefile head/lib/clang/libclangstaticanalyzercheckers/Makefile head/lib/clang/libclangstaticanalyzercore/Makefile head/lib/clang/libllvmanalysis/Makefile head/lib/clang/libllvmasmprinter/Makefile head/lib/clang/libllvmcodegen/Makefile head/lib/clang/libllvmcore/Makefile head/lib/clang/libllvmipo/Makefile head/lib/clang/libllvmmc/Makefile head/lib/clang/libllvmmipscodegen/Makefile head/lib/clang/libllvmscalaropts/Makefile head/lib/clang/libllvmx86instprinter/Makefile head/usr.bin/clang/clang/Makefile Directory Properties: head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon May 2 21:04:23 2011 (r221344) +++ head/ObsoleteFiles.inc Mon May 2 21:04:37 2011 (r221345) @@ -38,6 +38,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20110502: new clang import which bumps version from 2.9 to 3.0 +OLD_FILES+=usr/include/clang/2.9/emmintrin.h +OLD_FILES+=usr/include/clang/2.9/mm_malloc.h +OLD_FILES+=usr/include/clang/2.9/mmintrin.h +OLD_FILES+=usr/include/clang/2.9/pmmintrin.h +OLD_FILES+=usr/include/clang/2.9/tmmintrin.h +OLD_FILES+=usr/include/clang/2.9/xmmintrin.h +OLD_DIRS+=usr/include/clang/2.9 # 20110417: removal of Objective-C support OLD_FILES+=usr/include/objc/encoding.h OLD_FILES+=usr/include/objc/hash.h Copied: head/contrib/llvm/include/llvm-c/Disassembler.h (from r221340, vendor/llvm/dist/include/llvm-c/Disassembler.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/include/llvm-c/Disassembler.h Mon May 2 21:04:37 2011 (r221345, copy of r221340, vendor/llvm/dist/include/llvm-c/Disassembler.h) @@ -0,0 +1,149 @@ +/*===-- llvm-c/Disassembler.h - Disassembler Public C Interface ---*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides public interface to a disassembler library. *| +|* LLVM provides an implementation of this interface. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_DISASSEMBLER_H +#define LLVM_C_DISASSEMBLER_H 1 + +#include +#include "llvm/Support/DataTypes.h" + +/** + * An opaque reference to a disassembler context. + */ +typedef void *LLVMDisasmContextRef; + +/** + * The type for the operand information call back function. This is called to + * get the symbolic information for an operand of an instruction. Typically + * this is from the relocation information, symbol table, etc. That block of + * information is saved when the disassembler context is created and passed to + * the call back in the DisInfo parameter. The instruction containing operand + * is at the PC parameter. For some instruction sets, there can be more than + * one operand with symbolic information. To determine the symbolic operand + * information for each operand, the bytes for the specific operand in the + * instruction are specified by the Offset parameter and its byte widith is the + * size parameter. For instructions sets with fixed widths and one symbolic + * operand per instruction, the Offset parameter will be zero and Size parameter + * will be the instruction width. The information is returned in TagBuf and is + * Triple specific with its specific information defined by the value of + * TagType for that Triple. If symbolic information is returned the function + * returns 1 else it returns 0. + */ +typedef int (*LLVMOpInfoCallback)(void *DisInfo, + uint64_t PC, + uint64_t Offset, + uint64_t Size, + int TagType, + void *TagBuf); + +/** + * The initial support in LLVM MC for the most general form of a relocatable + * expression is "AddSymbol - SubtractSymbol + Offset". For some Darwin targets + * this full form is encoded in the relocation information so that AddSymbol and + * SubtractSymbol can be link edited independent of each other. Many other + * platforms only allow a relocatable expression of the form AddSymbol + Offset + * to be encoded. + * + * The LLVMOpInfoCallback() for the TagType value of 1 uses the struct + * LLVMOpInfo1. The value of the relocatable expression for the operand, + * including any PC adjustment, is passed in to the call back in the Value + * field. The symbolic information about the operand is returned using all + * the fields of the structure with the Offset of the relocatable expression + * returned in the Value field. It is possible that some symbols in the + * relocatable expression were assembly temporary symbols, for example + * "Ldata - LpicBase + constant", and only the Values of the symbols without + * symbol names are present in the relocation information. The VariantKind + * type is one of the Target specific #defines below and is used to print + * operands like "_foo@GOT", ":lower16:_foo", etc. + */ +struct LLVMOpInfoSymbol1 { + uint64_t Present; /* 1 if this symbol is present */ + char *Name; /* symbol name if not NULL */ + uint64_t Value; /* symbol value if name is NULL */ +}; +struct LLVMOpInfo1 { + struct LLVMOpInfoSymbol1 AddSymbol; + struct LLVMOpInfoSymbol1 SubtractSymbol; + uint64_t Value; + uint64_t VariantKind; +}; + +/** + * The operand VariantKinds for symbolic disassembly. + */ +#define LLVMDisassembler_VariantKind_None 0 /* all targets */ + +/** + * The ARM target VariantKinds. + */ +#define LLVMDisassembler_VariantKind_ARM_HI16 1 /* :upper16: */ +#define LLVMDisassembler_VariantKind_ARM_LO16 2 /* :lower16: */ + +/** + * The type for the symbol lookup function. This may be called by the + * disassembler for such things like adding a comment for a PC plus a constant + * offset load instruction to use a symbol name instead of a load address value. + * It is passed the block information is saved when the disassembler context is + * created and a value of a symbol to look up. If no symbol is found NULL is + * to be returned. + */ +typedef const char *(*LLVMSymbolLookupCallback)(void *DisInfo, + uint64_t SymbolValue); + +#ifdef __cplusplus +extern "C" { +#endif /* !defined(__cplusplus) */ + +/** + * Create a disassembler for the TripleName. Symbolic disassembly is supported + * by passing a block of information in the DisInfo parameter and specifing the + * TagType and call back functions as described above. These can all be passed + * as NULL. If successful this returns a disassembler context if not it + * returns NULL. + */ +extern LLVMDisasmContextRef +LLVMCreateDisasm(const char *TripleName, + void *DisInfo, + int TagType, + LLVMOpInfoCallback GetOpInfo, + LLVMSymbolLookupCallback SymbolLookUp); + +/** + * Dispose of a disassembler context. + */ +extern void +LLVMDisasmDispose(LLVMDisasmContextRef DC); + +/** + * Disassmble a single instruction using the disassembler context specified in + * the parameter DC. The bytes of the instruction are specified in the parameter + * Bytes, and contains at least BytesSize number of bytes. The instruction is + * at the address specified by the PC parameter. If a valid instruction can be + * disassembled its string is returned indirectly in OutString which whos size + * is specified in the parameter OutStringSize. This function returns the + * number of bytes in the instruction or zero if there was no valid instruction. + */ +extern size_t +LLVMDisasmInstruction(LLVMDisasmContextRef DC, + uint8_t *Bytes, + uint64_t BytesSize, + uint64_t PC, + char *OutString, + size_t OutStringSize); + +#ifdef __cplusplus +} +#endif /* !defined(__cplusplus) */ + +#endif /* !defined(LLVM_C_DISASSEMBLER_H) */ Modified: head/contrib/llvm/include/llvm-c/EnhancedDisassembly.h ============================================================================== --- head/contrib/llvm/include/llvm-c/EnhancedDisassembly.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm-c/EnhancedDisassembly.h Mon May 2 21:04:37 2011 (r221345) @@ -44,7 +44,7 @@ typedef int (*EDByteReaderCallback)(uint @param arg An anonymous argument for client use. @result 0 if the register could be read; -1 otherwise. */ -typedef int (*EDRegisterReaderCallback)(uint64_t *value, unsigned regID, +typedef int (*EDRegisterReaderCallback)(uint64_t *value, unsigned regID, void* arg); /*! @@ -83,7 +83,7 @@ typedef void *EDTokenRef; Encapsulates an operand of an instruction. */ typedef void *EDOperandRef; - + /*! @functiongroup Getting a disassembler */ @@ -91,7 +91,7 @@ typedef void *EDOperandRef; /*! @function EDGetDisassembler Gets the disassembler for a given target. - @param disassembler A pointer whose target will be filled in with the + @param disassembler A pointer whose target will be filled in with the disassembler. @param triple Identifies the target. Example: "x86_64-apple-darwin10" @param syntax The assembly syntax to use when decoding instructions. @@ -104,12 +104,12 @@ int EDGetDisassembler(EDDisassemblerRef /*! @functiongroup Generic architectural queries */ - + /*! @function EDGetRegisterName Gets the human-readable name for a given register. @param regName A pointer whose target will be pointed at the name of the - register. The name does not need to be deallocated and will be + register. The name does not need to be deallocated and will be @param disassembler The disassembler to query for the name. @param regID The register identifier, as returned by EDRegisterTokenValue. @result 0 on success; -1 otherwise. @@ -117,7 +117,7 @@ int EDGetDisassembler(EDDisassemblerRef int EDGetRegisterName(const char** regName, EDDisassemblerRef disassembler, unsigned regID); - + /*! @function EDRegisterIsStackPointer Determines if a register is one of the platform's stack-pointer registers. @@ -137,16 +137,16 @@ int EDRegisterIsStackPointer(EDDisassemb */ int EDRegisterIsProgramCounter(EDDisassemblerRef disassembler, unsigned regID); - + /*! @functiongroup Creating and querying instructions */ - + /*! @function EDCreateInst Gets a set of contiguous instructions from a disassembler. @param insts A pointer to an array that will be filled in with the - instructions. Must have at least count entries. Entries not filled in will + instructions. Must have at least count entries. Entries not filled in will be set to NULL. @param count The maximum number of instructions to fill in. @param disassembler The disassembler to use when decoding the instructions. @@ -197,7 +197,7 @@ int EDGetInstString(const char **buf, @result 0 on success; -1 otherwise. */ int EDInstID(unsigned *instID, EDInstRef inst); - + /*! @function EDInstIsBranch @param inst The instruction to be queried. @@ -217,7 +217,7 @@ int EDInstIsMove(EDInstRef inst); /*! @function EDBranchTargetID @param inst The instruction to be queried. - @result The ID of the branch target operand, suitable for use with + @result The ID of the branch target operand, suitable for use with EDCopyOperand. -1 if no such operand exists. */ int EDBranchTargetID(EDInstRef inst); @@ -225,7 +225,7 @@ int EDBranchTargetID(EDInstRef inst); /*! @function EDMoveSourceID @param inst The instruction to be queried. - @result The ID of the move source operand, suitable for use with + @result The ID of the move source operand, suitable for use with EDCopyOperand. -1 if no such operand exists. */ int EDMoveSourceID(EDInstRef inst); @@ -233,7 +233,7 @@ int EDMoveSourceID(EDInstRef inst); /*! @function EDMoveTargetID @param inst The instruction to be queried. - @result The ID of the move source operand, suitable for use with + @result The ID of the move source operand, suitable for use with EDCopyOperand. -1 if no such operand exists. */ int EDMoveTargetID(EDInstRef inst); @@ -241,7 +241,7 @@ int EDMoveTargetID(EDInstRef inst); /*! @functiongroup Creating and querying tokens */ - + /*! @function EDNumTokens @param inst The instruction to be queried. @@ -261,7 +261,7 @@ int EDNumTokens(EDInstRef inst); int EDGetToken(EDTokenRef *token, EDInstRef inst, int index); - + /*! @function EDGetTokenString Gets the disassembled text for a token. @@ -287,7 +287,7 @@ int EDOperandIndexForToken(EDTokenRef to @result 1 if the token is whitespace; 0 if not; -1 on error. */ int EDTokenIsWhitespace(EDTokenRef token); - + /*! @function EDTokenIsPunctuation @param token The token to be queried. @@ -335,18 +335,18 @@ int EDLiteralTokenAbsoluteValue(uint64_t /*! @function EDRegisterTokenValue - @param registerID A pointer whose target will be filled in with the LLVM + @param registerID A pointer whose target will be filled in with the LLVM register identifier for the token. @param token The token to be queried. @result 0 on success; -1 otherwise. */ int EDRegisterTokenValue(unsigned *registerID, EDTokenRef token); - + /*! @functiongroup Creating and querying operands */ - + /*! @function EDNumOperands @param inst The instruction to be queried. @@ -366,7 +366,7 @@ int EDNumOperands(EDInstRef inst); int EDGetOperand(EDOperandRef *operand, EDInstRef inst, int index); - + /*! @function EDOperandIsRegister @param operand The operand to be queried. @@ -391,13 +391,13 @@ int EDOperandIsMemory(EDOperandRef opera /*! @function EDRegisterOperandValue @param value A pointer whose target will be filled in with the LLVM register ID - of the register named by the operand. + of the register named by the operand. @param operand The operand to be queried. @result 0 on success; -1 otherwise. */ int EDRegisterOperandValue(unsigned *value, EDOperandRef operand); - + /*! @function EDImmediateOperandValue @param value A pointer whose target will be filled in with the value of the @@ -427,7 +427,7 @@ int EDEvaluateOperand(uint64_t *result, EDOperandRef operand, EDRegisterReaderCallback regReader, void *arg); - + #ifdef __BLOCKS__ /*! @@ -458,13 +458,13 @@ typedef int (^EDRegisterBlock_t)(uint64_ typedef int (^EDTokenVisitor_t)(EDTokenRef token); /*! @functiongroup Block-based interfaces */ - + /*! @function EDBlockCreateInsts Gets a set of contiguous instructions from a disassembler, using a block to read memory. @param insts A pointer to an array that will be filled in with the - instructions. Must have at least count entries. Entries not filled in will + instructions. Must have at least count entries. Entries not filled in will be set to NULL. @param count The maximum number of instructions to fill in. @param disassembler The disassembler to use when decoding the instructions. @@ -505,7 +505,7 @@ int EDBlockVisitTokens(EDInstRef inst, EDTokenVisitor_t visitor); #endif - + #ifdef __cplusplus } #endif Copied: head/contrib/llvm/include/llvm-c/Object.h (from r221340, vendor/llvm/dist/include/llvm-c/Object.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/include/llvm-c/Object.h Mon May 2 21:04:37 2011 (r221345, copy of r221340, vendor/llvm/dist/include/llvm-c/Object.h) @@ -0,0 +1,77 @@ +/*===-- llvm-c/Object.h - Object Lib C Iface --------------------*- C++ -*-===*/ +/* */ +/* The LLVM Compiler Infrastructure */ +/* */ +/* This file is distributed under the University of Illinois Open Source */ +/* License. See LICENSE.TXT for details. */ +/* */ +/*===----------------------------------------------------------------------===*/ +/* */ +/* This header declares the C interface to libLLVMObject.a, which */ +/* implements object file reading and writing. */ +/* */ +/* Many exotic languages can interoperate with C code but have a harder time */ +/* with C++ due to name mangling. So in addition to C, this interface enables */ +/* tools written in such languages. */ +/* */ +/*===----------------------------------------------------------------------===*/ + +#ifndef LLVM_C_OBJECT_H +#define LLVM_C_OBJECT_H + +#include "llvm-c/Core.h" +#include "llvm/Config/llvm-config.h" + +#ifdef __cplusplus +#include "llvm/Object/ObjectFile.h" + +extern "C" { +#endif + + +typedef struct LLVMOpaqueObjectFile *LLVMObjectFileRef; + +typedef struct LLVMOpaqueSectionIterator *LLVMSectionIteratorRef; + +LLVMObjectFileRef LLVMCreateObjectFile(LLVMMemoryBufferRef MemBuf); +void LLVMDisposeObjectFile(LLVMObjectFileRef ObjectFile); + +LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile); +void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI); +LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile, + LLVMSectionIteratorRef SI); +void LLVMMoveToNextSection(LLVMSectionIteratorRef SI); +const char *LLVMGetSectionName(LLVMSectionIteratorRef SI); +uint64_t LLVMGetSectionSize(LLVMSectionIteratorRef SI); +const char *LLVMGetSectionContents(LLVMSectionIteratorRef SI); + + +#ifdef __cplusplus +} + +namespace llvm { + namespace object { + inline ObjectFile *unwrap(LLVMObjectFileRef OF) { + return reinterpret_cast(OF); + } + + inline LLVMObjectFileRef wrap(const ObjectFile *OF) { + return reinterpret_cast(const_cast(OF)); + } + + inline ObjectFile::section_iterator *unwrap(LLVMSectionIteratorRef SI) { + return reinterpret_cast(SI); + } + + inline LLVMSectionIteratorRef + wrap(const ObjectFile::section_iterator *SI) { + return reinterpret_cast + (const_cast(SI)); + } + } +} + +#endif /* defined(__cplusplus) */ + +#endif + Modified: head/contrib/llvm/include/llvm-c/Transforms/Scalar.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Transforms/Scalar.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm-c/Transforms/Scalar.h Mon May 2 21:04:37 2011 (r221345) @@ -52,6 +52,9 @@ void LLVMAddLICMPass(LLVMPassManagerRef /** See llvm::createLoopDeletionPass function. */ void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM); +/** See llvm::createLoopIdiomPass function */ +void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM); + /** See llvm::createLoopRotatePass function. */ void LLVMAddLoopRotatePass(LLVMPassManagerRef PM); @@ -77,6 +80,9 @@ void LLVMAddSCCPPass(LLVMPassManagerRef void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM); /** See llvm::createScalarReplAggregatesPass function. */ +void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM); + +/** See llvm::createScalarReplAggregatesPass function. */ void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM, int Threshold); @@ -95,6 +101,19 @@ void LLVMAddDemoteMemoryToRegisterPass(L /** See llvm::createVerifierPass function. */ void LLVMAddVerifierPass(LLVMPassManagerRef PM); +/** See llvm::createCorrelatedValuePropagationPass function */ +void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM); + +/** See llvm::createEarlyCSEPass function */ +void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM); + +/** See llvm::createTypeBasedAliasAnalysisPass function */ +void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM); + +/** See llvm::createBasicAliasAnalysisPass function */ +void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM); + + #ifdef __cplusplus } #endif /* defined(__cplusplus) */ Modified: head/contrib/llvm/include/llvm-c/lto.h ============================================================================== --- head/contrib/llvm/include/llvm-c/lto.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm-c/lto.h Mon May 2 21:04:37 2011 (r221345) @@ -72,7 +72,7 @@ lto_get_version(void); /** - * Returns the last error string or NULL if last operation was sucessful. + * Returns the last error string or NULL if last operation was successful. */ extern const char* lto_get_error_message(void); @@ -127,7 +127,15 @@ lto_module_create_from_memory(const void * Returns NULL on error (check lto_get_error_message() for details). */ extern lto_module_t -lto_module_create_from_fd(int fd, const char *path, off_t size); +lto_module_create_from_fd(int fd, const char *path, size_t file_size); + +/** + * Loads an object file from disk. The seek point of fd is not preserved. + * Returns NULL on error (check lto_get_error_message() for details). + */ +extern lto_module_t +lto_module_create_from_fd_at_offset(int fd, const char *path, size_t file_size, + size_t map_size, off_t offset); /** @@ -255,7 +263,7 @@ lto_codegen_write_merged_modules(lto_cod /** * Generates code for all added modules into one native object file. - * On sucess returns a pointer to a generated mach-o/ELF buffer and + * On success returns a pointer to a generated mach-o/ELF buffer and * length set to the buffer size. The buffer is owned by the * lto_code_gen_t and will be freed when lto_codegen_dispose() * is called, or lto_codegen_compile() is called again. @@ -264,6 +272,13 @@ lto_codegen_write_merged_modules(lto_cod extern const void* lto_codegen_compile(lto_code_gen_t cg, size_t* length); +/** + * Generates code for all added modules into one native object file. + * The name of the file is written to name. Returns true on error. + */ +extern bool +lto_codegen_compile_to_file(lto_code_gen_t cg, const char** name); + /** * Sets options to help debug codegen bugs. Modified: head/contrib/llvm/include/llvm/ADT/APFloat.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/APFloat.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/APFloat.h Mon May 2 21:04:37 2011 (r221345) @@ -353,6 +353,10 @@ namespace llvm { unsigned FormatPrecision = 0, unsigned FormatMaxPadding = 3) const; + /// getExactInverse - If this value has an exact multiplicative inverse, + /// store it in inv and return true. + bool getExactInverse(APFloat *inv) const; + private: /* Trivial queries. */ Modified: head/contrib/llvm/include/llvm/ADT/APInt.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/APInt.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/APInt.h Mon May 2 21:04:37 2011 (r221345) @@ -818,6 +818,7 @@ public: APInt usub_ov(const APInt &RHS, bool &Overflow) const; APInt sdiv_ov(const APInt &RHS, bool &Overflow) const; APInt smul_ov(const APInt &RHS, bool &Overflow) const; + APInt umul_ov(const APInt &RHS, bool &Overflow) const; APInt sshl_ov(unsigned Amt, bool &Overflow) const; /// @returns the bit value at bitPosition @@ -1372,7 +1373,7 @@ public: /// Calculate the magic number for unsigned division by a constant. struct mu; - mu magicu() const; + mu magicu(unsigned LeadingZeros = 0) const; /// @} /// @name Building-block Operations for APInt and APFloat Modified: head/contrib/llvm/include/llvm/ADT/ArrayRef.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ArrayRef.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/ArrayRef.h Mon May 2 21:04:37 2011 (r221345) @@ -22,8 +22,8 @@ namespace llvm { /// /// This class does not own the underlying data, it is expected to be used in /// situations where the data resides in some other buffer, whose lifetime - /// extends past that of the StringRef. For this reason, it is not in general - /// safe to store a ArrayRef. + /// extends past that of the ArrayRef. For this reason, it is not in general + /// safe to store an ArrayRef. /// /// This is intended to be trivially copyable, so it should be passed by /// value. @@ -79,6 +79,8 @@ namespace llvm { /// empty - Check if the array is empty. bool empty() const { return Length == 0; } + const T *data() const { return Data; } + /// size - Get the array size. size_t size() const { return Length; } @@ -94,10 +96,22 @@ namespace llvm { return Data[Length-1]; } + /// slice(n) - Chop off the first N elements of the array. + ArrayRef slice(unsigned N) { + assert(N <= size() && "Invalid specifier"); + return ArrayRef(data()+N, size()-N); + } + + /// slice(n, m) - Chop off the first N elements of the array, and keep M + /// elements in the array. + ArrayRef slice(unsigned N, unsigned M) { + assert(N+M <= size() && "Invalid specifier"); + return ArrayRef(data()+N, M); + } + /// @} /// @name Operator Overloads /// @{ - const T &operator[](size_t Index) const { assert(Index < Length && "Invalid index!"); return Data[Index]; @@ -106,7 +120,6 @@ namespace llvm { /// @} /// @name Expensive Operations /// @{ - std::vector vec() const { return std::vector(Data, Data+Length); } Modified: head/contrib/llvm/include/llvm/ADT/DenseMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DenseMap.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/DenseMap.h Mon May 2 21:04:37 2011 (r221345) @@ -53,13 +53,13 @@ public: CopyFrom(other); } - explicit DenseMap(unsigned NumInitBuckets = 64) { + explicit DenseMap(unsigned NumInitBuckets = 0) { init(NumInitBuckets); } template DenseMap(const InputIt &I, const InputIt &E) { - init(64); + init(NextPowerOf2(std::distance(I, E))); insert(I, E); } @@ -72,7 +72,8 @@ public: P->first.~KeyT(); } #ifndef NDEBUG - memset(Buckets, 0x5a, sizeof(BucketT)*NumBuckets); + if (NumBuckets) + memset((void*)Buckets, 0x5a, sizeof(BucketT)*NumBuckets); #endif operator delete(Buckets); } @@ -98,7 +99,10 @@ public: unsigned size() const { return NumEntries; } /// Grow the densemap so that it has at least Size buckets. Does not shrink - void resize(size_t Size) { grow(Size); } + void resize(size_t Size) { + if (Size > NumBuckets) + grow(Size); + } void clear() { if (NumEntries == 0 && NumTombstones == 0) return; @@ -248,23 +252,29 @@ private: if (NumBuckets) { #ifndef NDEBUG - memset(Buckets, 0x5a, sizeof(BucketT)*NumBuckets); + memset((void*)Buckets, 0x5a, sizeof(BucketT)*NumBuckets); #endif operator delete(Buckets); } - Buckets = static_cast(operator new(sizeof(BucketT) * - other.NumBuckets)); + + NumBuckets = other.NumBuckets; + + if (NumBuckets == 0) { + Buckets = 0; + return; + } + + Buckets = static_cast(operator new(sizeof(BucketT) * NumBuckets)); if (isPodLike::value && isPodLike::value) - memcpy(Buckets, other.Buckets, other.NumBuckets * sizeof(BucketT)); + memcpy(Buckets, other.Buckets, NumBuckets * sizeof(BucketT)); else - for (size_t i = 0; i < other.NumBuckets; ++i) { + for (size_t i = 0; i < NumBuckets; ++i) { new (&Buckets[i].first) KeyT(other.Buckets[i].first); if (!KeyInfoT::isEqual(Buckets[i].first, getEmptyKey()) && !KeyInfoT::isEqual(Buckets[i].first, getTombstoneKey())) new (&Buckets[i].second) ValueT(other.Buckets[i].second); } - NumBuckets = other.NumBuckets; } BucketT *InsertIntoBucket(const KeyT &Key, const ValueT &Value, @@ -279,11 +289,14 @@ private: // table completely filled with tombstones, no lookup would ever succeed, // causing infinite loops in lookup. ++NumEntries; - if (NumEntries*4 >= NumBuckets*3 || - NumBuckets-(NumEntries+NumTombstones) < NumBuckets/8) { + if (NumEntries*4 >= NumBuckets*3) { this->grow(NumBuckets * 2); LookupBucketFor(Key, TheBucket); } + if (NumBuckets-(NumEntries+NumTombstones) < NumBuckets/8) { + this->grow(NumBuckets); + LookupBucketFor(Key, TheBucket); + } // If we are writing over a tombstone, remember this. if (!KeyInfoT::isEqual(TheBucket->first, getEmptyKey())) @@ -313,6 +326,11 @@ private: unsigned ProbeAmt = 1; BucketT *BucketsPtr = Buckets; + if (NumBuckets == 0) { + FoundBucket = 0; + return false; + } + // FoundTombstone - Keep track of whether we find a tombstone while probing. BucketT *FoundTombstone = 0; const KeyT EmptyKey = getEmptyKey(); @@ -354,6 +372,12 @@ private: NumEntries = 0; NumTombstones = 0; NumBuckets = InitBuckets; + + if (InitBuckets == 0) { + Buckets = 0; + return; + } + assert(InitBuckets && (InitBuckets & (InitBuckets-1)) == 0 && "# initial buckets must be a power of two!"); Buckets = static_cast(operator new(sizeof(BucketT)*InitBuckets)); @@ -367,6 +391,9 @@ private: unsigned OldNumBuckets = NumBuckets; BucketT *OldBuckets = Buckets; + if (NumBuckets < 64) + NumBuckets = 64; + // Double the number of buckets. while (NumBuckets < AtLeast) NumBuckets <<= 1; @@ -398,7 +425,8 @@ private: } #ifndef NDEBUG - memset(OldBuckets, 0x5a, sizeof(BucketT)*OldNumBuckets); + if (OldNumBuckets) + memset((void*)OldBuckets, 0x5a, sizeof(BucketT)*OldNumBuckets); #endif // Free the old table. operator delete(OldBuckets); @@ -431,13 +459,22 @@ private: } #ifndef NDEBUG - memset(OldBuckets, 0x5a, sizeof(BucketT)*OldNumBuckets); + memset((void*)OldBuckets, 0x5a, sizeof(BucketT)*OldNumBuckets); #endif // Free the old table. operator delete(OldBuckets); NumEntries = 0; } + +public: + /// Return the approximate size (in bytes) of the actual map. + /// This is just the raw memory used by DenseMap. + /// If entries are pointers to objects, the size of the referenced objects + /// are not included. + size_t getMemorySize() const { + return NumBuckets * sizeof(BucketT); + } }; template > { key ^= (key >> 31); return (unsigned)key; } - static bool isEqual(const Pair& LHS, const Pair& RHS) { return LHS == RHS; } + static bool isEqual(const Pair &LHS, const Pair &RHS) { + return FirstInfo::isEqual(LHS.first, RHS.first) && + SecondInfo::isEqual(LHS.second, RHS.second); + } }; } // end namespace llvm Modified: head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/DepthFirstIterator.h Mon May 2 21:04:37 2011 (r221345) @@ -143,8 +143,7 @@ public: static inline _Self end(const GraphT& G, SetType &S) { return _Self(S); } inline bool operator==(const _Self& x) const { - return VisitStack.size() == x.VisitStack.size() && - VisitStack == x.VisitStack; + return VisitStack == x.VisitStack; } inline bool operator!=(const _Self& x) const { return !operator==(x); } Modified: head/contrib/llvm/include/llvm/ADT/FoldingSet.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/FoldingSet.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/FoldingSet.h Mon May 2 21:04:37 2011 (r221345) @@ -209,10 +209,10 @@ template struct FoldingSetTr /// for FoldingSetTrait implementations. /// template struct DefaultFoldingSetTrait { - static void Profile(const T& X, FoldingSetNodeID& ID) { + static void Profile(const T &X, FoldingSetNodeID &ID) { X.Profile(ID); } - static void Profile(T& X, FoldingSetNodeID& ID) { + static void Profile(T &X, FoldingSetNodeID &ID) { X.Profile(ID); } @@ -267,7 +267,7 @@ template struc /// is often much larger than necessary, and the possibility of heap /// allocation means it requires a non-trivial destructor call. class FoldingSetNodeIDRef { - const unsigned* Data; + const unsigned *Data; size_t Size; public: FoldingSetNodeIDRef() : Data(0), Size(0) {} @@ -310,9 +310,10 @@ public: void AddInteger(unsigned long long I); void AddBoolean(bool B) { AddInteger(B ? 1U : 0U); } void AddString(StringRef String); + void AddNodeID(const FoldingSetNodeID &ID); template - inline void Add(const T& x) { FoldingSetTrait::Profile(x, *this); } + inline void Add(const T &x) { FoldingSetTrait::Profile(x, *this); } /// clear - Clear the accumulated profile, allowing this FoldingSetNodeID /// object to be used to compute a new profile. @@ -548,7 +549,7 @@ public: return static_cast(NodePtr); } - inline FoldingSetIterator& operator++() { // Preincrement + inline FoldingSetIterator &operator++() { // Preincrement advance(); return *this; } @@ -596,10 +597,10 @@ public: FoldingSetBucketIterator(void **Bucket, bool) : FoldingSetBucketIteratorImpl(Bucket, true) {} - T& operator*() const { return *static_cast(Ptr); } - T* operator->() const { return static_cast(Ptr); } + T &operator*() const { return *static_cast(Ptr); } + T *operator->() const { return static_cast(Ptr); } - inline FoldingSetBucketIterator& operator++() { // Preincrement + inline FoldingSetBucketIterator &operator++() { // Preincrement advance(); return *this; } @@ -615,36 +616,36 @@ template class FoldingSetNodeWrapper : public FoldingSetNode { T data; public: - explicit FoldingSetNodeWrapper(const T& x) : data(x) {} + explicit FoldingSetNodeWrapper(const T &x) : data(x) {} virtual ~FoldingSetNodeWrapper() {} template - explicit FoldingSetNodeWrapper(const A1& a1) + explicit FoldingSetNodeWrapper(const A1 &a1) : data(a1) {} template - explicit FoldingSetNodeWrapper(const A1& a1, const A2& a2) + explicit FoldingSetNodeWrapper(const A1 &a1, const A2 &a2) : data(a1,a2) {} template - explicit FoldingSetNodeWrapper(const A1& a1, const A2& a2, const A3& a3) + explicit FoldingSetNodeWrapper(const A1 &a1, const A2 &a2, const A3 &a3) : data(a1,a2,a3) {} template - explicit FoldingSetNodeWrapper(const A1& a1, const A2& a2, const A3& a3, - const A4& a4) + explicit FoldingSetNodeWrapper(const A1 &a1, const A2 &a2, const A3 &a3, + const A4 &a4) : data(a1,a2,a3,a4) {} template - explicit FoldingSetNodeWrapper(const A1& a1, const A2& a2, const A3& a3, - const A4& a4, const A5& a5) + explicit FoldingSetNodeWrapper(const A1 &a1, const A2 &a2, const A3 &a3, + const A4 &a4, const A5 &a5) : data(a1,a2,a3,a4,a5) {} - void Profile(FoldingSetNodeID& ID) { FoldingSetTrait::Profile(data, ID); } + void Profile(FoldingSetNodeID &ID) { FoldingSetTrait::Profile(data, ID); } - T& getValue() { return data; } - const T& getValue() const { return data; } + T &getValue() { return data; } + const T &getValue() const { return data; } operator T&() { return data; } operator const T&() const { return data; } @@ -661,20 +662,22 @@ class FastFoldingSetNode : public Foldin protected: explicit FastFoldingSetNode(const FoldingSetNodeID &ID) : FastID(ID) {} public: - void Profile(FoldingSetNodeID& ID) const { ID = FastID; } + void Profile(FoldingSetNodeID &ID) const { + ID.AddNodeID(FastID); + } }; //===----------------------------------------------------------------------===// // Partial specializations of FoldingSetTrait. template struct FoldingSetTrait { - static inline void Profile(const T* X, FoldingSetNodeID& ID) { + static inline void Profile(const T *X, FoldingSetNodeID &ID) { ID.AddPointer(X); } }; template struct FoldingSetTrait { - static inline void Profile(const T* X, FoldingSetNodeID& ID) { + static inline void Profile(const T *X, FoldingSetNodeID &ID) { ID.AddPointer(X); } }; Modified: head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h Mon May 2 21:04:37 2011 (r221345) @@ -10,6 +10,10 @@ // This file defines the ImmutableIntervalMap class. // //===----------------------------------------------------------------------===// + +#ifndef LLVM_ADT_IMMUTABLE_INTERVAL_MAP_H +#define LLVM_ADT_IMMUTABLE_INTERVAL_MAP_H + #include "llvm/ADT/ImmutableMap.h" namespace llvm { @@ -240,3 +244,5 @@ private: }; } // end namespace llvm + +#endif Modified: head/contrib/llvm/include/llvm/ADT/IntervalMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/IntervalMap.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/IntervalMap.h Mon May 2 21:04:37 2011 (r221345) @@ -1328,6 +1328,10 @@ public: /// const_iterator - Create an iterator that isn't pointing anywhere. const_iterator() : map(0) {} + /// setMap - Change the map iterated over. This call must be followed by a + /// call to goToBegin(), goToEnd(), or find() + void setMap(const IntervalMap &m) { map = const_cast(&m); } + /// valid - Return true if the current position is valid, false for end(). bool valid() const { return path.valid(); } Modified: head/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h Mon May 2 21:04:23 2011 (r221344) +++ head/contrib/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h Mon May 2 21:04:37 2011 (r221345) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 2 21:05:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2A801065670; Mon, 2 May 2011 21:05:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8839C8FC12; Mon, 2 May 2011 21:05:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42L5qhN054502; Mon, 2 May 2011 21:05:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42L5q3j054498; Mon, 2 May 2011 21:05:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105022105.p42L5q3j054498@svn.freebsd.org> From: John Baldwin Date: Mon, 2 May 2011 21:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221346 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 21:05:52 -0000 Author: jhb Date: Mon May 2 21:05:52 2011 New Revision: 221346 URL: http://svn.freebsd.org/changeset/base/221346 Log: Handle a rare edge case with nearly full TCP receive buffers. If a TCP buffer fills up causing the remote sender to enter into persist mode, but there is still room available in the receive buffer when a window probe arrives (either due to window scaling, or due to the local application very slowing draining data from the receive buffer), then the single byte of data in the window probe is accepted. However, this can cause rcv_nxt to be greater than rcv_adv. This condition will only last until the next ACK packet is pushed out via tcp_output(), and since the previous ACK advertised a zero window, the ACK should be pushed out while the TCP pcb is write-locked. During the window while rcv_nxt is greather than rcv_adv, a few places would compute the remaining receive window via rcv_adv - rcv_nxt. However, this value was then (uint32_t)-1. On a 64 bit machine this could expand to a positive 2^32 - 1 when cast to a long. In particular, when calculating the receive window in tcp_output(), the result would be that the receive window was computed as 2^32 - 1 resulting in advertising a far larger window to the remote peer than actually existed. Fix various places that compute the remaining receive window to either assert that it is not negative (i.e. rcv_nxt <= rcv_adv), or treat the window as full if rcv_nxt is greather than rcv_adv. Reviewed by: bz MFC after: 1 month Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_timewait.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon May 2 21:04:37 2011 (r221345) +++ head/sys/netinet/tcp_input.c Mon May 2 21:05:52 2011 (r221346) @@ -1831,6 +1831,9 @@ tcp_do_segment(struct mbuf *m, struct tc win = sbspace(&so->so_rcv); if (win < 0) win = 0; + KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt), + ("tcp_input negative window: tp %p rcv_nxt %u rcv_adv %u", tp, + tp->rcv_adv, tp->rcv_nxt)); tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); /* Reset receive buffer auto scaling when not in bulk receive mode. */ @@ -2868,7 +2871,10 @@ dodata: /* XXX */ * buffer size. * XXX: Unused. */ - len = so->so_rcv.sb_hiwat - (tp->rcv_adv - tp->rcv_nxt); + if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) + len = so->so_rcv.sb_hiwat - (tp->rcv_adv - tp->rcv_nxt); + else + len = so->so_rcv.sb_hiwat; #endif } else { m_freem(m); Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon May 2 21:04:37 2011 (r221345) +++ head/sys/netinet/tcp_output.c Mon May 2 21:05:52 2011 (r221346) @@ -561,15 +561,21 @@ after_sack_rexmit: * taking into account that we are limited by * TCP_MAXWIN << tp->rcv_scale. */ - long adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale) - - (tp->rcv_adv - tp->rcv_nxt); + long adv; + int oldwin; + + adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale); + if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt)) { + oldwin = (tp->rcv_adv - tp->rcv_nxt); + adv -= oldwin; + } else + oldwin = 0; /* * If the new window size ends up being the same as the old * size when it is scaled, then don't force a window update. */ - if ((tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale == - (adv + tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale) + if (oldwin >> tp->rcv_scale == (adv + oldwin) >> tp->rcv_scale) goto dontupdate; if (adv >= (long) (2 * tp->t_maxseg)) goto send; @@ -1008,7 +1014,8 @@ send: if (recwin < (long)(so->so_rcv.sb_hiwat / 4) && recwin < (long)tp->t_maxseg) recwin = 0; - if (recwin < (long)(tp->rcv_adv - tp->rcv_nxt)) + if (SEQ_GT(tp->rcv_adv, tp->rcv_nxt) && + recwin < (long)(tp->rcv_adv - tp->rcv_nxt)) recwin = (long)(tp->rcv_adv - tp->rcv_nxt); if (recwin > (long)TCP_MAXWIN << tp->rcv_scale) recwin = (long)TCP_MAXWIN << tp->rcv_scale; Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Mon May 2 21:04:37 2011 (r221345) +++ head/sys/netinet/tcp_timewait.c Mon May 2 21:05:52 2011 (r221346) @@ -242,6 +242,9 @@ tcp_twstart(struct tcpcb *tp) /* * Recover last window size sent. */ + KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt), + ("tcp_twstart negative window: tp %p rcv_nxt %u rcv_adv %u", tp, + tp->rcv_adv, tp->rcv_nxt)); tw->last_win = (tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale; /* From owner-svn-src-all@FreeBSD.ORG Mon May 2 21:10:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E0301065670; Mon, 2 May 2011 21:10:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 847038FC24; Mon, 2 May 2011 21:10:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42LADNA054797; Mon, 2 May 2011 21:10:13 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42LADdf054794; Mon, 2 May 2011 21:10:13 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105022110.p42LADdf054794@svn.freebsd.org> From: Dimitry Andric Date: Mon, 2 May 2011 21:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221347 - in head/usr.bin/clang: clang tblgen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 21:10:13 -0000 Author: dim Date: Mon May 2 21:10:13 2011 New Revision: 221347 URL: http://svn.freebsd.org/changeset/base/221347 Log: Minor updates to the clang and tblgen manpages. Modified: head/usr.bin/clang/clang/clang.1 head/usr.bin/clang/tblgen/tblgen.1 Modified: head/usr.bin/clang/clang/clang.1 ============================================================================== --- head/usr.bin/clang/clang/clang.1 Mon May 2 21:05:52 2011 (r221346) +++ head/usr.bin/clang/clang/clang.1 Mon May 2 21:10:13 2011 (r221347) @@ -125,7 +125,7 @@ .\" ======================================================================== .\" .IX Title "CLANG 1" -.TH CLANG 1 "2010-10-25" "clang 2.9" "Clang Tools Documentation" +.TH CLANG 1 "2011-04-30" "clang 3.0" "Clang Tools Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -135,7 +135,7 @@ clang \- the Clang C, C++, and Objective .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBclang\fR [\fB\-c\fR|\fB\-S\fR|\fB\-E\fR] \fB\-std=\fR\fIstandard\fR \fB\-g\fR - [\fB\-O0\fR|\fB\-O1\fR|\fB\-O2\fR|\fB\-Os\fR|\fB\-O3\fR|\fB\-O4\fR] + [\fB\-O0\fR|\fB\-O1\fR|\fB\-O2\fR|\fB\-Os\fR|\fB\-Oz\fR|\fB\-O3\fR|\fB\-O4\fR] \fB\-W\fR\fIwarnings...\fR \fB\-pedantic\fR \fB\-I\fR\fIdir...\fR \fB\-L\fR\fIdir...\fR \fB\-D\fR\fImacro[=defn]\fR @@ -174,7 +174,7 @@ parse errors. The output of this stage .IX Item "Code Generation and Optimization" This stage translates an \s-1AST\s0 into low-level intermediate code (known as \*(L"\s-1LLVM\s0 \&\s-1IR\s0\*(R") and ultimately to machine code. This phase is responsible for optimizing -the generated code and handling target-specfic code generation. The output of +the generated code and handling target-specific code generation. The output of this stage is typically called a \*(L".s\*(R" file or \*(L"assembly\*(R" file. .Sp Clang also supports the use of an integrated assembler, in which the code @@ -325,12 +325,13 @@ generate instructions that are valid on may not exist on earlier ones. .SS "Code Generation Options" .IX Subsection "Code Generation Options" -.IP "\fB\-O0\fR \fB\-O1\fR \fB\-O2\fR \fB\-Os\fR \fB\-O3\fR \fB\-O4\fR" 4 -.IX Item "-O0 -O1 -O2 -Os -O3 -O4" +.IP "\fB\-O0\fR \fB\-O1\fR \fB\-O2\fR \fB\-Os\fR \fB\-Oz\fR \fB\-O3\fR \fB\-O4\fR" 4 +.IX Item "-O0 -O1 -O2 -Os -Oz -O3 -O4" Specify which optimization level to use. \fB\-O0\fR means \*(L"no optimization\*(R": this level compiles the fastest and generates the most debuggable code. \fB\-O2\fR is a moderate level of optimization which enables most optimizations. \fB\-Os\fR is like -\&\fB\-O2\fR with extra optimizations to reduce code size. \fB\-O3\fR is like \fB\-O2\fR, +\&\fB\-O2\fR with extra optimizations to reduce code size. \fB\-Oz\fR is like \fB\-Os\fR +(and thus \fB\-O2\fR), but reduces code size further. \fB\-O3\fR is like \fB\-O2\fR, except that it enables optimizations that take longer to perform or that may generate larger code (in an attempt to make the program run faster). On supported platforms, \fB\-O4\fR enables link-time optimization; object files are @@ -389,15 +390,9 @@ Pass \fIarg\fR to the static analyzer. .IP "\fB\-Xassembler\fR \fIarg\fR" 4 .IX Item "-Xassembler arg" Pass \fIarg\fR to the assembler. -.IP "\fB\-Xclang\fR \fIarg\fR" 4 -.IX Item "-Xclang arg" -Pass \fIarg\fR to the clang compiler frontend. .IP "\fB\-Xlinker\fR \fIarg\fR" 4 .IX Item "-Xlinker arg" Pass \fIarg\fR to the linker. -.IP "\fB\-mllvm\fR \fIarg\fR" 4 -.IX Item "-mllvm arg" -Pass \fIarg\fR to the \s-1LLVM\s0 backend. .IP "\fB\-Xpreprocessor\fR \fIarg\fR" 4 .IX Item "-Xpreprocessor arg" Pass \fIarg\fR to the preprocessor. Modified: head/usr.bin/clang/tblgen/tblgen.1 ============================================================================== --- head/usr.bin/clang/tblgen/tblgen.1 Mon May 2 21:05:52 2011 (r221346) +++ head/usr.bin/clang/tblgen/tblgen.1 Mon May 2 21:10:13 2011 (r221347) @@ -125,7 +125,7 @@ .\" ======================================================================== .\" .IX Title "TBLGEN 1" -.TH TBLGEN 1 "2010-06-19" "LLVM 2.9" "LLVM Command Guide" +.TH TBLGEN 1 "2011-04-23" "LLVM 3.0" "LLVM Command Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -212,4 +212,4 @@ If \fBtblgen\fR succeeds, it will exit w occurs, it will exit with a non-zero value. .SH "AUTHORS" .IX Header "AUTHORS" -Maintained by The \s-1LLVM\s0 Team (). +Maintained by The \s-1LLVM\s0 Team (). From owner-svn-src-all@FreeBSD.ORG Mon May 2 21:13:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1D44106564A; Mon, 2 May 2011 21:13:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A31238FC0A; Mon, 2 May 2011 21:13:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42LD8ca055004; Mon, 2 May 2011 21:13:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42LD8TH055002; Mon, 2 May 2011 21:13:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105022113.p42LD8TH055002@svn.freebsd.org> From: Dimitry Andric Date: Mon, 2 May 2011 21:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221348 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 21:13:08 -0000 Author: dim Date: Mon May 2 21:13:08 2011 New Revision: 221348 URL: http://svn.freebsd.org/changeset/base/221348 Log: Clang r130700 can now compile sys/boot/i386/boot2 with room to spare. Modified: head/sys/boot/i386/boot2/Makefile Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Mon May 2 21:10:13 2011 (r221347) +++ head/sys/boot/i386/boot2/Makefile Mon May 2 21:13:08 2011 (r221348) @@ -2,9 +2,6 @@ .include -# XXX: clang can compile the boot code just fine, but boot2 gets too big -CC:=${CC:C/^(.*\/)?clang$/gcc/1} - FILES= boot boot1 boot2 NM?= nm @@ -45,6 +42,12 @@ CFLAGS= -Os \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -Winline --param max-inline-insns-single=100 +.if ${CC:T:Mclang} == "clang" +CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 +# XXX: clang integrated-as doesn't grok .codeNN directives yet +CFLAGS+= ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/} +.endif + LDFLAGS=-static -N --gc-sections # Pick up ../Makefile.inc early. From owner-svn-src-all@FreeBSD.ORG Mon May 2 21:32:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 05A751065670; Mon, 2 May 2011 21:32:19 +0000 (UTC) Date: Mon, 2 May 2011 21:32:19 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20110502213218.GA86377@freebsd.org> References: <201105022113.p42LD8TH055002@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105022113.p42LD8TH055002@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221348 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 21:32:19 -0000 On Mon May 2 11, Dimitry Andric wrote: > Author: dim > Date: Mon May 2 21:13:08 2011 > New Revision: 221348 > URL: http://svn.freebsd.org/changeset/base/221348 > > Log: > Clang r130700 can now compile sys/boot/i386/boot2 with room to spare. congratulations! everybody hanging out in #freebsd-clang knows how hard all of you guys have been working on this and persuading the llvm devs to look into the issues. alex > > Modified: > head/sys/boot/i386/boot2/Makefile > > Modified: head/sys/boot/i386/boot2/Makefile > ============================================================================== > --- head/sys/boot/i386/boot2/Makefile Mon May 2 21:10:13 2011 (r221347) > +++ head/sys/boot/i386/boot2/Makefile Mon May 2 21:13:08 2011 (r221348) > @@ -2,9 +2,6 @@ > > .include > > -# XXX: clang can compile the boot code just fine, but boot2 gets too big > -CC:=${CC:C/^(.*\/)?clang$/gcc/1} > - > FILES= boot boot1 boot2 > > NM?= nm > @@ -45,6 +42,12 @@ CFLAGS= -Os \ > -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ > -Winline --param max-inline-insns-single=100 > > +.if ${CC:T:Mclang} == "clang" > +CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 > +# XXX: clang integrated-as doesn't grok .codeNN directives yet > +CFLAGS+= ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/} > +.endif > + > LDFLAGS=-static -N --gc-sections > > # Pick up ../Makefile.inc early. -- a13x From owner-svn-src-all@FreeBSD.ORG Mon May 2 22:49:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17F2E106564A; Mon, 2 May 2011 22:49:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06C728FC12; Mon, 2 May 2011 22:49:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42Mnhfl057964; Mon, 2 May 2011 22:49:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42MnhaZ057961; Mon, 2 May 2011 22:49:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105022249.p42MnhaZ057961@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 2 May 2011 22:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221351 - stable/8/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 22:49:44 -0000 Author: yongari Date: Mon May 2 22:49:43 2011 New Revision: 221351 URL: http://svn.freebsd.org/changeset/base/221351 Log: MFC r220368: Add initial jumbo frame support for BCM5714/BCM5715 and BCM5780. Unlike other controllers which have more advanced jumbo support, these controllers have one send ring, one standard receive producer ring and one receive return ring. In order to receive jumbo frames on the controllers, driver now will increase Rx buffer size to 9k. Two Rx modes are supported on these controllers and I chose standard Rx BDs over extended Rx BDs. The extended Rx BD mode allows up to 4 segmentations for each Rx BDs such that kernel does not have to allocate large buffer of contiguous memory for receiving. The extended Rx BD mode is already used on controllers that have separate jumbo receive ring. However, using extended Rx BDs on BCM5714/BCM5715/BCM5780 reduces the number of Rx BDs to 256 entries which in turn may reduce the performance. Also UMA backed page allocator for jumbo frame returns contiguous memory so using extended Rx BD has no advantage on FreeBSD unless highly customized local allocator implemented in driver is used. To use jumbo buffers in standard receive ring, Rx buffer allocation handler was changed to allocate MJUM9BYTES sized mbuf. PR: kern/155192 Tested by: Vijay Singh gmail dot com> Submitted by: mjacob (initial version) Modified: stable/8/sys/dev/bge/if_bge.c stable/8/sys/dev/bge/if_bgereg.h 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/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Mon May 2 22:03:30 2011 (r221350) +++ stable/8/sys/dev/bge/if_bge.c Mon May 2 22:49:43 2011 (r221351) @@ -943,10 +943,19 @@ bge_newbuf_std(struct bge_softc *sc, int bus_dmamap_t map; int error, nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - if (m == NULL) - return (ENOBUFS); - m->m_len = m->m_pkthdr.len = MCLBYTES; + if (sc->bge_flags & BGE_FLAG_JUMBO_STD && + (sc->bge_ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN))) { + m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + if (m == NULL) + return (ENOBUFS); + m->m_len = m->m_pkthdr.len = MJUM9BYTES; + } else { + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) + return (ENOBUFS); + m->m_len = m->m_pkthdr.len = MCLBYTES; + } if ((sc->bge_flags & BGE_FLAG_RX_ALIGNBUG) == 0) m_adj(m, ETHER_ALIGN); @@ -2385,7 +2394,7 @@ static int bge_dma_alloc(struct bge_softc *sc) { bus_addr_t lowaddr; - bus_size_t boundary, sbsz, txsegsz, txmaxsegsz; + bus_size_t boundary, sbsz, rxmaxsegsz, txsegsz, txmaxsegsz; int i, error; lowaddr = BUS_SPACE_MAXADDR; @@ -2513,9 +2522,13 @@ bge_dma_alloc(struct bge_softc *sc) } /* Create tag for Rx mbufs. */ + if (sc->bge_flags & BGE_FLAG_JUMBO_STD) + rxmaxsegsz = MJUM9BYTES; + else + rxmaxsegsz = MCLBYTES; error = bus_dma_tag_create(sc->bge_cdata.bge_buffer_tag, 1, 0, - BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, - MCLBYTES, 0, NULL, NULL, &sc->bge_cdata.bge_rx_mtag); + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, rxmaxsegsz, 1, + rxmaxsegsz, 0, NULL, NULL, &sc->bge_cdata.bge_rx_mtag); if (error) { device_printf(sc->bge_dev, "could not allocate RX dma tag\n"); @@ -2759,7 +2772,7 @@ bge_attach(device_t dev) case BGE_ASICREV_BCM5714_A0: case BGE_ASICREV_BCM5780: case BGE_ASICREV_BCM5714: - sc->bge_flags |= BGE_FLAG_5714_FAMILY /* | BGE_FLAG_JUMBO */; + sc->bge_flags |= BGE_FLAG_5714_FAMILY | BGE_FLAG_JUMBO_STD; /* FALLTHROUGH */ case BGE_ASICREV_BCM5750: case BGE_ASICREV_BCM5752: @@ -3560,7 +3573,8 @@ bge_rxeof(struct bge_softc *sc, uint16_t sc->bge_cdata.bge_rx_return_ring_map, BUS_DMASYNC_POSTREAD); bus_dmamap_sync(sc->bge_cdata.bge_rx_std_ring_tag, sc->bge_cdata.bge_rx_std_ring_map, BUS_DMASYNC_POSTWRITE); - if (ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > + if (BGE_IS_JUMBO_CAPABLE(sc) && + ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN)) bus_dmamap_sync(sc->bge_cdata.bge_rx_jumbo_ring_tag, sc->bge_cdata.bge_rx_jumbo_ring_map, BUS_DMASYNC_POSTWRITE); @@ -4689,7 +4703,8 @@ bge_init_locked(struct bge_softc *sc) } /* Init jumbo RX ring. */ - if (ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > + if (BGE_IS_JUMBO_CAPABLE(sc) && + ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN)) { if (bge_init_rx_ring_jumbo(sc) != 0) { device_printf(sc->bge_dev, @@ -4914,14 +4929,19 @@ bge_ioctl(struct ifnet *ifp, u_long comm switch (command) { case SIOCSIFMTU: + if (BGE_IS_JUMBO_CAPABLE(sc) || + (sc->bge_flags & BGE_FLAG_JUMBO_STD)) { + if (ifr->ifr_mtu < ETHERMIN || + ifr->ifr_mtu > BGE_JUMBO_MTU) { + error = EINVAL; + break; + } + } else if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU) { + error = EINVAL; + break; + } BGE_LOCK(sc); - if (ifr->ifr_mtu < ETHERMIN || - ((BGE_IS_JUMBO_CAPABLE(sc)) && - ifr->ifr_mtu > BGE_JUMBO_MTU) || - ((!BGE_IS_JUMBO_CAPABLE(sc)) && - ifr->ifr_mtu > ETHERMTU)) - error = EINVAL; - else if (ifp->if_mtu != ifr->ifr_mtu) { + if (ifp->if_mtu != ifr->ifr_mtu) { ifp->if_mtu = ifr->ifr_mtu; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; Modified: stable/8/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/8/sys/dev/bge/if_bgereg.h Mon May 2 22:03:30 2011 (r221350) +++ stable/8/sys/dev/bge/if_bgereg.h Mon May 2 22:49:43 2011 (r221351) @@ -2748,6 +2748,7 @@ struct bge_softc { uint32_t bge_flags; #define BGE_FLAG_TBI 0x00000001 #define BGE_FLAG_JUMBO 0x00000002 +#define BGE_FLAG_JUMBO_STD 0x00000004 #define BGE_FLAG_EADDR 0x00000008 #define BGE_FLAG_MII_SERDES 0x00000010 #define BGE_FLAG_CPMU_PRESENT 0x00000020 From owner-svn-src-all@FreeBSD.ORG Mon May 2 22:52:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95FD01065677; Mon, 2 May 2011 22:52:22 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 851148FC17; Mon, 2 May 2011 22:52:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42MqM5h058089; Mon, 2 May 2011 22:52:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42MqMkW058086; Mon, 2 May 2011 22:52:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105022252.p42MqMkW058086@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 2 May 2011 22:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221352 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 22:52:22 -0000 Author: yongari Date: Mon May 2 22:52:22 2011 New Revision: 221352 URL: http://svn.freebsd.org/changeset/base/221352 Log: MFC r220368: Add initial jumbo frame support for BCM5714/BCM5715 and BCM5780. Unlike other controllers which have more advanced jumbo support, these controllers have one send ring, one standard receive producer ring and one receive return ring. In order to receive jumbo frames on the controllers, driver now will increase Rx buffer size to 9k. Two Rx modes are supported on these controllers and I chose standard Rx BDs over extended Rx BDs. The extended Rx BD mode allows up to 4 segmentations for each Rx BDs such that kernel does not have to allocate large buffer of contiguous memory for receiving. The extended Rx BD mode is already used on controllers that have separate jumbo receive ring. However, using extended Rx BDs on BCM5714/BCM5715/BCM5780 reduces the number of Rx BDs to 256 entries which in turn may reduce the performance. Also UMA backed page allocator for jumbo frame returns contiguous memory so using extended Rx BD has no advantage on FreeBSD unless highly customized local allocator implemented in driver is used. To use jumbo buffers in standard receive ring, Rx buffer allocation handler was changed to allocate MJUM9BYTES sized mbuf. PR: kern/155192 Tested by: Vijay Singh gmail dot com> Submitted by: mjacob (initial version) Modified: stable/7/sys/dev/bge/if_bge.c stable/7/sys/dev/bge/if_bgereg.h 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/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Mon May 2 22:49:43 2011 (r221351) +++ stable/7/sys/dev/bge/if_bge.c Mon May 2 22:52:22 2011 (r221352) @@ -943,10 +943,19 @@ bge_newbuf_std(struct bge_softc *sc, int bus_dmamap_t map; int error, nsegs; - m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - if (m == NULL) - return (ENOBUFS); - m->m_len = m->m_pkthdr.len = MCLBYTES; + if (sc->bge_flags & BGE_FLAG_JUMBO_STD && + (sc->bge_ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN))) { + m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES); + if (m == NULL) + return (ENOBUFS); + m->m_len = m->m_pkthdr.len = MJUM9BYTES; + } else { + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) + return (ENOBUFS); + m->m_len = m->m_pkthdr.len = MCLBYTES; + } if ((sc->bge_flags & BGE_FLAG_RX_ALIGNBUG) == 0) m_adj(m, ETHER_ALIGN); @@ -2385,7 +2394,7 @@ static int bge_dma_alloc(struct bge_softc *sc) { bus_addr_t lowaddr; - bus_size_t boundary, sbsz, txsegsz, txmaxsegsz; + bus_size_t boundary, sbsz, rxmaxsegsz, txsegsz, txmaxsegsz; int i, error; lowaddr = BUS_SPACE_MAXADDR; @@ -2513,9 +2522,13 @@ bge_dma_alloc(struct bge_softc *sc) } /* Create tag for Rx mbufs. */ + if (sc->bge_flags & BGE_FLAG_JUMBO_STD) + rxmaxsegsz = MJUM9BYTES; + else + rxmaxsegsz = MCLBYTES; error = bus_dma_tag_create(sc->bge_cdata.bge_buffer_tag, 1, 0, - BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, - MCLBYTES, 0, NULL, NULL, &sc->bge_cdata.bge_rx_mtag); + BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, rxmaxsegsz, 1, + rxmaxsegsz, 0, NULL, NULL, &sc->bge_cdata.bge_rx_mtag); if (error) { device_printf(sc->bge_dev, "could not allocate RX dma tag\n"); @@ -2759,7 +2772,7 @@ bge_attach(device_t dev) case BGE_ASICREV_BCM5714_A0: case BGE_ASICREV_BCM5780: case BGE_ASICREV_BCM5714: - sc->bge_flags |= BGE_FLAG_5714_FAMILY /* | BGE_FLAG_JUMBO */; + sc->bge_flags |= BGE_FLAG_5714_FAMILY | BGE_FLAG_JUMBO_STD; /* FALLTHROUGH */ case BGE_ASICREV_BCM5750: case BGE_ASICREV_BCM5752: @@ -3560,7 +3573,8 @@ bge_rxeof(struct bge_softc *sc, uint16_t sc->bge_cdata.bge_rx_return_ring_map, BUS_DMASYNC_POSTREAD); bus_dmamap_sync(sc->bge_cdata.bge_rx_std_ring_tag, sc->bge_cdata.bge_rx_std_ring_map, BUS_DMASYNC_POSTWRITE); - if (ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > + if (BGE_IS_JUMBO_CAPABLE(sc) && + ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN)) bus_dmamap_sync(sc->bge_cdata.bge_rx_jumbo_ring_tag, sc->bge_cdata.bge_rx_jumbo_ring_map, BUS_DMASYNC_POSTWRITE); @@ -4685,7 +4699,8 @@ bge_init_locked(struct bge_softc *sc) } /* Init jumbo RX ring. */ - if (ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > + if (BGE_IS_JUMBO_CAPABLE(sc) && + ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN > (MCLBYTES - ETHER_ALIGN)) { if (bge_init_rx_ring_jumbo(sc) != 0) { device_printf(sc->bge_dev, @@ -4910,14 +4925,19 @@ bge_ioctl(struct ifnet *ifp, u_long comm switch (command) { case SIOCSIFMTU: + if (BGE_IS_JUMBO_CAPABLE(sc) || + (sc->bge_flags & BGE_FLAG_JUMBO_STD)) { + if (ifr->ifr_mtu < ETHERMIN || + ifr->ifr_mtu > BGE_JUMBO_MTU) { + error = EINVAL; + break; + } + } else if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU) { + error = EINVAL; + break; + } BGE_LOCK(sc); - if (ifr->ifr_mtu < ETHERMIN || - ((BGE_IS_JUMBO_CAPABLE(sc)) && - ifr->ifr_mtu > BGE_JUMBO_MTU) || - ((!BGE_IS_JUMBO_CAPABLE(sc)) && - ifr->ifr_mtu > ETHERMTU)) - error = EINVAL; - else if (ifp->if_mtu != ifr->ifr_mtu) { + if (ifp->if_mtu != ifr->ifr_mtu) { ifp->if_mtu = ifr->ifr_mtu; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; Modified: stable/7/sys/dev/bge/if_bgereg.h ============================================================================== --- stable/7/sys/dev/bge/if_bgereg.h Mon May 2 22:49:43 2011 (r221351) +++ stable/7/sys/dev/bge/if_bgereg.h Mon May 2 22:52:22 2011 (r221352) @@ -2748,6 +2748,7 @@ struct bge_softc { uint32_t bge_flags; #define BGE_FLAG_TBI 0x00000001 #define BGE_FLAG_JUMBO 0x00000002 +#define BGE_FLAG_JUMBO_STD 0x00000004 #define BGE_FLAG_EADDR 0x00000008 #define BGE_FLAG_MII_SERDES 0x00000010 #define BGE_FLAG_CPMU_PRESENT 0x00000020 From owner-svn-src-all@FreeBSD.ORG Mon May 2 22:54:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55416106566B; Mon, 2 May 2011 22:54:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B2688FC0A; Mon, 2 May 2011 22:54:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42MsP5p058191; Mon, 2 May 2011 22:54:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42MsPpX058189; Mon, 2 May 2011 22:54:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201105022254.p42MsPpX058189@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 2 May 2011 22:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221353 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 22:54:25 -0000 Author: bz Date: Mon May 2 22:54:24 2011 New Revision: 221353 URL: http://svn.freebsd.org/changeset/base/221353 Log: Add LINT-NOINET6 which we have inofficially supported for years and our users complained when broken. Similarly add LINT-NOINET, and for at least documentation purposes add LINT-NOIP (which compiles out INET and INET6 and couple of NIC drivers). Tested by: make universe (if you broke it since you fix it) Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 2 weeks Modified: head/sys/conf/makeLINT.mk Modified: head/sys/conf/makeLINT.mk ============================================================================== --- head/sys/conf/makeLINT.mk Mon May 2 22:52:22 2011 (r221352) +++ head/sys/conf/makeLINT.mk Mon May 2 22:54:24 2011 (r221353) @@ -16,6 +16,34 @@ LINT: ${NOTES} ../../conf/makeLINT.sed echo "include ${.TARGET}" > ${.TARGET}-VIMAGE echo "ident ${.TARGET}-VIMAGE" >> ${.TARGET}-VIMAGE echo "options VIMAGE" >> ${.TARGET}-VIMAGE + echo "include ${.TARGET}" > ${.TARGET}-NOINET + echo "ident ${.TARGET}-NOINET" >> ${.TARGET}-NOINET + echo 'makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT="' >> ${.TARGET}-NOINET + echo "nooptions INET" >> ${.TARGET}-NOINET + echo "nodevice gre" >> ${.TARGET}-NOINET + echo "include ${.TARGET}" > ${.TARGET}-NOINET6 + echo "ident ${.TARGET}-NOINET6" >> ${.TARGET}-NOINET6 + echo "nooptions INET6" >> ${.TARGET}-NOINET6 + echo "include ${.TARGET}" > ${.TARGET}-NOIP + echo "ident ${.TARGET}-NOIP" >> ${.TARGET}-NOIP + echo 'makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT="' >> ${.TARGET}-NOIP + echo 'makeoptions MKMODULESENV+="WITHOUT_INET6_SUPPORT="' >> ${.TARGET}-NOIP + echo "nooptions INET" >> ${.TARGET}-NOIP + echo "nooptions INET6" >> ${.TARGET}-NOIP + echo "nodevice age" >> ${.TARGET}-NOIP + echo "nodevice alc" >> ${.TARGET}-NOIP + echo "nodevice ale" >> ${.TARGET}-NOIP + echo "nodevice bxe" >> ${.TARGET}-NOIP + echo "nodevice em" >> ${.TARGET}-NOIP + echo "nodevice fxp" >> ${.TARGET}-NOIP + echo "nodevice igb" >> ${.TARGET}-NOIP + echo "nodevice jme" >> ${.TARGET}-NOIP + echo "nodevice msk" >> ${.TARGET}-NOIP + echo "nodevice mxge" >> ${.TARGET}-NOIP + echo "nodevice sge" >> ${.TARGET}-NOIP + echo "nodevice sk" >> ${.TARGET}-NOIP + echo "nodevice txp" >> ${.TARGET}-NOIP + echo "nodevice vxge" >> ${.TARGET}-NOIP .endif .if ${TARGET} == "powerpc" || ${TARGET} == "mips" echo "machine ${TARGET} ${TARGET_ARCH}" >> ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Mon May 2 23:34:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26AF5106566B; Mon, 2 May 2011 23:34:34 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1624C8FC14; Mon, 2 May 2011 23:34:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p42NYX0Q059467; Mon, 2 May 2011 23:34:33 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p42NYXNf059465; Mon, 2 May 2011 23:34:33 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201105022334.p42NYXNf059465@svn.freebsd.org> From: David Christensen Date: Mon, 2 May 2011 23:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221354 - head/sys/dev/bxe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 23:34:34 -0000 Author: davidch Date: Mon May 2 23:34:33 2011 New Revision: 221354 URL: http://svn.freebsd.org/changeset/base/221354 Log: - Fixed a typo in an if() statement when setting flow control for MTU greater than 5000 bytes. Submitted by: yongari Modified: head/sys/dev/bxe/if_bxe.c Modified: head/sys/dev/bxe/if_bxe.c ============================================================================== --- head/sys/dev/bxe/if_bxe.c Mon May 2 22:54:24 2011 (r221353) +++ head/sys/dev/bxe/if_bxe.c Mon May 2 23:34:33 2011 (r221354) @@ -3600,7 +3600,7 @@ bxe_initial_phy_init(struct bxe_softc *s * It is recommended to turn off RX flow control for 5771x * when using jumbo frames for better performance. */ - if (!IS_E1HMF(sc) & (sc->mbuf_alloc_size > 5000)) + if (!IS_E1HMF(sc) && (sc->mbuf_alloc_size > 5000)) sc->link_params.req_fc_auto_adv = FLOW_CTRL_TX; else sc->link_params.req_fc_auto_adv = FLOW_CTRL_BOTH; From owner-svn-src-all@FreeBSD.ORG Tue May 3 01:19:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DFE51065676; Tue, 3 May 2011 01:19:40 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4A818FC18; Tue, 3 May 2011 01:19:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p431Jdp4062517; Tue, 3 May 2011 01:19:39 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p431JdTu062515; Tue, 3 May 2011 01:19:39 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105030119.p431JdTu062515@svn.freebsd.org> From: Rick Macklem Date: Tue, 3 May 2011 01:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221355 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 01:19:40 -0000 Author: rmacklem Date: Tue May 3 01:19:39 2011 New Revision: 221355 URL: http://svn.freebsd.org/changeset/base/221355 Log: MFC: r220810 Fix up handling of the nfsmount structure in read and write within the experimental NFS client. Mostly add mutex locking and use the same rsize, wsize during the operation by keeping a local copy of it. This is another change that brings it closer to the regular NFS client. Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.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/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Mon May 2 23:34:33 2011 (r221354) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Tue May 3 01:19:39 2011 (r221355) @@ -1284,16 +1284,22 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u struct nfsrv_descript nfsd; struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); struct nfsrv_descript *nd = &nfsd; + int rsize; *attrflagp = 0; tsiz = uio_uio_resid(uiop); - if (uiop->uio_offset + tsiz > 0xffffffff && - !NFSHASNFSV3OR4(nmp)) + NFSLOCKMNT(nmp); + if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { + /* XXX Needs overflow/negative check for uio_offset */ + NFSUNLOCKMNT(nmp); return (EFBIG); + } + rsize = nmp->nm_rsize; + NFSUNLOCKMNT(nmp); nd->nd_mrep = NULL; while (tsiz > 0) { *attrflagp = 0; - len = (tsiz > nmp->nm_rsize) ? nmp->nm_rsize : tsiz; + len = (tsiz > rsize) ? rsize : tsiz; NFSCL_REQSTART(nd, NFSPROC_READ, vp); if (nd->nd_flag & ND_NFSV4) nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID); @@ -1333,7 +1339,7 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); eof = fxdr_unsigned(int, *tl); } - NFSM_STRSIZ(retlen, nmp->nm_rsize); + NFSM_STRSIZ(retlen, rsize); error = nfsm_mbufuio(nd, uiop, retlen); if (error) goto nfsmout; @@ -1457,8 +1463,7 @@ nfsrpc_writerpc(vnode_t vp, struct uio * *attrflagp = 0; tsiz = uio_uio_resid(uiop); NFSLOCKMNT(nmp); - if (uiop->uio_offset + tsiz > 0xffffffff && - !NFSHASNFSV3OR4(nmp)) { + if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { NFSUNLOCKMNT(nmp); return (EFBIG); } @@ -1467,11 +1472,6 @@ nfsrpc_writerpc(vnode_t vp, struct uio * nd->nd_mrep = NULL; /* NFSv2 sometimes does a write with */ nd->nd_repstat = 0; /* uio_resid == 0, so the while is not done */ while (tsiz > 0) { - nmp = VFSTONFS(vnode_mount(vp)); - if (nmp == NULL) { - error = ENXIO; - goto nfsmout; - } *attrflagp = 0; len = (tsiz > wsize) ? wsize : tsiz; NFSCL_REQSTART(nd, NFSPROC_WRITE, vp); From owner-svn-src-all@FreeBSD.ORG Tue May 3 01:43:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94434106566C; Tue, 3 May 2011 01:43:04 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 824048FC08; Tue, 3 May 2011 01:43:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p431h4fL063233; Tue, 3 May 2011 01:43:04 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p431h4To063231; Tue, 3 May 2011 01:43:04 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105030143.p431h4To063231@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 3 May 2011 01:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221356 - head/sys/boot/ia64/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 01:43:04 -0000 Author: marcel Date: Tue May 3 01:43:04 2011 New Revision: 221356 URL: http://svn.freebsd.org/changeset/base/221356 Log: Fix corner case where the size is a power of two. Modified: head/sys/boot/ia64/common/exec.c Modified: head/sys/boot/ia64/common/exec.c ============================================================================== --- head/sys/boot/ia64/common/exec.c Tue May 3 01:19:39 2011 (r221355) +++ head/sys/boot/ia64/common/exec.c Tue May 3 01:43:04 2011 (r221356) @@ -76,7 +76,7 @@ sz2shft(vm_offset_t ofs, vm_size_t sz) shft = 12; /* Start with 4K */ s = 1 << shft; - while (s < sz) { + while (s <= sz) { shft++; s <<= 1; } From owner-svn-src-all@FreeBSD.ORG Tue May 3 01:55:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77D9F1065672; Tue, 3 May 2011 01:55:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64F4F8FC17; Tue, 3 May 2011 01:55:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p431tR6u063650; Tue, 3 May 2011 01:55:27 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p431tRmj063648; Tue, 3 May 2011 01:55:27 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105030155.p431tRmj063648@svn.freebsd.org> From: Rick Macklem Date: Tue, 3 May 2011 01:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221357 - stable/8/usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 01:55:27 -0000 Author: rmacklem Date: Tue May 3 01:55:27 2011 New Revision: 221357 URL: http://svn.freebsd.org/changeset/base/221357 Log: MFC: r220875 Add stablerestart(5) to the See Also list for nfsd.8. This is a content change. Modified: stable/8/usr.sbin/nfsd/nfsd.8 Directory Properties: stable/8/usr.sbin/nfsd/ (props changed) Modified: stable/8/usr.sbin/nfsd/nfsd.8 ============================================================================== --- stable/8/usr.sbin/nfsd/nfsd.8 Tue May 3 01:43:04 2011 (r221356) +++ stable/8/usr.sbin/nfsd/nfsd.8 Tue May 3 01:55:27 2011 (r221357) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd March 29, 1995 +.Dd April 19, 2011 .Dt NFSD 8 .Os .Sh NAME @@ -195,6 +195,7 @@ just do a .Xr nfssvc 2 , .Xr nfsv4 4 , .Xr exports 5 , +.Xr stablerestart 5 , .Xr gssd 8 , .Xr ipfw 8 , .Xr mountd 8 , From owner-svn-src-all@FreeBSD.ORG Tue May 3 04:44:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5100A106566B; Tue, 3 May 2011 04:44:51 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 346948FC14; Tue, 3 May 2011 04:44:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p434ipbO069852; Tue, 3 May 2011 04:44:51 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p434ipEj069845; Tue, 3 May 2011 04:44:51 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201105030444.p434ipEj069845@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 3 May 2011 04:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221358 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 04:44:51 -0000 Author: rodrigc Date: Tue May 3 04:44:50 2011 New Revision: 221358 URL: http://svn.freebsd.org/changeset/base/221358 Log: Switch to ANSI function prototypes in a few places. Get rid of some unused parameter warnings. Modified: head/lib/libstand/__main.c head/lib/libstand/bswap.c head/lib/libstand/cd9660.c head/lib/libstand/environment.c head/lib/libstand/getopt.c head/lib/libstand/tftp.c Modified: head/lib/libstand/__main.c ============================================================================== --- head/lib/libstand/__main.c Tue May 3 01:55:27 2011 (r221357) +++ head/lib/libstand/__main.c Tue May 3 04:44:50 2011 (r221358) @@ -38,6 +38,6 @@ __FBSDID("$FreeBSD$"); void __main(void); void -__main() +__main(void) { } Modified: head/lib/libstand/bswap.c ============================================================================== --- head/lib/libstand/bswap.c Tue May 3 01:55:27 2011 (r221357) +++ head/lib/libstand/bswap.c Tue May 3 04:44:50 2011 (r221358) @@ -16,9 +16,11 @@ static char *rcsid = "$NetBSD: bswap64.c #undef bswap32 #undef bswap64 +u_int32_t bswap32(u_int32_t x); +u_int64_t bswap64(u_int64_t x); + u_int32_t -bswap32(x) - u_int32_t x; +bswap32(u_int32_t x) { return ((x << 24) & 0xff000000 ) | ((x << 8) & 0x00ff0000 ) | @@ -27,8 +29,7 @@ bswap32(x) } u_int64_t -bswap64(x) - u_int64_t x; +bswap64(u_int64_t x) { u_int32_t *p = (u_int32_t*)&x; u_int32_t t; Modified: head/lib/libstand/cd9660.c ============================================================================== --- head/lib/libstand/cd9660.c Tue May 3 01:55:27 2011 (r221357) +++ head/lib/libstand/cd9660.c Tue May 3 04:44:50 2011 (r221358) @@ -545,7 +545,7 @@ again: } static int -cd9660_write(struct open_file *f, void *start, size_t size, size_t *resid) +cd9660_write(struct open_file *f __unused, void *start __unused, size_t size __unused, size_t *resid __unused) { return EROFS; } Modified: head/lib/libstand/environment.c ============================================================================== --- head/lib/libstand/environment.c Tue May 3 01:55:27 2011 (r221357) +++ head/lib/libstand/environment.c Tue May 3 04:44:50 2011 (r221358) @@ -207,13 +207,14 @@ env_discard(struct env_var *ev) } int -env_noset(struct env_var *ev, int flags, const void *value) +env_noset(struct env_var *ev __unused, int flags __unused, + const void *value __unused) { return(EPERM); } int -env_nounset(struct env_var *ev) +env_nounset(struct env_var *ev __unused) { return(EPERM); } Modified: head/lib/libstand/getopt.c ============================================================================== --- head/lib/libstand/getopt.c Tue May 3 01:55:27 2011 (r221357) +++ head/lib/libstand/getopt.c Tue May 3 04:44:50 2011 (r221358) @@ -52,10 +52,7 @@ char *optarg; /* argument associated wi * Parse argc/argv argument vector. */ int -getopt(nargc, nargv, ostr) - int nargc; - char * const *nargv; - const char *ostr; +getopt(int nargc, char * const *nargv, const char *ostr) { static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ Modified: head/lib/libstand/tftp.c ============================================================================== --- head/lib/libstand/tftp.c Tue May 3 01:55:27 2011 (r221357) +++ head/lib/libstand/tftp.c Tue May 3 04:44:50 2011 (r221358) @@ -110,11 +110,7 @@ static const int tftperrors[8] = { }; static ssize_t -recvtftp(d, pkt, len, tleft) - struct iodesc *d; - void *pkt; - ssize_t len; - time_t tleft; +recvtftp(struct iodesc *d, void *pkt, ssize_t len, time_t tleft) { struct tftphdr *t; @@ -168,8 +164,7 @@ recvtftp(d, pkt, len, tleft) /* send request, expect first block (or error) */ static int -tftp_makereq(h) - struct tftp_handle *h; +tftp_makereq(struct tftp_handle *h) { struct { u_char header[HEADER_SIZE]; @@ -212,8 +207,7 @@ tftp_makereq(h) /* ack block, expect next */ static int -tftp_getnextblock(h) - struct tftp_handle *h; +tftp_getnextblock(struct tftp_handle *h) { struct { u_char header[HEADER_SIZE]; @@ -246,9 +240,7 @@ tftp_getnextblock(h) } static int -tftp_open(path, f) - const char *path; - struct open_file *f; +tftp_open(const char *path, struct open_file *f) { struct tftp_handle *tftpfile; struct iodesc *io; @@ -287,11 +279,8 @@ tftp_open(path, f) } static int -tftp_read(f, addr, size, resid) - struct open_file *f; - void *addr; - size_t size; - size_t *resid; /* out */ +tftp_read(struct open_file *f, void *addr, size_t size, + size_t *resid /* out */) { struct tftp_handle *tftpfile; static int tc = 0; @@ -361,8 +350,7 @@ tftp_read(f, addr, size, resid) } static int -tftp_close(f) - struct open_file *f; +tftp_close(struct open_file *f) { struct tftp_handle *tftpfile; tftpfile = (struct tftp_handle *) f->f_fsdata; @@ -377,19 +365,14 @@ tftp_close(f) } static int -tftp_write(f, start, size, resid) - struct open_file *f; - void *start; - size_t size; - size_t *resid; /* out */ +tftp_write(struct open_file *f __unused, void *start __unused, size_t size __unused, + size_t *resid /* out */ __unused) { return (EROFS); } static int -tftp_stat(f, sb) - struct open_file *f; - struct stat *sb; +tftp_stat(struct open_file *f, struct stat *sb) { struct tftp_handle *tftpfile; tftpfile = (struct tftp_handle *) f->f_fsdata; @@ -403,10 +386,7 @@ tftp_stat(f, sb) } static off_t -tftp_seek(f, offset, where) - struct open_file *f; - off_t offset; - int where; +tftp_seek(struct open_file *f, off_t offset, int where) { struct tftp_handle *tftpfile; tftpfile = (struct tftp_handle *) f->f_fsdata; From owner-svn-src-all@FreeBSD.ORG Tue May 3 05:09:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C49D106566B; Tue, 3 May 2011 05:09:02 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B0168FC16; Tue, 3 May 2011 05:09:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p435922w070584; Tue, 3 May 2011 05:09:02 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p435923Z070582; Tue, 3 May 2011 05:09:02 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105030509.p435923Z070582@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 3 May 2011 05:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221359 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 05:09:02 -0000 Author: ae Date: Tue May 3 05:09:02 2011 New Revision: 221359 URL: http://svn.freebsd.org/changeset/base/221359 Log: MFC r220831: ipdn_bound_var() function is designed to bound a variable between specified minimum and maximum. In case when specified default value is out of bounds it does not work as expected and does not limit variable. Check that default value is in range and limit it if needed. Also bump max_hash_size value to 65536 to correspond with manual page. PR: kern/152887 Modified: stable/8/sys/netinet/ipfw/ip_dummynet.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/ipfw/ip_dummynet.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dummynet.c Tue May 3 04:44:50 2011 (r221358) +++ stable/8/sys/netinet/ipfw/ip_dummynet.c Tue May 3 05:09:02 2011 (r221359) @@ -108,6 +108,10 @@ ipdn_bound_var(int *v, int dflt, int lo, { int oldv = *v; const char *op = NULL; + if (dflt < lo) + dflt = lo; + if (dflt > hi) + dflt = hi; if (oldv < lo) { *v = dflt; op = "Bump"; @@ -2129,7 +2133,7 @@ ip_dn_init(void) dn_cfg.red_max_pkt_size = 1500; /* default max packet size */ /* hash tables */ - dn_cfg.max_hash_size = 1024; /* max in the hash tables */ + dn_cfg.max_hash_size = 65536; /* max in the hash tables */ dn_cfg.hash_size = 64; /* default hash size */ /* create hash tables for schedulers and flowsets. From owner-svn-src-all@FreeBSD.ORG Tue May 3 05:42:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA96106564A; Tue, 3 May 2011 05:42:50 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD55C8FC13; Tue, 3 May 2011 05:42:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p435go5Y071617; Tue, 3 May 2011 05:42:50 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p435goQQ071615; Tue, 3 May 2011 05:42:50 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105030542.p435goQQ071615@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 3 May 2011 05:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221360 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 05:42:51 -0000 Author: ae Date: Tue May 3 05:42:50 2011 New Revision: 221360 URL: http://svn.freebsd.org/changeset/base/221360 Log: MFC r218360 (by luigi): correct the 'output_time' of packets generated by dummynet. In the dec.2009 rewrite I introduced a bug, using for the computation the arrival time instead of the time the packet has exited from the queue. The bandwidth computation was still correct because it is computed elsewhere, but traffic was sent out in bursts. The bug is also present in RELENG_8 after dec.2009 Thanks to Daikichi Osuga for investingating, finding and fixing the bug with detailed graphs of the behaviour before and after the fix. Submitted by: Daikichi Osuga Modified: stable/8/sys/netinet/ipfw/ip_dn_io.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/ipfw/ip_dn_io.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dn_io.c Tue May 3 05:09:02 2011 (r221359) +++ stable/8/sys/netinet/ipfw/ip_dn_io.c Tue May 3 05:42:50 2011 (r221360) @@ -461,7 +461,7 @@ serve_sched(struct mq *q, struct dn_sch_ (m->m_pkthdr.len * 8 + extra_bits(m, s)); si->credit -= len_scaled; /* Move packet in the delay line */ - dn_tag_get(m)->output_time += s->link.delay ; + dn_tag_get(m)->output_time = dn_cfg.curr_time + s->link.delay ; mq_append(&si->dline.mq, m); } /* From owner-svn-src-all@FreeBSD.ORG Tue May 3 07:24:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2DB9106566B; Tue, 3 May 2011 07:24:47 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78F128FC0A; Tue, 3 May 2011 07:24:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p437OlHb074670; Tue, 3 May 2011 07:24:47 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p437OlG4074668; Tue, 3 May 2011 07:24:47 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201105030724.p437OlG4074668@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 3 May 2011 07:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221361 - stable/8/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 07:24:47 -0000 Author: pluknet Date: Tue May 3 07:24:47 2011 New Revision: 221361 URL: http://svn.freebsd.org/changeset/base/221361 Log: MFC r221119: Fix typo in "continuously" argument used in patrol auto command. Unlike the version in head, this one preserves a misspelled version. Modified: stable/8/usr.sbin/mfiutil/mfi_patrol.c Directory Properties: stable/8/usr.sbin/mfiutil/ (props changed) Modified: stable/8/usr.sbin/mfiutil/mfi_patrol.c ============================================================================== --- stable/8/usr.sbin/mfiutil/mfi_patrol.c Tue May 3 05:42:50 2011 (r221360) +++ stable/8/usr.sbin/mfiutil/mfi_patrol.c Tue May 3 07:24:47 2011 (r221361) @@ -252,7 +252,8 @@ patrol_config(int ac, char **av) if (strcasecmp(av[1], "auto") == 0) { op_mode = MFI_PR_OPMODE_AUTO; if (ac > 2) { - if (strcasecmp(av[2], "continously") == 0) + if (strcasecmp(av[2], "continously") == 0 || + strcasecmp(av[2], "continuously") == 0) exec_freq = 0xffffffff; else { val = strtol(av[2], &cp, 0); From owner-svn-src-all@FreeBSD.ORG Tue May 3 07:32:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974D0106564A; Tue, 3 May 2011 07:32:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84C338FC12; Tue, 3 May 2011 07:32:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p437Wwgw074940; Tue, 3 May 2011 07:32:58 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p437Wwoa074933; Tue, 3 May 2011 07:32:58 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201105030732.p437Wwoa074933@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 3 May 2011 07:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221362 - in head: sys/kern sys/sys usr.bin/rctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 07:32:58 -0000 Author: trasz Date: Tue May 3 07:32:58 2011 New Revision: 221362 URL: http://svn.freebsd.org/changeset/base/221362 Log: Change the way rctl interfaces with jails by introducing prison_racct structure, which acts as a proxy between them. This makes jail rules persistent, i.e. they can be added before jail gets created, and they don't disappear when the jail gets destroyed. Modified: head/sys/kern/kern_jail.c head/sys/kern/kern_racct.c head/sys/kern/kern_rctl.c head/sys/sys/jail.h head/sys/sys/rctl.h head/usr.bin/rctl/rctl.8 Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Tue May 3 07:24:47 2011 (r221361) +++ head/sys/kern/kern_jail.c Tue May 3 07:32:58 2011 (r221362) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #define DEFAULT_HOSTUUID "00000000-0000-0000-0000-000000000000" MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); +MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures"); /* Keep struct prison prison0 and some code in kern_jail_set() readable. */ #ifdef INET @@ -114,10 +115,11 @@ struct prison prison0 = { }; MTX_SYSINIT(prison0, &prison0.pr_mtx, "jail mutex", MTX_DEF); -/* allprison and lastprid are protected by allprison_lock. */ +/* allprison, allprison_racct and lastprid are protected by allprison_lock. */ struct sx allprison_lock; SX_SYSINIT(allprison_lock, &allprison_lock, "allprison"); struct prisonlist allprison = TAILQ_HEAD_INITIALIZER(allprison); +LIST_HEAD(, prison_racct) allprison_racct; int lastprid = 0; static int do_jail_attach(struct thread *td, struct prison *pr); @@ -125,6 +127,10 @@ static void prison_complete(void *contex static void prison_deref(struct prison *pr, int flags); static char *prison_path(struct prison *pr1, struct prison *pr2); static void prison_remove_one(struct prison *pr); +#ifdef RACCT +static void prison_racct_attach(struct prison *pr); +static void prison_racct_detach(struct prison *pr); +#endif #ifdef INET static int _prison_check_ip4(struct prison *pr, struct in_addr *ia); static int prison_restrict_ip4(struct prison *pr, struct in_addr *newip4); @@ -1197,7 +1203,6 @@ kern_jail_set(struct thread *td, struct root = mypr->pr_root; vref(root); } - racct_create(&pr->pr_racct); strlcpy(pr->pr_hostuuid, DEFAULT_HOSTUUID, HOSTUUIDLEN); pr->pr_flags |= PR_HOST; #if defined(INET) || defined(INET6) @@ -1657,6 +1662,11 @@ kern_jail_set(struct thread *td, struct pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; mtx_unlock(&pr->pr_mtx); +#ifdef RACCT + if (created) + prison_racct_attach(pr); +#endif + /* Locks may have prevented a complete restriction of child IP * addresses. If so, allocate some more memory and try again. */ @@ -2533,10 +2543,9 @@ prison_deref(struct prison *pr, int flag if (pr->pr_cpuset != NULL) cpuset_rel(pr->pr_cpuset); osd_jail_exit(pr); -#ifdef RCTL - rctl_racct_release(pr->pr_racct); +#ifdef RACCT + prison_racct_detach(pr); #endif - racct_destroy(&pr->pr_racct); free(pr, M_PRISON); /* Removing a prison frees a reference on its parent. */ @@ -4277,14 +4286,103 @@ void prison_racct_foreach(void (*callback)(struct racct *racct, void *arg2, void *arg3), void *arg2, void *arg3) { - struct prison *pr; + struct prison_racct *prr; sx_slock(&allprison_lock); - TAILQ_FOREACH(pr, &allprison, pr_list) - (callback)(pr->pr_racct, arg2, arg3); + LIST_FOREACH(prr, &allprison_racct, prr_next) + (callback)(prr->prr_racct, arg2, arg3); sx_sunlock(&allprison_lock); } +static struct prison_racct * +prison_racct_find_locked(const char *name) +{ + struct prison_racct *prr; + + sx_assert(&allprison_lock, SA_XLOCKED); + + if (name[0] == '\0' || strlen(name) >= MAXHOSTNAMELEN) + return (NULL); + + LIST_FOREACH(prr, &allprison_racct, prr_next) { + if (strcmp(name, prr->prr_name) != 0) + continue; + + /* Found prison_racct with a matching name? */ + prison_racct_hold(prr); + return (prr); + } + + /* Add new prison_racct. */ + prr = malloc(sizeof(*prr), M_PRISON_RACCT, M_ZERO | M_WAITOK); + racct_create(&prr->prr_racct); + + strcpy(prr->prr_name, name); + refcount_init(&prr->prr_refcount, 1); + LIST_INSERT_HEAD(&allprison_racct, prr, prr_next); + + return (prr); +} + +struct prison_racct * +prison_racct_find(const char *name) +{ + struct prison_racct *prr; + + sx_xlock(&allprison_lock); + prr = prison_racct_find_locked(name); + sx_xunlock(&allprison_lock); + return (prr); +} + +void +prison_racct_hold(struct prison_racct *prr) +{ + + refcount_acquire(&prr->prr_refcount); +} + +void +prison_racct_free(struct prison_racct *prr) +{ + int old; + + old = prr->prr_refcount; + if (old > 1 && atomic_cmpset_int(&prr->prr_refcount, old, old - 1)) + return; + + sx_xlock(&allprison_lock); + if (refcount_release(&prr->prr_refcount)) { + racct_destroy(&prr->prr_racct); + LIST_REMOVE(prr, prr_next); + sx_xunlock(&allprison_lock); + free(prr, M_PRISON_RACCT); + + return; + } + sx_xunlock(&allprison_lock); +} + +#ifdef RACCT +static void +prison_racct_attach(struct prison *pr) +{ + struct prison_racct *prr; + + prr = prison_racct_find_locked(pr->pr_name); + KASSERT(prr != NULL, ("cannot find prison_racct")); + + pr->pr_prison_racct = prr; +} + +static void +prison_racct_detach(struct prison *pr) +{ + prison_racct_free(pr->pr_prison_racct); + pr->pr_prison_racct = NULL; +} +#endif /* RACCT */ + #ifdef DDB static void Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Tue May 3 07:24:47 2011 (r221361) +++ head/sys/kern/kern_racct.c Tue May 3 07:32:58 2011 (r221362) @@ -313,7 +313,8 @@ racct_add_cred_locked(struct ucred *cred racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, amount); for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent) - racct_alloc_resource(pr->pr_racct, resource, amount); + racct_alloc_resource(pr->pr_prison_racct->prr_racct, resource, + amount); racct_alloc_resource(cred->cr_loginclass->lc_racct, resource, amount); } @@ -522,7 +523,8 @@ racct_sub_cred_locked(struct ucred *cred racct_alloc_resource(cred->cr_ruidinfo->ui_racct, resource, -amount); for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent) - racct_alloc_resource(pr->pr_racct, resource, -amount); + racct_alloc_resource(pr->pr_prison_racct->prr_racct, resource, + -amount); racct_alloc_resource(cred->cr_loginclass->lc_racct, resource, -amount); } @@ -669,9 +671,11 @@ racct_proc_ucred_changed(struct proc *p, } if (newpr != oldpr) { for (pr = oldpr; pr != NULL; pr = pr->pr_parent) - racct_sub_racct(pr->pr_racct, p->p_racct); + racct_sub_racct(pr->pr_prison_racct->prr_racct, + p->p_racct); for (pr = newpr; pr != NULL; pr = pr->pr_parent) - racct_add_racct(pr->pr_racct, p->p_racct); + racct_add_racct(pr->pr_prison_racct->prr_racct, + p->p_racct); } mtx_unlock(&racct_lock); @@ -744,7 +748,7 @@ racct_init(void) /* * XXX: Move this somewhere. */ - racct_create(&prison0.pr_racct); + prison0.pr_prison_racct = prison_racct_find("0"); } SYSINIT(racct, SI_SUB_RACCT, SI_ORDER_FIRST, racct_init, NULL); Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Tue May 3 07:24:47 2011 (r221361) +++ head/sys/kern/kern_rctl.c Tue May 3 07:32:58 2011 (r221362) @@ -241,7 +241,8 @@ rctl_available_resource(const struct pro break; case RCTL_SUBJECT_TYPE_JAIL: available = rule->rr_amount - - cred->cr_prison->pr_racct->r_resources[resource]; + cred->cr_prison->pr_prison_racct->prr_racct-> + r_resources[resource]; break; default: panic("rctl_compute_available: unknown per %d", @@ -327,7 +328,7 @@ rctl_enforce(struct proc *p, int resourc printf("rctl: rule \"%s\" matched by pid %d " "(%s), uid %d, jail %s\n", sbuf_data(&sb), p->p_pid, p->p_comm, p->p_ucred->cr_uid, - p->p_ucred->cr_prison->pr_name); + p->p_ucred->cr_prison->pr_prison_racct->prr_name); sbuf_delete(&sb); free(buf, M_RCTL); link->rrl_exceeded = 1; @@ -346,7 +347,7 @@ rctl_enforce(struct proc *p, int resourc rctl_rule_to_sbuf(&sb, rule); sbuf_printf(&sb, " pid=%d ruid=%d jail=%s", p->p_pid, p->p_ucred->cr_ruid, - p->p_ucred->cr_prison->pr_name); + p->p_ucred->cr_prison->pr_prison_racct->prr_name); sbuf_finish(&sb); devctl_notify_f("RCTL", "rule", "matched", sbuf_data(&sb), M_NOWAIT); @@ -481,9 +482,9 @@ rctl_rule_matches(const struct rctl_rule return (0); break; case RCTL_SUBJECT_TYPE_JAIL: - if (filter->rr_subject.rs_prison != NULL && - rule->rr_subject.rs_prison != - filter->rr_subject.rs_prison) + if (filter->rr_subject.rs_prison_racct != NULL && + rule->rr_subject.rs_prison_racct != + filter->rr_subject.rs_prison_racct) return (0); break; default: @@ -635,7 +636,10 @@ rctl_rule_acquire_subject(struct rctl_ru switch (rule->rr_subject_type) { case RCTL_SUBJECT_TYPE_UNDEFINED: case RCTL_SUBJECT_TYPE_PROCESS: + break; case RCTL_SUBJECT_TYPE_JAIL: + if (rule->rr_subject.rs_prison_racct != NULL) + prison_racct_hold(rule->rr_subject.rs_prison_racct); break; case RCTL_SUBJECT_TYPE_USER: if (rule->rr_subject.rs_uip != NULL) @@ -658,7 +662,10 @@ rctl_rule_release_subject(struct rctl_ru switch (rule->rr_subject_type) { case RCTL_SUBJECT_TYPE_UNDEFINED: case RCTL_SUBJECT_TYPE_PROCESS: + break; case RCTL_SUBJECT_TYPE_JAIL: + if (rule->rr_subject.rs_prison_racct != NULL) + prison_racct_free(rule->rr_subject.rs_prison_racct); break; case RCTL_SUBJECT_TYPE_USER: if (rule->rr_subject.rs_uip != NULL) @@ -686,7 +693,7 @@ rctl_rule_alloc(int flags) rule->rr_subject.rs_proc = NULL; rule->rr_subject.rs_uip = NULL; rule->rr_subject.rs_loginclass = NULL; - rule->rr_subject.rs_prison = NULL; + rule->rr_subject.rs_prison_racct = NULL; rule->rr_per = RCTL_SUBJECT_TYPE_UNDEFINED; rule->rr_resource = RACCT_UNDEFINED; rule->rr_action = RCTL_ACTION_UNDEFINED; @@ -708,7 +715,7 @@ rctl_rule_duplicate(const struct rctl_ru copy->rr_subject.rs_proc = rule->rr_subject.rs_proc; copy->rr_subject.rs_uip = rule->rr_subject.rs_uip; copy->rr_subject.rs_loginclass = rule->rr_subject.rs_loginclass; - copy->rr_subject.rs_prison = rule->rr_subject.rs_prison; + copy->rr_subject.rs_prison_racct = rule->rr_subject.rs_prison_racct; copy->rr_per = rule->rr_per; copy->rr_resource = rule->rr_resource; copy->rr_action = rule->rr_action; @@ -784,7 +791,7 @@ rctl_rule_fully_specified(const struct r return (0); break; case RCTL_SUBJECT_TYPE_JAIL: - if (rule->rr_subject.rs_prison == NULL) + if (rule->rr_subject.rs_prison_racct == NULL) return (0); break; default: @@ -833,7 +840,7 @@ rctl_string_to_rule(char *rulestr, struc rule->rr_subject.rs_proc = NULL; rule->rr_subject.rs_uip = NULL; rule->rr_subject.rs_loginclass = NULL; - rule->rr_subject.rs_prison = NULL; + rule->rr_subject.rs_prison_racct = NULL; } else { switch (rule->rr_subject_type) { case RCTL_SUBJECT_TYPE_UNDEFINED: @@ -866,23 +873,12 @@ rctl_string_to_rule(char *rulestr, struc } break; case RCTL_SUBJECT_TYPE_JAIL: - rule->rr_subject.rs_prison = - prison_find_name(&prison0, subject_idstr); - if (rule->rr_subject.rs_prison == NULL) { - /* - * No jail with that name; try with the JID. - */ - error = str2id(subject_idstr, &id); - if (error != 0) - goto out; - rule->rr_subject.rs_prison = prison_find(id); - if (rule->rr_subject.rs_prison == NULL) { - error = ESRCH; - goto out; - } + rule->rr_subject.rs_prison_racct = + prison_racct_find(subject_idstr); + if (rule->rr_subject.rs_prison_racct == NULL) { + error = ENAMETOOLONG; + goto out; } - /* prison_find() returns with mutex held. */ - mtx_unlock(&rule->rr_subject.rs_prison->pr_mtx); break; default: panic("rctl_string_to_rule: unknown subject type %d", @@ -944,6 +940,7 @@ rctl_rule_add(struct rctl_rule *rule) struct ucred *cred; struct uidinfo *uip; struct prison *pr; + struct prison_racct *prr; struct loginclass *lc; struct rctl_rule *rule2; int match; @@ -1008,9 +1005,9 @@ rctl_rule_add(struct rctl_rule *rule) break; case RCTL_SUBJECT_TYPE_JAIL: - pr = rule->rr_subject.rs_prison; - KASSERT(pr != NULL, ("rctl_rule_add: NULL pr")); - rctl_racct_add_rule(pr->pr_racct, rule); + prr = rule->rr_subject.rs_prison_racct; + KASSERT(prr != NULL, ("rctl_rule_add: NULL pr")); + rctl_racct_add_rule(prr->prr_racct, rule); break; default: @@ -1040,7 +1037,7 @@ rctl_rule_add(struct rctl_rule *rule) case RCTL_SUBJECT_TYPE_JAIL: match = 0; for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent) { - if (pr == rule->rr_subject.rs_prison) { + if (pr->pr_prison_racct == rule->rr_subject.rs_prison_racct) { match = 1; break; } @@ -1144,11 +1141,11 @@ rctl_rule_to_sbuf(struct sbuf *sb, const rule->rr_subject.rs_loginclass->lc_name); break; case RCTL_SUBJECT_TYPE_JAIL: - if (rule->rr_subject.rs_prison == NULL) + if (rule->rr_subject.rs_prison_racct == NULL) sbuf_printf(sb, ":"); else sbuf_printf(sb, "%s:", - rule->rr_subject.rs_prison->pr_name); + rule->rr_subject.rs_prison_racct->prr_name); break; default: panic("rctl_rule_to_sbuf: unknown subject type %d", @@ -1245,7 +1242,7 @@ rctl_get_racct(struct thread *td, struct struct proc *p; struct uidinfo *uip; struct loginclass *lc; - struct prison *pr; + struct prison_racct *prr; error = priv_check(td, PRIV_RCTL_GET_RACCT); if (error != 0) @@ -1256,11 +1253,9 @@ rctl_get_racct(struct thread *td, struct return (error); sx_slock(&allproc_lock); - sx_slock(&allprison_lock); error = rctl_string_to_rule(inputstr, &filter); free(inputstr, M_RCTL); if (error != 0) { - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (error); } @@ -1295,19 +1290,18 @@ rctl_get_racct(struct thread *td, struct outputsbuf = rctl_racct_to_sbuf(lc->lc_racct, 1); break; case RCTL_SUBJECT_TYPE_JAIL: - pr = filter->rr_subject.rs_prison; - if (pr == NULL) { + prr = filter->rr_subject.rs_prison_racct; + if (prr == NULL) { error = EINVAL; goto out; } - outputsbuf = rctl_racct_to_sbuf(pr->pr_racct, 1); + outputsbuf = rctl_racct_to_sbuf(prr->prr_racct, 1); break; default: error = EINVAL; } out: rctl_rule_release(filter); - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); if (error != 0) return (error); @@ -1354,11 +1348,9 @@ rctl_get_rules(struct thread *td, struct return (error); sx_slock(&allproc_lock); - sx_slock(&allprison_lock); error = rctl_string_to_rule(inputstr, &filter); free(inputstr, M_RCTL); if (error != 0) { - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (error); } @@ -1406,7 +1398,6 @@ again: error = rctl_write_outbuf(sb, uap->outbufp, uap->outbuflen); rctl_rule_release(filter); - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); free(buf, M_RCTL); return (error); @@ -1431,30 +1422,25 @@ rctl_get_limits(struct thread *td, struc return (error); sx_slock(&allproc_lock); - sx_slock(&allprison_lock); error = rctl_string_to_rule(inputstr, &filter); free(inputstr, M_RCTL); if (error != 0) { - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (error); } if (filter->rr_subject_type == RCTL_SUBJECT_TYPE_UNDEFINED) { rctl_rule_release(filter); - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (EINVAL); } if (filter->rr_subject_type != RCTL_SUBJECT_TYPE_PROCESS) { rctl_rule_release(filter); - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (EOPNOTSUPP); } if (filter->rr_subject.rs_proc == NULL) { rctl_rule_release(filter); - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (EINVAL); } @@ -1486,7 +1472,6 @@ again: error = rctl_write_outbuf(sb, uap->outbufp, uap->outbuflen); rctl_rule_release(filter); - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); free(buf, M_RCTL); return (error); @@ -1508,11 +1493,9 @@ rctl_add_rule(struct thread *td, struct return (error); sx_slock(&allproc_lock); - sx_slock(&allprison_lock); error = rctl_string_to_rule(inputstr, &rule); free(inputstr, M_RCTL); if (error != 0) { - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (error); } @@ -1532,7 +1515,6 @@ rctl_add_rule(struct thread *td, struct out: rctl_rule_release(rule); - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (error); } @@ -1553,18 +1535,15 @@ rctl_remove_rule(struct thread *td, stru return (error); sx_slock(&allproc_lock); - sx_slock(&allprison_lock); error = rctl_string_to_rule(inputstr, &filter); free(inputstr, M_RCTL); if (error != 0) { - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (error); } error = rctl_rule_remove(filter); rctl_rule_release(filter); - sx_sunlock(&allprison_lock); sx_sunlock(&allproc_lock); return (error); @@ -1580,12 +1559,12 @@ rctl_proc_ucred_changed(struct proc *p, struct rctl_rule_link *link, *newlink; struct uidinfo *newuip; struct loginclass *newlc; - struct prison *newpr; + struct prison_racct *newprr; LIST_HEAD(, rctl_rule_link) newrules; newuip = newcred->cr_ruidinfo; newlc = newcred->cr_loginclass; - newpr = newcred->cr_prison; + newprr = newcred->cr_prison->pr_prison_racct; LIST_INIT(&newrules); @@ -1605,7 +1584,7 @@ again: rulecnt++; LIST_FOREACH(link, &newlc->lc_racct->r_rule_links, rrl_next) rulecnt++; - LIST_FOREACH(link, &newpr->pr_racct->r_rule_links, rrl_next) + LIST_FOREACH(link, &newprr->prr_racct->r_rule_links, rrl_next) rulecnt++; rw_runlock(&rctl_lock); @@ -1655,7 +1634,7 @@ again: rulecnt--; } - LIST_FOREACH(link, &newpr->pr_racct->r_rule_links, rrl_next) { + LIST_FOREACH(link, &newprr->prr_racct->r_rule_links, rrl_next) { if (newlink == NULL) goto goaround; rctl_rule_acquire(link->rrl_rule); Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Tue May 3 07:24:47 2011 (r221361) +++ head/sys/sys/jail.h Tue May 3 07:32:58 2011 (r221362) @@ -136,6 +136,7 @@ MALLOC_DECLARE(M_PRISON); #define HOSTUUIDLEN 64 struct racct; +struct prison_racct; /* * This structure describes a prison. It is pointed to by all struct @@ -168,7 +169,7 @@ struct prison { int pr_ip6s; /* (p) number of v6 IPs */ struct in_addr *pr_ip4; /* (p) v4 IPs of jail */ struct in6_addr *pr_ip6; /* (p) v6 IPs of jail */ - struct racct *pr_racct; /* (c) resource accounting */ + struct prison_racct *pr_prison_racct; /* (c) racct jail proxy */ void *pr_sparep[3]; int pr_childcount; /* (a) number of child jails */ int pr_childmax; /* (p) maximum child jails */ @@ -183,6 +184,13 @@ struct prison { char pr_domainname[MAXHOSTNAMELEN]; /* (p) jail domainname */ char pr_hostuuid[HOSTUUIDLEN]; /* (p) jail hostuuid */ }; + +struct prison_racct { + LIST_ENTRY(prison_racct) prr_next; + char prr_name[MAXHOSTNAMELEN]; + u_int prr_refcount; + struct racct *prr_racct; +}; #endif /* _KERNEL || _WANT_PRISON */ #ifdef _KERNEL @@ -385,6 +393,9 @@ int prison_priv_check(struct ucred *cred int sysctl_jail_param(SYSCTL_HANDLER_ARGS); void prison_racct_foreach(void (*callback)(struct racct *racct, void *arg2, void *arg3), void *arg2, void *arg3); +struct prison_racct *prison_racct_find(const char *name); +void prison_racct_hold(struct prison_racct *prr); +void prison_racct_free(struct prison_racct *prr); #endif /* _KERNEL */ #endif /* !_SYS_JAIL_H_ */ Modified: head/sys/sys/rctl.h ============================================================================== --- head/sys/sys/rctl.h Tue May 3 07:24:47 2011 (r221361) +++ head/sys/sys/rctl.h Tue May 3 07:32:58 2011 (r221362) @@ -44,7 +44,7 @@ struct proc; struct uidinfo; struct loginclass; -struct prison; +struct prison_racct; struct ucred; struct rctl_rule_link; @@ -70,7 +70,7 @@ struct rctl_rule { struct proc *rs_proc; struct uidinfo *rs_uip; struct loginclass *rs_loginclass; - struct prison *rs_prison; + struct prison_racct *rs_prison_racct; } rr_subject; int rr_per; int rr_resource; Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Tue May 3 07:24:47 2011 (r221361) +++ head/usr.bin/rctl/rctl.8 Tue May 3 07:32:58 2011 (r221362) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2011 +.Dd May 3, 2011 .Dt RCTL 8 .Os .Sh NAME @@ -90,7 +90,7 @@ Subject defines the kind of entity the r It can be either process, user, login class, or jail. .Pp Subject ID identifies the subject. It can be user name, -numerical user ID, login class name, jail name, or numerical jail ID. +numerical user ID, login class name, or jail name. .Pp Resource identifies the resource the rule controls. .Pp @@ -177,9 +177,9 @@ Prevent user "joe" from allocating more .Pp Remove all RCTL rules. .Pp -.Dl rctl -hu jail:5 +.Dl rctl -hu jail:www .Pp -Display resource usage information for jail with JID 5. +Display resource usage information for jail named "www". .Pp .Dl rctl -l process:512 .Pp From owner-svn-src-all@FreeBSD.ORG Tue May 3 07:33:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DB5B106566C; Tue, 3 May 2011 07:33:39 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB668FC15; Tue, 3 May 2011 07:33:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p437XdTX075014; Tue, 3 May 2011 07:33:39 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p437XduH075011; Tue, 3 May 2011 07:33:39 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105030733.p437XduH075011@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 3 May 2011 07:33:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221363 - head/sbin/geom/class/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 07:33:39 -0000 Author: ae Date: Tue May 3 07:33:39 2011 New Revision: 221363 URL: http://svn.freebsd.org/changeset/base/221363 Log: Add "-a alignment" option to gpart(8). When it specified gpart(8) tries to align partition start offset and size to be multiple of alignment value. MFC after: 2 weeks Modified: head/sbin/geom/class/part/geom_part.c head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Tue May 3 07:32:58 2011 (r221362) +++ head/sbin/geom/class/part/geom_part.c Tue May 3 07:33:39 2011 (r221363) @@ -93,6 +93,7 @@ static void gpart_restore(struct gctl_re struct g_command PUBSYM(class_commands)[] = { { "add", 0, gpart_issue, { + { 'a', "alignment", GPART_AUTOFILL, G_TYPE_STRING }, { 'b', "start", GPART_AUTOFILL, G_TYPE_STRING }, { 's', "size", GPART_AUTOFILL, G_TYPE_STRING }, { 't', "type", NULL, G_TYPE_STRING }, @@ -100,7 +101,8 @@ struct g_command PUBSYM(class_commands)[ { 'l', "label", G_VAL_OPTIONAL, G_TYPE_STRING }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "[-b start] [-s size] -t type [-i index] [-l label] [-f flags] geom" + "[-a alignment] [-b start] [-s size] -t type [-i index] " + "[-l label] [-f flags] geom" }, { "backup", 0, gpart_backup, G_NULL_OPTS, "geom" @@ -168,11 +170,12 @@ struct g_command PUBSYM(class_commands)[ "-a attrib -i index [-f flags] geom" }, { "resize", 0, gpart_issue, { + { 'a', "alignment", GPART_AUTOFILL, G_TYPE_STRING }, { 's', "size", GPART_AUTOFILL, G_TYPE_STRING }, { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "[-s size] -i index [-f flags] geom" + "[-a alignment] [-s size] -i index [-f flags] geom" }, { "restore", 0, gpart_restore, { { 'F', "force", NULL, G_TYPE_BOOL }, @@ -298,6 +301,9 @@ fmtattrib(struct gprovider *pp) return (buf); } +#define ALIGNDOWN(d, a) (-(a) & (d)) +#define ALIGNUP(d, a) (-(-(a) & -(d))) + static int gpart_autofill_resize(struct gctl_req *req) { @@ -306,7 +312,7 @@ gpart_autofill_resize(struct gctl_req *r struct ggeom *gp; struct gprovider *pp; off_t last, size, start, new_size; - off_t lba, new_lba; + off_t lba, new_lba, alignment; const char *s; int error, idx; @@ -333,6 +339,19 @@ gpart_autofill_resize(struct gctl_req *r if (pp == NULL) errx(EXIT_FAILURE, "Provider for geom %s not found.", s); + s = gctl_get_ascii(req, "alignment"); + alignment = 1; + if (*s != '*') { + error = g_parse_lba(s, pp->lg_sectorsize, &alignment); + if (error) + errc(EXIT_FAILURE, error, "Invalid alignment param"); + if (alignment == 0) + errx(EXIT_FAILURE, "Invalid alignment param"); + } + error = gctl_delete_param(req, "alignment"); + if (error) + errc(EXIT_FAILURE, error, "internal error"); + s = gctl_get_ascii(req, "size"); if (*s == '*') new_size = 0; @@ -341,10 +360,14 @@ gpart_autofill_resize(struct gctl_req *r if (error) errc(EXIT_FAILURE, error, "Invalid size param"); /* no autofill necessary. */ - goto done; + if (alignment == 1) + goto done; + if (new_size > alignment) + new_size = ALIGNDOWN(new_size, alignment); } last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0); + last = ALIGNDOWN(last, alignment); LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { s = find_provcfg(pp, "index"); if (s == NULL) @@ -376,7 +399,7 @@ gpart_autofill_resize(struct gctl_req *r size = lba - start; pp = find_provider(gp, lba); if (pp == NULL) - new_size = last - start + 1; + new_size = ALIGNDOWN(last - start + 1, alignment); else { s = find_provcfg(pp, "start"); if (s == NULL) { @@ -389,6 +412,7 @@ gpart_autofill_resize(struct gctl_req *r * Is there any free space between current and * next providers? */ + new_lba = ALIGNUP(new_lba, alignment); if (new_lba > lba) new_size = new_lba - start; else { @@ -410,12 +434,12 @@ gpart_autofill(struct gctl_req *req) struct gclass *cp; struct ggeom *gp; struct gprovider *pp; - off_t first, last; - off_t size, start; - off_t lba, len; + off_t first, last, a_first; + off_t size, start, a_lba; + off_t lba, len, alignment; uintmax_t grade; const char *s; - int error, has_size, has_start; + int error, has_size, has_start, has_alignment; s = gctl_get_ascii(req, "verb"); if (strcmp(s, "resize") == 0) @@ -442,6 +466,20 @@ gpart_autofill(struct gctl_req *req) if (pp == NULL) errx(EXIT_FAILURE, "Provider for geom %s not found.", s); + s = gctl_get_ascii(req, "alignment"); + has_alignment = (*s == '*') ? 0 : 1; + alignment = 1; + if (has_alignment) { + error = g_parse_lba(s, pp->lg_sectorsize, &alignment); + if (error) + errc(EXIT_FAILURE, error, "Invalid alignment param"); + if (alignment == 0) + errx(EXIT_FAILURE, "Invalid alignment param"); + } + error = gctl_delete_param(req, "alignment"); + if (error) + errc(EXIT_FAILURE, error, "internal error"); + s = gctl_get_ascii(req, "size"); has_size = (*s == '*') ? 0 : 1; size = 0; @@ -449,6 +487,8 @@ gpart_autofill(struct gctl_req *req) error = g_parse_lba(s, pp->lg_sectorsize, &size); if (error) errc(EXIT_FAILURE, error, "Invalid size param"); + if (size > alignment) + size = ALIGNDOWN(size, alignment); } s = gctl_get_ascii(req, "start"); @@ -458,15 +498,18 @@ gpart_autofill(struct gctl_req *req) error = g_parse_lba(s, pp->lg_sectorsize, &start); if (error) errc(EXIT_FAILURE, error, "Invalid start param"); + start = ALIGNUP(start, alignment); } /* No autofill necessary. */ - if (has_size && has_start) + if (has_size && has_start && !has_alignment) goto done; first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0); last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0); grade = ~0ULL; + a_first = ALIGNUP(first, alignment); + last = ALIGNDOWN(last, alignment); while ((pp = find_provider(gp, first)) != NULL) { s = find_provcfg(pp, "start"); if (s == NULL) { @@ -475,23 +518,24 @@ gpart_autofill(struct gctl_req *req) } else lba = (off_t)strtoimax(s, NULL, 0); - if (first < lba) { + a_lba = ALIGNDOWN(lba, alignment); + if (first < a_lba && a_first < a_lba) { /* Free space [first, lba> */ - len = lba - first; + len = a_lba - a_first; if (has_size) { if (len >= size && (uintmax_t)(len - size) < grade) { - start = first; + start = a_first; grade = len - size; } } else if (has_start) { - if (start >= first && start < lba) { - size = lba - start; - grade = start - first; + if (start >= a_first && start < a_lba) { + size = a_lba - start; + grade = start - a_first; } } else { if (grade == ~0ULL || len > size) { - start = first; + start = a_first; size = len; grade = 0; } @@ -505,24 +549,25 @@ gpart_autofill(struct gctl_req *req) (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else first = (off_t)strtoimax(s, NULL, 0) + 1; + a_first = ALIGNUP(first, alignment); } - if (first <= last) { + if (a_first <= last) { /* Free space [first-last] */ - len = last - first + 1; + len = ALIGNDOWN(last - a_first + 1, alignment); if (has_size) { if (len >= size && (uintmax_t)(len - size) < grade) { - start = first; + start = a_first; grade = len - size; } } else if (has_start) { - if (start >= first && start <= last) { - size = last - start + 1; - grade = start - first; + if (start >= a_first && start <= last) { + size = ALIGNDOWN(last - start + 1, alignment); + grade = start - a_first; } } else { if (grade == ~0ULL || len > size) { - start = first; + start = a_first; size = len; grade = 0; } Modified: head/sbin/geom/class/part/gpart.8 ============================================================================== --- head/sbin/geom/class/part/gpart.8 Tue May 3 07:32:58 2011 (r221362) +++ head/sbin/geom/class/part/gpart.8 Tue May 3 07:33:39 2011 (r221363) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 12, 2011 +.Dd May 03, 2011 .Dt GPART 8 .Os .Sh NAME @@ -91,6 +91,7 @@ utility: .Nm .Cm add .Fl t Ar type +.Op Fl a Ar alignment .Op Fl b Ar start .Op Fl s Ar size .Op Fl i Ar index @@ -148,6 +149,7 @@ utility: .Nm .Cm resize .Fl i Ar index +.Op Fl a Ar alignment .Op Fl s Ar size .Op Fl f Ar flags .Ar geom @@ -209,7 +211,17 @@ Partition types are discussed below in t .Sx "PARTITION TYPES" . .Pp Additional options include: -.Bl -tag -width 10n +.Bl -tag -width 12n +.It Fl a Ar alignment +If specified, then +.Nm +utility tries to align +.Ar start +offset and partition +.Ar size +to be multiple of +.Ar alignment +value. .It Fl i Ar index The index in the partition table at which the new partition is to be placed. @@ -416,7 +428,15 @@ to maximum available from given geom .Ar geom . .Pp Additional options include: -.Bl -tag -width 10n +.Bl -tag -width 12n +.It Fl a Ar alignment +If specified, then +.Nm +utility tries to align partition +.Ar size +to be multiple of +.Ar alignment +value. .It Fl f Ar flags Additional operational flags. See the section entitled @@ -834,6 +854,13 @@ partition that would contain UFS where t /sbin/gpart add -s 512M -t freebsd-ufs da0 .Ed .Pp +Create a 15GB-sized +.Cm freebsd-ufs +partition that would contain UFS and aligned on 4KB boundaries: +.Bd -literal -offset indent +/sbin/gpart add -s 15G -t freebsd-ufs -a 4k da0 +.Ed +.Pp After having created all required partitions, embed bootstrap code into them. .Bd -literal -offset indent /sbin/gpart bootcode -p /boot/boot1 da0 From owner-svn-src-all@FreeBSD.ORG Tue May 3 07:39:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F502106564A; Tue, 3 May 2011 07:39:55 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F26458FC17; Tue, 3 May 2011 07:39:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p437dscp075223; Tue, 3 May 2011 07:39:54 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p437dsud075220; Tue, 3 May 2011 07:39:54 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201105030739.p437dsud075220@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 3 May 2011 07:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221364 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 07:39:55 -0000 Author: rodrigc Date: Tue May 3 07:39:54 2011 New Revision: 221364 URL: http://svn.freebsd.org/changeset/base/221364 Log: Add #include for missing forward declation of struct inpcb. Modified: head/lib/libstand/net.c head/lib/libstand/udp.c Modified: head/lib/libstand/net.c ============================================================================== --- head/lib/libstand/net.c Tue May 3 07:33:39 2011 (r221363) +++ head/lib/libstand/net.c Tue May 3 07:39:54 2011 (r221364) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/lib/libstand/udp.c ============================================================================== --- head/lib/libstand/udp.c Tue May 3 07:33:39 2011 (r221363) +++ head/lib/libstand/udp.c Tue May 3 07:39:54 2011 (r221364) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue May 3 07:43:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FFAE106566B; Tue, 3 May 2011 07:43:47 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EAF78FC1C; Tue, 3 May 2011 07:43:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p437hlSu075370; Tue, 3 May 2011 07:43:47 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p437hl8M075368; Tue, 3 May 2011 07:43:47 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201105030743.p437hl8M075368@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 3 May 2011 07:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221365 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 07:43:47 -0000 Author: rodrigc Date: Tue May 3 07:43:47 2011 New Revision: 221365 URL: http://svn.freebsd.org/changeset/base/221365 Log: - Comment out unused variable. - Add parentheses around expression to eliminate compiler warning. Modified: head/lib/libstand/dosfs.c Modified: head/lib/libstand/dosfs.c ============================================================================== --- head/lib/libstand/dosfs.c Tue May 3 07:39:54 2011 (r221364) +++ head/lib/libstand/dosfs.c Tue May 3 07:43:47 2011 (r221365) @@ -358,7 +358,7 @@ dos_stat(struct open_file *fd, struct st static int dos_readdir(struct open_file *fd, struct dirent *d) { - DOS_FILE *f = (DOS_FILE *)fd->f_fsdata; + /* DOS_FILE *f = (DOS_FILE *)fd->f_fsdata; */ u_char fn[261]; DOS_DIR dd; size_t res; @@ -414,7 +414,7 @@ dos_readdir(struct open_file *fd, struct } } - d->d_fileno = dd.de.clus[1] << 8 + dd.de.clus[0]; + d->d_fileno = (dd.de.clus[1] << 8) + dd.de.clus[0]; d->d_reclen = sizeof(*d); d->d_type = (dd.de.attr & FA_DIR) ? DT_DIR : DT_REG; memcpy(d->d_name, fn, sizeof(d->d_name)); From owner-svn-src-all@FreeBSD.ORG Tue May 3 07:46:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D267106566C; Tue, 3 May 2011 07:46:02 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BB8D8FC14; Tue, 3 May 2011 07:46:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p437k2tj075485; Tue, 3 May 2011 07:46:02 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p437k2ve075483; Tue, 3 May 2011 07:46:02 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201105030746.p437k2ve075483@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 3 May 2011 07:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221366 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 07:46:02 -0000 Author: rodrigc Date: Tue May 3 07:46:02 2011 New Revision: 221366 URL: http://svn.freebsd.org/changeset/base/221366 Log: Rename DEBUG macro to TFTP_DEBUG, to be more consistent with debug macros in other files. Modified: head/lib/libstand/tftp.c Modified: head/lib/libstand/tftp.c ============================================================================== --- head/lib/libstand/tftp.c Tue May 3 07:43:47 2011 (r221365) +++ head/lib/libstand/tftp.c Tue May 3 07:46:02 2011 (r221366) @@ -148,14 +148,14 @@ recvtftp(struct iodesc *d, void *pkt, ss printf("illegal tftp error %d\n", ntohs(t->th_code)); errno = EIO; } else { -#ifdef DEBUG +#ifdef TFTP_DEBUG printf("tftp-error %d\n", ntohs(t->th_code)); #endif errno = tftperrors[ntohs(t->th_code)]; } return (-1); default: -#ifdef DEBUG +#ifdef TFTP_DEBUG printf("tftp type %d not handled\n", ntohs(t->th_opcode)); #endif return (-1); @@ -303,7 +303,7 @@ tftp_read(struct open_file *f, void *add res = tftp_getnextblock(tftpfile); if (res) { /* no answer */ -#ifdef DEBUG +#ifdef TFTP_DEBUG printf("tftp: read error\n"); #endif return (res); @@ -319,7 +319,7 @@ tftp_read(struct open_file *f, void *add inbuffer = tftpfile->validsize - offinblock; if (inbuffer < 0) { -#ifdef DEBUG +#ifdef TFTP_DEBUG printf("tftp: invalid offset %d\n", tftpfile->off); #endif @@ -336,7 +336,7 @@ tftp_read(struct open_file *f, void *add if ((tftpfile->islastblock) && (count == inbuffer)) break; /* EOF */ } else { -#ifdef DEBUG +#ifdef TFTP_DEBUG printf("tftp: block %d not found\n", needblock); #endif return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Tue May 3 07:58:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5166E106564A; Tue, 3 May 2011 07:58:13 +0000 (UTC) (envelope-from vadim@nuclight.avtf.net) Received: from nuclight.avtf.net (nuclight.avtf.net [82.117.70.99]) by mx1.freebsd.org (Postfix) with ESMTP id 09BA98FC13; Tue, 3 May 2011 07:58:10 +0000 (UTC) Received: from kernblitz.nuclight.avtf.net (vadim@localhost [127.0.0.1]) by nuclight.avtf.net (8.14.4/8.14.4) with ESMTP id p437fCX0030882; Tue, 3 May 2011 14:41:12 +0700 (NOVST) (envelope-from vadim@kernblitz.nuclight.avtf.net) Received: (from vadim@localhost) by kernblitz.nuclight.avtf.net (8.14.4/8.14.4/Submit) id p437fBOa030879; Tue, 3 May 2011 14:41:11 +0700 (NOVST) (envelope-from vadim) Message-Id: <201105030741.p437fBOa030879@kernblitz.nuclight.avtf.net> To: svn-src-all@freebsd.org From: Vadim Goncharov In-Reply-To: =?UTF-8?Q?=3C201104221710=2Ep3MHApbu051050=5F=5F38279=2E417?= =?UTF-8?Q?6498011=241303492287=24gmane=24org=40svn=2Efreebsd=2Eorg=3E?= References: <201104221710.p3MHApbu051050__38279.4176498011$1303492287$gmane$org@svn.freebsd.org> X-Comment-To: David E. O'Brien Date: Tue, 3 May 2011 14:41:10 +0700 User-Agent: slrn/0.9.9p1 (FreeBSD) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: "David E. O'Brien" Subject: Re: svn commit: r220954 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 07:58:13 -0000 Hi David E. O'Brien! On Fri, 22 Apr 2011 17:10:51 +0000 (UTC); David E. O'Brien wrote: > Author: obrien > Date: Fri Apr 22 17:10:51 2011 > New Revision: 220954 > URL: http://svn.freebsd.org/changeset/base/220954 > Log: > Note which of the built kernels is being installed. > > PR: 156579 > Submitted by: dhw > Modified: > head/Makefile.inc1 > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Fri Apr 22 14:42:42 2011 (r220953) > +++ head/Makefile.inc1 Fri Apr 22 17:10:51 2011 (r220954) > @@ -868,7 +868,7 @@ reinstallkernel reinstallkernel.debug: i > false > .endif > @echo "--------------------------------------------------------------" > - @echo ">>> Installing kernel" > + @echo ">>> Installing kernel ${KERNCONF}" > @echo "--------------------------------------------------------------" > cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ > ${CROSSENV} PATH=${TMPPATH} \ > _______________________________________________ > 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-unsubscribe@freebsd.org" I have lines like the following in /etc/make.conf on some hosts: # build specified kernels by default and install first of them KERNCONF?=ROUTER GENERIC and do just cd /usr/src && make buildkernel Will this patch print the correct first kernel, or this will be entire list? -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-svn-src-all@FreeBSD.ORG Tue May 3 08:27:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD4E2106566B; Tue, 3 May 2011 08:27:16 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9D9C8FC12; Tue, 3 May 2011 08:27:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p438RGtp076778; Tue, 3 May 2011 08:27:16 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p438RGCi076776; Tue, 3 May 2011 08:27:16 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201105030827.p438RGCi076776@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 3 May 2011 08:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221367 - stable/7/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 08:27:16 -0000 Author: pluknet Date: Tue May 3 08:27:16 2011 New Revision: 221367 URL: http://svn.freebsd.org/changeset/base/221367 Log: MFC r221119: Fix typo in "continuously" argument used in patrol auto command. Unlike in head, this version preserves a misspelled argument. Modified: stable/7/usr.sbin/mfiutil/mfi_patrol.c Directory Properties: stable/7/usr.sbin/mfiutil/ (props changed) Modified: stable/7/usr.sbin/mfiutil/mfi_patrol.c ============================================================================== --- stable/7/usr.sbin/mfiutil/mfi_patrol.c Tue May 3 07:46:02 2011 (r221366) +++ stable/7/usr.sbin/mfiutil/mfi_patrol.c Tue May 3 08:27:16 2011 (r221367) @@ -252,7 +252,8 @@ patrol_config(int ac, char **av) if (strcasecmp(av[1], "auto") == 0) { op_mode = MFI_PR_OPMODE_AUTO; if (ac > 2) { - if (strcasecmp(av[2], "continously") == 0) + if (strcasecmp(av[2], "continously") == 0 || + strcasecmp(av[2], "continuously") == 0) exec_freq = 0xffffffff; else { val = strtol(av[2], &cp, 0); From owner-svn-src-all@FreeBSD.ORG Tue May 3 08:39:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1376106566B; Tue, 3 May 2011 08:39:57 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC9BB8FC27; Tue, 3 May 2011 08:39:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p438dvYI077183; Tue, 3 May 2011 08:39:57 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p438dvu9077182; Tue, 3 May 2011 08:39:57 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201105030839.p438dvu9077182@svn.freebsd.org> From: Martin Matuska Date: Tue, 3 May 2011 08:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221368 - stable/8/contrib/gcc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 08:39:57 -0000 Author: mm Date: Tue May 3 08:39:57 2011 New Revision: 221368 URL: http://svn.freebsd.org/changeset/base/221368 Log: MFC r221282: Add ChangeLog.gcc43 for backported changes from gcc 4.3 Added: stable/8/contrib/gcc/ChangeLog.gcc43 - copied unchanged from r221282, head/contrib/gcc/ChangeLog.gcc43 Modified: Directory Properties: stable/8/contrib/gcc/ (props changed) Copied: stable/8/contrib/gcc/ChangeLog.gcc43 (from r221282, head/contrib/gcc/ChangeLog.gcc43) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/contrib/gcc/ChangeLog.gcc43 Tue May 3 08:39:57 2011 (r221368, copy of r221282, head/contrib/gcc/ChangeLog.gcc43) @@ -0,0 +1,163 @@ +2007-05-01 Dwarakanath Rajagopal (r124339) + + * config/i386/i386.c (override_options): Accept k8-sse3, opteron-sse3 + and athlon64-sse3 as improved versions of k8, opteron and athlon64 + with SSE3 instruction set support. + * doc/invoke.texi: Likewise. + +2007-04-07 H.J. Lu (r123639) + + * config/i386/i386.c (ix86_handle_option): Handle SSSE3. + +2007-02-08 Harsha Jagasia (r121726) + + * config/i386/xmmintrin.h: Make inclusion of emmintrin.h + conditional to __SSE2__. + (Entries below should have been added to first ChangeLog + entry for amdfam10 dated 2007-02-05) + * config/i386/emmintrin.h: Generate #error if __SSE2__ is not + defined. + * config/i386/pmmintrin.h: Generate #error if __SSE3__ is not + defined. + * config/i386/tmmintrin.h: Generate #error if __SSSE3__ is not + defined. + +2007-02-07 Jakub Jelinek (r121687) + + * config/i386/i386.c (override_options): Set PTA_SSSE3 for core2. + +2007-01-17 Eric Christopher (r120846) + + * config.gcc: Support core2 processor. + +2006-12-02 H.J. Lu (r119454 - partial) + + PR target/30040 + * config/i386/driver-i386.c (bit_SSSE3): New. + +2006-11-18 Vladimir Makarov (r118973) + + * doc/invoke.texi (core2): Add item. + + * config/i386/i386.h (TARGET_CORE2, TARGET_CPU_DEFAULT_core2): New + macros. + (TARGET_CPU_CPP_BUILTINS): Add code for core2. + (TARGET_CPU_DEFAULT_generic): Change value. + (TARGET_CPU_DEFAULT_NAMES): Add core2. + (processor_type): Add new constant PROCESSOR_CORE2. + + * config/i386/i386.md (cpu): Add core2. + + * config/i386/i386.c (core2_cost): New initialized variable. + (m_CORE2): New macro. + (x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen, + x86_deep_branch, x86_partial_reg_stall, x86_use_simode_fiop, + x86_use_cltd, x86_promote_QImode, x86_sub_esp_4, x86_sub_esp_8, + x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves, + x86_partial_reg_dependency, x86_memory_mismatch_stall, + x86_accumulate_outgoing_args, x86_prologue_using_move, + x86_epilogue_using_move, x86_arch_always_fancy_math_387, + x86_sse_partial_reg_dependency, x86_rep_movl_optimal, + x86_use_incdec, x86_four_jump_limit, x86_schedule, + x86_pad_returns): Add m_CORE2. + (override_options): Add entries for Core2. + (ix86_issue_rate): Add case for Core2. + +2006-10-27 Vladimir Makarov (r118090) + + * config/i386/i386.h (TARGET_GEODE): + (TARGET_CPU_CPP_BUILTINS): Add code for geode. + (TARGET_CPU_DEFAULT_geode): New macro. + (TARGET_CPU_DEFAULT_k6, TARGET_CPU_DEFAULT_k6_2, + TARGET_CPU_DEFAULT_k6_3, TARGET_CPU_DEFAULT_athlon, + TARGET_CPU_DEFAULT_athlon_sse, TARGET_CPU_DEFAULT_k8, + TARGET_CPU_DEFAULT_pentium_m, TARGET_CPU_DEFAULT_prescott, + TARGET_CPU_DEFAULT_nocona, TARGET_CPU_DEFAULT_generic): Increase + the macro values. + (TARGET_CPU_DEFAULT_NAMES): Add geode. + (processor_type): Add PROCESSOR_GEODE. + + * config/i386/i386.md: Include geode.md. + (cpu): Add geode. + + * config/i386/i386.c (geode_cost): New initialized global + variable. + (m_GEODE, m_K6_GEODE): New macros. + (x86_use_leave, x86_push_memory, x86_deep_branch, x86_use_sahf, + x86_use_himode_fiop, x86_promote_QImode, x86_add_esp_4, + x86_add_esp_8, x86_rep_movl_optimal, x86_ext_80387_constants, + x86_schedule): Use m_K6_GEODE instead of m_K6. + (x86_movx, x86_cmove): Set up m_GEODE. + (x86_integer_DFmode_moves): Clear m_GEODE. + (processor_target_table): Add entry for geode. + (processor_alias_table): Ditto. + + * config/i386/geode.md: New file. + + * doc/invoke.texi: Add entry about geode processor. + +2006-10-22 H.J. Lu (r117958) + + * config.gcc (i[34567]86-*-*): Add tmmintrin.h to extra_headers. + (x86_64-*-*): Likewise. + + * config/i386/i386.c (pta_flags): Add PTA_SSSE3. + (override_options): Check SSSE3. + (ix86_builtins): Add IX86_BUILTIN_PHADDW, IX86_BUILTIN_PHADDD, + IX86_BUILTIN_PHADDSW, IX86_BUILTIN_PHSUBW, IX86_BUILTIN_PHSUBD, + IX86_BUILTIN_PHSUBSW, IX86_BUILTIN_PMADDUBSW, + IX86_BUILTIN_PMULHRSW, IX86_BUILTIN_PSHUFB, + IX86_BUILTIN_PSIGNB, IX86_BUILTIN_PSIGNW, IX86_BUILTIN_PSIGND, + IX86_BUILTIN_PALIGNR, IX86_BUILTIN_PABSB, IX86_BUILTIN_PABSW, + IX86_BUILTIN_PABSD, IX86_BUILTIN_PHADDW128, + IX86_BUILTIN_PHADDD128, IX86_BUILTIN_PHADDSW128, + IX86_BUILTIN_PHSUBW128, IX86_BUILTIN_PHSUBD128, + IX86_BUILTIN_PHSUBSW128, IX86_BUILTIN_PMADDUBSW128, + IX86_BUILTIN_PMULHRSW128, IX86_BUILTIN_PSHUFB128, + IX86_BUILTIN_PSIGNB128, IX86_BUILTIN_PSIGNW128, + IX86_BUILTIN_PSIGND128, IX86_BUILTIN_PALIGNR128, + IX86_BUILTIN_PABSB128, IX86_BUILTIN_PABSW128 and + IX86_BUILTIN_PABSD128. + (bdesc_2arg): Add SSSE3. + (bdesc_1arg): Likewise. + (ix86_init_mmx_sse_builtins): Support SSSE3. + (ix86_expand_builtin): Likewise. + * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Likewise. + + * config/i386/i386.md (UNSPEC_PSHUFB): New. + (UNSPEC_PSIGN): Likewise. + (UNSPEC_PALIGNR): Likewise. + Include mmx.md before sse.md. + + * config/i386/i386.opt: Add -mssse3. + + * config/i386/sse.md (ssse3_phaddwv8hi3): New pattern for SSSE3. + (ssse3_phaddwv4hi3): Likewise. + (ssse3_phadddv4si3): Likewise. + (ssse3_phadddv2si3): Likewise. + (ssse3_phaddswv8hi3): Likewise. + (ssse3_phaddswv4hi3): Likewise. + (ssse3_phsubwv8hi3): Likewise. + (ssse3_phsubwv4hi3): Likewise. + (ssse3_phsubdv4si3): Likewise. + (ssse3_phsubdv2si3): Likewise. + (ssse3_phsubswv8hi3): Likewise. + (ssse3_phsubswv4hi3): Likewise. + (ssse3_pmaddubswv8hi3): Likewise. + (ssse3_pmaddubswv4hi3): Likewise. + (ssse3_pmulhrswv8hi3): Likewise. + (ssse3_pmulhrswv4hi3): Likewise. + (ssse3_pshufbv16qi3): Likewise. + (ssse3_pshufbv8qi3): Likewise. + (ssse3_psign3): Likewise. + (ssse3_psign3): Likewise. + (ssse3_palignrti): Likewise. + (ssse3_palignrdi): Likewise. + (abs2): Likewise. + (abs2): Likewise. + + * config/i386/tmmintrin.h: New file. + + * doc/extend.texi: Document SSSE3 built-in functions. + + * doc/invoke.texi: Document -mssse3/-mno-ssse3 switches. From owner-svn-src-all@FreeBSD.ORG Tue May 3 08:40:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 751C11065679; Tue, 3 May 2011 08:40:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60A3A8FC0A; Tue, 3 May 2011 08:40:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p438etM0077251; Tue, 3 May 2011 08:40:55 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p438etsa077250; Tue, 3 May 2011 08:40:55 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201105030840.p438etsa077250@svn.freebsd.org> From: Martin Matuska Date: Tue, 3 May 2011 08:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221369 - stable/7/contrib/gcc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 08:40:55 -0000 Author: mm Date: Tue May 3 08:40:55 2011 New Revision: 221369 URL: http://svn.freebsd.org/changeset/base/221369 Log: MFC r221282: Add ChangeLog.gcc43 for backported changes from gcc 4.3 Added: stable/7/contrib/gcc/ChangeLog.gcc43 - copied unchanged from r221282, head/contrib/gcc/ChangeLog.gcc43 Modified: Directory Properties: stable/7/contrib/gcc/ (props changed) Copied: stable/7/contrib/gcc/ChangeLog.gcc43 (from r221282, head/contrib/gcc/ChangeLog.gcc43) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/contrib/gcc/ChangeLog.gcc43 Tue May 3 08:40:55 2011 (r221369, copy of r221282, head/contrib/gcc/ChangeLog.gcc43) @@ -0,0 +1,163 @@ +2007-05-01 Dwarakanath Rajagopal (r124339) + + * config/i386/i386.c (override_options): Accept k8-sse3, opteron-sse3 + and athlon64-sse3 as improved versions of k8, opteron and athlon64 + with SSE3 instruction set support. + * doc/invoke.texi: Likewise. + +2007-04-07 H.J. Lu (r123639) + + * config/i386/i386.c (ix86_handle_option): Handle SSSE3. + +2007-02-08 Harsha Jagasia (r121726) + + * config/i386/xmmintrin.h: Make inclusion of emmintrin.h + conditional to __SSE2__. + (Entries below should have been added to first ChangeLog + entry for amdfam10 dated 2007-02-05) + * config/i386/emmintrin.h: Generate #error if __SSE2__ is not + defined. + * config/i386/pmmintrin.h: Generate #error if __SSE3__ is not + defined. + * config/i386/tmmintrin.h: Generate #error if __SSSE3__ is not + defined. + +2007-02-07 Jakub Jelinek (r121687) + + * config/i386/i386.c (override_options): Set PTA_SSSE3 for core2. + +2007-01-17 Eric Christopher (r120846) + + * config.gcc: Support core2 processor. + +2006-12-02 H.J. Lu (r119454 - partial) + + PR target/30040 + * config/i386/driver-i386.c (bit_SSSE3): New. + +2006-11-18 Vladimir Makarov (r118973) + + * doc/invoke.texi (core2): Add item. + + * config/i386/i386.h (TARGET_CORE2, TARGET_CPU_DEFAULT_core2): New + macros. + (TARGET_CPU_CPP_BUILTINS): Add code for core2. + (TARGET_CPU_DEFAULT_generic): Change value. + (TARGET_CPU_DEFAULT_NAMES): Add core2. + (processor_type): Add new constant PROCESSOR_CORE2. + + * config/i386/i386.md (cpu): Add core2. + + * config/i386/i386.c (core2_cost): New initialized variable. + (m_CORE2): New macro. + (x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen, + x86_deep_branch, x86_partial_reg_stall, x86_use_simode_fiop, + x86_use_cltd, x86_promote_QImode, x86_sub_esp_4, x86_sub_esp_8, + x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves, + x86_partial_reg_dependency, x86_memory_mismatch_stall, + x86_accumulate_outgoing_args, x86_prologue_using_move, + x86_epilogue_using_move, x86_arch_always_fancy_math_387, + x86_sse_partial_reg_dependency, x86_rep_movl_optimal, + x86_use_incdec, x86_four_jump_limit, x86_schedule, + x86_pad_returns): Add m_CORE2. + (override_options): Add entries for Core2. + (ix86_issue_rate): Add case for Core2. + +2006-10-27 Vladimir Makarov (r118090) + + * config/i386/i386.h (TARGET_GEODE): + (TARGET_CPU_CPP_BUILTINS): Add code for geode. + (TARGET_CPU_DEFAULT_geode): New macro. + (TARGET_CPU_DEFAULT_k6, TARGET_CPU_DEFAULT_k6_2, + TARGET_CPU_DEFAULT_k6_3, TARGET_CPU_DEFAULT_athlon, + TARGET_CPU_DEFAULT_athlon_sse, TARGET_CPU_DEFAULT_k8, + TARGET_CPU_DEFAULT_pentium_m, TARGET_CPU_DEFAULT_prescott, + TARGET_CPU_DEFAULT_nocona, TARGET_CPU_DEFAULT_generic): Increase + the macro values. + (TARGET_CPU_DEFAULT_NAMES): Add geode. + (processor_type): Add PROCESSOR_GEODE. + + * config/i386/i386.md: Include geode.md. + (cpu): Add geode. + + * config/i386/i386.c (geode_cost): New initialized global + variable. + (m_GEODE, m_K6_GEODE): New macros. + (x86_use_leave, x86_push_memory, x86_deep_branch, x86_use_sahf, + x86_use_himode_fiop, x86_promote_QImode, x86_add_esp_4, + x86_add_esp_8, x86_rep_movl_optimal, x86_ext_80387_constants, + x86_schedule): Use m_K6_GEODE instead of m_K6. + (x86_movx, x86_cmove): Set up m_GEODE. + (x86_integer_DFmode_moves): Clear m_GEODE. + (processor_target_table): Add entry for geode. + (processor_alias_table): Ditto. + + * config/i386/geode.md: New file. + + * doc/invoke.texi: Add entry about geode processor. + +2006-10-22 H.J. Lu (r117958) + + * config.gcc (i[34567]86-*-*): Add tmmintrin.h to extra_headers. + (x86_64-*-*): Likewise. + + * config/i386/i386.c (pta_flags): Add PTA_SSSE3. + (override_options): Check SSSE3. + (ix86_builtins): Add IX86_BUILTIN_PHADDW, IX86_BUILTIN_PHADDD, + IX86_BUILTIN_PHADDSW, IX86_BUILTIN_PHSUBW, IX86_BUILTIN_PHSUBD, + IX86_BUILTIN_PHSUBSW, IX86_BUILTIN_PMADDUBSW, + IX86_BUILTIN_PMULHRSW, IX86_BUILTIN_PSHUFB, + IX86_BUILTIN_PSIGNB, IX86_BUILTIN_PSIGNW, IX86_BUILTIN_PSIGND, + IX86_BUILTIN_PALIGNR, IX86_BUILTIN_PABSB, IX86_BUILTIN_PABSW, + IX86_BUILTIN_PABSD, IX86_BUILTIN_PHADDW128, + IX86_BUILTIN_PHADDD128, IX86_BUILTIN_PHADDSW128, + IX86_BUILTIN_PHSUBW128, IX86_BUILTIN_PHSUBD128, + IX86_BUILTIN_PHSUBSW128, IX86_BUILTIN_PMADDUBSW128, + IX86_BUILTIN_PMULHRSW128, IX86_BUILTIN_PSHUFB128, + IX86_BUILTIN_PSIGNB128, IX86_BUILTIN_PSIGNW128, + IX86_BUILTIN_PSIGND128, IX86_BUILTIN_PALIGNR128, + IX86_BUILTIN_PABSB128, IX86_BUILTIN_PABSW128 and + IX86_BUILTIN_PABSD128. + (bdesc_2arg): Add SSSE3. + (bdesc_1arg): Likewise. + (ix86_init_mmx_sse_builtins): Support SSSE3. + (ix86_expand_builtin): Likewise. + * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Likewise. + + * config/i386/i386.md (UNSPEC_PSHUFB): New. + (UNSPEC_PSIGN): Likewise. + (UNSPEC_PALIGNR): Likewise. + Include mmx.md before sse.md. + + * config/i386/i386.opt: Add -mssse3. + + * config/i386/sse.md (ssse3_phaddwv8hi3): New pattern for SSSE3. + (ssse3_phaddwv4hi3): Likewise. + (ssse3_phadddv4si3): Likewise. + (ssse3_phadddv2si3): Likewise. + (ssse3_phaddswv8hi3): Likewise. + (ssse3_phaddswv4hi3): Likewise. + (ssse3_phsubwv8hi3): Likewise. + (ssse3_phsubwv4hi3): Likewise. + (ssse3_phsubdv4si3): Likewise. + (ssse3_phsubdv2si3): Likewise. + (ssse3_phsubswv8hi3): Likewise. + (ssse3_phsubswv4hi3): Likewise. + (ssse3_pmaddubswv8hi3): Likewise. + (ssse3_pmaddubswv4hi3): Likewise. + (ssse3_pmulhrswv8hi3): Likewise. + (ssse3_pmulhrswv4hi3): Likewise. + (ssse3_pshufbv16qi3): Likewise. + (ssse3_pshufbv8qi3): Likewise. + (ssse3_psign3): Likewise. + (ssse3_psign3): Likewise. + (ssse3_palignrti): Likewise. + (ssse3_palignrdi): Likewise. + (abs2): Likewise. + (abs2): Likewise. + + * config/i386/tmmintrin.h: New file. + + * doc/extend.texi: Document SSSE3 built-in functions. + + * doc/invoke.texi: Document -mssse3/-mno-ssse3 switches. From owner-svn-src-all@FreeBSD.ORG Tue May 3 09:59:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3025C106564A; Tue, 3 May 2011 09:59:34 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AE4F8FC08; Tue, 3 May 2011 09:59:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p439xYAh079574; Tue, 3 May 2011 09:59:34 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p439xYPI079572; Tue, 3 May 2011 09:59:34 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105030959.p439xYPI079572@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 09:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221370 - stable/8/usr.bin/xargs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 09:59:34 -0000 Author: ru Date: Tue May 3 09:59:33 2011 New Revision: 221370 URL: http://svn.freebsd.org/changeset/base/221370 Log: MFC r219958: Discourage from using "cp -r". Modified: stable/8/usr.bin/xargs/xargs.1 Directory Properties: stable/8/usr.bin/xargs/ (props changed) Modified: stable/8/usr.bin/xargs/xargs.1 ============================================================================== --- stable/8/usr.bin/xargs/xargs.1 Tue May 3 08:40:55 2011 (r221369) +++ stable/8/usr.bin/xargs/xargs.1 Tue May 3 09:59:33 2011 (r221370) @@ -37,7 +37,7 @@ .\" $FreeBSD$ .\" $xMach: xargs.1,v 1.2 2002/02/23 05:23:37 tim Exp $ .\" -.Dd January 26, 2008 +.Dd March 24, 2011 .Dt XARGS 1 .Os .Sh NAME @@ -167,7 +167,7 @@ directories which start with an uppercas directory to .Pa destdir : .Pp -.Dl /bin/ls -1d [A-Z]* | xargs -J % cp -rp % destdir +.Dl /bin/ls -1d [A-Z]* | xargs -J % cp -Rp % destdir .Pp .It Fl L Ar number Call From owner-svn-src-all@FreeBSD.ORG Tue May 3 10:01:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75D801065674; Tue, 3 May 2011 10:01:09 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60E508FC24; Tue, 3 May 2011 10:01:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43A19Va079714; Tue, 3 May 2011 10:01:09 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43A19do079711; Tue, 3 May 2011 10:01:09 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031001.p43A19do079711@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 10:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221371 - stable/8/sbin/umount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 10:01:09 -0000 Author: ru Date: Tue May 3 10:01:08 2011 New Revision: 221371 URL: http://svn.freebsd.org/changeset/base/221371 Log: MFC r219955: It's possible to unmount multiple items at once, make it clear. Modified: stable/8/sbin/umount/umount.8 stable/8/sbin/umount/umount.c Directory Properties: stable/8/sbin/umount/ (props changed) Modified: stable/8/sbin/umount/umount.8 ============================================================================== --- stable/8/sbin/umount/umount.8 Tue May 3 09:59:33 2011 (r221370) +++ stable/8/sbin/umount/umount.8 Tue May 3 10:01:08 2011 (r221371) @@ -37,7 +37,7 @@ .Sh SYNOPSIS .Nm .Op Fl fv -.Ar special | node | fsid +.Ar special ... | node ... | fsid ... .Nm .Fl a | A .Op Fl F Ar fstab Modified: stable/8/sbin/umount/umount.c ============================================================================== --- stable/8/sbin/umount/umount.c Tue May 3 09:59:33 2011 (r221370) +++ stable/8/sbin/umount/umount.c Tue May 3 10:01:08 2011 (r221371) @@ -599,7 +599,7 @@ usage() { (void)fprintf(stderr, "%s\n%s\n", - "usage: umount [-fv] special | node | fsid", + "usage: umount [-fv] special ... | node ... | fsid ...", " umount -a | -A [-F fstab] [-fv] [-h host] [-t type]"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Tue May 3 10:08:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41111106566C; Tue, 3 May 2011 10:08:12 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CAB88FC13; Tue, 3 May 2011 10:08:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43A8CGI079953; Tue, 3 May 2011 10:08:12 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43A8CPF079951; Tue, 3 May 2011 10:08:12 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031008.p43A8CPF079951@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 10:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221372 - head/bin/stty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 10:08:12 -0000 Author: ru Date: Tue May 3 10:08:11 2011 New Revision: 221372 URL: http://svn.freebsd.org/changeset/base/221372 Log: Don't call -f option's argument "stdin". MFC after: 3 days Modified: head/bin/stty/stty.c Modified: head/bin/stty/stty.c ============================================================================== --- head/bin/stty/stty.c Tue May 3 10:01:08 2011 (r221371) +++ head/bin/stty/stty.c Tue May 3 10:08:11 2011 (r221372) @@ -61,9 +61,11 @@ main(int argc, char *argv[]) struct info i; enum FMT fmt; int ch; + const char *file; fmt = NOTSET; i.fd = STDIN_FILENO; + file = "stdin"; opterr = 0; while (optind < argc && @@ -79,6 +81,7 @@ main(int argc, char *argv[]) case 'f': if ((i.fd = open(optarg, O_RDONLY | O_NONBLOCK)) < 0) err(1, "%s", optarg); + file = optarg; break; case 'g': fmt = GFLAG; @@ -92,7 +95,7 @@ args: argc -= optind; argv += optind; if (tcgetattr(i.fd, &i.t) < 0) - errx(1, "stdin isn't a terminal"); + errx(1, "%s isn't a terminal", file); if (ioctl(i.fd, TIOCGETD, &i.ldisc) < 0) err(1, "TIOCGETD"); if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0) From owner-svn-src-all@FreeBSD.ORG Tue May 3 10:11:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44B1B106566B; Tue, 3 May 2011 10:11:45 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3048B8FC19; Tue, 3 May 2011 10:11:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43ABjII080104; Tue, 3 May 2011 10:11:45 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43ABjcm080102; Tue, 3 May 2011 10:11:45 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031011.p43ABjcm080102@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 10:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221373 - head/contrib/bsnmp/snmp_mibII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 10:11:45 -0000 Author: ru Date: Tue May 3 10:11:44 2011 New Revision: 221373 URL: http://svn.freebsd.org/changeset/base/221373 Log: Properly detect interface's state in the LINK_STATE_UNKNOWN case. MFC after: 1 week Modified: head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Modified: head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c ============================================================================== --- head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Tue May 3 10:08:11 2011 (r221372) +++ head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Tue May 3 10:11:44 2011 (r221373) @@ -289,8 +289,7 @@ op_ifentry(struct snmp_context *ctx, str * cable) and hence return 'dormant'. */ if (ifp->mib.ifmd_flags & IFF_RUNNING) { - if (ifp->mib.ifmd_data.ifi_link_state == - LINK_STATE_DOWN) + if (ifp->mib.ifmd_data.ifi_link_state != LINK_STATE_UP) value->v.integer = 5; /* state dormant */ else value->v.integer = 1; /* state up */ From owner-svn-src-all@FreeBSD.ORG Tue May 3 10:18:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FEBE106567D; Tue, 3 May 2011 10:18:28 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BE138FC29; Tue, 3 May 2011 10:18:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43AISJH080337; Tue, 3 May 2011 10:18:28 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43AISvQ080335; Tue, 3 May 2011 10:18:28 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <201105031018.p43AISvQ080335@svn.freebsd.org> From: Doug Rabson Date: Tue, 3 May 2011 10:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221374 - head/usr.bin/login X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 10:18:28 -0000 Author: dfr Date: Tue May 3 10:18:27 2011 New Revision: 221374 URL: http://svn.freebsd.org/changeset/base/221374 Log: Call pam_setcred() before login_getpwclass to support home directories on GSS-API authenticated NFS where the kerberos credentials need to be saved so that the kernel can authenticate to the NFS server. Modified: head/usr.bin/login/login.c Modified: head/usr.bin/login/login.c ============================================================================== --- head/usr.bin/login/login.c Tue May 3 10:11:44 2011 (r221373) +++ head/usr.bin/login/login.c Tue May 3 10:18:27 2011 (r221374) @@ -380,6 +380,19 @@ main(int argc, char *argv[]) au_login_success(); #endif + /* + * This needs to happen before login_getpwclass to support + * home directories on GSS-API authenticated NFS where the + * kerberos credentials need to be saved so that the kernel + * can authenticate to the NFS server. + */ + pam_err = pam_setcred(pamh, pam_silent|PAM_ESTABLISH_CRED); + if (pam_err != PAM_SUCCESS) { + pam_syslog("pam_setcred()"); + bail(NO_SLEEP_EXIT, 1); + } + pam_cred_established = 1; + /* * Establish the login class. */ @@ -513,12 +526,11 @@ main(int argc, char *argv[]) bail(NO_SLEEP_EXIT, 1); } - pam_err = pam_setcred(pamh, pam_silent|PAM_ESTABLISH_CRED); + pam_err = pam_setcred(pamh, pam_silent|PAM_REINITIALIZE_CRED); if (pam_err != PAM_SUCCESS) { pam_syslog("pam_setcred()"); bail(NO_SLEEP_EXIT, 1); } - pam_cred_established = 1; pam_err = pam_open_session(pamh, pam_silent); if (pam_err != PAM_SUCCESS) { From owner-svn-src-all@FreeBSD.ORG Tue May 3 11:00:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0606F106566C; Tue, 3 May 2011 11:00:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3F138FC08; Tue, 3 May 2011 11:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43B0VRL090163; Tue, 3 May 2011 11:00:31 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43B0VfD090159; Tue, 3 May 2011 11:00:31 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105031100.p43B0VfD090159@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 3 May 2011 11:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221375 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 11:00:32 -0000 Author: ae Date: Tue May 3 11:00:31 2011 New Revision: 221375 URL: http://svn.freebsd.org/changeset/base/221375 Log: MFC r206428 (by luigi): This commit enables partial operation of dummynet with kernels compiled with "options VIMAGE". As it is now, there is still a single instance of the pipes, and it is only usable from vnet0 (the main instance). Trying to use a pipe from a different vimage does not crash the system as it did before, but the traffic coming out from the pipe goes to the wrong place, and i still need to figure out where. Support for per-vimage pipes is almost there (just a matter of uncommenting the VNET_* definitions for dn_cfg, plus putting into the structure the remaining static variables), however i need first to figure out how init/uninit work, and also to understand where packets are ending up on exit from a pipe. In summary: vimage support for dummynet is not complete yet, but we are getting there. MFC r206461 (by bz): Try to help with a virtualized dummynet after r206428. This adds the explicit include (so far probably included through one of the few "hidden" includes in other header files) for vnet.h and adds a cast to unbreak LINT-VIMAGE. Modified: stable/8/sys/netinet/ipfw/ip_dn_io.c stable/8/sys/netinet/ipfw/ip_dn_private.h stable/8/sys/netinet/ipfw/ip_dummynet.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/ipfw/ip_dn_io.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dn_io.c Tue May 3 10:18:27 2011 (r221374) +++ stable/8/sys/netinet/ipfw/ip_dn_io.c Tue May 3 11:00:31 2011 (r221375) @@ -45,8 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include /* IFNAMSIZ, struct ifaddr, ifq head, lock.h mutex.h */ #include +#include + #include #include /* ip_len, ip_off */ #include /* ip_output(), IP_FORWARDING */ @@ -69,6 +72,7 @@ __FBSDID("$FreeBSD$"); */ struct dn_parms dn_cfg; +//VNET_DEFINE(struct dn_parms, _base_dn_cfg); static long tick_last; /* Last tick duration (usec). */ static long tick_delta; /* Last vs standard tick diff (usec). */ @@ -100,31 +104,34 @@ SYSCTL_DECL(_net_inet); SYSCTL_DECL(_net_inet_ip); SYSCTL_NODE(_net_inet_ip, OID_AUTO, dummynet, CTLFLAG_RW, 0, "Dummynet"); +/* wrapper to pass dn_cfg fields to SYSCTL_* */ +//#define DC(x) (&(VNET_NAME(_base_dn_cfg).x)) +#define DC(x) (&(dn_cfg.x)) /* parameters */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, hash_size, - CTLFLAG_RW, &dn_cfg.hash_size, 0, "Default hash table size"); + CTLFLAG_RW, DC(hash_size), 0, "Default hash table size"); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, pipe_slot_limit, - CTLFLAG_RW, &dn_cfg.slot_limit, 0, + CTLFLAG_RW, DC(slot_limit), 0, "Upper limit in slots for pipe queue."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, pipe_byte_limit, - CTLFLAG_RW, &dn_cfg.byte_limit, 0, + CTLFLAG_RW, DC(byte_limit), 0, "Upper limit in bytes for pipe queue."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, io_fast, - CTLFLAG_RW, &dn_cfg.io_fast, 0, "Enable fast dummynet io."); + CTLFLAG_RW, DC(io_fast), 0, "Enable fast dummynet io."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, - CTLFLAG_RW, &dn_cfg.debug, 0, "Dummynet debug level"); + CTLFLAG_RW, DC(debug), 0, "Dummynet debug level"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire, - CTLFLAG_RW, &dn_cfg.expire, 0, "Expire empty queues/pipes"); + CTLFLAG_RW, DC(expire), 0, "Expire empty queues/pipes"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, - CTLFLAG_RD, &dn_cfg.expire_cycle, 0, "Expire cycle for queues/pipes"); + CTLFLAG_RD, DC(expire_cycle), 0, "Expire cycle for queues/pipes"); /* RED parameters */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_lookup_depth, - CTLFLAG_RD, &dn_cfg.red_lookup_depth, 0, "Depth of RED lookup table"); + CTLFLAG_RD, DC(red_lookup_depth), 0, "Depth of RED lookup table"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_avg_pkt_size, - CTLFLAG_RD, &dn_cfg.red_avg_pkt_size, 0, "RED Medium packet size"); + CTLFLAG_RD, DC(red_avg_pkt_size), 0, "RED Medium packet size"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_max_pkt_size, - CTLFLAG_RD, &dn_cfg.red_max_pkt_size, 0, "RED Max packet size"); + CTLFLAG_RD, DC(red_max_pkt_size), 0, "RED Max packet size"); /* time adjustment */ SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_delta, @@ -142,13 +149,13 @@ SYSCTL_LONG(_net_inet_ip_dummynet, OID_A /* statistics */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, schk_count, - CTLFLAG_RD, &dn_cfg.schk_count, 0, "Number of schedulers"); + CTLFLAG_RD, DC(schk_count), 0, "Number of schedulers"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, si_count, - CTLFLAG_RD, &dn_cfg.si_count, 0, "Number of scheduler instances"); + CTLFLAG_RD, DC(si_count), 0, "Number of scheduler instances"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, fsk_count, - CTLFLAG_RD, &dn_cfg.fsk_count, 0, "Number of flowsets"); + CTLFLAG_RD, DC(fsk_count), 0, "Number of flowsets"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, queue_count, - CTLFLAG_RD, &dn_cfg.queue_count, 0, "Number of queues"); + CTLFLAG_RD, DC(queue_count), 0, "Number of queues"); SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt, CTLFLAG_RD, &io_pkt, 0, "Number of packets passed to dummynet."); @@ -158,7 +165,7 @@ SYSCTL_ULONG(_net_inet_ip_dummynet, OID_ SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt_drop, CTLFLAG_RD, &io_pkt_drop, 0, "Number of packets dropped by dummynet."); - +#undef DC SYSEND #endif @@ -496,6 +503,8 @@ dummynet_task(void *context, int pending struct timeval t; struct mq q = { NULL, NULL }; /* queue to accumulate results */ + CURVNET_SET((struct vnet *)context); + DN_BH_WLOCK(); /* Update number of lost(coalesced) ticks. */ @@ -560,6 +569,7 @@ dummynet_task(void *context, int pending dn_reschedule(); if (q.head != NULL) dummynet_send(q.head); + CURVNET_RESTORE(); } /* Modified: stable/8/sys/netinet/ipfw/ip_dn_private.h ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dn_private.h Tue May 3 10:18:27 2011 (r221374) +++ stable/8/sys/netinet/ipfw/ip_dn_private.h Tue May 3 11:00:31 2011 (r221375) @@ -150,6 +150,8 @@ struct dn_parms { uint32_t expire; uint32_t expire_cycle; /* tick count */ + int init_done; + /* if the upper half is busy doing something long, * can set the busy flag and we will enqueue packets in * a queue for later processing. @@ -354,6 +356,8 @@ enum { }; extern struct dn_parms dn_cfg; +//VNET_DECLARE(struct dn_parms, _base_dn_cfg); +//#define dn_cfg VNET(_base_dn_cfg) int dummynet_io(struct mbuf **, int , struct ip_fw_args *); void dummynet_task(void *context, int pending); Modified: stable/8/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dummynet.c Tue May 3 10:18:27 2011 (r221374) +++ stable/8/sys/netinet/ipfw/ip_dummynet.c Tue May 3 11:00:31 2011 (r221375) @@ -2111,14 +2111,10 @@ ip_dn_ctl(struct sockopt *sopt) static void ip_dn_init(void) { - static int init_done = 0; - - if (init_done) + if (dn_cfg.init_done) return; - init_done = 1; - if (bootverbose) - printf("DUMMYNET with IPv6 initialized (100131)\n"); - + printf("DUMMYNET %p with IPv6 initialized (100409)\n", curvnet); + dn_cfg.init_done = 1; /* Set defaults here. MSVC does not accept initializers, * and this is also useful for vimages */ @@ -2155,10 +2151,8 @@ ip_dn_init(void) SLIST_INIT(&dn_cfg.schedlist); DN_LOCK_INIT(); - ip_dn_ctl_ptr = ip_dn_ctl; - ip_dn_io_ptr = dummynet_io; - TASK_INIT(&dn_task, 0, dummynet_task, NULL); + TASK_INIT(&dn_task, 0, dummynet_task, curvnet); dn_tq = taskqueue_create_fast("dummynet", M_NOWAIT, taskqueue_thread_enqueue, &dn_tq); taskqueue_start_threads(&dn_tq, 1, PI_NET, "dummynet"); @@ -2172,13 +2166,16 @@ ip_dn_init(void) #ifdef KLD_MODULE static void -ip_dn_destroy(void) +ip_dn_destroy(int last) { callout_drain(&dn_timeout); DN_BH_WLOCK(); - ip_dn_ctl_ptr = NULL; - ip_dn_io_ptr = NULL; + if (last) { + printf("%s removing last instance\n", __FUNCTION__); + ip_dn_ctl_ptr = NULL; + ip_dn_io_ptr = NULL; + } dummynet_flush(); DN_BH_WUNLOCK(); @@ -2203,13 +2200,15 @@ dummynet_modevent(module_t mod, int type return EEXIST ; } ip_dn_init(); + ip_dn_ctl_ptr = ip_dn_ctl; + ip_dn_io_ptr = dummynet_io; return 0; } else if (type == MOD_UNLOAD) { #if !defined(KLD_MODULE) printf("dummynet statically compiled, cannot unload\n"); return EINVAL ; #else - ip_dn_destroy(); + ip_dn_destroy(1 /* last */); return 0; #endif } else @@ -2287,8 +2286,24 @@ static moduledata_t dummynet_mod = { "dummynet", dummynet_modevent, NULL }; -DECLARE_MODULE(dummynet, dummynet_mod, - SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY-1); +#define DN_SI_SUB SI_SUB_PROTO_IFATTACHDOMAIN +#define DN_MODEV_ORD (SI_ORDER_ANY - 128) /* after ipfw */ +DECLARE_MODULE(dummynet, dummynet_mod, DN_SI_SUB, DN_MODEV_ORD); MODULE_DEPEND(dummynet, ipfw, 2, 2, 2); MODULE_VERSION(dummynet, 3); + +/* + * Starting up. Done in order after dummynet_modevent() has been called. + * VNET_SYSINIT is also called for each existing vnet and each new vnet. + */ +//VNET_SYSINIT(vnet_dn_init, DN_SI_SUB, DN_MODEV_ORD+2, ip_dn_init, NULL); + +/* + * Shutdown handlers up shop. These are done in REVERSE ORDER, but still + * after dummynet_modevent() has been called. Not called on reboot. + * VNET_SYSUNINIT is also called for each exiting vnet as it exits. + * or when the module is unloaded. + */ +//VNET_SYSUNINIT(vnet_dn_uninit, DN_SI_SUB, DN_MODEV_ORD+2, ip_dn_destroy, NULL); + /* end of file */ From owner-svn-src-all@FreeBSD.ORG Tue May 3 11:07:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59334106564A; Tue, 3 May 2011 11:07:47 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A49B8FC0A; Tue, 3 May 2011 11:07:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43B7lvr090448; Tue, 3 May 2011 11:07:47 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43B7lWN090446; Tue, 3 May 2011 11:07:47 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105031107.p43B7lWN090446@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 3 May 2011 11:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221376 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 11:07:47 -0000 Author: ae Date: Tue May 3 11:07:46 2011 New Revision: 221376 URL: http://svn.freebsd.org/changeset/base/221376 Log: MFC r220832: Add sysctl handlers for net.inet.ip.dummynet.hash_size, .pipe_byte_limit and .pipe_slot_limit oids to prevent to set incorrect values. Modified: stable/8/sys/netinet/ipfw/ip_dn_io.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/ipfw/ip_dn_io.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dn_io.c Tue May 3 11:00:31 2011 (r221375) +++ stable/8/sys/netinet/ipfw/ip_dn_io.c Tue May 3 11:07:46 2011 (r221376) @@ -108,14 +108,58 @@ SYSCTL_NODE(_net_inet_ip, OID_AUTO, dumm //#define DC(x) (&(VNET_NAME(_base_dn_cfg).x)) #define DC(x) (&(dn_cfg.x)) /* parameters */ -SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, hash_size, - CTLFLAG_RW, DC(hash_size), 0, "Default hash table size"); -SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, pipe_slot_limit, - CTLFLAG_RW, DC(slot_limit), 0, - "Upper limit in slots for pipe queue."); -SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, pipe_byte_limit, - CTLFLAG_RW, DC(byte_limit), 0, - "Upper limit in bytes for pipe queue."); + +static int +sysctl_hash_size(SYSCTL_HANDLER_ARGS) +{ + int error, value; + + value = dn_cfg.hash_size; + error = sysctl_handle_int(oidp, &value, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (value < 16 || value > 65536) + return (EINVAL); + dn_cfg.hash_size = value; + return (0); +} + +SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, hash_size, + CTLTYPE_INT | CTLFLAG_RW, 0, 0, sysctl_hash_size, + "I", "Default hash table size"); + +static int +sysctl_limits(SYSCTL_HANDLER_ARGS) +{ + int error; + long value; + + if (arg2 != 0) + value = dn_cfg.slot_limit; + else + value = dn_cfg.byte_limit; + error = sysctl_handle_long(oidp, &value, 0, req); + + if (error != 0 || req->newptr == NULL) + return (error); + if (arg2 != 0) { + if (value < 1) + return (EINVAL); + dn_cfg.slot_limit = value; + } else { + if (value < 1500) + return (EINVAL); + dn_cfg.byte_limit = value; + } + return (0); +} + +SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, pipe_slot_limit, + CTLTYPE_LONG | CTLFLAG_RW, 0, 1, sysctl_limits, + "L", "Upper limit in slots for pipe queue."); +SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, pipe_byte_limit, + CTLTYPE_LONG | CTLFLAG_RW, 0, 0, sysctl_limits, + "L", "Upper limit in bytes for pipe queue."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, io_fast, CTLFLAG_RW, DC(io_fast), 0, "Enable fast dummynet io."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, From owner-svn-src-all@FreeBSD.ORG Tue May 3 11:22:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E8091065670; Tue, 3 May 2011 11:22:38 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 382408FC15; Tue, 3 May 2011 11:22:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43BMcOL090962; Tue, 3 May 2011 11:22:38 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43BMc3J090952; Tue, 3 May 2011 11:22:38 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201105031122.p43BMc3J090952@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 3 May 2011 11:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221377 - in vendor-crypto/openssh/dist: . contrib/caldera contrib/cygwin contrib/redhat contrib/suse openbsd-compat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 11:22:38 -0000 Author: des Date: Tue May 3 11:22:37 2011 New Revision: 221377 URL: http://svn.freebsd.org/changeset/base/221377 Log: Vendor import of OpenSSH 5.8p2 Modified: vendor-crypto/openssh/dist/ChangeLog vendor-crypto/openssh/dist/README vendor-crypto/openssh/dist/contrib/caldera/openssh.spec vendor-crypto/openssh/dist/contrib/cygwin/ssh-host-config vendor-crypto/openssh/dist/contrib/cygwin/ssh-user-config vendor-crypto/openssh/dist/contrib/redhat/openssh.spec vendor-crypto/openssh/dist/contrib/suse/openssh.spec vendor-crypto/openssh/dist/entropy.c vendor-crypto/openssh/dist/openbsd-compat/port-linux.c Modified: vendor-crypto/openssh/dist/ChangeLog ============================================================================== --- vendor-crypto/openssh/dist/ChangeLog Tue May 3 11:07:46 2011 (r221376) +++ vendor-crypto/openssh/dist/ChangeLog Tue May 3 11:22:37 2011 (r221377) @@ -1,3 +1,29 @@ +20110403 + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Prepare for 5.8p2 release. + - Release 5.8p2 + +20110329 + - (djm) [entropy.c] closefrom() before running ssh-rand-helper; leftover fds + noticed by tmraz AT redhat.com + +20110221 + - (dtucker) [contrib/cygwin/ssh-host-config] From Corinna: revamp of the + Cygwin-specific service installer script ssh-host-config. The actual + functionality is the same, the revisited version is just more + exact when it comes to check for problems which disallow to run + certain aspects of the script. So, part of this script and the also + rearranged service helper script library "csih" is to check if all + the tools required to run the script are available on the system. + The new script also is more thorough to inform the user why the + script failed. Patch from vinschen at redhat com. + +20110206 + - (dtucker) [openbsd-compat/port-linux.c] Bug #1851: fix syntax error in + selinux code. Patch from Leonardo Chiquitto + - (dtucker) [contrib/cygwin/ssh-{host,user}-config] Add ECDSA key + generation and simplify. Patch from Corinna Vinschen. + 20110204 - OpenBSD CVS Sync - djm@cvs.openbsd.org 2011/01/31 21:42:15 Modified: vendor-crypto/openssh/dist/README ============================================================================== --- vendor-crypto/openssh/dist/README Tue May 3 11:07:46 2011 (r221376) +++ vendor-crypto/openssh/dist/README Tue May 3 11:22:37 2011 (r221377) @@ -1,4 +1,4 @@ -See http://www.openssh.com/txt/release-5.8 for the release notes. +See http://www.openssh.com/txt/release-5.8p2 for the release notes. - A Japanese translation of this document and of the OpenSSH FAQ is - available at http://www.unixuser.org/~haruyama/security/openssh/index.html @@ -62,4 +62,4 @@ References - [6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 [7] http://www.openssh.com/faq.html -$Id: README,v 1.75.4.1 2011/02/04 00:57:50 djm Exp $ +$Id: README,v 1.75.4.2 2011/05/03 00:04:21 djm Exp $ Modified: vendor-crypto/openssh/dist/contrib/caldera/openssh.spec ============================================================================== --- vendor-crypto/openssh/dist/contrib/caldera/openssh.spec Tue May 3 11:07:46 2011 (r221376) +++ vendor-crypto/openssh/dist/contrib/caldera/openssh.spec Tue May 3 11:22:37 2011 (r221377) @@ -16,7 +16,7 @@ #old cvs stuff. please update before use. may be deprecated. %define use_stable 1 -%define version 5.8p1 +%define version 5.8p2 %if %{use_stable} %define cvs %{nil} %define release 1 @@ -363,4 +363,4 @@ fi * Mon Jan 01 1998 ... Template Version: 1.31 -$Id: openssh.spec,v 1.73.4.1 2011/02/04 00:57:54 djm Exp $ +$Id: openssh.spec,v 1.73.4.2 2011/05/03 00:04:23 djm Exp $ Modified: vendor-crypto/openssh/dist/contrib/cygwin/ssh-host-config ============================================================================== --- vendor-crypto/openssh/dist/contrib/cygwin/ssh-host-config Tue May 3 11:07:46 2011 (r221376) +++ vendor-crypto/openssh/dist/contrib/cygwin/ssh-host-config Tue May 3 11:22:37 2011 (r221377) @@ -1,6 +1,6 @@ #!/bin/bash # -# ssh-host-config, Copyright 2000-2009 Red Hat Inc. +# ssh-host-config, Copyright 2000-2011 Red Hat Inc. # # This file is part of the Cygwin port of OpenSSH. # @@ -19,12 +19,39 @@ # ====================================================================== # Initialization # ====================================================================== -PROGNAME=$(basename $0) -_tdir=$(dirname $0) -PROGDIR=$(cd $_tdir && pwd) CSIH_SCRIPT=/usr/share/csih/cygwin-service-installation-helper.sh +# List of apps used. This is checkad for existance in csih_sanity_check +# Don't use *any* transient commands before sourcing the csih helper script, +# otherwise the sanity checks are short-circuited. +declare -a csih_required_commands=( + /usr/bin/basename coreutils + /usr/bin/cat coreutils + /usr/bin/chmod coreutils + /usr/bin/dirname coreutils + /usr/bin/id coreutils + /usr/bin/mv coreutils + /usr/bin/rm coreutils + /usr/bin/cygpath cygwin + /usr/bin/mount cygwin + /usr/bin/ps cygwin + /usr/bin/setfacl cygwin + /usr/bin/umount cygwin + /usr/bin/cmp diffutils + /usr/bin/grep grep + /usr/bin/awk gawk + /usr/bin/ssh-keygen openssh + /usr/sbin/sshd openssh + /usr/bin/sed sed +) +csih_sanity_check_server=yes +source ${CSIH_SCRIPT} + +PROGNAME=$(/usr/bin/basename $0) +_tdir=$(/usr/bin/dirname $0) +PROGDIR=$(cd $_tdir && pwd) + # Subdirectory where the new package is being installed PREFIX=/usr @@ -32,8 +59,6 @@ PREFIX=/usr SYSCONFDIR=/etc LOCALSTATEDIR=/var -source ${CSIH_SCRIPT} - port_number=22 privsep_configured=no privsep_used=yes @@ -46,23 +71,48 @@ opt_force=no # Routine: create_host_keys # ====================================================================== create_host_keys() { + local ret=0 + if [ ! -f "${SYSCONFDIR}/ssh_host_key" ] then csih_inform "Generating ${SYSCONFDIR}/ssh_host_key" - ssh-keygen -t rsa1 -f ${SYSCONFDIR}/ssh_host_key -N '' > /dev/null + if ! /usr/bin/ssh-keygen -t rsa1 -f ${SYSCONFDIR}/ssh_host_key -N '' > /dev/null + then + csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" + let ++ret + fi fi if [ ! -f "${SYSCONFDIR}/ssh_host_rsa_key" ] then csih_inform "Generating ${SYSCONFDIR}/ssh_host_rsa_key" - ssh-keygen -t rsa -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' > /dev/null + if ! /usr/bin/ssh-keygen -t rsa -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' > /dev/null + then + csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" + let ++ret + fi fi if [ ! -f "${SYSCONFDIR}/ssh_host_dsa_key" ] then csih_inform "Generating ${SYSCONFDIR}/ssh_host_dsa_key" - ssh-keygen -t dsa -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' > /dev/null + if ! /usr/bin/ssh-keygen -t dsa -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' > /dev/null + then + csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" + let ++ret + fi fi + + if [ ! -f "${SYSCONFDIR}/ssh_host_ecdsa_key" ] + then + csih_inform "Generating ${SYSCONFDIR}/ssh_host_ecdsa_key" + if ! /usr/bin/ssh-keygen -t ecdsa -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' > /dev/null + then + csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!" + let ++ret + fi + fi + return $ret } # --- End of create_host_keys --- # # ====================================================================== @@ -75,61 +125,58 @@ update_services_file() { local _spaces local _serv_tmp local _wservices + local ret=0 - if csih_is_nt - then - _win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc" - _services="${_my_etcdir}/services" - # On NT, 27 spaces, no space after the hash - _spaces=" #" - else - _win_etcdir="${WINDIR}" - _services="${_my_etcdir}/SERVICES" - # On 9x, 18 spaces (95 is very touchy), a space after the hash - _spaces=" # " - fi + _win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc" + _services="${_my_etcdir}/services" + _spaces=" #" _serv_tmp="${_my_etcdir}/srv.out.$$" - mount -o text,posix=0,noacl -f "${_win_etcdir}" "${_my_etcdir}" + /usr/bin/mount -o text,posix=0,noacl -f "${_win_etcdir}" "${_my_etcdir}" # Depends on the above mount _wservices=`cygpath -w "${_services}"` # Remove sshd 22/port from services - if [ `grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ] + if [ `/usr/bin/grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ] then - grep -v 'sshd[ \t][ \t]*22' "${_services}" > "${_serv_tmp}" + /usr/bin/grep -v 'sshd[ \t][ \t]*22' "${_services}" > "${_serv_tmp}" if [ -f "${_serv_tmp}" ] then - if mv "${_serv_tmp}" "${_services}" + if /usr/bin/mv "${_serv_tmp}" "${_services}" then csih_inform "Removing sshd from ${_wservices}" else csih_warning "Removing sshd from ${_wservices} failed!" + let ++ret fi - rm -f "${_serv_tmp}" + /usr/bin/rm -f "${_serv_tmp}" else csih_warning "Removing sshd from ${_wservices} failed!" + let ++ret fi fi # Add ssh 22/tcp and ssh 22/udp to services - if [ `grep -q 'ssh[ \t][ \t]*22' "${_services}"; echo $?` -ne 0 ] + if [ `/usr/bin/grep -q 'ssh[ \t][ \t]*22' "${_services}"; echo $?` -ne 0 ] then - if awk '{ if ( $2 ~ /^23\/tcp/ ) print "ssh 22/tcp'"${_spaces}"'SSH Remote Login Protocol\nssh 22/udp'"${_spaces}"'SSH Remote Login Protocol"; print $0; }' < "${_services}" > "${_serv_tmp}" + if /usr/bin/awk '{ if ( $2 ~ /^23\/tcp/ ) print "ssh 22/tcp'"${_spaces}"'SSH Remote Login Protocol\nssh 22/udp'"${_spaces}"'SSH Remote Login Protocol"; print $0; }' < "${_services}" > "${_serv_tmp}" then - if mv "${_serv_tmp}" "${_services}" + if /usr/bin/mv "${_serv_tmp}" "${_services}" then csih_inform "Added ssh to ${_wservices}" else csih_warning "Adding ssh to ${_wservices} failed!" + let ++ret fi - rm -f "${_serv_tmp}" + /usr/bin/rm -f "${_serv_tmp}" else csih_warning "Adding ssh to ${_wservices} failed!" + let ++ret fi fi - umount "${_my_etcdir}" + /usr/bin/umount "${_my_etcdir}" + return $ret } # --- End of update_services_file --- # # ====================================================================== @@ -138,51 +185,57 @@ update_services_file() { # ====================================================================== sshd_privsep() { local sshdconfig_tmp + local ret=0 if [ "${privsep_configured}" != "yes" ] then - if csih_is_nt + csih_inform "Privilege separation is set to yes by default since OpenSSH 3.3." + csih_inform "However, this requires a non-privileged account called 'sshd'." + csih_inform "For more info on privilege separation read /usr/share/doc/openssh/README.privsep." + if csih_request "Should privilege separation be used?" then - csih_inform "Privilege separation is set to yes by default since OpenSSH 3.3." - csih_inform "However, this requires a non-privileged account called 'sshd'." - csih_inform "For more info on privilege separation read /usr/share/doc/openssh/README.privsep." - if csih_request "Should privilege separation be used?" + privsep_used=yes + if ! csih_create_unprivileged_user sshd then - privsep_used=yes - if ! csih_create_unprivileged_user sshd - then - csih_warning "Couldn't create user 'sshd'!" - csih_warning "Privilege separation set to 'no' again!" - csih_warning "Check your ${SYSCONFDIR}/sshd_config file!" - privsep_used=no - fi - else + csih_error_recoverable "Couldn't create user 'sshd'!" + csih_error_recoverable "Privilege separation set to 'no' again!" + csih_error_recoverable "Check your ${SYSCONFDIR}/sshd_config file!" + let ++ret privsep_used=no fi else - # On 9x don't use privilege separation. Since security isn't - # available it just adds useless additional processes. privsep_used=no fi fi # Create default sshd_config from skeleton files in /etc/defaults/etc or # modify to add the missing privsep configuration option - if cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1 + if /usr/bin/cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1 then csih_inform "Updating ${SYSCONFDIR}/sshd_config file" sshdconfig_tmp=${SYSCONFDIR}/sshd_config.$$ - sed -e "s/^#UsePrivilegeSeparation yes/UsePrivilegeSeparation ${privsep_used}/ + /usr/bin/sed -e "s/^#UsePrivilegeSeparation yes/UsePrivilegeSeparation ${privsep_used}/ s/^#Port 22/Port ${port_number}/ s/^#StrictModes yes/StrictModes no/" \ < ${SYSCONFDIR}/sshd_config \ > "${sshdconfig_tmp}" - mv "${sshdconfig_tmp}" ${SYSCONFDIR}/sshd_config + if ! /usr/bin/mv "${sshdconfig_tmp}" ${SYSCONFDIR}/sshd_config + then + csih_warning "Setting privilege separation to 'yes' failed!" + csih_warning "Check your ${SYSCONFDIR}/sshd_config file!" + let ++ret + fi elif [ "${privsep_configured}" != "yes" ] then echo >> ${SYSCONFDIR}/sshd_config - echo "UsePrivilegeSeparation ${privsep_used}" >> ${SYSCONFDIR}/sshd_config + if ! echo "UsePrivilegeSeparation ${privsep_used}" >> ${SYSCONFDIR}/sshd_config + then + csih_warning "Setting privilege separation to 'yes' failed!" + csih_warning "Check your ${SYSCONFDIR}/sshd_config file!" + let ++ret + fi fi + return $ret } # --- End of sshd_privsep --- # # ====================================================================== @@ -195,72 +248,82 @@ update_inetd_conf() { local _sshd_inetd_conf="${_inetcnf_dir}/sshd-inetd" local _sshd_inetd_conf_tmp="${_inetcnf_dir}/sshd-inetd.$$" local _with_comment=1 + local ret=0 if [ -d "${_inetcnf_dir}" ] then # we have inetutils-1.5 inetd.d support if [ -f "${_inetcnf}" ] then - grep -q '^[ \t]*ssh' "${_inetcnf}" && _with_comment=0 + /usr/bin/grep -q '^[ \t]*ssh' "${_inetcnf}" && _with_comment=0 # check for sshd OR ssh in top-level inetd.conf file, and remove # will be replaced by a file in inetd.d/ - if [ `grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -eq 0 ] + if [ `/usr/bin/grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -eq 0 ] then - grep -v '^[# \t]*ssh' "${_inetcnf}" >> "${_inetcnf_tmp}" + /usr/bin/grep -v '^[# \t]*ssh' "${_inetcnf}" >> "${_inetcnf_tmp}" if [ -f "${_inetcnf_tmp}" ] then - if mv "${_inetcnf_tmp}" "${_inetcnf}" + if /usr/bin/mv "${_inetcnf_tmp}" "${_inetcnf}" then csih_inform "Removed ssh[d] from ${_inetcnf}" else csih_warning "Removing ssh[d] from ${_inetcnf} failed!" + let ++ret fi - rm -f "${_inetcnf_tmp}" + /usr/bin/rm -f "${_inetcnf_tmp}" else csih_warning "Removing ssh[d] from ${_inetcnf} failed!" + let ++ret fi fi fi csih_install_config "${_sshd_inetd_conf}" "${SYSCONFDIR}/defaults" - if cmp "${SYSCONFDIR}/defaults${_sshd_inetd_conf}" "${_sshd_inetd_conf}" >/dev/null 2>&1 + if /usr/bin/cmp "${SYSCONFDIR}/defaults${_sshd_inetd_conf}" "${_sshd_inetd_conf}" >/dev/null 2>&1 then if [ "${_with_comment}" -eq 0 ] then - sed -e 's/@COMMENT@[ \t]*//' < "${_sshd_inetd_conf}" > "${_sshd_inetd_conf_tmp}" + /usr/bin/sed -e 's/@COMMENT@[ \t]*//' < "${_sshd_inetd_conf}" > "${_sshd_inetd_conf_tmp}" else - sed -e 's/@COMMENT@[ \t]*/# /' < "${_sshd_inetd_conf}" > "${_sshd_inetd_conf_tmp}" + /usr/bin/sed -e 's/@COMMENT@[ \t]*/# /' < "${_sshd_inetd_conf}" > "${_sshd_inetd_conf_tmp}" + fi + if /usr/bin/mv "${_sshd_inetd_conf_tmp}" "${_sshd_inetd_conf}" + then + csih_inform "Updated ${_sshd_inetd_conf}" + else + csih_warning "Updating ${_sshd_inetd_conf} failed!" + let ++ret fi - mv "${_sshd_inetd_conf_tmp}" "${_sshd_inetd_conf}" - csih_inform "Updated ${_sshd_inetd_conf}" fi elif [ -f "${_inetcnf}" ] then - grep -q '^[ \t]*sshd' "${_inetcnf}" && _with_comment=0 + /usr/bin/grep -q '^[ \t]*sshd' "${_inetcnf}" && _with_comment=0 # check for sshd in top-level inetd.conf file, and remove # will be replaced by a file in inetd.d/ - if [ `grep -q '^[# \t]*sshd' "${_inetcnf}"; echo $?` -eq 0 ] + if [ `/usr/bin/grep -q '^[# \t]*sshd' "${_inetcnf}"; echo $?` -eq 0 ] then - grep -v '^[# \t]*sshd' "${_inetcnf}" >> "${_inetcnf_tmp}" + /usr/bin/grep -v '^[# \t]*sshd' "${_inetcnf}" >> "${_inetcnf_tmp}" if [ -f "${_inetcnf_tmp}" ] then - if mv "${_inetcnf_tmp}" "${_inetcnf}" + if /usr/bin/mv "${_inetcnf_tmp}" "${_inetcnf}" then csih_inform "Removed sshd from ${_inetcnf}" else csih_warning "Removing sshd from ${_inetcnf} failed!" + let ++ret fi - rm -f "${_inetcnf_tmp}" + /usr/bin/rm -f "${_inetcnf_tmp}" else csih_warning "Removing sshd from ${_inetcnf} failed!" + let ++ret fi fi # Add ssh line to inetd.conf - if [ `grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -ne 0 ] + if [ `/usr/bin/grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -ne 0 ] then if [ "${_with_comment}" -eq 0 ] then @@ -268,115 +331,186 @@ update_inetd_conf() { else echo '# ssh stream tcp nowait root /usr/sbin/sshd sshd -i' >> "${_inetcnf}" fi - csih_inform "Added ssh to ${_inetcnf}" + if [ $? -eq 0 ] + then + csih_inform "Added ssh to ${_inetcnf}" + else + csih_warning "Adding ssh to ${_inetcnf} failed!" + let ++ret + fi fi fi + return $ret } # --- End of update_inetd_conf --- # # ====================================================================== +# Routine: check_service_files_ownership +# Checks that the files in /etc and /var belong to the right owner +# ====================================================================== +check_service_files_ownership() { + local run_service_as=$1 + local ret=0 + + if [ -z "${run_service_as}" ] + then + accnt_name=$(/usr/bin/cygrunsrv -VQ sshd | /usr/bin/sed -ne 's/^Account *: *//gp') + if [ "${accnt_name}" = "LocalSystem" ] + then + # Convert "LocalSystem" to "SYSTEM" as is the correct account name + accnt_name="SYSTEM:" + elif [[ "${accnt_name}" =~ ^\.\\ ]] + then + # Convert "." domain to local machine name + accnt_name="U-${COMPUTERNAME}${accnt_name#.}," + fi + run_service_as=$(/usr/bin/grep -Fi "${accnt_name}" /etc/passwd | /usr/bin/awk -F: '{print $1;}') + if [ -z "${run_service_as}" ] + then + csih_warning "Couldn't determine name of user running sshd service from /etc/passwd!" + csih_warning "As a result, this script cannot make sure that the files used" + csih_warning "by the sshd service belong to the user running the service." + csih_warning "Please re-run the mkpasswd tool to make sure the /etc/passwd" + csih_warning "file is in a good shape." + return 1 + fi + fi + for i in "${SYSCONFDIR}"/ssh_config "${SYSCONFDIR}"/sshd_config "${SYSCONFDIR}"/ssh_host_*key "${SYSCONFDIR}"/ssh_host_*key.pub + do + if [ -f "$i" ] + then + if ! chown "${run_service_as}".544 "$i" >/dev/null 2>&1 + then + csih_warning "Couldn't change owner of $i!" + let ++ret + fi + fi + done + if ! chown "${run_service_as}".544 ${LOCALSTATEDIR}/empty >/dev/null 2>&1 + then + csih_warning "Couldn't change owner of ${LOCALSTATEDIR}/empty!" + let ++ret + fi + if ! chown "${run_service_as}".544 ${LOCALSTATEDIR}/log/lastlog >/dev/null 2>&1 + then + csih_warning "Couldn't change owner of ${LOCALSTATEDIR}/log/lastlog!" + let ++ret + fi + if [ -f ${LOCALSTATEDIR}/log/sshd.log ] + then + if ! chown "${run_service_as}".544 ${LOCALSTATEDIR}/log/sshd.log >/dev/null 2>&1 + then + csih_warning "Couldn't change owner of ${LOCALSTATEDIR}/log/sshd.log!" + let ++ret + fi + fi + if [ $ret -ne 0 ] + then + csih_warning "Couldn't change owner of important files to ${run_service_as}!" + csih_warning "This may cause the sshd service to fail! Please make sure that" + csih_warning "you have suufficient permissions to change the ownership of files" + csih_warning "and try to run the ssh-host-config script again." + fi + return $ret +} # --- End of check_service_files_ownership --- # + +# ====================================================================== # Routine: install_service # Install sshd as a service # ====================================================================== install_service() { local run_service_as local password + local ret=0 - if csih_is_nt + echo + if /usr/bin/cygrunsrv -Q sshd >/dev/null 2>&1 then - if ! cygrunsrv -Q sshd >/dev/null 2>&1 + csih_inform "Sshd service is already installed." + check_service_files_ownership "" || let ret+=$? + else + echo -e "${_csih_QUERY_STR} Do you want to install sshd as a service?" + if csih_request "(Say \"no\" if it is already installed as a service)" then - echo - echo - csih_warning "The following functions require administrator privileges!" - echo - echo -e "${_csih_QUERY_STR} Do you want to install sshd as a service?" - if csih_request "(Say \"no\" if it is already installed as a service)" + csih_get_cygenv "${cygwin_value}" + + if ( csih_is_nt2003 || [ "$csih_FORCE_PRIVILEGED_USER" = "yes" ] ) then - csih_get_cygenv "${cygwin_value}" + csih_inform "On Windows Server 2003, Windows Vista, and above, the" + csih_inform "SYSTEM account cannot setuid to other users -- a capability" + csih_inform "sshd requires. You need to have or to create a privileged" + csih_inform "account. This script will help you do so." + echo + + [ "${opt_force}" = "yes" ] && opt_f=-f + [ -n "${user_account}" ] && opt_u="-u ""${user_account}""" + csih_select_privileged_username ${opt_f} ${opt_u} sshd - if ( csih_is_nt2003 || [ "$csih_FORCE_PRIVILEGED_USER" = "yes" ] ) + if ! csih_create_privileged_user "${password_value}" then - csih_inform "On Windows Server 2003, Windows Vista, and above, the" - csih_inform "SYSTEM account cannot setuid to other users -- a capability" - csih_inform "sshd requires. You need to have or to create a privileged" - csih_inform "account. This script will help you do so." - echo - - [ "${opt_force}" = "yes" ] && opt_f=-f - [ -n "${user_account}" ] && opt_u="-u ""${user_account}""" - csih_select_privileged_username ${opt_f} ${opt_u} sshd - - if ! csih_create_privileged_user "${password_value}" - then - csih_error_recoverable "There was a serious problem creating a privileged user." - csih_request "Do you want to proceed anyway?" || exit 1 - fi + csih_error_recoverable "There was a serious problem creating a privileged user." + csih_request "Do you want to proceed anyway?" || exit 1 + let ++ret fi + fi - # never returns empty if NT or above - run_service_as=$(csih_service_should_run_as) + # Never returns empty if NT or above + run_service_as=$(csih_service_should_run_as) - if [ "${run_service_as}" = "${csih_PRIVILEGED_USERNAME}" ] + if [ "${run_service_as}" = "${csih_PRIVILEGED_USERNAME}" ] + then + password="${csih_PRIVILEGED_PASSWORD}" + if [ -z "${password}" ] then - password="${csih_PRIVILEGED_PASSWORD}" - if [ -z "${password}" ] - then - csih_get_value "Please enter the password for user '${run_service_as}':" "-s" - password="${csih_value}" - fi + csih_get_value "Please enter the password for user '${run_service_as}':" "-s" + password="${csih_value}" fi + fi - # at this point, we either have $run_service_as = "system" and $password is empty, - # or $run_service_as is some privileged user and (hopefully) $password contains - # the correct password. So, from here out, we use '-z "${password}"' to discriminate - # the two cases. + # At this point, we either have $run_service_as = "system" and + # $password is empty, or $run_service_as is some privileged user and + # (hopefully) $password contains the correct password. So, from here + # out, we use '-z "${password}"' to discriminate the two cases. - csih_check_user "${run_service_as}" + csih_check_user "${run_service_as}" - if [ -n "${csih_cygenv}" ] + if [ -n "${csih_cygenv}" ] + then + cygwin_env=( -e "CYGWIN=${csih_cygenv}" ) + fi + if [ -z "${password}" ] + then + if /usr/bin/cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd \ + -a "-D" -y tcpip "${cygwin_env[@]}" then - cygwin_env=( -e "CYGWIN=${csih_cygenv}" ) + echo + csih_inform "The sshd service has been installed under the LocalSystem" + csih_inform "account (also known as SYSTEM). To start the service now, call" + csih_inform "\`net start sshd' or \`cygrunsrv -S sshd'. Otherwise, it" + csih_inform "will start automatically after the next reboot." fi - if [ -z "${password}" ] + else + if /usr/bin/cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd \ + -a "-D" -y tcpip "${cygwin_env[@]}" \ + -u "${run_service_as}" -w "${password}" then - if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd \ - -a "-D" -y tcpip "${cygwin_env[@]}" - then - echo - csih_inform "The sshd service has been installed under the LocalSystem" - csih_inform "account (also known as SYSTEM). To start the service now, call" - csih_inform "\`net start sshd' or \`cygrunsrv -S sshd'. Otherwise, it" - csih_inform "will start automatically after the next reboot." - fi - else - if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd \ - -a "-D" -y tcpip "${cygwin_env[@]}" \ - -u "${run_service_as}" -w "${password}" - then - echo - csih_inform "The sshd service has been installed under the '${run_service_as}'" - csih_inform "account. To start the service now, call \`net start sshd' or" - csih_inform "\`cygrunsrv -S sshd'. Otherwise, it will start automatically" - csih_inform "after the next reboot." - fi + echo + csih_inform "The sshd service has been installed under the '${run_service_as}'" + csih_inform "account. To start the service now, call \`net start sshd' or" + csih_inform "\`cygrunsrv -S sshd'. Otherwise, it will start automatically" + csih_inform "after the next reboot." fi + fi - # now, if successfully installed, set ownership of the affected files - if cygrunsrv -Q sshd >/dev/null 2>&1 - then - chown "${run_service_as}" ${SYSCONFDIR}/ssh* - chown "${run_service_as}".544 ${LOCALSTATEDIR}/empty - chown "${run_service_as}".544 ${LOCALSTATEDIR}/log/lastlog - if [ -f ${LOCALSTATEDIR}/log/sshd.log ] - then - chown "${run_service_as}".544 ${LOCALSTATEDIR}/log/sshd.log - fi - else - csih_warning "Something went wrong installing the sshd service." - fi - fi # user allowed us to install as service - fi # service not yet installed - fi # csih_is_nt + if /usr/bin/cygrunsrv -Q sshd >/dev/null 2>&1 + then + check_service_files_ownership "${run_service_as}" || let ret+=$? + else + csih_error_recoverable "Installing sshd as a service failed!" + let ++ret + fi + fi # user allowed us to install as service + fi # service not yet installed + return $ret } # --- End of install_service --- # # ====================================================================== @@ -488,21 +622,71 @@ done # Check for running ssh/sshd processes first. Refuse to do anything while # some ssh processes are still running -if ps -ef | grep -q '/sshd\?$' +if /usr/bin/ps -ef | /usr/bin/grep -q '/sshd\?$' then echo csih_error "There are still ssh processes running. Please shut them down first." fi +# Make sure the user is running in an administrative context +admin=$(/usr/bin/id -G | /usr/bin/grep -Eq '\<544\>' && echo yes || echo no) +if [ "${admin}" != "yes" ] +then + echo + csih_warning "Running this script typically requires administrator privileges!" + csih_warning "However, it seems your account does not have these privileges." + csih_warning "Here's the list of groups in your user token:" + echo + for i in $(/usr/bin/id -G) + do + /usr/bin/awk -F: "/[^:]*:[^:]*:$i:/{ print \" \" \$1; }" /etc/group + done + echo + csih_warning "This usually means you're running this script from a non-admin" + csih_warning "desktop session, or in a non-elevated shell under UAC control." + echo + csih_warning "Make sure you have the appropriate privileges right now," + csih_warning "otherwise parts of this script will probably fail!" + echo + echo -e "${_csih_QUERY_STR} Are you sure you want to continue? (Say \"no\" if you're not sure" + if ! csih_request "you have the required privileges)" + then + echo + csih_inform "Ok. Exiting. Make sure to switch to an administrative account" + csih_inform "or to start this script from an elevated shell." + exit 1 + fi +fi + +echo + +warning_cnt=0 + # Check for ${SYSCONFDIR} directory csih_make_dir "${SYSCONFDIR}" "Cannot create global configuration files." -chmod 775 "${SYSCONFDIR}" -setfacl -m u:system:rwx "${SYSCONFDIR}" +if ! /usr/bin/chmod 775 "${SYSCONFDIR}" >/dev/null 2>&1 +then + csih_warning "Can't set permissions on ${SYSCONFDIR}!" + let ++warning_cnt +fi +if ! /usr/bin/setfacl -m u:system:rwx "${SYSCONFDIR}" >/dev/null 2>&1 +then + csih_warning "Can't set extended permissions on ${SYSCONFDIR}!" + let ++warning_cnt +fi # Check for /var/log directory csih_make_dir "${LOCALSTATEDIR}/log" "Cannot create log directory." -chmod 775 "${LOCALSTATEDIR}/log" -setfacl -m u:system:rwx "${LOCALSTATEDIR}/log" +if ! /usr/bin/chmod 775 "${LOCALSTATEDIR}/log" >/dev/null 2>&1 +then + csih_warning "Can't set permissions on ${LOCALSTATEDIR}/log!" + let ++warning_cnt +fi +if ! /usr/bin/setfacl -m u:system:rwx "${LOCALSTATEDIR}/log" >/dev/null 2>&1 +then + csih_warning "Can't set extended permissions on ${LOCALSTATEDIR}/log!" + let ++warning_cnt +fi # Create /var/log/lastlog if not already exists if [ -e ${LOCALSTATEDIR}/log/lastlog -a ! -f ${LOCALSTATEDIR}/log/lastlog ] @@ -513,26 +697,33 @@ then fi if [ ! -e ${LOCALSTATEDIR}/log/lastlog ] then - cat /dev/null > ${LOCALSTATEDIR}/log/lastlog - chmod 644 ${LOCALSTATEDIR}/log/lastlog + /usr/bin/cat /dev/null > ${LOCALSTATEDIR}/log/lastlog + if ! /usr/bin/chmod 644 ${LOCALSTATEDIR}/log/lastlog >/dev/null 2>&1 + then + csih_warning "Can't set permissions on ${LOCALSTATEDIR}/log/lastlog!" + let ++warning_cnt + fi fi # Create /var/empty file used as chroot jail for privilege separation csih_make_dir "${LOCALSTATEDIR}/empty" "Cannot create ${LOCALSTATEDIR}/empty directory." -chmod 755 "${LOCALSTATEDIR}/empty" -setfacl -m u:system:rwx "${LOCALSTATEDIR}/empty" +if ! /usr/bin/chmod 755 "${LOCALSTATEDIR}/empty" >/dev/null 2>&1 +then + csih_warning "Can't set permissions on ${LOCALSTATEDIR}/empty!" + let ++warning_cnt +fi +if ! /usr/bin/setfacl -m u:system:rwx "${LOCALSTATEDIR}/empty" >/dev/null 2>&1 +then + csih_warning "Can't set extended permissions on ${LOCALSTATEDIR}/empty!" + let ++warning_cnt +fi # host keys -create_host_keys - -# use 'cmp' program to determine if a config file is identical -# to the default version of that config file -csih_check_program_or_error cmp diffutils - +create_host_keys || let warning_cnt+=$? # handle ssh_config -csih_install_config "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults" -if cmp "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/ssh_config" >/dev/null 2>&1 +csih_install_config "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults" || let ++warning_cnt +if /usr/bin/cmp "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/ssh_config" >/dev/null 2>&1 then if [ "${port_number}" != "22" ] then @@ -543,19 +734,24 @@ then fi # handle sshd_config (and privsep) -csih_install_config "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults" -if ! cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1 +csih_install_config "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults" || let ++warning_cnt +if ! /usr/bin/cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1 then - grep -q UsePrivilegeSeparation ${SYSCONFDIR}/sshd_config && privsep_configured=yes + /usr/bin/grep -q UsePrivilegeSeparation ${SYSCONFDIR}/sshd_config && privsep_configured=yes fi -sshd_privsep - +sshd_privsep || let warning_cnt+=$? - -update_services_file -update_inetd_conf -install_service +update_services_file || let warning_cnt+=$? +update_inetd_conf || let warning_cnt+=$? +install_service || let warning_cnt+=$? echo -csih_inform "Host configuration finished. Have fun!" - +if [ $warning_cnt -eq 0 ] +then + csih_inform "Host configuration finished. Have fun!" +else + csih_warning "Host configuration exited with ${warning_cnt} errors or warnings!" + csih_warning "Make sure that all problems reported are fixed," + csih_warning "then re-run ssh-host-config." +fi +exit $warning_cnt Modified: vendor-crypto/openssh/dist/contrib/cygwin/ssh-user-config ============================================================================== --- vendor-crypto/openssh/dist/contrib/cygwin/ssh-user-config Tue May 3 11:07:46 2011 (r221376) +++ vendor-crypto/openssh/dist/contrib/cygwin/ssh-user-config Tue May 3 11:22:37 2011 (r221377) @@ -39,85 +39,34 @@ pwdhome= with_passphrase= # ====================================================================== -# Routine: create_ssh1_identity -# optionally create ~/.ssh/identity[.pub] +# Routine: create_identity +# optionally create identity of type argument in ~/.ssh # optionally add result to ~/.ssh/authorized_keys # ====================================================================== -create_ssh1_identity() { - if [ ! -f "${pwdhome}/.ssh/identity" ] +create_identity() { + local file="$1" + local type="$2" + local name="$3" + if [ ! -f "${pwdhome}/.ssh/${file}" ] then - if csih_request "Shall I create an SSH1 RSA identity file for you?" + if csih_request "Shall I create a ${name} identity file for you?" then - csih_inform "Generating ${pwdhome}/.ssh/identity" + csih_inform "Generating ${pwdhome}/.ssh/${file}" if [ "${with_passphrase}" = "yes" ] then - ssh-keygen -t rsa1 -N "${passphrase}" -f "${pwdhome}/.ssh/identity" > /dev/null + ssh-keygen -t "${type}" -N "${passphrase}" -f "${pwdhome}/.ssh/${file}" > /dev/null else - ssh-keygen -t rsa1 -f "${pwdhome}/.ssh/identity" > /dev/null + ssh-keygen -t "${type}" -f "${pwdhome}/.ssh/${file}" > /dev/null fi if csih_request "Do you want to use this identity to login to this machine?" then csih_inform "Adding to ${pwdhome}/.ssh/authorized_keys" - cat "${pwdhome}/.ssh/identity.pub" >> "${pwdhome}/.ssh/authorized_keys" + cat "${pwdhome}/.ssh/${file}.pub" >> "${pwdhome}/.ssh/authorized_keys" fi fi fi } # === End of create_ssh1_identity() === # -readonly -f create_ssh1_identity - -# ====================================================================== -# Routine: create_ssh2_rsa_identity -# optionally create ~/.ssh/id_rsa[.pub] -# optionally add result to ~/.ssh/authorized_keys -# ====================================================================== -create_ssh2_rsa_identity() { - if [ ! -f "${pwdhome}/.ssh/id_rsa" ] - then - if csih_request "Shall I create an SSH2 RSA identity file for you?" - then - csih_inform "Generating ${pwdhome}/.ssh/id_rsa" - if [ "${with_passphrase}" = "yes" ] - then - ssh-keygen -t rsa -N "${passphrase}" -f "${pwdhome}/.ssh/id_rsa" > /dev/null - else - ssh-keygen -t rsa -f "${pwdhome}/.ssh/id_rsa" > /dev/null - fi - if csih_request "Do you want to use this identity to login to this machine?" - then - csih_inform "Adding to ${pwdhome}/.ssh/authorized_keys" - cat "${pwdhome}/.ssh/id_rsa.pub" >> "${pwdhome}/.ssh/authorized_keys" - fi - fi - fi -} # === End of create_ssh2_rsa_identity() === # -readonly -f create_ssh2_rsa_identity - -# ====================================================================== -# Routine: create_ssh2_dsa_identity -# optionally create ~/.ssh/id_dsa[.pub] -# optionally add result to ~/.ssh/authorized_keys -# ====================================================================== -create_ssh2_dsa_identity() { - if [ ! -f "${pwdhome}/.ssh/id_dsa" ] - then - if csih_request "Shall I create an SSH2 DSA identity file for you?" - then - csih_inform "Generating ${pwdhome}/.ssh/id_dsa" - if [ "${with_passphrase}" = "yes" ] - then - ssh-keygen -t dsa -N "${passphrase}" -f "${pwdhome}/.ssh/id_dsa" > /dev/null - else - ssh-keygen -t dsa -f "${pwdhome}/.ssh/id_dsa" > /dev/null - fi - if csih_request "Do you want to use this identity to login to this machine?" - then - csih_inform "Adding to ${pwdhome}/.ssh/authorized_keys" - cat "${pwdhome}/.ssh/id_dsa.pub" >> "${pwdhome}/.ssh/authorized_keys" - fi - fi - fi -} # === End of create_ssh2_dsa_identity() === # -readonly -f create_ssh2_dsa_identity +readonly -f create_identity # ====================================================================== # Routine: check_user_homedir @@ -311,9 +260,10 @@ fi check_user_homedir check_user_dot_ssh_dir -create_ssh1_identity -create_ssh2_rsa_identity -create_ssh2_dsa_identity +create_identity id_rsa rsa "SSH2 RSA" +create_identity id_dsa dsa "SSH2 DSA" +create_identity id_ecdsa ecdsa "SSH2 ECDSA" +create_identity identity rsa1 "(deprecated) SSH1 RSA" fix_authorized_keys_perms echo Modified: vendor-crypto/openssh/dist/contrib/redhat/openssh.spec ============================================================================== --- vendor-crypto/openssh/dist/contrib/redhat/openssh.spec Tue May 3 11:07:46 2011 (r221376) +++ vendor-crypto/openssh/dist/contrib/redhat/openssh.spec Tue May 3 11:22:37 2011 (r221377) @@ -1,4 +1,4 @@ -%define ver 5.8p1 +%define ver 5.8p2 %define rel 1 # OpenSSH privilege separation requires a user & group ID Modified: vendor-crypto/openssh/dist/contrib/suse/openssh.spec ============================================================================== --- vendor-crypto/openssh/dist/contrib/suse/openssh.spec Tue May 3 11:07:46 2011 (r221376) +++ vendor-crypto/openssh/dist/contrib/suse/openssh.spec Tue May 3 11:22:37 2011 (r221377) @@ -13,7 +13,7 @@ Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation Name: openssh -Version: 5.8p1 +Version: 5.8p2 URL: http://www.openssh.com/ Release: 1 Source0: openssh-%{version}.tar.gz Modified: vendor-crypto/openssh/dist/entropy.c ============================================================================== --- vendor-crypto/openssh/dist/entropy.c Tue May 3 11:07:46 2011 (r221376) +++ vendor-crypto/openssh/dist/entropy.c Tue May 3 11:22:37 2011 (r221377) @@ -100,6 +100,7 @@ seed_rng(void) close(p[0]); close(p[1]); close(devnull); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 3 11:23:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5BA2106566B; Tue, 3 May 2011 11:23:40 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77B2D8FC20; Tue, 3 May 2011 11:23:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43BNeC8091037; Tue, 3 May 2011 11:23:40 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43BNeIk091036; Tue, 3 May 2011 11:23:40 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201105031123.p43BNeIk091036@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 3 May 2011 11:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221378 - vendor-crypto/openssh/5.8p2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 11:23:40 -0000 Author: des Date: Tue May 3 11:23:40 2011 New Revision: 221378 URL: http://svn.freebsd.org/changeset/base/221378 Log: Tag OpenSSH 5.8p2 Added: vendor-crypto/openssh/5.8p2/ - copied from r221377, vendor-crypto/openssh/dist/ From owner-svn-src-all@FreeBSD.ORG Tue May 3 11:37:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B239A1065677; Tue, 3 May 2011 11:37:03 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D5CB8FC1A; Tue, 3 May 2011 11:37:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43Bb3PX091466; Tue, 3 May 2011 11:37:03 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43Bb32Q091458; Tue, 3 May 2011 11:37:03 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031137.p43Bb32Q091458@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 11:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221379 - vendor/one-true-awk/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 11:37:03 -0000 Author: ru Date: Tue May 3 11:37:03 2011 New Revision: 221379 URL: http://svn.freebsd.org/changeset/base/221379 Log: Vendor import of bwk's 1-May-2011 release. Modified: vendor/one-true-awk/dist/FIXES vendor/one-true-awk/dist/README vendor/one-true-awk/dist/b.c vendor/one-true-awk/dist/lib.c vendor/one-true-awk/dist/main.c vendor/one-true-awk/dist/makefile vendor/one-true-awk/dist/run.c Modified: vendor/one-true-awk/dist/FIXES ============================================================================== --- vendor/one-true-awk/dist/FIXES Tue May 3 11:23:40 2011 (r221378) +++ vendor/one-true-awk/dist/FIXES Tue May 3 11:37:03 2011 (r221379) @@ -25,6 +25,32 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +May 1, 2011: + after advice from todd miller, kevin lo, ruslan ermilov, + and arnold robbins, changed srand() to return the previous + seed (which is 1 on the first call of srand). the seed is + an Awkfloat internally though converted to unsigned int to + pass to the library srand(). thanks, everyone. + + fixed a subtle (and i hope low-probability) overflow error + in fldbld, by adding space for one extra \0. thanks to + robert bassett for spotting this one and providing a fix. + + removed the files related to compilation on windows. i no + longer have anything like a current windows environment, so + i can't test any of it. + +May 23, 2010: + fixed long-standing overflow bug in run.c; many thanks to + nelson beebe for spotting it and providing the fix. + + fixed bug that didn't parse -vd=1 properly; thanks to santiago + vila for spotting it. + +Feb 8, 2010: + i give up. replaced isblank with isspace in b.c; there are + no consistent header files. + Nov 26, 2009: fixed a long-standing issue with when FS takes effect. a change to FS is now noticed immediately for subsequent splits. Modified: vendor/one-true-awk/dist/README ============================================================================== --- vendor/one-true-awk/dist/README Tue May 3 11:23:40 2011 (r221378) +++ vendor/one-true-awk/dist/README Tue May 3 11:37:03 2011 (r221379) @@ -29,7 +29,7 @@ by Al Aho, Brian Kernighan, and Peter We Changes, mostly bug fixes and occasional enhancements, are listed in FIXES. If you distribute this code further, please please please distribute FIXES with it. If you find errors, please report them -to bwk@bell-labs.com. Thanks. +to bwk@cs.princeton.edu. Thanks. The program itself is created by make Modified: vendor/one-true-awk/dist/b.c ============================================================================== --- vendor/one-true-awk/dist/b.c Tue May 3 11:23:40 2011 (r221378) +++ vendor/one-true-awk/dist/b.c Tue May 3 11:37:03 2011 (r221379) @@ -734,7 +734,7 @@ Node *unary(Node *np) /* #define HAS_ISBLANK */ #ifndef HAS_ISBLANK -int (isblank)(int c) +int (xisblank)(int c) { return c==' ' || c=='\t'; } @@ -748,7 +748,7 @@ struct charclass { } charclasses[] = { { "alnum", 5, isalnum }, { "alpha", 5, isalpha }, - { "blank", 5, isblank }, + { "blank", 5, isspace }, /* was isblank */ { "cntrl", 5, iscntrl }, { "digit", 5, isdigit }, { "graph", 5, isgraph }, Modified: vendor/one-true-awk/dist/lib.c ============================================================================== --- vendor/one-true-awk/dist/lib.c Tue May 3 11:23:40 2011 (r221378) +++ vendor/one-true-awk/dist/lib.c Tue May 3 11:37:03 2011 (r221379) @@ -256,6 +256,7 @@ void fldbld(void) /* create fields from { /* this relies on having fields[] the same length as $0 */ /* the fields are all stored in this one array with \0's */ + /* possibly with a final trailing \0 not associated with any field */ char *r, *fr, sep; Cell *p; int i, j, n; @@ -268,7 +269,7 @@ void fldbld(void) /* create fields from n = strlen(r); if (n > fieldssize) { xfree(fields); - if ((fields = (char *) malloc(n+1)) == NULL) + if ((fields = (char *) malloc(n+2)) == NULL) /* possibly 2 final \0s */ FATAL("out of space for fields in fldbld %d", n); fieldssize = n; } Modified: vendor/one-true-awk/dist/main.c ============================================================================== --- vendor/one-true-awk/dist/main.c Tue May 3 11:23:40 2011 (r221378) +++ vendor/one-true-awk/dist/main.c Tue May 3 11:37:03 2011 (r221379) @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20091126"; +const char *version = "version 20110501"; #define DEBUG #include @@ -38,6 +38,7 @@ extern char **environ; extern int nfields; int dbg = 0; +Awkfloat srand_seed = 1; char *cmdname; /* gets argv[0] for error messages */ extern FILE *yyin; /* lex input file */ char *lexprog; /* points to program argument if it exists */ @@ -67,6 +68,10 @@ int main(int argc, char *argv[]) exit(1); } signal(SIGFPE, fpecatch); + + srand_seed = 1; + srand(srand_seed); + yyin = NULL; symtab = makesymtab(NSYMTAB/NSYMTAB); while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { @@ -113,6 +118,8 @@ int main(int argc, char *argv[]) case 'v': /* -v a=1 to be done NOW. one -v for each */ if (argv[1][2] == '\0' && --argc > 1 && isclvar((++argv)[1])) setclvar(argv[1]); + else if (argv[1][2] != '\0') + setclvar(&argv[1][2]); break; case 'd': dbg = atoi(&argv[1][2]); Modified: vendor/one-true-awk/dist/makefile ============================================================================== --- vendor/one-true-awk/dist/makefile Tue May 3 11:23:40 2011 (r221378) +++ vendor/one-true-awk/dist/makefile Tue May 3 11:37:03 2011 (r221379) @@ -26,13 +26,12 @@ CFLAGS = -g CFLAGS = -O2 CFLAGS = -CC = gcc -Wall -g -Wwrite-strings -CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov CC = gcc -Wall -g CC = cc +CC = gcc -Wall -g -Wwrite-strings +CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov CC = gcc -O4 - YACC = bison -y YACC = yacc YFLAGS = -d @@ -40,13 +39,13 @@ YFLAGS = -d OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o SOURCE = awk.h ytab.c ytab.h proto.h awkgram.y lex.c b.c main.c \ - maketab.c parse.c lib.c run.c tran.c proctab.c missing95.c + maketab.c parse.c lib.c run.c tran.c proctab.c LISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \ - lib.c run.c tran.c missing95.c + lib.c run.c tran.c -SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile makefile.win \ - vcvars32.bat buildwin.bat awk.1 +SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile \ + awk.1 a.out: ytab.o $(OFILES) $(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -lm Modified: vendor/one-true-awk/dist/run.c ============================================================================== --- vendor/one-true-awk/dist/run.c Tue May 3 11:23:40 2011 (r221378) +++ vendor/one-true-awk/dist/run.c Tue May 3 11:37:03 2011 (r221379) @@ -66,6 +66,7 @@ void tempfree(Cell *p) { jmp_buf env; extern int pairstack[]; +extern Awkfloat srand_seed; Node *winner = NULL; /* root of parse tree */ Cell *tmps; /* free temporary cells for execution */ @@ -1466,6 +1467,7 @@ Cell *bltin(Node **a, int n) /* builtin Cell *x, *y; Awkfloat u; int t; + Awkfloat tmp; char *p, *buf; Node *nextarg; FILE *fp; @@ -1517,7 +1519,10 @@ Cell *bltin(Node **a, int n) /* builtin u = time((time_t *)0); else u = getfval(x); + tmp = u; srand((unsigned int) u); + u = srand_seed; + srand_seed = tmp; break; case FTOUPPER: case FTOLOWER: @@ -1887,9 +1892,10 @@ Cell *gsub(Node **a, int nnn) /* global adjbuf(&buf, &bufsz, 1+strlen(sptr)+pb-buf, 0, &pb, "gsub"); while ((*pb++ = *sptr++) != 0) ; - done: if (pb > buf + bufsz) - FATAL("gsub result2 %.30s too big; can't happen", buf); - *pb = '\0'; + done: if (pb < buf + bufsz) + *pb = '\0'; + else if (*(pb-1) != '\0') + FATAL("gsub result2 %.30s truncated; can't happen", buf); setsval(x, buf); /* BUG: should be able to avoid copy + free */ pfa->initstat = tempstat; } From owner-svn-src-all@FreeBSD.ORG Tue May 3 11:39:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687EA106564A; Tue, 3 May 2011 11:39:01 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6558FC16; Tue, 3 May 2011 11:39:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43Bd1U4091565; Tue, 3 May 2011 11:39:01 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43Bd1PH091564; Tue, 3 May 2011 11:39:01 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031139.p43Bd1PH091564@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 11:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221380 - vendor/one-true-awk/20110501 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 11:39:01 -0000 Author: ru Date: Tue May 3 11:39:00 2011 New Revision: 221380 URL: http://svn.freebsd.org/changeset/base/221380 Log: Tag a 20110501 release. Added: vendor/one-true-awk/20110501/ - copied from r221379, vendor/one-true-awk/dist/ From owner-svn-src-all@FreeBSD.ORG Tue May 3 11:47:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25A0B106566B; Tue, 3 May 2011 11:47:20 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1050A8FC15; Tue, 3 May 2011 11:47:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43BlJHx091851; Tue, 3 May 2011 11:47:19 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43BlJjR091843; Tue, 3 May 2011 11:47:19 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031147.p43BlJjR091843@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 11:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221381 - head/contrib/one-true-awk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 11:47:20 -0000 Author: ru Date: Tue May 3 11:47:19 2011 New Revision: 221381 URL: http://svn.freebsd.org/changeset/base/221381 Log: Update to a 1-May-2011 release (except for the isblank change). Modified: head/contrib/one-true-awk/FIXES head/contrib/one-true-awk/README head/contrib/one-true-awk/b.c head/contrib/one-true-awk/lib.c head/contrib/one-true-awk/main.c head/contrib/one-true-awk/makefile head/contrib/one-true-awk/run.c Directory Properties: head/contrib/one-true-awk/ (props changed) Modified: head/contrib/one-true-awk/FIXES ============================================================================== --- head/contrib/one-true-awk/FIXES Tue May 3 11:39:00 2011 (r221380) +++ head/contrib/one-true-awk/FIXES Tue May 3 11:47:19 2011 (r221381) @@ -25,6 +25,32 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +May 1, 2011: + after advice from todd miller, kevin lo, ruslan ermilov, + and arnold robbins, changed srand() to return the previous + seed (which is 1 on the first call of srand). the seed is + an Awkfloat internally though converted to unsigned int to + pass to the library srand(). thanks, everyone. + + fixed a subtle (and i hope low-probability) overflow error + in fldbld, by adding space for one extra \0. thanks to + robert bassett for spotting this one and providing a fix. + + removed the files related to compilation on windows. i no + longer have anything like a current windows environment, so + i can't test any of it. + +May 23, 2010: + fixed long-standing overflow bug in run.c; many thanks to + nelson beebe for spotting it and providing the fix. + + fixed bug that didn't parse -vd=1 properly; thanks to santiago + vila for spotting it. + +Feb 8, 2010: + i give up. replaced isblank with isspace in b.c; there are + no consistent header files. + Nov 26, 2009: fixed a long-standing issue with when FS takes effect. a change to FS is now noticed immediately for subsequent splits. Modified: head/contrib/one-true-awk/README ============================================================================== --- head/contrib/one-true-awk/README Tue May 3 11:39:00 2011 (r221380) +++ head/contrib/one-true-awk/README Tue May 3 11:47:19 2011 (r221381) @@ -29,7 +29,7 @@ by Al Aho, Brian Kernighan, and Peter We Changes, mostly bug fixes and occasional enhancements, are listed in FIXES. If you distribute this code further, please please please distribute FIXES with it. If you find errors, please report them -to bwk@bell-labs.com. Thanks. +to bwk@cs.princeton.edu. Thanks. The program itself is created by make Modified: head/contrib/one-true-awk/b.c ============================================================================== --- head/contrib/one-true-awk/b.c Tue May 3 11:39:00 2011 (r221380) +++ head/contrib/one-true-awk/b.c Tue May 3 11:47:19 2011 (r221381) @@ -752,7 +752,7 @@ Node *unary(Node *np) /* #define HAS_ISBLANK */ #ifndef HAS_ISBLANK -int (isblank)(int c) +int (xisblank)(int c) { return c==' ' || c=='\t'; } @@ -766,7 +766,11 @@ struct charclass { } charclasses[] = { { "alnum", 5, isalnum }, { "alpha", 5, isalpha }, +#ifndef HAS_ISBLANK + { "blank", 5, isspace }, /* was isblank */ +#else { "blank", 5, isblank }, +#endif { "cntrl", 5, iscntrl }, { "digit", 5, isdigit }, { "graph", 5, isgraph }, Modified: head/contrib/one-true-awk/lib.c ============================================================================== --- head/contrib/one-true-awk/lib.c Tue May 3 11:39:00 2011 (r221380) +++ head/contrib/one-true-awk/lib.c Tue May 3 11:47:19 2011 (r221381) @@ -256,6 +256,7 @@ void fldbld(void) /* create fields from { /* this relies on having fields[] the same length as $0 */ /* the fields are all stored in this one array with \0's */ + /* possibly with a final trailing \0 not associated with any field */ char *r, *fr, sep; Cell *p; int i, j, n; @@ -268,7 +269,7 @@ void fldbld(void) /* create fields from n = strlen(r); if (n > fieldssize) { xfree(fields); - if ((fields = (char *) malloc(n+1)) == NULL) + if ((fields = (char *) malloc(n+2)) == NULL) /* possibly 2 final \0s */ FATAL("out of space for fields in fldbld %d", n); fieldssize = n; } Modified: head/contrib/one-true-awk/main.c ============================================================================== --- head/contrib/one-true-awk/main.c Tue May 3 11:39:00 2011 (r221380) +++ head/contrib/one-true-awk/main.c Tue May 3 11:47:19 2011 (r221381) @@ -25,7 +25,7 @@ THIS SOFTWARE. #include __FBSDID("$FreeBSD$"); -const char *version = "version 20091126 (FreeBSD)"; +const char *version = "version 20110501 (FreeBSD)"; #define DEBUG #include @@ -41,6 +41,7 @@ extern char **environ; extern int nfields; int dbg = 0; +Awkfloat srand_seed = 1; char *cmdname; /* gets argv[0] for error messages */ extern FILE *yyin; /* lex input file */ char *lexprog; /* points to program argument if it exists */ @@ -71,6 +72,10 @@ int main(int argc, char *argv[]) exit(1); } signal(SIGFPE, fpecatch); + + srand_seed = 1; + srand(srand_seed); + yyin = NULL; symtab = makesymtab(NSYMTAB/NSYMTAB); while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { @@ -120,14 +125,10 @@ int main(int argc, char *argv[]) WARNING("field separator FS is empty"); break; case 'v': /* -v a=1 to be done NOW. one -v for each */ - if (argv[1][2] != 0) { /* arg is -vsomething */ - if (argv[1][2] != 0) - setclvar(&argv[1][2]); - } else { /* arg is -v something */ - argc--; argv++; - if (argc > 1 && isclvar(argv[1])) - setclvar(argv[1]); - } + if (argv[1][2] == '\0' && --argc > 1 && isclvar((++argv)[1])) + setclvar(argv[1]); + else if (argv[1][2] != '\0') + setclvar(&argv[1][2]); break; case 'd': dbg = atoi(&argv[1][2]); Modified: head/contrib/one-true-awk/makefile ============================================================================== --- head/contrib/one-true-awk/makefile Tue May 3 11:39:00 2011 (r221380) +++ head/contrib/one-true-awk/makefile Tue May 3 11:47:19 2011 (r221381) @@ -26,13 +26,12 @@ CFLAGS = -g CFLAGS = -O2 CFLAGS = -CC = gcc -Wall -g -Wwrite-strings -CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov CC = gcc -Wall -g CC = cc +CC = gcc -Wall -g -Wwrite-strings +CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov CC = gcc -O4 - YACC = bison -y YACC = yacc YFLAGS = -d @@ -40,13 +39,13 @@ YFLAGS = -d OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o SOURCE = awk.h ytab.c ytab.h proto.h awkgram.y lex.c b.c main.c \ - maketab.c parse.c lib.c run.c tran.c proctab.c missing95.c + maketab.c parse.c lib.c run.c tran.c proctab.c LISTING = awk.h proto.h awkgram.y lex.c b.c main.c maketab.c parse.c \ - lib.c run.c tran.c missing95.c + lib.c run.c tran.c -SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile makefile.win \ - vcvars32.bat buildwin.bat awk.1 +SHIP = README FIXES $(SOURCE) ytab[ch].bak makefile \ + awk.1 a.out: ytab.o $(OFILES) $(CC) $(CFLAGS) ytab.o $(OFILES) $(ALLOC) -lm Modified: head/contrib/one-true-awk/run.c ============================================================================== --- head/contrib/one-true-awk/run.c Tue May 3 11:39:00 2011 (r221380) +++ head/contrib/one-true-awk/run.c Tue May 3 11:47:19 2011 (r221381) @@ -69,6 +69,7 @@ void tempfree(Cell *p) { jmp_buf env; extern int pairstack[]; +extern Awkfloat srand_seed; Node *winner = NULL; /* root of parse tree */ Cell *tmps; /* free temporary cells for execution */ @@ -1469,6 +1470,7 @@ Cell *bltin(Node **a, int n) /* builtin Cell *x, *y; Awkfloat u; int t; + Awkfloat tmp; char *p, *buf; Node *nextarg; FILE *fp; @@ -1520,7 +1522,10 @@ Cell *bltin(Node **a, int n) /* builtin u = time((time_t *)0); else u = getfval(x); + tmp = u; srand((unsigned int) u); + u = srand_seed; + srand_seed = tmp; break; case FTOUPPER: case FTOLOWER: @@ -1890,9 +1895,10 @@ Cell *gsub(Node **a, int nnn) /* global adjbuf(&buf, &bufsz, 1+strlen(sptr)+pb-buf, 0, &pb, "gsub"); while ((*pb++ = *sptr++) != 0) ; - done: if (pb > buf + bufsz) - FATAL("gsub result2 %.30s too big; can't happen", buf); - *pb = '\0'; + done: if (pb < buf + bufsz) + *pb = '\0'; + else if (*(pb-1) != '\0') + FATAL("gsub result2 %.30s truncated; can't happen", buf); setsval(x, buf); /* BUG: should be able to avoid copy + free */ pfa->initstat = tempstat; } From owner-svn-src-all@FreeBSD.ORG Tue May 3 12:21:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E25C4106579F; Tue, 3 May 2011 12:21:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B585F8FC15; Tue, 3 May 2011 12:21:08 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 5AC8B46B52; Tue, 3 May 2011 08:21:08 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E9DAB8A027; Tue, 3 May 2011 08:21:07 -0400 (EDT) From: John Baldwin To: Craig Rodrigues Date: Tue, 3 May 2011 07:50:44 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201105030743.p437hl8M075368@svn.freebsd.org> In-Reply-To: <201105030743.p437hl8M075368@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201105030750.44240.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 03 May 2011 08:21:08 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221365 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 12:21:09 -0000 On Tuesday, May 03, 2011 3:43:47 am Craig Rodrigues wrote: > Author: rodrigc > Date: Tue May 3 07:43:47 2011 > New Revision: 221365 > URL: http://svn.freebsd.org/changeset/base/221365 > > Log: > - Comment out unused variable. > - Add parentheses around expression to eliminate compiler warning. > > Modified: > head/lib/libstand/dosfs.c > > Modified: head/lib/libstand/dosfs.c > ============================================================================== > --- head/lib/libstand/dosfs.c Tue May 3 07:39:54 2011 (r221364) > +++ head/lib/libstand/dosfs.c Tue May 3 07:43:47 2011 (r221365) > @@ -358,7 +358,7 @@ dos_stat(struct open_file *fd, struct st > static int > dos_readdir(struct open_file *fd, struct dirent *d) > { > - DOS_FILE *f = (DOS_FILE *)fd->f_fsdata; > + /* DOS_FILE *f = (DOS_FILE *)fd->f_fsdata; */ Err, wouldn't it be better to just remove it if it is unused? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue May 3 12:22:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 946C01065677; Tue, 3 May 2011 12:22:46 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 801118FC08; Tue, 3 May 2011 12:22:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43CMkBp092964; Tue, 3 May 2011 12:22:46 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43CMkUb092962; Tue, 3 May 2011 12:22:46 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031222.p43CMkUb092962@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 12:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221382 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 12:22:46 -0000 Author: ru Date: Tue May 3 12:22:46 2011 New Revision: 221382 URL: http://svn.freebsd.org/changeset/base/221382 Log: Updated `flags' field description. Modified: head/etc/newsyslog.conf Modified: head/etc/newsyslog.conf ============================================================================== --- head/etc/newsyslog.conf Tue May 3 11:47:19 2011 (r221381) +++ head/etc/newsyslog.conf Tue May 3 12:22:46 2011 (r221382) @@ -8,7 +8,7 @@ # is no process which needs to be signalled when a given log file is # rotated, then the entry for that file should include the 'N' flag. # -# The 'flags' field is one or more of the letters: BCGJNUWZ or a '-'. +# The 'flags' field is one or more of the letters: BCDGJNUXZ or a '-'. # # Note: some sites will want to select more restrictive protections than the # defaults. In particular, it may be desirable to switch many of the 644 From owner-svn-src-all@FreeBSD.ORG Tue May 3 12:29:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25CF6106566C; Tue, 3 May 2011 12:29:04 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 056CA8FC08; Tue, 3 May 2011 12:29:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43CT370093193; Tue, 3 May 2011 12:29:03 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43CT3Yk093191; Tue, 3 May 2011 12:29:03 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031229.p43CT3Yk093191@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 12:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221383 - head/usr.bin/calendar/calendars X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 12:29:04 -0000 Author: ru Date: Tue May 3 12:29:03 2011 New Revision: 221383 URL: http://svn.freebsd.org/changeset/base/221383 Log: Fixed bad format and misorder. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue May 3 12:22:46 2011 (r221382) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue May 3 12:29:03 2011 (r221383) @@ -45,8 +45,8 @@ 02/01 Juli Mallett born in Washington, Pennsylvania, United States, 1985 02/02 Diomidis D. Spinellis born in Athens, Greece, 1967 02/02 Michael W Lucas born in Detroit, Michigan, United States, 1967 -02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 02/02 Dmitry Chagin born in Stalingrad, USSR, 1976 +02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 02/05 Frank Laszlo born in Howell, Michigan, United States, 1983 02/10 David Greenman born in Portland, Oregon, United States, 1968 02/10 Paul Richards born in Ammanford, Carmarthenshire, United Kingdom, 1968 @@ -68,7 +68,6 @@ 02/24 Johan Karlsson born in Mariannelund, Sweden, 1974 02/24 Colin Percival born in Burnaby, Canada, 1981 02/26 Pietro Cerutti born in Faido, Switzerland, 1984 -05/19 Sofian Brabez born in Toulouse, France, 1984 02/28 Daichi GOTO born in Shimizu Suntou, Shizuoka, Japan, 1980 03/01 Hye-Shik Chang born in Daejeon, Republic of Korea, 1980 03/02 Cy Schubert born in Edmonton, Alberta, Canada, 1956 @@ -151,7 +150,8 @@ 05/17 Thomas Abthorpe born in Port Arthur, Ontario, Canada, 1968 05/19 Philippe Charnier born in Fontainebleau, France, 1966 05/19 Ian Dowse born in Dublin, Ireland, 1975 -05/20 Dan Moschuk died in Burlington, Ontario, Canada, 2010 +05/19 Sofian Brabez born in Toulouse, France, 1984 +05/20 Dan Moschuk died in Burlington, Ontario, Canada, 2010 05/21 Kris Kennaway born in Winnipeg, Manitoba, Canada, 1978 05/22 Clive Tong-I Lin born in Changhua, Taiwan, Republic of China, 1978 05/22 Michael Bushkov born in Rostov-on-Don, Russian Federation, 1985 @@ -175,7 +175,7 @@ 06/04 Justin Gibbs born in San Pedro, California, United States, 1973 06/04 Jason Evans born in Greeley, Colorado, United States, 1973 06/04 Thomas Moestl born in Braunschweig, Niedersachsen, Germany, 1980 -06/04 Zack Kirsch born in Memphis, Tennessee, United States, 1982 +06/04 Zack Kirsch born in Memphis, Tennessee, United States, 1982 06/06 Sergei Kolobov born in Karpinsk, Russian Federation, 1972 06/06 Alan Eldridge died in Denver, Colorado, 2003 06/07 Jimmy Olgeni born in Milano, Italy, 1976 From owner-svn-src-all@FreeBSD.ORG Tue May 3 13:16:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6693106566B; Tue, 3 May 2011 13:16:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2AE68FC0C; Tue, 3 May 2011 13:16:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43DG2xK094666; Tue, 3 May 2011 13:16:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43DG21G094664; Tue, 3 May 2011 13:16:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105031316.p43DG21G094664@svn.freebsd.org> From: Alexander Motin Date: Tue, 3 May 2011 13:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221384 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 13:16:02 -0000 Author: mav Date: Tue May 3 13:16:02 2011 New Revision: 221384 URL: http://svn.freebsd.org/changeset/base/221384 Log: Do not report legacy unit numbers (do not create legacy aliases) for disks on port multiplier ports above first two. They don't fit into ATA_STATIC_ID scheme and so can't be mapped properly. No need to pollute dev. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue May 3 12:29:03 2011 (r221383) +++ head/sys/cam/cam_xpt.c Tue May 3 13:16:02 2011 (r221384) @@ -3600,9 +3600,12 @@ xpt_path_legacy_ata_id(struct cam_path * } xpt_unlock_buses(); } - if (path->target != NULL) - return (bus_id * 2 + path->target->target_id); - else + if (path->target != NULL) { + if (path->target->target_id < 2) + return (bus_id * 2 + path->target->target_id); + else + return (-1); + } else return (bus_id * 2); } From owner-svn-src-all@FreeBSD.ORG Tue May 3 13:34:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D65A3106566B; Tue, 3 May 2011 13:34:40 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2C3F8FC13; Tue, 3 May 2011 13:34:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43DYeIl095250; Tue, 3 May 2011 13:34:40 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43DYevk095248; Tue, 3 May 2011 13:34:40 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105031334.p43DYevk095248@svn.freebsd.org> From: Ruslan Ermilov Date: Tue, 3 May 2011 13:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221385 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 13:34:40 -0000 Author: ru Date: Tue May 3 13:34:40 2011 New Revision: 221385 URL: http://svn.freebsd.org/changeset/base/221385 Log: Fixed the HISTORY section which was copied without editing from aio(4). Submitted by: Igor Sysoev Modified: head/share/man/man4/sem.4 Modified: head/share/man/man4/sem.4 ============================================================================== --- head/share/man/man4/sem.4 Tue May 3 13:16:02 2011 (r221384) +++ head/share/man/man4/sem.4 Tue May 3 13:34:40 2011 (r221385) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2006 +.Dd May 3, 2011 .Dt SEM 4 .Os .Sh NAME @@ -73,9 +73,5 @@ dynamic kernel module. .Sh HISTORY The .Nm -facility appeared as a kernel option in -.Fx 3.0 . -The -.Nm -kernel module appeared in +facility appeared in .Fx 5.0 . From owner-svn-src-all@FreeBSD.ORG Tue May 3 14:16:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1A66106566C; Tue, 3 May 2011 14:16:04 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 909F38FC0C; Tue, 3 May 2011 14:16:04 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 9E41E7F3A8B; Tue, 3 May 2011 15:39:27 +0200 (CEST) Date: Tue, 3 May 2011 15:39:27 +0200 From: Roman Divacky To: Dimitry Andric Message-ID: <20110503133927.GA41839@freebsd.org> References: <201105022113.p42LD8TH055002@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105022113.p42LD8TH055002@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221348 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 14:16:04 -0000 With the recent libobjc removal this means that we can compile all (no exceptions) of FreeBSD/{i386,amd64} with clang. Quite a milestone in my opinion :) On Mon, May 02, 2011 at 09:13:08PM +0000, Dimitry Andric wrote: > Author: dim > Date: Mon May 2 21:13:08 2011 > New Revision: 221348 > URL: http://svn.freebsd.org/changeset/base/221348 > > Log: > Clang r130700 can now compile sys/boot/i386/boot2 with room to spare. > > Modified: > head/sys/boot/i386/boot2/Makefile > > Modified: head/sys/boot/i386/boot2/Makefile > ============================================================================== > --- head/sys/boot/i386/boot2/Makefile Mon May 2 21:10:13 2011 (r221347) > +++ head/sys/boot/i386/boot2/Makefile Mon May 2 21:13:08 2011 (r221348) > @@ -2,9 +2,6 @@ > > .include > > -# XXX: clang can compile the boot code just fine, but boot2 gets too big > -CC:=${CC:C/^(.*\/)?clang$/gcc/1} > - > FILES= boot boot1 boot2 > > NM?= nm > @@ -45,6 +42,12 @@ CFLAGS= -Os \ > -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ > -Winline --param max-inline-insns-single=100 > > +.if ${CC:T:Mclang} == "clang" > +CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 > +# XXX: clang integrated-as doesn't grok .codeNN directives yet > +CFLAGS+= ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/} > +.endif > + > LDFLAGS=-static -N --gc-sections > > # Pick up ../Makefile.inc early. From owner-svn-src-all@FreeBSD.ORG Tue May 3 14:43:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 693671065690; Tue, 3 May 2011 14:43:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 562588FC20; Tue, 3 May 2011 14:43:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43EhGRo097952; Tue, 3 May 2011 14:43:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43EhGhj097950; Tue, 3 May 2011 14:43:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105031443.p43EhGhj097950@svn.freebsd.org> From: Dimitry Andric Date: Tue, 3 May 2011 14:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221386 - head/contrib/texinfo/makeinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 14:43:16 -0000 Author: dim Date: Tue May 3 14:43:16 2011 New Revision: 221386 URL: http://svn.freebsd.org/changeset/base/221386 Log: Fix stack smash problem in makeinfo, by increasing buffer sizes in current_chapter_number(). Modified: head/contrib/texinfo/makeinfo/sectioning.c Modified: head/contrib/texinfo/makeinfo/sectioning.c ============================================================================== --- head/contrib/texinfo/makeinfo/sectioning.c Tue May 3 13:34:40 2011 (r221385) +++ head/contrib/texinfo/makeinfo/sectioning.c Tue May 3 14:43:16 2011 (r221386) @@ -256,13 +256,13 @@ current_chapter_number (void) return xstrdup (""); else if (enum_marker == APPENDIX_MAGIC) { - char s[1]; + char s[2]; sprintf (s, "%c", numbers[0] + 64); return xstrdup (s); } else { - char s[5]; + char s[11]; sprintf (s, "%d", numbers[0]); return xstrdup (s); } From owner-svn-src-all@FreeBSD.ORG Tue May 3 15:12:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25E5D106566C; Tue, 3 May 2011 15:12:02 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1239F8FC0C; Tue, 3 May 2011 15:12:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43FC1SW099142; Tue, 3 May 2011 15:12:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43FC1Jr099140; Tue, 3 May 2011 15:12:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105031512.p43FC1Jr099140@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 3 May 2011 15:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221387 - head/usr.sbin/makefs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 15:12:02 -0000 Author: nwhitehorn Date: Tue May 3 15:12:01 2011 New Revision: 221387 URL: http://svn.freebsd.org/changeset/base/221387 Log: Add support for synthesizing an APM partition map to map Mac PowerPC bootstrap partitions from the ISO9660 boot catalog. This preserves OS X's ability to mount the CD, while allowing us a way to provide HFS-ified bootstrap code for Open Firmware. Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Tue May 3 14:43:16 2011 (r221386) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Tue May 3 15:12:01 2011 (r221387) @@ -31,6 +31,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. */ + +#include + #include "cd9660.h" #include "cd9660_eltorito.h" @@ -497,11 +500,43 @@ cd9660_setup_boot_volume_descriptor(volu return 1; } +static int +cd9660_write_apm_partition_entry(FILE *fd, int index, int total_partitions, + off_t sector_start, off_t nsectors, off_t sector_size, + const char *part_name, const char *part_type) { + uint32_t apm32; + uint16_t apm16; + + fseeko(fd, (off_t)(index + 1) * sector_size, SEEK_SET); + + /* Signature */ + apm16 = htons(0x504d); + fwrite(&apm16, sizeof(apm16), 1, fd); + apm16 = 0; + fwrite(&apm16, sizeof(apm16), 1, fd); + + /* Total number of partitions */ + apm32 = htonl(total_partitions); + fwrite(&apm32, sizeof(apm32), 1, fd); + /* Bounds */ + apm32 = htonl(sector_start); + fwrite(&apm32, sizeof(apm32), 1, fd); + apm32 = htonl(nsectors); + fwrite(&apm32, sizeof(apm32), 1, fd); + + fwrite(part_name, strlen(part_name) + 1, 1, fd); + fseek(fd, 32 - strlen(part_name) - 1, SEEK_CUR); + fwrite(part_type, strlen(part_type) + 1, 1, fd); + + return 0; +} + int cd9660_write_boot(FILE *fd) { struct boot_catalog_entry *e; struct cd9660_boot_image *t; + int apm_partitions = 0; /* write boot catalog */ if (fseeko(fd, (off_t)diskStructure.boot_catalog_sector * @@ -533,7 +568,51 @@ cd9660_write_boot(FILE *fd) t->filename, t->sector); } cd9660_copy_file(fd, t->sector, t->filename); + + if (t->system == ET_SYS_MAC) + apm_partitions++; + } + + if (apm_partitions > 0) { + /* Write DDR and global APM info */ + uint32_t apm32; + uint16_t apm16; + int total_parts; + + fseek(fd, 0, SEEK_SET); + apm16 = htons(0x4552); + fwrite(&apm16, sizeof(apm16), 1, fd); + apm16 = htons(diskStructure.sectorSize); + fwrite(&apm16, sizeof(apm16), 1, fd); + apm32 = htonl(diskStructure.totalSectors); + fwrite(&apm32, sizeof(apm32), 1, fd); + + /* Count total needed entries */ + total_parts = 2 + apm_partitions; /* Self + ISO9660 */ + + /* Write self-descriptor */ + cd9660_write_apm_partition_entry(fd, 0, + total_parts, 1, total_parts, diskStructure.sectorSize, + "Apple", "Apple_partition_map"); + + /* Write ISO9660 descriptor, enclosing the whole disk */ + cd9660_write_apm_partition_entry(fd, 1, + total_parts, 0, diskStructure.totalSectors, + diskStructure.sectorSize, "", "CD_ROM_Mode_1"); + + /* Write all partition entries */ + apm_partitions = 0; + TAILQ_FOREACH(t, &diskStructure.boot_images, image_list) { + if (t->system != ET_SYS_MAC) + continue; + + cd9660_write_apm_partition_entry(fd, + 2 + apm_partitions++, total_parts, + t->sector, t->num_sectors, diskStructure.sectorSize, + "CD Boot", "Apple_Bootstrap"); + } } return 0; } + From owner-svn-src-all@FreeBSD.ORG Tue May 3 15:12:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0716106566B; Tue, 3 May 2011 15:12:30 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 504748FC35; Tue, 3 May 2011 15:12:29 +0000 (UTC) Received: from outgoing.leidinger.net (p5B155A42.dip.t-dialin.net [91.21.90.66]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 32A7E844017; Tue, 3 May 2011 16:55:16 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id 5DF4811C7; Tue, 3 May 2011 16:55:13 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p43EtDU3051300; Tue, 3 May 2011 16:55:13 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 03 May 2011 16:55:13 +0200 Message-ID: <20110503165513.1811181sivefe4xw@webmail.leidinger.net> Date: Tue, 03 May 2011 16:55:13 +0200 From: Alexander Leidinger To: Roman Divacky References: <201105022113.p42LD8TH055002@svn.freebsd.org> <20110503133927.GA41839@freebsd.org> In-Reply-To: <20110503133927.GA41839@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.6) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 32A7E844017.AE0D4 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=0.154, required 6, autolearn=disabled, TW_BJ 0.08, TW_SV 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1305039316.81097@Rwd3+soK/9QwGaLBmKm8jw X-EBL-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r221348 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 15:12:30 -0000 Quoting Roman Divacky (from Tue, 3 May 2011 15:39:27 +0200): > With the recent libobjc removal this means that we can compile > all (no exceptions) of FreeBSD/{i386,amd64} with clang. > > Quite a milestone in my opinion :) Newsflash? Bye, Alexander. -- Alas, how love can trifle with itself! -- William Shakespeare, "The Two Gentlemen of Verona" http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-svn-src-all@FreeBSD.ORG Tue May 3 15:27:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EF221065670; Tue, 3 May 2011 15:27:56 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3324D8FC0C; Tue, 3 May 2011 15:27:54 +0000 (UTC) Received: by fxm11 with SMTP id 11so234761fxm.13 for ; Tue, 03 May 2011 08:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=K0vwWbqTzyaKuquUXhWtPrTbJLo5fgh3pILOke5J6m4=; b=NSqAfQYJ/xVzmvbJMl40+j8/EL2Ccej/JpgDZR+6+m/X5kt4T3H60WnSUljm/fpcN6 oiU2/hPEyRF3HKvowaJpPopG7iswryGYVzqParqzvjbrjBKm/n0hWJbiUiUDM+FwsPXb bUlSAiXGbHcJdgKHkCe/ryw492PAV0K8mSgQI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=K4eDce90QU8RSatUu16ZzM9uwWxu8VesLg2sNQhYvnIRH3oS/iv92sjJJcUUxmycHr NlioZUibeny+vMI+lCnojnPQxPIN+buRxI9tCR1mXptU9pGPzEPuYtJk5bSq6Pp8X4P8 3WfZPdYrhcOttlenCTLR1NduN1i7WqV+K9BNc= Received: by 10.223.87.218 with SMTP id x26mr1596429fal.133.1304436472967; Tue, 03 May 2011 08:27:52 -0700 (PDT) MIME-Version: 1.0 Sender: baptiste.daroussin@gmail.com Received: by 10.223.123.137 with HTTP; Tue, 3 May 2011 08:27:32 -0700 (PDT) In-Reply-To: <201105031512.p43FC1Jr099140@svn.freebsd.org> References: <201105031512.p43FC1Jr099140@svn.freebsd.org> From: Baptiste Daroussin Date: Tue, 3 May 2011 17:27:32 +0200 X-Google-Sender-Auth: BS1l8_j-3_D5OXOowdOFC6Yzv4U Message-ID: To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221387 - head/usr.sbin/makefs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 15:27:56 -0000 2011/5/3 Nathan Whitehorn : > Author: nwhitehorn > Date: Tue May =A03 15:12:01 2011 > New Revision: 221387 > URL: http://svn.freebsd.org/changeset/base/221387 > > Log: > =A0Add support for synthesizing an APM partition map to map Mac PowerPC > =A0bootstrap partitions from the ISO9660 boot catalog. This preserves OS = X's > =A0ability to mount the CD, while allowing us a way to provide HFS-ified > =A0bootstrap code for Open Firmware. > > Modified: > =A0head/usr.sbin/makefs/cd9660/cd9660_eltorito.c > > Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c =A0 =A0 =A0 Tue May =A0= 3 14:43:16 2011 =A0 =A0 =A0 =A0(r221386) > +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c =A0 =A0 =A0 Tue May =A0= 3 15:12:01 2011 =A0 =A0 =A0 =A0(r221387) > @@ -31,6 +31,9 @@ > =A0* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY > =A0* OF SUCH DAMAGE. > =A0*/ > + > +#include > + > =A0#include "cd9660.h" > =A0#include "cd9660_eltorito.h" > > @@ -497,11 +500,43 @@ cd9660_setup_boot_volume_descriptor(volu > =A0 =A0 =A0 =A0return 1; > =A0} > > +static int > +cd9660_write_apm_partition_entry(FILE *fd, int index, int total_partitio= ns, > + =A0 =A0off_t sector_start, off_t nsectors, off_t sector_size, > + =A0 =A0const char *part_name, const char *part_type) { > + =A0 =A0 =A0 uint32_t apm32; > + =A0 =A0 =A0 uint16_t apm16; > + > + =A0 =A0 =A0 fseeko(fd, (off_t)(index + 1) * sector_size, SEEK_SET); > + > + =A0 =A0 =A0 /* Signature */ > + =A0 =A0 =A0 apm16 =3D htons(0x504d); > + =A0 =A0 =A0 fwrite(&apm16, sizeof(apm16), 1, fd); > + =A0 =A0 =A0 apm16 =3D 0; > + =A0 =A0 =A0 fwrite(&apm16, sizeof(apm16), 1, fd); > + > + =A0 =A0 =A0 /* Total number of partitions */ > + =A0 =A0 =A0 apm32 =3D htonl(total_partitions); > + =A0 =A0 =A0 fwrite(&apm32, sizeof(apm32), 1, fd); > + =A0 =A0 =A0 /* Bounds */ > + =A0 =A0 =A0 apm32 =3D htonl(sector_start); > + =A0 =A0 =A0 fwrite(&apm32, sizeof(apm32), 1, fd); > + =A0 =A0 =A0 apm32 =3D htonl(nsectors); > + =A0 =A0 =A0 fwrite(&apm32, sizeof(apm32), 1, fd); > + > + =A0 =A0 =A0 fwrite(part_name, strlen(part_name) + 1, 1, fd); > + =A0 =A0 =A0 fseek(fd, 32 - strlen(part_name) - 1, SEEK_CUR); > + =A0 =A0 =A0 fwrite(part_type, strlen(part_type) + 1, 1, fd); > + > + =A0 =A0 =A0 return 0; > +} > + > =A0int > =A0cd9660_write_boot(FILE *fd) > =A0{ > =A0 =A0 =A0 =A0struct boot_catalog_entry *e; > =A0 =A0 =A0 =A0struct cd9660_boot_image *t; > + =A0 =A0 =A0 int apm_partitions =3D 0; > > =A0 =A0 =A0 =A0/* write boot catalog */ > =A0 =A0 =A0 =A0if (fseeko(fd, (off_t)diskStructure.boot_catalog_sector * > @@ -533,7 +568,51 @@ cd9660_write_boot(FILE *fd) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0t->filename, t->se= ctor); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cd9660_copy_file(fd, t->sector, t->filenam= e); > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (t->system =3D=3D ET_SYS_MAC) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 apm_partitions++; > + =A0 =A0 =A0 } > + > + =A0 =A0 =A0 if (apm_partitions > 0) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Write DDR and global APM info */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 uint32_t apm32; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 uint16_t apm16; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 int total_parts; > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 fseek(fd, 0, SEEK_SET); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 apm16 =3D htons(0x4552); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 fwrite(&apm16, sizeof(apm16), 1, fd); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 apm16 =3D htons(diskStructure.sectorSize); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 fwrite(&apm16, sizeof(apm16), 1, fd); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 apm32 =3D htonl(diskStructure.totalSectors)= ; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 fwrite(&apm32, sizeof(apm32), 1, fd); > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Count total needed entries */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 total_parts =3D 2 + apm_partitions; /* Self= + ISO9660 */ > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Write self-descriptor */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 cd9660_write_apm_partition_entry(fd, 0, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 total_parts, 1, total_parts, diskSt= ructure.sectorSize, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Apple", "Apple_partition_map"); > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Write ISO9660 descriptor, enclosing the = whole disk */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 cd9660_write_apm_partition_entry(fd, 1, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 total_parts, 0, diskStructure.total= Sectors, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 diskStructure.sectorSize, "", "CD_R= OM_Mode_1"); > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Write all partition entries */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 apm_partitions =3D 0; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 TAILQ_FOREACH(t, &diskStructure.boot_images= , image_list) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (t->system !=3D ET_SYS_M= AC) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 continue; > + > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cd9660_write_apm_partition_= entry(fd, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 2 + apm_partitions+= +, total_parts, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 t->sector, t->num_s= ectors, diskStructure.sectorSize, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "CD Boot", "Apple_B= ootstrap"); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 =A0} > > =A0 =A0 =A0 =A0return 0; > =A0} > + > _______________________________________________ > 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-unsubscribe@freebsd.org" > Nice, Do not forget to send this to the netbsd folks so that both makefs keep as in sync as possible, christos@NetBSD.org should be interested by this. if you already did this, sorry for the noise. regards, Bapt From owner-svn-src-all@FreeBSD.ORG Tue May 3 15:50:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76C491065673; Tue, 3 May 2011 15:50:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 645688FC08; Tue, 3 May 2011 15:50:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43FoMuB000711; Tue, 3 May 2011 15:50:22 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43FoMhw000709; Tue, 3 May 2011 15:50:22 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201105031550.p43FoMhw000709@svn.freebsd.org> From: Andriy Gapon Date: Tue, 3 May 2011 15:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221388 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 15:50:22 -0000 Author: avg Date: Tue May 3 15:50:22 2011 New Revision: 221388 URL: http://svn.freebsd.org/changeset/base/221388 Log: SNDCTL_DSP_GETIPTR: set pointer to sndbuf_getfreeptr() Rationale: - unlike current behavior this seems to be compliant with OSS specification: http://manuals.opensound.com/developer/SNDCTL_DSP_GETIPTR.html - this seems to meet expectations of some OSS programs compiled for or ported from Linux, e.g. ALSA OSS plugin - this doesn't seem to break any programs as far as current testing shows Tested by: nox, hselasky MFC after: 4 days Modified: head/sys/dev/sound/pcm/dsp.c Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Tue May 3 15:12:01 2011 (r221387) +++ head/sys/dev/sound/pcm/dsp.c Tue May 3 15:50:22 2011 (r221388) @@ -1655,7 +1655,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd /* XXX abusive DMA update: chn_rdupdate(rdch); */ a->bytes = sndbuf_gettotal(bs); a->blocks = sndbuf_getblocks(bs) - rdch->blocks; - a->ptr = sndbuf_getreadyptr(bs); + a->ptr = sndbuf_getfreeptr(bs); rdch->blocks = sndbuf_getblocks(bs); CHN_UNLOCK(rdch); } else From owner-svn-src-all@FreeBSD.ORG Tue May 3 15:58:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEFAB1065689; Tue, 3 May 2011 15:58:24 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81AB68FC13; Tue, 3 May 2011 15:58:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43FwOGe000993; Tue, 3 May 2011 15:58:24 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43FwONI000989; Tue, 3 May 2011 15:58:24 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201105031558.p43FwONI000989@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 3 May 2011 15:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221389 - in head/sys/dev/vxge: . include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 15:58:24 -0000 Author: gnn Date: Tue May 3 15:58:24 2011 New Revision: 221389 URL: http://svn.freebsd.org/changeset/base/221389 Log: Add in support for multicast. Submitted by: Sriram Rapuru at @ Wipro for Exar Inc. MFC after: 2 weeks Modified: head/sys/dev/vxge/include/build-version.h head/sys/dev/vxge/vxge.c head/sys/dev/vxge/vxge.h Modified: head/sys/dev/vxge/include/build-version.h ============================================================================== --- head/sys/dev/vxge/include/build-version.h Tue May 3 15:50:22 2011 (r221388) +++ head/sys/dev/vxge/include/build-version.h Tue May 3 15:58:24 2011 (r221389) @@ -3,5 +3,5 @@ #ifndef BUILD_VERSION_H #define BUILD_VERSION_H /* Do not edit! Automatically generated when released. */ -#define GENERATED_BUILD_VERSION 22708 +#define GENERATED_BUILD_VERSION 22770 #endif /* BUILD_VERSION_H */ Modified: head/sys/dev/vxge/vxge.c ============================================================================== --- head/sys/dev/vxge/vxge.c Tue May 3 15:50:22 2011 (r221388) +++ head/sys/dev/vxge/vxge.c Tue May 3 15:58:24 2011 (r221389) @@ -357,6 +357,9 @@ vxge_init_locked(vxge_dev_t *vdev) if (!vpath_handle) continue; + /* Enabling mcast for all vpath */ + vxge_hal_vpath_mcast_enable(vpath_handle); + /* Enabling bcast for all vpath */ status = vxge_hal_vpath_bcast_enable(vpath_handle); if (status != VXGE_HAL_OK) @@ -2879,26 +2882,6 @@ vxge_promisc_set(vxge_dev_t *vdev) ifp = vdev->ifp; - if ((ifp->if_flags & IFF_ALLMULTI) && (!vdev->all_multi_flag)) { - for (i = 0; i < vdev->no_of_vpath; i++) { - vpath_handle = vxge_vpath_handle_get(vdev, i); - if (!vpath_handle) - continue; - - vxge_hal_vpath_mcast_enable(vpath_handle); - vdev->all_multi_flag = 1; - } - - } else if (!(ifp->if_flags & IFF_ALLMULTI) && (vdev->all_multi_flag)) { - for (i = 0; i < vdev->no_of_vpath; i++) { - vpath_handle = vxge_vpath_handle_get(vdev, i); - if (!vpath_handle) - continue; - - vxge_hal_vpath_mcast_disable(vpath_handle); - vdev->all_multi_flag = 0; - } - } for (i = 0; i < vdev->no_of_vpath; i++) { vpath_handle = vxge_vpath_handle_get(vdev, i); if (!vpath_handle) Modified: head/sys/dev/vxge/vxge.h ============================================================================== --- head/sys/dev/vxge/vxge.h Tue May 3 15:50:22 2011 (r221388) +++ head/sys/dev/vxge/vxge.h Tue May 3 15:58:24 2011 (r221389) @@ -406,7 +406,6 @@ struct vxge_dev_t { int no_of_vpath; u64 active_port; u32 no_of_func; - u32 all_multi_flag; u32 hw_fw_version; u32 max_supported_vpath; int rx_mbuf_sz; From owner-svn-src-all@FreeBSD.ORG Tue May 3 16:00:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18A01106566B; Tue, 3 May 2011 16:00:27 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 063C18FC12; Tue, 3 May 2011 16:00:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43G0QJw001109; Tue, 3 May 2011 16:00:26 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43G0QiD001107; Tue, 3 May 2011 16:00:26 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201105031600.p43G0QiD001107@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 3 May 2011 16:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221390 - head/cddl/compat/opensolaris/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 16:00:27 -0000 Author: jh Date: Tue May 3 16:00:26 2011 New Revision: 221390 URL: http://svn.freebsd.org/changeset/base/221390 Log: Don't pass empty mount options to nmount(2). Reviewed by: pjd MFC after: 2 weeks Modified: head/cddl/compat/opensolaris/misc/zmount.c Modified: head/cddl/compat/opensolaris/misc/zmount.c ============================================================================== --- head/cddl/compat/opensolaris/misc/zmount.c Tue May 3 15:58:24 2011 (r221389) +++ head/cddl/compat/opensolaris/misc/zmount.c Tue May 3 16:00:26 2011 (r221390) @@ -98,8 +98,10 @@ zmount(const char *spec, const char *dir build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, dir), (size_t)-1); build_iovec(&iov, &iovlen, "from", __DECONST(char *, spec), (size_t)-1); - for (p = optstr; p != NULL; strsep(&p, ",/ ")) - build_iovec(&iov, &iovlen, p, NULL, (size_t)-1); + for (p = optstr; p != NULL; strsep(&p, ",/ ")) { + if (*p != '\0') + build_iovec(&iov, &iovlen, p, NULL, (size_t)-1); + } rv = nmount(iov, iovlen, 0); free(optstr); return (rv); From owner-svn-src-all@FreeBSD.ORG Tue May 3 16:00:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BD6310656F2; Tue, 3 May 2011 16:00:37 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3940F8FC19; Tue, 3 May 2011 16:00:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43G0bxe001161; Tue, 3 May 2011 16:00:37 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43G0bhZ001159; Tue, 3 May 2011 16:00:37 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201105031600.p43G0bhZ001159@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 3 May 2011 16:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221391 - head/tools/tools/vxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 16:00:37 -0000 Author: gnn Date: Tue May 3 16:00:36 2011 New Revision: 221391 URL: http://svn.freebsd.org/changeset/base/221391 Log: Give some sort of message when the program is not run as root. Root privileges are required to talk to the device. Submitted by: Sriram Rapuru at Wipro for Exar Inc. MFC after: 2 weeks Modified: head/tools/tools/vxge/vxge_info.c Modified: head/tools/tools/vxge/vxge_info.c ============================================================================== --- head/tools/tools/vxge/vxge_info.c Tue May 3 16:00:26 2011 (r221390) +++ head/tools/tools/vxge/vxge_info.c Tue May 3 16:00:36 2011 (r221391) @@ -31,6 +31,7 @@ /*$FreeBSD$*/ #include "vxge_info.h" +#include static int sockfd; static struct ifreq ifr; @@ -38,6 +39,15 @@ static struct ifreq ifr; int main(int argc, char *argv[]) { + uid_t uid; + + uid = getuid(); + + if (uid) { + printf("vxge-manage: Operation not permitted.\nExiting...\n"); + goto _exit0; + } + if (argc >= 4) { if (!((strcasecmp(argv[2], "regs") == 0) || (strcasecmp(argv[2], "stats") == 0) || From owner-svn-src-all@FreeBSD.ORG Tue May 3 16:36:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FB961065672; Tue, 3 May 2011 16:36:39 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCF18FC16; Tue, 3 May 2011 16:36:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43Gadxc002220; Tue, 3 May 2011 16:36:39 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43GadGd002218; Tue, 3 May 2011 16:36:39 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201105031636.p43GadGd002218@svn.freebsd.org> From: Colin Percival Date: Tue, 3 May 2011 16:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221392 - stable/8/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 16:36:39 -0000 Author: cperciva Date: Tue May 3 16:36:39 2011 New Revision: 221392 URL: http://svn.freebsd.org/changeset/base/221392 Log: MFC r221049: Stop zeroing UFS1 superblocks if we fall off the end of the disk, in order to avoid wasting time (potentially many hours) in the event that we find a partially-overwritten UFS1 superblock. Modified: stable/8/sbin/newfs/mkfs.c Directory Properties: stable/8/sbin/newfs/ (props changed) Modified: stable/8/sbin/newfs/mkfs.c ============================================================================== --- stable/8/sbin/newfs/mkfs.c Tue May 3 16:00:36 2011 (r221391) +++ stable/8/sbin/newfs/mkfs.c Tue May 3 16:36:39 2011 (r221392) @@ -517,9 +517,12 @@ restart: fsdummy.fs_magic = 0; bwrite(&disk, part_ofs + SBLOCK_UFS1 / disk.d_bsize, chdummy, SBLOCKSIZE); - for (cg = 0; cg < fsdummy.fs_ncg; cg++) + for (cg = 0; cg < fsdummy.fs_ncg; cg++) { + if (fsbtodb(&fsdummy, cgsblock(&fsdummy, cg)) > fssize) + break; bwrite(&disk, part_ofs + fsbtodb(&fsdummy, cgsblock(&fsdummy, cg)), chdummy, SBLOCKSIZE); + } } } if (!Nflag) From owner-svn-src-all@FreeBSD.ORG Tue May 3 16:49:31 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07C341065674; Tue, 3 May 2011 16:49:31 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 8E00F8FC08; Tue, 3 May 2011 16:49:29 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id p439RvKu024629; Tue, 3 May 2011 04:27:57 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id p439RvS3024628; Tue, 3 May 2011 04:27:57 -0500 (CDT) (envelope-from brooks) Date: Tue, 3 May 2011 04:27:57 -0500 From: Brooks Davis To: Roman Divacky Message-ID: <20110503092757.GA24552@lor.one-eyed-alien.net> References: <201105022113.p42LD8TH055002@svn.freebsd.org> <20110503133927.GA41839@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: <20110503133927.GA41839@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (lor.one-eyed-alien.net [127.0.0.1]); Tue, 03 May 2011 04:27:57 -0500 (CDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric Subject: Re: svn commit: r221348 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 16:49:31 -0000 --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 03, 2011 at 03:39:27PM +0200, Roman Divacky wrote: > With the recent libobjc removal this means that we can compile > all (no exceptions) of FreeBSD/{i386,amd64} with clang. >=20 > Quite a milestone in my opinion :) Great news! Thanks for all the work to make this happen! Has boot2 been submitted to LLVM as a clang regression test? Thanks, Brooks >=20 > On Mon, May 02, 2011 at 09:13:08PM +0000, Dimitry Andric wrote: > > Author: dim > > Date: Mon May 2 21:13:08 2011 > > New Revision: 221348 > > URL: http://svn.freebsd.org/changeset/base/221348 > >=20 > > Log: > > Clang r130700 can now compile sys/boot/i386/boot2 with room to spare. > >=20 > > Modified: > > head/sys/boot/i386/boot2/Makefile > >=20 > > Modified: head/sys/boot/i386/boot2/Makefile > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/boot/i386/boot2/Makefile Mon May 2 21:10:13 2011 (r221347) > > +++ head/sys/boot/i386/boot2/Makefile Mon May 2 21:13:08 2011 (r221348) > > @@ -2,9 +2,6 @@ > > =20 > > .include > > =20 > > -# XXX: clang can compile the boot code just fine, but boot2 gets too b= ig > > -CC:=3D${CC:C/^(.*\/)?clang$/gcc/1} > > - > > FILES=3D boot boot1 boot2 > > =20 > > NM?=3D nm > > @@ -45,6 +42,12 @@ CFLAGS=3D -Os \ > > -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ > > -Winline --param max-inline-insns-single=3D100 > > =20 > > +.if ${CC:T:Mclang} =3D=3D "clang" > > +CFLAGS+=3D -mllvm -stack-alignment=3D8 -mllvm -inline-threshold=3D3 > > +# XXX: clang integrated-as doesn't grok .codeNN directives yet > > +CFLAGS+=3D ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/} > > +.endif > > + > > LDFLAGS=3D-static -N --gc-sections > > =20 > > # Pick up ../Makefile.inc early. >=20 --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFNv8qdXY6L6fI4GtQRAqqsAKDfekWELf17Jni2vZFXibzcLxjsyACgrXol qd1b5HxJJpih4ETohr1Ahuk= =CVJH -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7-- From owner-svn-src-all@FreeBSD.ORG Tue May 3 17:01:08 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 239F0106566C; Tue, 3 May 2011 17:01:08 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id CFBBB8FC08; Tue, 3 May 2011 17:01:07 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 06C517F39FE; Tue, 3 May 2011 18:51:20 +0200 (CEST) Date: Tue, 3 May 2011 18:51:19 +0200 From: Roman Divacky To: Brooks Davis Message-ID: <20110503165119.GA64219@freebsd.org> References: <201105022113.p42LD8TH055002@svn.freebsd.org> <20110503133927.GA41839@freebsd.org> <20110503092757.GA24552@lor.one-eyed-alien.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110503092757.GA24552@lor.one-eyed-alien.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric Subject: Re: svn commit: r221348 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 17:01:08 -0000 On Tue, May 03, 2011 at 04:27:57AM -0500, Brooks Davis wrote: > On Tue, May 03, 2011 at 03:39:27PM +0200, Roman Divacky wrote: > > With the recent libobjc removal this means that we can compile > > all (no exceptions) of FreeBSD/{i386,amd64} with clang. > > > > Quite a milestone in my opinion :) > > > Great news! Thanks for all the work to make this happen! > > Has boot2 been submitted to LLVM as a clang regression test? No, but we are setting up a testing environment to track the code size changes in boot2. Pawel, can you comment on this? From owner-svn-src-all@FreeBSD.ORG Tue May 3 17:37:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A937106566C; Tue, 3 May 2011 17:37:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06DDD8FC0C; Tue, 3 May 2011 17:37:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43HbPnV004125; Tue, 3 May 2011 17:37:25 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43HbOM5004112; Tue, 3 May 2011 17:37:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105031737.p43HbOM5004112@svn.freebsd.org> From: John Baldwin Date: Tue, 3 May 2011 17:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221393 - in head/sys: amd64/pci conf dev/acpica dev/pci i386/pci sparc64/pci x86/pci x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 17:37:25 -0000 Author: jhb Date: Tue May 3 17:37:24 2011 New Revision: 221393 URL: http://svn.freebsd.org/changeset/base/221393 Log: Reimplement how PCI-PCI bridges manage their I/O windows. Previously the driver would verify that requests for child devices were confined to any existing I/O windows, but the driver relied on the firmware to initialize the windows and would never grow the windows for new requests. Now the driver actively manages the I/O windows. This is implemented by allocating a bus resource for each I/O window from the parent PCI bus and suballocating that resource to child devices. The suballocations are managed by creating an rman for each I/O window. The suballocated resources are mapped by passing the bus_activate_resource() call up to the parent PCI bus. Windows are grown when needed by using bus_adjust_resource() to adjust the resource allocated from the parent PCI bus. If the adjust request succeeds, the window is adjusted and the suballocation request for the child device is retried. When growing a window, the rman_first_free_region() and rman_last_free_region() routines are used to determine if the front or end of the existing I/O window is free. From using that, the smallest ranges that need to be added to either the front or back of the window are computed. The driver will first try to grow the window in whichever direction requires the smallest growth first followed by the other direction if that fails. Subtractive bridges will first attempt to satisfy requests for child resources from I/O windows (including attempts to grow the windows). If that fails, the request is passed up to the parent PCI bus directly however. The PCI-PCI bridge driver will try to use firmware-assigned ranges for child BARs first and only allocate a "fresh" range if that specific range cannot be accommodated in the I/O window. This allows systems where the firmware assigns resources during boot but later wipes the I/O windows (some ACPI BIOSen are known to do this) to "rediscover" the original I/O window ranges. The ACPI Host-PCI bridge driver has been adjusted to correctly honor hw.acpi.host_mem_start and the I/O port equivalent when a PCI-PCI bridge makes a wildcard request for an I/O window range. The new PCI-PCI bridge driver is only enabled if the NEW_PCIB kernel option is enabled. This is a transition aide to allow platforms that do not yet support bus_activate_resource() and bus_adjust_resource() in their Host-PCI bridge drivers (and possibly other drivers as needed) to use the old driver for now. Once all platforms support the new driver, the kernel option and old driver will be removed. PR: kern/143874 kern/149306 Tested by: mav Modified: head/sys/amd64/pci/pci_bus.c head/sys/conf/options head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/acpica/acpi_pcib_pci.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_private.h head/sys/i386/pci/pci_bus.c head/sys/sparc64/pci/apb.c head/sys/sparc64/pci/ofw_pcib.c head/sys/x86/pci/qpi.c head/sys/x86/x86/mptable_pci.c Modified: head/sys/amd64/pci/pci_bus.c ============================================================================== --- head/sys/amd64/pci/pci_bus.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/amd64/pci/pci_bus.c Tue May 3 17:37:24 2011 (r221393) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue May 3 16:36:39 2011 (r221392) +++ head/sys/conf/options Tue May 3 17:37:24 2011 (r221393) @@ -136,6 +136,7 @@ MFI_DEBUG opt_mfi.h MFI_DECODE_LOG opt_mfi.h MPROF_BUFFERS opt_mprof.h MPROF_HASH_SIZE opt_mprof.h +NEW_PCIB opt_global.h NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NO_ADAPTIVE_SX Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Tue May 3 17:37:24 2011 (r221393) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -370,11 +371,17 @@ acpi_pcib_acpi_alloc_resource(device_t d * Hardcoding like this sucks, so a more MD/MI way needs to be * found to do it. This is typically only used on older laptops * that don't have pci busses behind pci bridge, so assuming > 32MB - * is liekly OK. + * is likely OK. + * + * PCI-PCI bridges may allocate smaller ranges for their windows, + * but the heuristics here should apply to those, so we allow + * several different end addresses. */ - if (type == SYS_RES_MEMORY && start == 0UL && end == ~0UL) + if (type == SYS_RES_MEMORY && start == 0UL && (end == ~0UL || + end == 0xffffffff)) start = acpi_host_mem_start; - if (type == SYS_RES_IOPORT && start == 0UL && end == ~0UL) + if (type == SYS_RES_IOPORT && start == 0UL && (end == ~0UL || + end == 0xffff || end == 0xffffffff)) start = 0x1000; return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); Modified: head/sys/dev/acpica/acpi_pcib_pci.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_pci.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/dev/acpica/acpi_pcib_pci.c Tue May 3 17:37:24 2011 (r221393) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/dev/pci/pci.c Tue May 3 17:37:24 2011 (r221393) @@ -3967,6 +3967,26 @@ pci_alloc_resource(device_t dev, device_ break; case SYS_RES_IOPORT: case SYS_RES_MEMORY: +#ifdef NEW_PCIB + /* + * PCI-PCI bridge I/O window resources are not BARs. + * For those allocations just pass the request up the + * tree. + */ + if (cfg->hdrtype == PCIM_HDRTYPE_BRIDGE) { + switch (*rid) { + case PCIR_IOBASEL_1: + case PCIR_MEMBASE_1: + case PCIR_PMBASEL_1: + /* + * XXX: Should we bother creating a resource + * list entry? + */ + return (bus_generic_alloc_resource(dev, child, + type, rid, start, end, count, flags)); + } + } +#endif /* Reserve resources for this BAR if needed. */ rle = resource_list_find(rl, type, *rid); if (rle == NULL) { Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/dev/pci/pci_pci.c Tue May 3 17:37:24 2011 (r221393) @@ -36,14 +36,16 @@ __FBSDID("$FreeBSD$"); */ #include -#include +#include #include +#include +#include #include -#include -#include #include #include +#include +#include #include #include @@ -73,8 +75,13 @@ static device_method_t pcib_methods[] = DEVMETHOD(bus_read_ivar, pcib_read_ivar), DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), +#ifdef NEW_PCIB + DEVMETHOD(bus_adjust_resource, pcib_adjust_resource), + DEVMETHOD(bus_release_resource, pcib_release_resource), +#else DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), +#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), @@ -100,6 +107,243 @@ static devclass_t pcib_devclass; DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc)); DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, 0, 0); +#ifdef NEW_PCIB +/* + * XXX Todo: + * - properly handle the ISA enable bit. If it is set, we should change + * the behavior of the I/O window resource and rman to not allocate the + * blocked ranges (upper 768 bytes of each 1K in the first 64k of the + * I/O port address space). + */ + +/* + * Is a resource from a child device sub-allocated from one of our + * resource managers? + */ +static int +pcib_is_resource_managed(struct pcib_softc *sc, int type, struct resource *r) +{ + + switch (type) { + case SYS_RES_IOPORT: + return (rman_is_region_manager(r, &sc->io.rman)); + case SYS_RES_MEMORY: + /* Prefetchable resources may live in either memory rman. */ + if (rman_get_flags(r) & RF_PREFETCHABLE && + rman_is_region_manager(r, &sc->pmem.rman)) + return (1); + return (rman_is_region_manager(r, &sc->mem.rman)); + } + return (0); +} + +static int +pcib_is_window_open(struct pcib_window *pw) +{ + + return (pw->valid && pw->base < pw->limit); +} + +/* + * XXX: If RF_ACTIVE did not also imply allocating a bus space tag and + * handle for the resource, we could pass RF_ACTIVE up to the PCI bus + * when allocating the resource windows and rely on the PCI bus driver + * to do this for us. + */ +static void +pcib_activate_window(struct pcib_softc *sc, int type) +{ + + PCI_ENABLE_IO(device_get_parent(sc->dev), sc->dev, type); +} + +static void +pcib_write_windows(struct pcib_softc *sc, int mask) +{ + device_t dev; + uint32_t val; + + dev = sc->dev; + if (sc->io.valid && mask & WIN_IO) { + val = pci_read_config(dev, PCIR_IOBASEL_1, 1); + if ((val & PCIM_BRIO_MASK) == PCIM_BRIO_32) { + pci_write_config(dev, PCIR_IOBASEH_1, + sc->io.base >> 16, 2); + pci_write_config(dev, PCIR_IOLIMITH_1, + sc->io.limit >> 16, 2); + } + pci_write_config(dev, PCIR_IOBASEL_1, sc->io.base >> 8, 1); + pci_write_config(dev, PCIR_IOLIMITL_1, sc->io.limit >> 8, 1); + } + + if (mask & WIN_MEM) { + pci_write_config(dev, PCIR_MEMBASE_1, sc->mem.base >> 16, 2); + pci_write_config(dev, PCIR_MEMLIMIT_1, sc->mem.limit >> 16, 2); + } + + if (sc->pmem.valid && mask & WIN_PMEM) { + val = pci_read_config(dev, PCIR_PMBASEL_1, 2); + if ((val & PCIM_BRPM_MASK) == PCIM_BRPM_64) { + pci_write_config(dev, PCIR_PMBASEH_1, + sc->pmem.base >> 32, 4); + pci_write_config(dev, PCIR_PMLIMITH_1, + sc->pmem.limit >> 32, 4); + } + pci_write_config(dev, PCIR_PMBASEL_1, sc->pmem.base >> 16, 2); + pci_write_config(dev, PCIR_PMLIMITL_1, sc->pmem.limit >> 16, 2); + } +} + +static void +pcib_alloc_window(struct pcib_softc *sc, struct pcib_window *w, int type, + int flags, pci_addr_t max_address) +{ + char buf[64]; + int error, rid; + + if (max_address != (u_long)max_address) + max_address = ~0ul; + w->rman.rm_start = 0; + w->rman.rm_end = max_address; + w->rman.rm_type = RMAN_ARRAY; + snprintf(buf, sizeof(buf), "%s %s window", + device_get_nameunit(sc->dev), w->name); + w->rman.rm_descr = strdup(buf, M_DEVBUF); + error = rman_init(&w->rman); + if (error) + panic("Failed to initialize %s %s rman", + device_get_nameunit(sc->dev), w->name); + + if (!pcib_is_window_open(w)) + return; + + if (w->base > max_address || w->limit > max_address) { + device_printf(sc->dev, + "initial %s window has too many bits, ignoring\n", w->name); + return; + } + rid = w->reg; + w->res = bus_alloc_resource(sc->dev, type, &rid, w->base, w->limit, + w->limit - w->base + 1, flags); + if (w->res == NULL) { + device_printf(sc->dev, + "failed to allocate initial %s window: %#jx-%#jx\n", + w->name, (uintmax_t)w->base, (uintmax_t)w->limit); + w->base = max_address; + w->limit = 0; + pcib_write_windows(sc, w->mask); + return; + } + pcib_activate_window(sc, type); + + error = rman_manage_region(&w->rman, rman_get_start(w->res), + rman_get_end(w->res)); + if (error) + panic("Failed to initialize rman with resource"); +} + +/* + * Initialize I/O windows. + */ +static void +pcib_probe_windows(struct pcib_softc *sc) +{ + pci_addr_t max; + device_t dev; + uint32_t val; + + dev = sc->dev; + + /* Determine if the I/O port window is implemented. */ + val = pci_read_config(dev, PCIR_IOBASEL_1, 1); + if (val == 0) { + /* + * If 'val' is zero, then only 16-bits of I/O space + * are supported. + */ + pci_write_config(dev, PCIR_IOBASEL_1, 0xff, 1); + if (pci_read_config(dev, PCIR_IOBASEL_1, 1) != 0) { + sc->io.valid = 1; + pci_write_config(dev, PCIR_IOBASEL_1, 0, 1); + } + } else + sc->io.valid = 1; + + /* Read the existing I/O port window. */ + if (sc->io.valid) { + sc->io.reg = PCIR_IOBASEL_1; + sc->io.step = 12; + sc->io.mask = WIN_IO; + sc->io.name = "I/O port"; + if ((val & PCIM_BRIO_MASK) == PCIM_BRIO_32) { + sc->io.base = PCI_PPBIOBASE( + pci_read_config(dev, PCIR_IOBASEH_1, 2), val); + sc->io.limit = PCI_PPBIOLIMIT( + pci_read_config(dev, PCIR_IOLIMITH_1, 2), + pci_read_config(dev, PCIR_IOLIMITL_1, 1)); + max = 0xffffffff; + } else { + sc->io.base = PCI_PPBIOBASE(0, val); + sc->io.limit = PCI_PPBIOLIMIT(0, + pci_read_config(dev, PCIR_IOLIMITL_1, 1)); + max = 0xffff; + } + pcib_alloc_window(sc, &sc->io, SYS_RES_IOPORT, 0, max); + } + + /* Read the existing memory window. */ + sc->mem.valid = 1; + sc->mem.reg = PCIR_MEMBASE_1; + sc->mem.step = 20; + sc->mem.mask = WIN_MEM; + sc->mem.name = "memory"; + sc->mem.base = PCI_PPBMEMBASE(0, + pci_read_config(dev, PCIR_MEMBASE_1, 2)); + sc->mem.limit = PCI_PPBMEMLIMIT(0, + pci_read_config(dev, PCIR_MEMLIMIT_1, 2)); + pcib_alloc_window(sc, &sc->mem, SYS_RES_MEMORY, 0, 0xffffffff); + + /* Determine if the prefetchable memory window is implemented. */ + val = pci_read_config(dev, PCIR_PMBASEL_1, 2); + if (val == 0) { + /* + * If 'val' is zero, then only 32-bits of memory space + * are supported. + */ + pci_write_config(dev, PCIR_PMBASEL_1, 0xffff, 2); + if (pci_read_config(dev, PCIR_PMBASEL_1, 2) != 0) { + sc->pmem.valid = 1; + pci_write_config(dev, PCIR_PMBASEL_1, 0, 2); + } + } else + sc->pmem.valid = 1; + + /* Read the existing prefetchable memory window. */ + if (sc->pmem.valid) { + sc->pmem.reg = PCIR_PMBASEL_1; + sc->pmem.step = 20; + sc->pmem.mask = WIN_PMEM; + sc->pmem.name = "prefetch"; + if ((val & PCIM_BRPM_MASK) == PCIM_BRPM_64) { + sc->pmem.base = PCI_PPBMEMBASE( + pci_read_config(dev, PCIR_PMBASEH_1, 4), val); + sc->pmem.limit = PCI_PPBMEMLIMIT( + pci_read_config(dev, PCIR_PMLIMITH_1, 4), + pci_read_config(dev, PCIR_PMLIMITL_1, 2)); + max = 0xffffffffffffffff; + } else { + sc->pmem.base = PCI_PPBMEMBASE(0, val); + sc->pmem.limit = PCI_PPBMEMLIMIT(0, + pci_read_config(dev, PCIR_PMLIMITL_1, 2)); + max = 0xffffffff; + } + pcib_alloc_window(sc, &sc->pmem, SYS_RES_MEMORY, + RF_PREFETCHABLE, max); + } +} + +#else + /* * Is the prefetch window open (eg, can we allocate memory in it?) */ @@ -230,6 +474,7 @@ pcib_set_mem_decode(struct pcib_softc *s pci_write_config(dev, PCIR_PMLIMITH_1, pmemhi, 4); pci_write_config(dev, PCIR_PMLIMITL_1, sc->pmemlimit >> 16, 2); } +#endif /* * Get current bridge configuration. @@ -247,10 +492,12 @@ pcib_cfg_save(struct pcib_softc *sc) sc->subbus = pci_read_config(dev, PCIR_SUBBUS_1, 1); sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); sc->seclat = pci_read_config(dev, PCIR_SECLAT_1, 1); +#ifndef NEW_PCIB if (sc->command & PCIM_CMD_PORTEN) pcib_get_io_decode(sc); if (sc->command & PCIM_CMD_MEMEN) pcib_get_mem_decode(sc); +#endif } /* @@ -269,10 +516,14 @@ pcib_cfg_restore(struct pcib_softc *sc) pci_write_config(dev, PCIR_SUBBUS_1, sc->subbus, 1); pci_write_config(dev, PCIR_BRIDGECTL_1, sc->bridgectl, 2); pci_write_config(dev, PCIR_SECLAT_1, sc->seclat, 1); +#ifdef NEW_PCIB + pcib_write_windows(sc, WIN_IO | WIN_MEM | WIN_PMEM); +#else if (sc->command & PCIM_CMD_PORTEN) pcib_set_io_decode(sc); if (sc->command & PCIM_CMD_MEMEN) pcib_set_mem_decode(sc); +#endif } /* @@ -389,18 +640,35 @@ pcib_attach_common(device_t dev) if ((pci_get_devid(dev) & 0xff00ffff) == 0x24008086 || pci_read_config(dev, PCIR_PROGIF, 1) == PCIP_BRIDGE_PCI_SUBTRACTIVE) sc->flags |= PCIB_SUBTRACTIVE; - + +#ifdef NEW_PCIB + pcib_probe_windows(sc); +#endif if (bootverbose) { device_printf(dev, " domain %d\n", sc->domain); device_printf(dev, " secondary bus %d\n", sc->secbus); device_printf(dev, " subordinate bus %d\n", sc->subbus); - device_printf(dev, " I/O decode 0x%x-0x%x\n", sc->iobase, sc->iolimit); +#ifdef NEW_PCIB + if (pcib_is_window_open(&sc->io)) + device_printf(dev, " I/O decode 0x%jx-0x%jx\n", + (uintmax_t)sc->io.base, (uintmax_t)sc->io.limit); + if (pcib_is_window_open(&sc->mem)) + device_printf(dev, " memory decode 0x%jx-0x%jx\n", + (uintmax_t)sc->mem.base, (uintmax_t)sc->mem.limit); + if (pcib_is_window_open(&sc->pmem)) + device_printf(dev, " prefetched decode 0x%jx-0x%jx\n", + (uintmax_t)sc->pmem.base, (uintmax_t)sc->pmem.limit); +#else + if (pcib_is_io_open(sc)) + device_printf(dev, " I/O decode 0x%x-0x%x\n", + sc->iobase, sc->iolimit); if (pcib_is_nonprefetch_open(sc)) device_printf(dev, " memory decode 0x%jx-0x%jx\n", (uintmax_t)sc->membase, (uintmax_t)sc->memlimit); if (pcib_is_prefetch_open(sc)) device_printf(dev, " prefetched decode 0x%jx-0x%jx\n", (uintmax_t)sc->pmembase, (uintmax_t)sc->pmemlimit); +#endif else device_printf(dev, " no prefetched decode\n"); if (sc->flags & PCIB_SUBTRACTIVE) @@ -502,6 +770,377 @@ pcib_write_ivar(device_t dev, device_t c return(ENOENT); } +#ifdef NEW_PCIB +static const char * +pcib_child_name(device_t child) +{ + static char buf[64]; + + if (device_get_nameunit(child) != NULL) + return (device_get_nameunit(child)); + snprintf(buf, sizeof(buf), "pci%d:%d:%d:%d", pci_get_domain(child), + pci_get_bus(child), pci_get_slot(child), pci_get_function(child)); + return (buf); +} + +/* + * Attempt to allocate a resource from the existing resources assigned + * to a window. + */ +static struct resource * +pcib_suballoc_resource(struct pcib_softc *sc, struct pcib_window *w, + device_t child, int type, int *rid, u_long start, u_long end, u_long count, + u_int flags) +{ + struct resource *res; + + if (!pcib_is_window_open(w)) + return (NULL); + + res = rman_reserve_resource(&w->rman, start, end, count, + flags & ~RF_ACTIVE, child); + if (res == NULL) + return (NULL); + + if (bootverbose) + device_printf(sc->dev, + "allocated %s range (%#lx-%#lx) for rid %x of %s\n", + w->name, rman_get_start(res), rman_get_end(res), *rid, + pcib_child_name(child)); + rman_set_rid(res, *rid); + + /* + * If the resource should be active, pass that request up the + * tree. This assumes the parent drivers can handle + * activating sub-allocated resources. + */ + if (flags & RF_ACTIVE) { + if (bus_activate_resource(child, type, *rid, res) != 0) { + rman_release_resource(res); + return (NULL); + } + } + + return (res); +} + +/* + * Attempt to grow a window to make room for a given resource request. + * The 'step' parameter is log_2 of the desired I/O window's alignment. + */ +static int +pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type, + u_long start, u_long end, u_long count, u_int flags) +{ + u_long align, start_free, end_free, front, back; + int error, rid; + + /* + * Clamp the desired resource range to the maximum address + * this window supports. Reject impossible requests. + */ + if (!w->valid) + return (EINVAL); + if (end > w->rman.rm_end) + end = w->rman.rm_end; + if (start + count - 1 > end || start + count < start) + return (EINVAL); + + /* + * If there is no resource at all, just try to allocate enough + * aligned space for this resource. + */ + if (w->res == NULL) { + if (RF_ALIGNMENT(flags) < w->step) { + flags &= ~RF_ALIGNMENT_MASK; + flags |= RF_ALIGNMENT_LOG2(w->step); + } + start &= ~((1ul << w->step) - 1); + end |= ((1ul << w->step) - 1); + count = roundup2(count, 1ul << w->step); + rid = w->reg; + w->res = bus_alloc_resource(sc->dev, type, &rid, start, end, + count, flags & ~RF_ACTIVE); + if (w->res == NULL) { + if (bootverbose) + device_printf(sc->dev, + "failed to allocate initial %s window (%#lx-%#lx,%#lx)\n", + w->name, start, end, count); + return (ENXIO); + } + if (bootverbose) + device_printf(sc->dev, + "allocated initial %s window of %#lx-%#lx\n", + w->name, rman_get_start(w->res), + rman_get_end(w->res)); + error = rman_manage_region(&w->rman, rman_get_start(w->res), + rman_get_end(w->res)); + if (error) { + if (bootverbose) + device_printf(sc->dev, + "failed to add initial %s window to rman\n", + w->name); + bus_release_resource(sc->dev, type, w->reg, w->res); + w->res = NULL; + return (error); + } + pcib_activate_window(sc, type); + goto updatewin; + } + + /* + * See if growing the window would help. Compute the minimum + * amount of address space needed on both the front and back + * ends of the existing window to satisfy the allocation. + * + * For each end, build a candidate region adjusting for the + * required alignment, etc. If there is a free region at the + * edge of the window, grow from the inner edge of the free + * region. Otherwise grow from the window boundary. + * + * XXX: Special case: if w->res is completely empty and the + * request size is larger than w->res, we should find the + * optimal aligned buffer containing w->res and allocate that. + */ + if (bootverbose) + device_printf(sc->dev, + "attempting to grow %s window for (%#lx-%#lx,%#lx)\n", + w->name, start, end, count); + align = 1ul << RF_ALIGNMENT(flags); + if (start < rman_get_start(w->res)) { + if (rman_first_free_region(&w->rman, &start_free, &end_free) != + 0 || start_free != rman_get_start(w->res)) + end_free = rman_get_start(w->res) - 1; + if (end_free > end) + end_free = end; + + /* Move end_free down until it is properly aligned. */ + end_free &= ~(align - 1); + front = end_free - count; + + /* + * The resource would now be allocated at (front, + * end_free). Ensure that fits in the (start, end) + * bounds. end_free is checked above. If 'front' is + * ok, ensure it is properly aligned for this window. + * Also check for underflow. + */ + if (front >= start && front <= end_free) { + if (bootverbose) + printf("\tfront candidate range: %#lx-%#lx\n", + front, end_free); + front &= (1ul << w->step) - 1; + front = rman_get_start(w->res) - front; + } else + front = 0; + } else + front = 0; + if (end > rman_get_end(w->res)) { + if (rman_last_free_region(&w->rman, &start_free, &end_free) != + 0 || end_free != rman_get_end(w->res)) + start_free = rman_get_end(w->res) + 1; + if (start_free < start) + start_free = start; + + /* Move start_free up until it is properly aligned. */ + start_free = roundup2(start_free, align); + back = start_free + count; + + /* + * The resource would now be allocated at (start_free, + * back). Ensure that fits in the (start, end) + * bounds. start_free is checked above. If 'back' is + * ok, ensure it is properly aligned for this window. + * Also check for overflow. + */ + if (back <= end && start_free <= back) { + if (bootverbose) + printf("\tback candidate range: %#lx-%#lx\n", + start_free, back); + back = roundup2(back, w->step) - 1; + back -= rman_get_end(w->res); + } else + back = 0; + } else + back = 0; + + /* + * Try to allocate the smallest needed region first. + * If that fails, fall back to the other region. + */ + error = ENOSPC; + while (front != 0 || back != 0) { + if (front != 0 && (front <= back || back == 0)) { + error = bus_adjust_resource(sc->dev, type, w->res, + rman_get_start(w->res) - front, + rman_get_end(w->res)); + if (error == 0) + break; + front = 0; + } else { + error = bus_adjust_resource(sc->dev, type, w->res, + rman_get_start(w->res), + rman_get_end(w->res) + back); + if (error == 0) + break; + back = 0; + } + } + + if (error) + return (error); + if (bootverbose) + device_printf(sc->dev, "grew %s window to %#lx-%#lx\n", + w->name, rman_get_start(w->res), rman_get_end(w->res)); + + /* Add the newly allocated region to the resource manager. */ + if (w->base != rman_get_start(w->res)) { + KASSERT(w->limit == rman_get_end(w->res), ("both ends moved")); + error = rman_manage_region(&w->rman, rman_get_start(w->res), + w->base - 1); + } else { + KASSERT(w->limit != rman_get_end(w->res), + ("neither end moved")); + error = rman_manage_region(&w->rman, w->limit + 1, + rman_get_end(w->res)); + } + if (error) { + if (bootverbose) + device_printf(sc->dev, + "failed to expand %s resource manager\n", w->name); + bus_adjust_resource(sc->dev, type, w->res, w->base, w->limit); + return (error); + } + +updatewin: + /* Save the new window. */ + w->base = rman_get_start(w->res); + w->limit = rman_get_end(w->res); + KASSERT((w->base & ((1ul << w->step) - 1)) == 0, + ("start address is not aligned")); + KASSERT((w->limit & ((1ul << w->step) - 1)) == (1ul << w->step) - 1, + ("end address is not aligned")); + pcib_write_windows(sc, w->mask); + return (0); +} + +/* + * We have to trap resource allocation requests and ensure that the bridge + * is set up to, or capable of handling them. + */ +struct resource * +pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct pcib_softc *sc; + struct resource *r; + + sc = device_get_softc(dev); + + /* + * VGA resources are decoded iff the VGA enable bit is set in + * the bridge control register. VGA resources do not fall into + * the resource windows and are passed up to the parent. + */ + if ((type == SYS_RES_IOPORT && pci_is_vga_ioport_range(start, end)) || + (type == SYS_RES_MEMORY && pci_is_vga_memory_range(start, end))) { + if (sc->bridgectl & PCIB_BCR_VGA_ENABLE) + return (bus_generic_alloc_resource(dev, child, type, + rid, start, end, count, flags)); + else + return (NULL); + } + + switch (type) { + case SYS_RES_IOPORT: + r = pcib_suballoc_resource(sc, &sc->io, child, type, rid, start, + end, count, flags); + if (r != NULL) + break; + if (pcib_grow_window(sc, &sc->io, type, start, end, count, + flags) == 0) + r = pcib_suballoc_resource(sc, &sc->io, child, type, + rid, start, end, count, flags); + break; + case SYS_RES_MEMORY: + /* + * For prefetchable resources, prefer the prefetchable + * memory window, but fall back to the regular memory + * window if that fails. Try both windows before + * attempting to grow a window in case the firmware + * has used a range in the regular memory window to + * map a prefetchable BAR. + */ + if (flags & RF_PREFETCHABLE) { + r = pcib_suballoc_resource(sc, &sc->pmem, child, type, + rid, start, end, count, flags); + if (r != NULL) + break; + } + r = pcib_suballoc_resource(sc, &sc->mem, child, type, rid, + start, end, count, flags); + if (r != NULL) + break; + if (flags & RF_PREFETCHABLE) { + if (pcib_grow_window(sc, &sc->pmem, type, start, end, + count, flags) == 0) { + r = pcib_suballoc_resource(sc, &sc->pmem, child, + type, rid, start, end, count, flags); + if (r != NULL) + break; + } + } + if (pcib_grow_window(sc, &sc->mem, type, start, end, count, + flags & ~RF_PREFETCHABLE) == 0) + r = pcib_suballoc_resource(sc, &sc->mem, child, type, + rid, start, end, count, flags); + break; + default: + return (bus_generic_alloc_resource(dev, child, type, rid, + start, end, count, flags)); + } + + /* + * If attempts to suballocate from the window fail but this is a + * subtractive bridge, pass the request up the tree. + */ + if (sc->flags & PCIB_SUBTRACTIVE && r == NULL) + return (bus_generic_alloc_resource(dev, child, type, rid, + start, end, count, flags)); + return (r); +} + +int +pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, + u_long start, u_long end) +{ + struct pcib_softc *sc; + + sc = device_get_softc(bus); + if (pcib_is_resource_managed(sc, type, r)) + return (rman_adjust_resource(r, start, end)); + return (bus_generic_adjust_resource(bus, child, type, r, start, end)); +} + +int +pcib_release_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct pcib_softc *sc; + int error; + + sc = device_get_softc(dev); + if (pcib_is_resource_managed(sc, type, r)) { + if (rman_get_flags(r) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); + } + return (rman_release_resource(r)); + } + return (bus_generic_release_resource(dev, child, type, rid, r)); +} +#else /* * We have to trap resource allocation requests and ensure that the bridge * is set up to, or capable of handling them. @@ -657,6 +1296,7 @@ pcib_alloc_resource(device_t dev, device return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); } +#endif /* * PCIB interface. Modified: head/sys/dev/pci/pcib_private.h ============================================================================== --- head/sys/dev/pci/pcib_private.h Tue May 3 16:36:39 2011 (r221392) +++ head/sys/dev/pci/pcib_private.h Tue May 3 17:37:24 2011 (r221393) @@ -39,6 +39,24 @@ */ DECLARE_CLASS(pcib_driver); +#ifdef NEW_PCIB +#define WIN_IO 0x1 +#define WIN_MEM 0x2 +#define WIN_PMEM 0x4 + +struct pcib_window { + pci_addr_t base; /* base address */ + pci_addr_t limit; /* topmost address */ + struct rman rman; + struct resource *res; + int reg; /* resource id from parent */ + int valid; + int mask; /* WIN_* bitmask of this window */ + int step; /* log_2 of window granularity */ + const char *name; +}; +#endif + /* * Bridge-specific data. */ @@ -53,12 +71,18 @@ struct pcib_softc u_int pribus; /* primary bus number */ u_int secbus; /* secondary bus number */ u_int subbus; /* subordinate bus number */ +#ifdef NEW_PCIB + struct pcib_window io; /* I/O port window */ + struct pcib_window mem; /* memory window */ + struct pcib_window pmem; /* prefetchable memory window */ +#else pci_addr_t pmembase; /* base address of prefetchable memory */ pci_addr_t pmemlimit; /* topmost address of prefetchable memory */ pci_addr_t membase; /* base address of memory window */ pci_addr_t memlimit; /* topmost address of memory window */ uint32_t iobase; /* base address of port window */ uint32_t iolimit; /* topmost address of port window */ +#endif uint16_t secstat; /* secondary bus status register */ uint16_t bridgectl; /* bridge control register */ uint8_t seclat; /* secondary bus latency timer */ @@ -74,6 +98,12 @@ int pcib_read_ivar(device_t dev, device int pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); struct resource *pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); +#ifdef NEW_PCIB +int pcib_adjust_resource(device_t bus, device_t child, int type, + struct resource *r, u_long start, u_long end); +int pcib_release_resource(device_t dev, device_t child, int type, int rid, + struct resource *r); +#endif int pcib_maxslots(device_t dev); uint32_t pcib_read_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, int width); void pcib_write_config(device_t dev, u_int b, u_int s, u_int f, u_int reg, uint32_t val, int width); Modified: head/sys/i386/pci/pci_bus.c ============================================================================== --- head/sys/i386/pci/pci_bus.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/i386/pci/pci_bus.c Tue May 3 17:37:24 2011 (r221393) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/sparc64/pci/apb.c ============================================================================== --- head/sys/sparc64/pci/apb.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/sparc64/pci/apb.c Tue May 3 17:37:24 2011 (r221393) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- head/sys/sparc64/pci/ofw_pcib.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/sparc64/pci/ofw_pcib.c Tue May 3 17:37:24 2011 (r221393) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/x86/pci/qpi.c ============================================================================== --- head/sys/x86/pci/qpi.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/x86/pci/qpi.c Tue May 3 17:37:24 2011 (r221393) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/x86/x86/mptable_pci.c ============================================================================== --- head/sys/x86/x86/mptable_pci.c Tue May 3 16:36:39 2011 (r221392) +++ head/sys/x86/x86/mptable_pci.c Tue May 3 17:37:24 2011 (r221393) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Tue May 3 18:23:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45E141065670; Tue, 3 May 2011 18:23:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3560A8FC15; Tue, 3 May 2011 18:23:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43INCON005566; Tue, 3 May 2011 18:23:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43INCON005563; Tue, 3 May 2011 18:23:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105031823.p43INCON005563@svn.freebsd.org> From: John Baldwin Date: Tue, 3 May 2011 18:23:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221394 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 18:23:12 -0000 Author: jhb Date: Tue May 3 18:23:11 2011 New Revision: 221394 URL: http://svn.freebsd.org/changeset/base/221394 Log: Enable the new PCI-PCI bridge driver on amd64 and i386 by default. It can be disabled via 'nooptions NEW_PCIB'. Modified: head/sys/amd64/conf/DEFAULTS head/sys/i386/conf/DEFAULTS Modified: head/sys/amd64/conf/DEFAULTS ============================================================================== --- head/sys/amd64/conf/DEFAULTS Tue May 3 17:37:24 2011 (r221393) +++ head/sys/amd64/conf/DEFAULTS Tue May 3 18:23:11 2011 (r221394) @@ -20,3 +20,5 @@ options GEOM_PART_BSD options GEOM_PART_EBR options GEOM_PART_EBR_COMPAT options GEOM_PART_MBR + +options NEW_PCIB Modified: head/sys/i386/conf/DEFAULTS ============================================================================== --- head/sys/i386/conf/DEFAULTS Tue May 3 17:37:24 2011 (r221393) +++ head/sys/i386/conf/DEFAULTS Tue May 3 18:23:11 2011 (r221394) @@ -28,3 +28,5 @@ options GEOM_PART_MBR # enable support for native hardware options NATIVE device atpic + +options NEW_PCIB From owner-svn-src-all@FreeBSD.ORG Tue May 3 18:54:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0795106566C; Tue, 3 May 2011 18:54:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5CE68FC12; Tue, 3 May 2011 18:54:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43IsIKE006819; Tue, 3 May 2011 18:54:18 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43IsIJ5006816; Tue, 3 May 2011 18:54:18 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105031854.p43IsIJ5006816@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 3 May 2011 18:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221397 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 18:54:19 -0000 Author: ae Date: Tue May 3 18:54:18 2011 New Revision: 221397 URL: http://svn.freebsd.org/changeset/base/221397 Log: Add make_dev_alias_p() function. It is similar to make_dev_alias(), but it may return an error like make_dev_p() does. Reviewed by: kib (previous version) MFC after: 2 weeks Modified: head/sys/kern/kern_conf.c head/sys/sys/conf.h Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Tue May 3 18:48:06 2011 (r221396) +++ head/sys/kern/kern_conf.c Tue May 3 18:54:18 2011 (r221397) @@ -893,23 +893,34 @@ dev_depends(struct cdev *pdev, struct cd dev_unlock(); } -struct cdev * -make_dev_alias(struct cdev *pdev, const char *fmt, ...) +static int +make_dev_alias_v(int flags, struct cdev **cdev, struct cdev *pdev, + const char *fmt, va_list ap) { struct cdev *dev; - va_list ap; int error; - KASSERT(pdev != NULL, ("NULL pdev")); - dev = devfs_alloc(MAKEDEV_WAITOK); + KASSERT(pdev != NULL, ("make_dev_alias_v: pdev is NULL")); + KASSERT((flags & MAKEDEV_WAITOK) == 0 || (flags & MAKEDEV_NOWAIT) == 0, + ("make_dev_alias_v: both WAITOK and NOWAIT specified")); + KASSERT((flags & ~(MAKEDEV_WAITOK | MAKEDEV_NOWAIT | + MAKEDEV_CHECKNAME)) == 0, + ("make_dev_alias_v: invalid flags specified (flags=%02x)", flags)); + + dev = devfs_alloc(flags); + if (dev == NULL) + return (ENOMEM); dev_lock(); dev->si_flags |= SI_ALIAS; - va_start(ap, fmt); error = prep_devname(dev, fmt, ap); - va_end(ap); if (error != 0) { - panic("make_dev_alias: bad si_name (error=%d, si_name=%s)", - error, dev->si_name); + if ((flags & MAKEDEV_CHECKNAME) == 0) { + panic("make_dev_alias_v: bad si_name " + "(error=%d, si_name=%s)", error, dev->si_name); + } + dev_unlock(); + devfs_free(dev); + return (error); } dev->si_flags |= SI_NAMED; devfs_create(dev); @@ -917,11 +928,41 @@ make_dev_alias(struct cdev *pdev, const clean_unrhdrl(devfs_inos); dev_unlock(); - notify_create(dev, MAKEDEV_WAITOK); + notify_create(dev, flags); + *cdev = dev; + + return (0); +} +struct cdev * +make_dev_alias(struct cdev *pdev, const char *fmt, ...) +{ + struct cdev *dev; + va_list ap; + int res; + + va_start(ap, fmt); + res = make_dev_alias_v(MAKEDEV_WAITOK, &dev, pdev, fmt, ap); + va_end(ap); + + KASSERT(res == 0 && dev != NULL, + ("make_dev_alias: failed make_dev_alias_v (error=%d)", res)); return (dev); } +int +make_dev_alias_p(int flags, struct cdev **cdev, struct cdev *pdev, + const char *fmt, ...) +{ + va_list ap; + int res; + + va_start(ap, fmt); + res = make_dev_alias_v(flags, cdev, pdev, fmt, ap); + va_end(ap); + return (res); +} + static void destroy_devl(struct cdev *dev) { Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Tue May 3 18:48:06 2011 (r221396) +++ head/sys/sys/conf.h Tue May 3 18:54:18 2011 (r221397) @@ -278,6 +278,8 @@ int make_dev_p(int _flags, struct cdev * const char *_fmt, ...) __printflike(8, 9); struct cdev *make_dev_alias(struct cdev *_pdev, const char *_fmt, ...) __printflike(2, 3); +int make_dev_alias_p(int _flags, struct cdev **_cdev, struct cdev *_pdev, + const char *_fmt, ...) __printflike(4, 5); void dev_lock(void); void dev_unlock(void); void setconf(void); From owner-svn-src-all@FreeBSD.ORG Tue May 3 18:55:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCBB3106564A; Tue, 3 May 2011 18:55:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A22E08FC0A; Tue, 3 May 2011 18:55:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43ItG2r006895; Tue, 3 May 2011 18:55:16 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43ItGoP006893; Tue, 3 May 2011 18:55:16 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105031855.p43ItGoP006893@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 3 May 2011 18:55:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221398 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 18:55:16 -0000 Author: ae Date: Tue May 3 18:55:16 2011 New Revision: 221398 URL: http://svn.freebsd.org/changeset/base/221398 Log: Document make_dev_alias_p(). MFC after: 2 weeks Modified: head/share/man/man9/make_dev.9 Modified: head/share/man/man9/make_dev.9 ============================================================================== --- head/share/man/man9/make_dev.9 Tue May 3 18:54:18 2011 (r221397) +++ head/share/man/man9/make_dev.9 Tue May 3 18:55:16 2011 (r221398) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 24, 2010 +.Dd May 03, 2011 .Dt MAKE_DEV 9 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nm make_dev_credf , .Nm make_dev_p , .Nm make_dev_alias , +.Nm make_dev_alias_p , .Nm destroy_dev , .Nm destroy_dev_sched , .Nm destroy_dev_sched_cb , @@ -54,6 +55,8 @@ and DEVFS registration for devices .Fn make_dev_p "int flags" "struct cdev **cdev" "struct cdevsw *devsw" "struct ucred *cr" "uid_t uid" "gid_t gid" "int mode" "const char *fmt" ... .Ft struct cdev * .Fn make_dev_alias "struct cdev *pdev" "const char *fmt" ... +.Ft int +.Fn make_dev_alias_p "int flags" "struct cdev **cdev" "struct cdev *pdev" "const char *fmt" ... .Ft void .Fn destroy_dev "struct cdev *dev" .Ft void @@ -149,6 +152,15 @@ created device will be never destroyed return an error if the device name is invalid or already exists .El .Pp +Only +.Dv MAKEDEV_NOWAIT , +.Dv MAKEDEV_WAITOK +and +.Dv MAKEDEV_CHECKNAME +values are accepted for the +.Fn make_dev_alias_p +function. +.Pp The .Dv MAKEDEV_WAITOK flag is assumed if none of @@ -214,6 +226,13 @@ It is an error to call prior to calling .Fn make_dev . .Pp +.Fn make_dev_alias_p +function is similar to +.Fn make_dev_alias +but it takes a pointer to the resulting +.Ft *cdev +as an argument and may return an error. +.Pp The .Fa cdev returned by @@ -321,6 +340,8 @@ pointer, otherwise it will return .Sh ERRORS The .Fn make_dev_p +and +.Fn make_dev_alias_p call will fail and the device will be not registered if: .Bl -tag -width Er .It Bq Er ENOMEM From owner-svn-src-all@FreeBSD.ORG Tue May 3 19:12:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D6AF106566B; Tue, 3 May 2011 19:12:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D5C58FC14; Tue, 3 May 2011 19:12:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43JCgGn007756; Tue, 3 May 2011 19:12:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43JCg5N007754; Tue, 3 May 2011 19:12:42 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105031912.p43JCg5N007754@svn.freebsd.org> From: Alexander Motin Date: Tue, 3 May 2011 19:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221400 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:12:42 -0000 Author: mav Date: Tue May 3 19:12:42 2011 New Revision: 221400 URL: http://svn.freebsd.org/changeset/base/221400 Log: Use make_dev_alias_p() added in r221397 to create alias dev entry. It removes panic in case if alias name is already busy for some reason. Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Tue May 3 18:57:46 2011 (r221399) +++ head/sys/geom/geom_dev.c Tue May 3 19:12:42 2011 (r221400) @@ -148,7 +148,8 @@ g_dev_taste(struct g_class *mp, struct g snprintf(buf, sizeof(buf), "%s%s", val, gp->name + len); freeenv(val); - adev = make_dev_alias(dev, buf); + make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, + &adev, dev, "%s", buf); break; } } From owner-svn-src-all@FreeBSD.ORG Tue May 3 19:33:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 080E61065674; Tue, 3 May 2011 19:33:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC49E8FC16; Tue, 3 May 2011 19:33:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43JX6YT009094; Tue, 3 May 2011 19:33:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43JX6V7009091; Tue, 3 May 2011 19:33:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105031933.p43JX6V7009091@svn.freebsd.org> From: Xin LI Date: Tue, 3 May 2011 19:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221401 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:33:07 -0000 Author: delphij Date: Tue May 3 19:33:06 2011 New Revision: 221401 URL: http://svn.freebsd.org/changeset/base/221401 Log: Fix prototype for ffsll(3) and fls(3). PR: docs/156796 Submitted by: Jean-Yves Migeon MFC after: 3 days Modified: head/lib/libc/string/ffs.3 Modified: head/lib/libc/string/ffs.3 ============================================================================== --- head/lib/libc/string/ffs.3 Tue May 3 19:12:42 2011 (r221400) +++ head/lib/libc/string/ffs.3 Tue May 3 19:33:06 2011 (r221401) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd October 26, 2008 +.Dd May 3, 2011 .Dt FFS 3 .Os .Sh NAME @@ -50,8 +50,8 @@ .Ft int .Fn ffsl "long value" .Ft int -.Ft int .Fn ffsll "long long value" +.Ft int .Fn fls "int value" .Ft int .Fn flsl "long value" From owner-svn-src-all@FreeBSD.ORG Tue May 3 19:33:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43CEA106564A; Tue, 3 May 2011 19:33:10 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E77F8FC19; Tue, 3 May 2011 19:33:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43JXAtI009125; Tue, 3 May 2011 19:33:10 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43JXAcB009122; Tue, 3 May 2011 19:33:10 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201105031933.p43JXAcB009122@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 3 May 2011 19:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221402 - in vendor/tre: . dist dist/doc dist/lib dist/lib/.deps dist/m4 dist/po dist/python dist/src dist/src/.deps dist/tests dist/tests/.deps dist/tests/agrep dist/utils dist/win32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:33:10 -0000 Author: gabor Date: Tue May 3 19:33:09 2011 New Revision: 221402 URL: http://svn.freebsd.org/changeset/base/221402 Log: - Vendor import of TRE 0.8.0 Added: vendor/tre/ vendor/tre/dist/ vendor/tre/dist/ABOUT-NLS vendor/tre/dist/AUTHORS vendor/tre/dist/ChangeLog vendor/tre/dist/INSTALL vendor/tre/dist/LICENSE vendor/tre/dist/Makefile (contents, props changed) vendor/tre/dist/Makefile.am (contents, props changed) vendor/tre/dist/Makefile.in (contents, props changed) vendor/tre/dist/NEWS vendor/tre/dist/README vendor/tre/dist/THANKS vendor/tre/dist/TODO vendor/tre/dist/aclocal.m4 vendor/tre/dist/config.h (contents, props changed) vendor/tre/dist/config.h.in (contents, props changed) vendor/tre/dist/config.log vendor/tre/dist/config.status (contents, props changed) vendor/tre/dist/configure (contents, props changed) vendor/tre/dist/configure.ac vendor/tre/dist/doc/ vendor/tre/dist/doc/Makefile (contents, props changed) vendor/tre/dist/doc/Makefile.am (contents, props changed) vendor/tre/dist/doc/Makefile.in (contents, props changed) vendor/tre/dist/doc/agrep.1 (contents, props changed) vendor/tre/dist/doc/agrep.1.in (contents, props changed) vendor/tre/dist/doc/default.css (contents, props changed) vendor/tre/dist/doc/tre-api.html (contents, props changed) vendor/tre/dist/doc/tre-syntax.html (contents, props changed) vendor/tre/dist/lib/ vendor/tre/dist/lib/.deps/ vendor/tre/dist/lib/.deps/regcomp.Plo vendor/tre/dist/lib/.deps/regerror.Plo vendor/tre/dist/lib/.deps/regexec.Plo vendor/tre/dist/lib/.deps/tre-ast.Plo vendor/tre/dist/lib/.deps/tre-compile.Plo vendor/tre/dist/lib/.deps/tre-match-approx.Plo vendor/tre/dist/lib/.deps/tre-match-backtrack.Plo vendor/tre/dist/lib/.deps/tre-match-parallel.Plo vendor/tre/dist/lib/.deps/tre-mem.Plo vendor/tre/dist/lib/.deps/tre-parse.Plo vendor/tre/dist/lib/.deps/tre-stack.Plo vendor/tre/dist/lib/Makefile (contents, props changed) vendor/tre/dist/lib/Makefile.am (contents, props changed) vendor/tre/dist/lib/Makefile.in (contents, props changed) vendor/tre/dist/lib/README vendor/tre/dist/lib/regcomp.c (contents, props changed) vendor/tre/dist/lib/regerror.c (contents, props changed) vendor/tre/dist/lib/regex.h (contents, props changed) vendor/tre/dist/lib/regexec.c (contents, props changed) vendor/tre/dist/lib/stamp-h2 vendor/tre/dist/lib/tre-ast.c (contents, props changed) vendor/tre/dist/lib/tre-ast.h (contents, props changed) vendor/tre/dist/lib/tre-compile.c (contents, props changed) vendor/tre/dist/lib/tre-compile.h (contents, props changed) vendor/tre/dist/lib/tre-config.h (contents, props changed) vendor/tre/dist/lib/tre-config.h.in (contents, props changed) vendor/tre/dist/lib/tre-internal.h (contents, props changed) vendor/tre/dist/lib/tre-match-approx.c (contents, props changed) vendor/tre/dist/lib/tre-match-backtrack.c (contents, props changed) vendor/tre/dist/lib/tre-match-parallel.c (contents, props changed) vendor/tre/dist/lib/tre-match-utils.h (contents, props changed) vendor/tre/dist/lib/tre-mem.c (contents, props changed) vendor/tre/dist/lib/tre-mem.h (contents, props changed) vendor/tre/dist/lib/tre-parse.c (contents, props changed) vendor/tre/dist/lib/tre-parse.h (contents, props changed) vendor/tre/dist/lib/tre-stack.c (contents, props changed) vendor/tre/dist/lib/tre-stack.h (contents, props changed) vendor/tre/dist/lib/tre.h (contents, props changed) vendor/tre/dist/lib/xmalloc.c (contents, props changed) vendor/tre/dist/lib/xmalloc.h (contents, props changed) vendor/tre/dist/libtool (contents, props changed) vendor/tre/dist/m4/ vendor/tre/dist/m4/Makefile (contents, props changed) vendor/tre/dist/m4/Makefile.am (contents, props changed) vendor/tre/dist/m4/Makefile.in (contents, props changed) vendor/tre/dist/m4/ac_libtool_tags.m4 vendor/tre/dist/m4/ax_check_funcs_comp.m4 vendor/tre/dist/m4/ax_check_sign.m4 vendor/tre/dist/m4/ax_decl_wchar_max.m4 vendor/tre/dist/m4/gettext.m4 vendor/tre/dist/m4/iconv.m4 vendor/tre/dist/m4/intlmacosx.m4 vendor/tre/dist/m4/lib-ld.m4 vendor/tre/dist/m4/lib-link.m4 vendor/tre/dist/m4/lib-prefix.m4 vendor/tre/dist/m4/nls.m4 vendor/tre/dist/m4/po.m4 vendor/tre/dist/m4/progtest.m4 vendor/tre/dist/m4/vl_prog_cc_warnings.m4 vendor/tre/dist/po/ vendor/tre/dist/po/LINGUAS vendor/tre/dist/po/Makefile (contents, props changed) vendor/tre/dist/po/Makefile.in (contents, props changed) vendor/tre/dist/po/Makefile.in.in (contents, props changed) vendor/tre/dist/po/Makevars vendor/tre/dist/po/POTFILES vendor/tre/dist/po/POTFILES.in (contents, props changed) vendor/tre/dist/po/Rules-quot vendor/tre/dist/po/boldquot.sed (contents, props changed) vendor/tre/dist/po/en@boldquot.header vendor/tre/dist/po/en@quot.header vendor/tre/dist/po/fi.gmo (contents, props changed) vendor/tre/dist/po/fi.po vendor/tre/dist/po/insert-header.sin vendor/tre/dist/po/quot.sed (contents, props changed) vendor/tre/dist/po/remove-potcdate.sin vendor/tre/dist/po/stamp-po vendor/tre/dist/po/sv.gmo (contents, props changed) vendor/tre/dist/po/sv.po vendor/tre/dist/po/tre.pot vendor/tre/dist/python/ vendor/tre/dist/python/example.py (contents, props changed) vendor/tre/dist/python/setup.py (contents, props changed) vendor/tre/dist/python/tre-python.c (contents, props changed) vendor/tre/dist/src/ vendor/tre/dist/src/.deps/ vendor/tre/dist/src/.deps/agrep-agrep.Po vendor/tre/dist/src/Makefile (contents, props changed) vendor/tre/dist/src/Makefile.am (contents, props changed) vendor/tre/dist/src/Makefile.in (contents, props changed) vendor/tre/dist/src/agrep.c (contents, props changed) vendor/tre/dist/stamp-h1 vendor/tre/dist/tests/ vendor/tre/dist/tests/.deps/ vendor/tre/dist/tests/.deps/bench.Po vendor/tre/dist/tests/.deps/libxtre_la-regcomp.Plo vendor/tre/dist/tests/.deps/libxtre_la-regerror.Plo vendor/tre/dist/tests/.deps/libxtre_la-regexec.Plo vendor/tre/dist/tests/.deps/libxtre_la-tre-ast.Plo vendor/tre/dist/tests/.deps/libxtre_la-tre-compile.Plo vendor/tre/dist/tests/.deps/libxtre_la-tre-match-approx.Plo vendor/tre/dist/tests/.deps/libxtre_la-tre-match-backtrack.Plo vendor/tre/dist/tests/.deps/libxtre_la-tre-match-parallel.Plo vendor/tre/dist/tests/.deps/libxtre_la-tre-mem.Plo vendor/tre/dist/tests/.deps/libxtre_la-tre-parse.Plo vendor/tre/dist/tests/.deps/libxtre_la-tre-stack.Plo vendor/tre/dist/tests/.deps/libxtre_la-xmalloc.Plo vendor/tre/dist/tests/.deps/randtest-randtest.Po vendor/tre/dist/tests/.deps/retest-retest.Po vendor/tre/dist/tests/.deps/test-str-source.Po vendor/tre/dist/tests/.deps/wretest-retest.Po vendor/tre/dist/tests/Makefile (contents, props changed) vendor/tre/dist/tests/Makefile.am (contents, props changed) vendor/tre/dist/tests/Makefile.in (contents, props changed) vendor/tre/dist/tests/agrep/ vendor/tre/dist/tests/agrep/Makefile (contents, props changed) vendor/tre/dist/tests/agrep/Makefile.am (contents, props changed) vendor/tre/dist/tests/agrep/Makefile.in (contents, props changed) vendor/tre/dist/tests/agrep/basic.args vendor/tre/dist/tests/agrep/basic.input vendor/tre/dist/tests/agrep/basic.ok vendor/tre/dist/tests/agrep/delimiters.args vendor/tre/dist/tests/agrep/delimiters.input vendor/tre/dist/tests/agrep/delimiters.ok vendor/tre/dist/tests/agrep/exitstatus.args vendor/tre/dist/tests/agrep/exitstatus.input vendor/tre/dist/tests/agrep/exitstatus.ok vendor/tre/dist/tests/agrep/records.args vendor/tre/dist/tests/agrep/records.input vendor/tre/dist/tests/agrep/records.ok vendor/tre/dist/tests/agrep/run-tests.sh (contents, props changed) vendor/tre/dist/tests/bench.c (contents, props changed) vendor/tre/dist/tests/build-tests.sh (contents, props changed) vendor/tre/dist/tests/randtest.c (contents, props changed) vendor/tre/dist/tests/retest.c (contents, props changed) vendor/tre/dist/tests/test-str-source.c (contents, props changed) vendor/tre/dist/tre.pc vendor/tre/dist/tre.pc.in (contents, props changed) vendor/tre/dist/tre.spec vendor/tre/dist/tre.spec.in (contents, props changed) vendor/tre/dist/utils/ vendor/tre/dist/utils/Makefile (contents, props changed) vendor/tre/dist/utils/Makefile.am (contents, props changed) vendor/tre/dist/utils/Makefile.in (contents, props changed) vendor/tre/dist/utils/autogen.sh (contents, props changed) vendor/tre/dist/utils/build-rpm.sh (contents, props changed) vendor/tre/dist/utils/compile (contents, props changed) vendor/tre/dist/utils/config.guess (contents, props changed) vendor/tre/dist/utils/config.rpath (contents, props changed) vendor/tre/dist/utils/config.sub (contents, props changed) vendor/tre/dist/utils/depcomp (contents, props changed) vendor/tre/dist/utils/install-sh (contents, props changed) vendor/tre/dist/utils/ltmain.sh (contents, props changed) vendor/tre/dist/utils/missing (contents, props changed) vendor/tre/dist/utils/mkinstalldirs (contents, props changed) vendor/tre/dist/win32/ vendor/tre/dist/win32/config.h (contents, props changed) vendor/tre/dist/win32/retest.dsp vendor/tre/dist/win32/tre-config.h (contents, props changed) vendor/tre/dist/win32/tre.def vendor/tre/dist/win32/tre.dsp vendor/tre/dist/win32/tre.dsw Added: vendor/tre/dist/ABOUT-NLS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/tre/dist/ABOUT-NLS Tue May 3 19:33:09 2011 (r221402) @@ -0,0 +1,1068 @@ +1 Notes on the Free Translation Project +*************************************** + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that free software will gradually become able to speak many +languages. A few packages already provide translations for their +messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work on translations can contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +1.1 Quick configuration advice +============================== + +If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +1.2 INSTALL Matters +=================== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the included GNU +`gettext' library will be used. This library is wholly contained +within this package, usually in the `intl/' subdirectory, so prior +installation of the GNU `gettext' package is _not_ required. +Installers may use special options at configuration time for changing +the default behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will, respectively, bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might not be desirable. You should use +the more recent version of the GNU `gettext' library. I.e. if the file +`intl/VERSION' shows that the library which comes with this package is +more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages usually have many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +1.3 Using This Package +====================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. If you happen to have the `LC_ALL' or some other +`LC_xxx' environment variables set, you should unset them before +setting `LANG', otherwise the setting of `LANG' will not have the +desired effect. Here `LL' is an ISO 639 two-letter language code, and +`CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your language by running the +command `locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +1.4 Translating Teams +===================== + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://translationproject.org/', in the "Teams" area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `coordinator@translationproject.org' to +reach the coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skills are praised more than +programming skills, here. + +1.5 Available Packages +====================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of November +2007. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo + +----------------------------------------------------+ + Compendium | [] [] [] [] | + a2ps | [] [] [] [] [] | + aegis | () | + ant-phone | () | + anubis | [] | + ap-utils | | + aspell | [] [] [] [] [] | + bash | [] | + bfd | | + bibshelf | [] | + binutils | | + bison | [] [] | + bison-runtime | [] | + bluez-pin | [] [] [] [] [] | + cflow | [] | + clisp | [] [] [] | + console-tools | [] [] | + coreutils | [] [] [] [] | + cpio | | + cpplib | [] [] [] | + cryptonit | [] | + dialog | | + diffutils | [] [] [] [] [] [] | + doodle | [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + fetchmail | [] [] () [] [] | + findutils | [] | + findutils_stable | [] [] [] | + flex | [] [] [] | + fslint | | + gas | | + gawk | [] [] [] | + gcal | [] | + gcc | [] | + gettext-examples | [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] | + gip | [] | + gliv | [] [] | + glunarclock | [] | + gmult | [] [] | + gnubiff | () | + gnucash | [] [] () () [] | + gnuedu | | + gnulib | [] | + gnunet | | + gnunet-gtk | | + gnutls | [] | + gpe-aerial | [] [] | + gpe-beam | [] [] | + gpe-calendar | | + gpe-clock | [] [] | + gpe-conf | [] [] | + gpe-contacts | | + gpe-edit | [] | + gpe-filemanager | | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-package | | + gpe-sketchbook | [] [] | + gpe-su | [] [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | | + gphoto2 | [] [] [] [] | + gprof | [] [] | + gpsdrive | | + gramadoir | [] [] | + grep | [] [] | + gretl | () | + gsasl | | + gss | | + gst-plugins-bad | [] [] | + gst-plugins-base | [] [] | + gst-plugins-good | [] [] [] | + gst-plugins-ugly | [] [] | + gstreamer | [] [] [] [] [] [] [] | + gtick | () | + gtkam | [] [] [] [] | + gtkorphan | [] [] | + gtkspell | [] [] [] [] | + gutenprint | [] | + hello | [] [] [] [] [] | + herrie | [] | + hylafax | | + idutils | [] [] | + indent | [] [] [] [] | + iso_15924 | | + iso_3166 | [] [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | [] [] [] | + iso_639 | [] [] [] [] | + jpilot | [] | + jtag | | + jwhois | | + kbd | [] [] [] [] | + keytouch | [] [] | + keytouch-editor | [] | + keytouch-keyboa... | [] | + latrine | () | + ld | [] | + leafpad | [] [] [] [] [] | + libc | [] [] [] [] | + libexif | [] | + libextractor | [] | + libgpewidget | [] [] [] | + libgpg-error | [] | + libgphoto2 | [] [] | + libgphoto2_port | [] [] | + libgsasl | | + libiconv | [] [] | + libidn | [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lprng | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailfromd | | + mailutils | [] | + make | [] [] | + man-db | [] [] [] | + minicom | [] [] [] | + nano | [] [] [] | + opcodes | [] | + parted | [] [] | + pilot-qof | | + popt | [] [] [] | + psmisc | [] | + pwdutils | | + qof | | + radius | [] | + recode | [] [] [] [] [] [] | + rpm | [] | + screem | | + scrollkeeper | [] [] [] [] [] [] [] [] | + sed | [] [] [] | + shared-mime-info | [] [] [] [] () [] [] [] | + sharutils | [] [] [] [] [] [] | + shishi | | + skencil | [] () | + solfege | | + soundtracker | [] [] | + sp | [] | + system-tools-ba... | [] [] [] [] [] [] [] [] [] | + tar | [] [] | + texinfo | [] [] [] | + tin | () () | + tuxpaint | [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] [] | + util-linux-ng | [] [] [] [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] | + xchat | [] [] [] [] [] [] [] | + xkeyboard-config | [] | + xpad | [] [] [] | + +----------------------------------------------------+ + af am ar az be bg bs ca cs cy da de el en en_GB eo + 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18 + + es et eu fa fi fr ga gl gu he hi hr hu id is it + +--------------------------------------------------+ + Compendium | [] [] [] [] [] | + a2ps | [] [] [] () | + aegis | | + ant-phone | [] | + anubis | [] | + ap-utils | [] [] | + aspell | [] [] [] | + bash | [] | + bfd | [] [] | + bibshelf | [] [] [] | + binutils | [] [] [] | + bison | [] [] [] [] [] [] | + bison-runtime | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] | + cflow | [] | + clisp | [] [] | + console-tools | | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] | + cpplib | [] [] | + cryptonit | [] | + dialog | [] [] [] | + diffutils | [] [] [] [] [] [] [] [] [] | + doodle | [] [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] | + fetchmail | [] | + findutils | [] [] [] | + findutils_stable | [] [] [] [] | + flex | [] [] [] | + fslint | | + gas | [] [] | + gawk | [] [] [] [] () | + gcal | [] [] | + gcc | [] | + gettext-examples | [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] | + gettext-tools | [] [] [] [] | + gip | [] [] [] [] | + gliv | () | + glunarclock | [] [] [] | + gmult | [] [] [] | + gnubiff | () () | + gnucash | () () () | + gnuedu | [] | + gnulib | [] [] [] | + gnunet | | + gnunet-gtk | | + gnutls | | + gpe-aerial | [] [] | + gpe-beam | [] [] | + gpe-calendar | | + gpe-clock | [] [] [] [] | + gpe-conf | [] | + gpe-contacts | [] [] | + gpe-edit | [] [] [] [] | + gpe-filemanager | [] | + gpe-go | [] [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] [] [] [] | + gpe-package | [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] | + gphoto2 | [] [] [] [] [] | + gprof | [] [] [] [] [] | + gpsdrive | [] | + gramadoir | [] [] | + grep | [] [] [] | + gretl | [] [] [] () | + gsasl | [] [] | + gss | [] [] | + gst-plugins-bad | [] [] [] [] | + gst-plugins-base | [] [] [] [] | + gst-plugins-good | [] [] [] [] [] | + gst-plugins-ugly | [] [] [] [] | + gstreamer | [] [] [] | + gtick | [] [] [] | + gtkam | [] [] [] [] | + gtkorphan | [] [] | + gtkspell | [] [] [] [] [] [] [] | + gutenprint | [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + herrie | [] | + hylafax | | + idutils | [] [] [] [] [] | + indent | [] [] [] [] [] [] [] [] [] [] | + iso_15924 | [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | [] | + iso_4217 | [] [] [] [] [] [] | + iso_639 | [] [] [] [] [] [] | + jpilot | [] [] | + jtag | [] | + jwhois | [] [] [] [] [] | + kbd | [] [] | + keytouch | [] [] [] | + keytouch-editor | [] | + keytouch-keyboa... | [] [] | + latrine | [] [] | + ld | [] [] [] [] | + leafpad | [] [] [] [] [] [] | + libc | [] [] [] [] [] | + libexif | [] | + libextractor | [] | + libgpewidget | [] [] [] [] [] | + libgpg-error | [] | + libgphoto2 | [] [] [] | + libgphoto2_port | [] [] | + libgsasl | [] [] | + libiconv | [] [] [] | + libidn | [] [] | + lifelines | () | + lilypond | [] [] [] | + lingoteach | [] [] [] | + lprng | | + lynx | [] [] [] | + m4 | [] [] [] [] | + mailfromd | | + mailutils | [] [] | + make | [] [] [] [] [] [] [] [] | + man-db | [] | + minicom | [] [] [] [] | + nano | [] [] [] [] [] [] [] | + opcodes | [] [] [] [] | + parted | [] [] [] | + pilot-qof | | + popt | [] [] [] [] | + psmisc | [] [] | + pwdutils | | + qof | [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] | + sed | [] [] [] [] [] | + shared-mime-info | [] [] [] [] [] [] | + sharutils | [] [] [] [] [] [] [] [] | + shishi | [] | + skencil | [] [] | + solfege | [] | + soundtracker | [] [] [] | + sp | [] | + system-tools-ba... | [] [] [] [] [] [] [] [] [] | + tar | [] [] [] [] [] | + texinfo | [] [] [] | + tin | [] () | + tuxpaint | [] [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux | [] [] [] [] [] [] [] | + util-linux-ng | [] [] [] [] [] [] [] | + vorbis-tools | | + wastesedge | () | + wdiff | [] [] [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] | + xchat | [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] [] | + xpad | [] [] [] | + +--------------------------------------------------+ + es et eu fa fi fr ga gl gu he hi hr hu id is it + 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52 + + ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn + +--------------------------------------------------+ + Compendium | [] | + a2ps | () [] [] | + aegis | () | + ant-phone | [] | + anubis | [] [] [] | + ap-utils | [] | + aspell | [] [] | + bash | [] | + bfd | | + bibshelf | [] | + binutils | | + bison | [] [] [] | + bison-runtime | [] [] [] | + bluez-pin | [] [] [] | + cflow | | + clisp | [] | + console-tools | | + coreutils | [] | + cpio | [] | + cpplib | [] | + cryptonit | [] | + dialog | [] [] | + diffutils | [] [] [] | + doodle | | + e2fsprogs | [] | + enscript | [] | + fetchmail | [] [] | + findutils | [] | + findutils_stable | [] | + flex | [] [] | + fslint | | + gas | | + gawk | [] [] | + gcal | | + gcc | | + gettext-examples | [] [] [] | + gettext-runtime | [] [] [] | + gettext-tools | [] [] | + gip | [] [] | + gliv | [] | + glunarclock | [] [] | + gmult | [] [] [] | + gnubiff | | + gnucash | () () () | + gnuedu | | + gnulib | [] [] | + gnunet | | + gnunet-gtk | | + gnutls | [] | + gpe-aerial | [] | + gpe-beam | [] | + gpe-calendar | [] | + gpe-clock | [] [] [] | + gpe-conf | [] [] [] | + gpe-contacts | [] | + gpe-edit | [] [] [] | + gpe-filemanager | [] [] | + gpe-go | [] [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] | + gpe-package | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] [] | + gpe-taskmanager | [] [] [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | [] | + gphoto2 | [] [] | + gprof | [] | + gpsdrive | [] | + gramadoir | () | + grep | [] [] | + gretl | | + gsasl | [] | + gss | | + gst-plugins-bad | [] | + gst-plugins-base | [] | + gst-plugins-good | [] | + gst-plugins-ugly | [] | + gstreamer | [] | + gtick | [] | + gtkam | [] [] | + gtkorphan | [] | + gtkspell | [] [] | + gutenprint | [] | + hello | [] [] [] [] [] [] [] | + herrie | [] | + hylafax | | + idutils | [] | + indent | [] [] | + iso_15924 | [] | + iso_3166 | [] [] [] [] [] [] [] [] | + iso_3166_2 | [] | + iso_4217 | [] [] [] | + iso_639 | [] [] [] [] | + jpilot | () () | + jtag | | + jwhois | [] | + kbd | [] | + keytouch | [] | + keytouch-editor | [] | + keytouch-keyboa... | | + latrine | [] | + ld | | + leafpad | [] [] | + libc | [] [] [] | + libexif | | + libextractor | | + libgpewidget | [] | + libgpg-error | | + libgphoto2 | [] | + libgphoto2_port | [] | + libgsasl | [] | + libiconv | [] | + libidn | [] [] | + lifelines | [] | + lilypond | [] | + lingoteach | [] | + lprng | | + lynx | [] [] | + m4 | [] [] | + mailfromd | | + mailutils | | + make | [] [] [] | + man-db | | + minicom | [] | + nano | [] [] [] | + opcodes | [] | + parted | [] [] | + pilot-qof | | + popt | [] [] [] | + psmisc | [] [] [] | + pwdutils | | + qof | | + radius | | + recode | [] | + rpm | [] [] | + screem | [] | + scrollkeeper | [] [] [] [] | + sed | [] [] | + shared-mime-info | [] [] [] [] [] [] [] | + sharutils | [] [] | + shishi | | + skencil | | + solfege | () () | + soundtracker | | + sp | () | + system-tools-ba... | [] [] [] [] | + tar | [] [] [] | + texinfo | [] [] | + tin | | + tuxpaint | () [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] | + util-linux-ng | [] [] | + vorbis-tools | | + wastesedge | [] | + wdiff | [] [] | + wget | [] [] | + xchat | [] [] [] [] | + xkeyboard-config | [] [] [] | + xpad | [] [] [] | + +--------------------------------------------------+ + ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn + 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6 + + or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta + +--------------------------------------------------+ + Compendium | [] [] [] [] [] | + a2ps | () [] [] [] [] [] [] | + aegis | () () | + ant-phone | [] [] | + anubis | [] [] [] | + ap-utils | () | + aspell | [] [] [] | + bash | [] [] | + bfd | | + bibshelf | [] | + binutils | [] [] | + bison | [] [] [] [] [] | + bison-runtime | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] [] [] | + cflow | [] | + clisp | [] | + console-tools | [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + cpplib | [] | + cryptonit | [] [] | + dialog | [] | + diffutils | [] [] [] [] [] [] | + doodle | [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] [] | + fetchmail | [] [] [] | + findutils | [] [] [] | + findutils_stable | [] [] [] [] [] [] | + flex | [] [] [] [] [] | + fslint | [] | + gas | | + gawk | [] [] [] [] | + gcal | [] | + gcc | [] [] | + gettext-examples | [] [] [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] [] [] | + gip | [] [] [] [] | + gliv | [] [] [] [] [] [] | + glunarclock | [] [] [] [] [] [] | + gmult | [] [] [] [] | + gnubiff | () [] | + gnucash | () [] | + gnuedu | | + gnulib | [] [] [] | + gnunet | | + gnunet-gtk | [] | + gnutls | [] [] | + gpe-aerial | [] [] [] [] [] [] [] | + gpe-beam | [] [] [] [] [] [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] [] [] [] [] [] | + gpe-conf | [] [] [] [] [] [] [] | + gpe-contacts | [] [] [] [] [] | + gpe-edit | [] [] [] [] [] [] [] [] [] | + gpe-filemanager | [] [] | + gpe-go | [] [] [] [] [] [] [] [] | + gpe-login | [] [] [] [] [] [] [] [] | + gpe-ownerinfo | [] [] [] [] [] [] [] [] | + gpe-package | [] [] | + gpe-sketchbook | [] [] [] [] [] [] [] [] | + gpe-su | [] [] [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] [] [] [] | + gpe-today | [] [] [] [] [] [] [] [] | + gpe-todo | [] [] [] [] | + gphoto2 | [] [] [] [] [] [] | + gprof | [] [] [] | + gpsdrive | [] [] | + gramadoir | [] [] | + grep | [] [] [] [] | + gretl | [] [] [] | + gsasl | [] [] [] | + gss | [] [] [] [] | + gst-plugins-bad | [] [] [] | + gst-plugins-base | [] [] | + gst-plugins-good | [] [] | + gst-plugins-ugly | [] [] [] | + gstreamer | [] [] [] [] | + gtick | [] | + gtkam | [] [] [] [] [] | + gtkorphan | [] | + gtkspell | [] [] [] [] [] [] [] [] | + gutenprint | [] | + hello | [] [] [] [] [] [] [] [] | + herrie | [] [] [] | + hylafax | | + idutils | [] [] [] [] [] | + indent | [] [] [] [] [] [] [] | + iso_15924 | | + iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | + iso_3166_2 | | + iso_4217 | [] [] [] [] [] [] [] | + iso_639 | [] [] [] [] [] [] [] | + jpilot | | + jtag | [] | + jwhois | [] [] [] [] | + kbd | [] [] [] | + keytouch | [] | + keytouch-editor | [] | + keytouch-keyboa... | [] | + latrine | | + ld | [] | + leafpad | [] [] [] [] [] [] | + libc | [] [] [] [] | + libexif | [] [] | + libextractor | [] [] | + libgpewidget | [] [] [] [] [] [] [] [] | + libgpg-error | [] [] [] | + libgphoto2 | [] | + libgphoto2_port | [] [] [] | + libgsasl | [] [] [] [] | + libiconv | [] [] [] | + libidn | [] [] () | + lifelines | [] [] | + lilypond | | + lingoteach | [] | + lprng | [] | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailfromd | [] | + mailutils | [] [] [] | + make | [] [] [] [] | + man-db | [] [] [] [] | + minicom | [] [] [] [] [] | + nano | [] [] [] [] | + opcodes | [] [] | + parted | [] | + pilot-qof | | + popt | [] [] [] [] | + psmisc | [] [] | + pwdutils | [] [] | + qof | [] [] | + radius | [] [] | + recode | [] [] [] [] [] [] [] | + rpm | [] [] [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] [] | + shared-mime-info | [] [] [] [] [] [] | + sharutils | [] [] [] [] | + shishi | [] | + skencil | [] [] [] | + solfege | [] | + soundtracker | [] [] | + sp | | + system-tools-ba... | [] [] [] [] [] [] [] [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + tin | () | + tuxpaint | [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] [] | + util-linux-ng | [] [] [] [] | + vorbis-tools | [] | + wastesedge | | + wdiff | [] [] [] [] [] [] [] | + wget | [] [] [] [] | + xchat | [] [] [] [] [] [] [] | + xkeyboard-config | [] [] [] | + xpad | [] [] [] | + +--------------------------------------------------+ + or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta + 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3 + + tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu + +---------------------------------------------------+ + Compendium | [] [] [] [] | 19 + a2ps | [] [] [] | 19 + aegis | [] | 1 + ant-phone | [] [] | 6 + anubis | [] [] [] | 11 + ap-utils | () [] | 4 + aspell | [] [] [] | 16 + bash | [] | 6 + bfd | | 2 + bibshelf | [] | 7 + binutils | [] [] [] [] | 9 + bison | [] [] [] [] | 20 + bison-runtime | [] [] [] [] | 18 + bluez-pin | [] [] [] [] [] [] | 28 + cflow | [] [] | 5 + clisp | | 9 + console-tools | [] [] | 5 + coreutils | [] [] [] | 18 + cpio | [] [] [] [] | 11 + cpplib | [] [] [] [] [] | 12 + cryptonit | [] | 6 + dialog | [] [] [] | 9 + diffutils | [] [] [] [] [] | 29 + doodle | [] | 6 + e2fsprogs | [] [] | 10 + enscript | [] [] [] | 16 + fetchmail | [] [] | 12 + findutils | [] [] [] | 11 + findutils_stable | [] [] [] [] | 18 + flex | [] [] | 15 + fslint | [] | 2 + gas | [] | 3 + gawk | [] [] [] | 16 + gcal | [] | 5 + gcc | [] [] [] | 7 + gettext-examples | [] [] [] [] [] [] | 29 + gettext-runtime | [] [] [] [] [] [] | 28 + gettext-tools | [] [] [] [] [] | 20 + gip | [] [] | 13 + gliv | [] [] | 11 + glunarclock | [] [] [] | 15 + gmult | [] [] [] [] | 16 + gnubiff | [] | 2 + gnucash | () [] | 5 + gnuedu | [] | 2 + gnulib | [] | 10 + gnunet | | 0 + gnunet-gtk | [] [] | 3 + gnutls | | 4 + gpe-aerial | [] [] | 14 + gpe-beam | [] [] | 14 + gpe-calendar | [] [] | 7 + gpe-clock | [] [] [] [] | 21 + gpe-conf | [] [] [] | 16 + gpe-contacts | [] [] | 10 + gpe-edit | [] [] [] [] [] | 22 + gpe-filemanager | [] [] | 7 + gpe-go | [] [] [] [] | 19 + gpe-login | [] [] [] [] [] | 21 + gpe-ownerinfo | [] [] [] [] | 21 + gpe-package | [] | 6 + gpe-sketchbook | [] [] | 16 + gpe-su | [] [] [] [] | 21 + gpe-taskmanager | [] [] [] [] | 21 + gpe-timesheet | [] [] [] [] | 18 + gpe-today | [] [] [] [] [] | 21 + gpe-todo | [] [] | 8 + gphoto2 | [] [] [] [] | 21 + gprof | [] [] | 13 + gpsdrive | [] | 5 + gramadoir | [] | 7 + grep | [] | 12 + gretl | | 6 + gsasl | [] [] [] | 9 + gss | [] | 7 + gst-plugins-bad | [] [] [] | 13 + gst-plugins-base | [] [] | 11 + gst-plugins-good | [] [] [] [] [] | 16 + gst-plugins-ugly | [] [] [] | 13 + gstreamer | [] [] [] | 18 + gtick | [] [] | 7 + gtkam | [] | 16 + gtkorphan | [] | 7 + gtkspell | [] [] [] [] [] [] | 27 + gutenprint | | 4 + hello | [] [] [] [] [] | 38 + herrie | [] [] | 8 + hylafax | | 0 + idutils | [] [] | 15 + indent | [] [] [] [] [] | 28 + iso_15924 | [] [] | 4 + iso_3166 | [] [] [] [] [] [] [] [] [] | 54 + iso_3166_2 | [] [] | 4 + iso_4217 | [] [] [] [] [] | 24 + iso_639 | [] [] [] [] [] | 26 + jpilot | [] [] [] [] | 7 + jtag | [] | 3 + jwhois | [] [] [] | 13 + kbd | [] [] [] | 13 + keytouch | [] | 8 + keytouch-editor | [] | 5 + keytouch-keyboa... | [] | 5 + latrine | [] [] | 5 + ld | [] [] [] [] | 10 + leafpad | [] [] [] [] [] | 24 + libc | [] [] [] | 19 + libexif | [] | 5 + libextractor | [] | 5 + libgpewidget | [] [] [] | 20 + libgpg-error | [] | 6 + libgphoto2 | [] [] | 9 + libgphoto2_port | [] [] [] | 11 + libgsasl | [] | 8 + libiconv | [] [] | 11 + libidn | [] [] | 11 + lifelines | | 4 + lilypond | [] | 6 + lingoteach | [] | 6 + lprng | [] | 2 + lynx | [] [] [] | 15 + m4 | [] [] [] | 18 + mailfromd | [] [] | 3 + mailutils | [] [] | 8 + make | [] [] [] | 20 + man-db | [] | 9 + minicom | [] | 14 + nano | [] [] [] | 20 + opcodes | [] [] | 10 + parted | [] [] [] | 11 + pilot-qof | [] | 1 + popt | [] [] [] [] | 18 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 3 19:35:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FD311065686; Tue, 3 May 2011 19:35:51 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9D1F8FC13; Tue, 3 May 2011 19:35:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43JZoZ8009257; Tue, 3 May 2011 19:35:50 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43JZocn009256; Tue, 3 May 2011 19:35:50 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201105031935.p43JZocn009256@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 3 May 2011 19:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221403 - vendor/tre/0.8.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:35:51 -0000 Author: gabor Date: Tue May 3 19:35:50 2011 New Revision: 221403 URL: http://svn.freebsd.org/changeset/base/221403 Log: - Tag TRE 0.8.0 Added: vendor/tre/0.8.0/ - copied from r221402, vendor/tre/dist/ From owner-svn-src-all@FreeBSD.ORG Tue May 3 19:41:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE9F9106568F; Tue, 3 May 2011 19:41:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 602D28FC1D; Tue, 3 May 2011 19:41:03 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p43JewIQ096848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 May 2011 22:40:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p43JewvG083935; Tue, 3 May 2011 22:40:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p43Jewup083934; Tue, 3 May 2011 22:40:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 3 May 2011 22:40:58 +0300 From: Kostik Belousov To: Gabor Kovesdan Message-ID: <20110503194058.GJ48734@deviant.kiev.zoral.com.ua> References: <201105031933.p43JXAcB009122@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KAtLAm/lMQMd2j9H" Content-Disposition: inline In-Reply-To: <201105031933.p43JXAcB009122@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r221402 - in vendor/tre: . dist dist/doc dist/lib dist/lib/.deps dist/m4 dist/po dist/python dist/src dist/src/.deps dist/tests dist/tests/.deps dist/tests/agrep dist/utils dist/win32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:41:05 -0000 --KAtLAm/lMQMd2j9H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 03, 2011 at 07:33:10PM +0000, Gabor Kovesdan wrote: > Author: gabor > Date: Tue May 3 19:33:09 2011 > New Revision: 221402 > URL: http://svn.freebsd.org/changeset/base/221402 >=20 > Log: > - Vendor import of TRE 0.8.0 What is this ? Why we do need it in base ? > vendor/tre/dist/lib/.deps/ > vendor/tre/dist/lib/.deps/regcomp.Plo > vendor/tre/dist/lib/.deps/regerror.Plo > vendor/tre/dist/lib/.deps/regexec.Plo > vendor/tre/dist/lib/.deps/tre-ast.Plo > vendor/tre/dist/lib/.deps/tre-compile.Plo > vendor/tre/dist/lib/.deps/tre-match-approx.Plo > vendor/tre/dist/lib/.deps/tre-match-backtrack.Plo > vendor/tre/dist/lib/.deps/tre-match-parallel.Plo > vendor/tre/dist/lib/.deps/tre-mem.Plo > vendor/tre/dist/lib/.deps/tre-parse.Plo > vendor/tre/dist/lib/.deps/tre-stack.Plo I am sure that all .deps dirs are garbage. --KAtLAm/lMQMd2j9H Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3AWkoACgkQC3+MBN1Mb4jFDgCg3vNLMawR9whUQ9uRG7rQT8yI LX8AnA/ZX0NtB6SBI1Qzen84AxQvuQD/ =kNWZ -----END PGP SIGNATURE----- --KAtLAm/lMQMd2j9H-- From owner-svn-src-all@FreeBSD.ORG Tue May 3 19:50:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37397106564A; Tue, 3 May 2011 19:50:40 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CD0E8FC15; Tue, 3 May 2011 19:50:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43Jod2T010112; Tue, 3 May 2011 19:50:39 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43Jod7N010111; Tue, 3 May 2011 19:50:39 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201105031950.p43Jod7N010111@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 3 May 2011 19:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221406 - in vendor/tre/dist: lib/.deps src/.deps tests/.deps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:50:40 -0000 Author: gabor Date: Tue May 3 19:50:39 2011 New Revision: 221406 URL: http://svn.freebsd.org/changeset/base/221406 Log: - Delete unnecessary garbage files Deleted: vendor/tre/dist/lib/.deps/ vendor/tre/dist/src/.deps/ vendor/tre/dist/tests/.deps/ From owner-svn-src-all@FreeBSD.ORG Tue May 3 19:51:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F35B106566C; Tue, 3 May 2011 19:51:30 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B2838FC08; Tue, 3 May 2011 19:51:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43JpUNO010252; Tue, 3 May 2011 19:51:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43JpTnT010228; Tue, 3 May 2011 19:51:29 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105031951.p43JpTnT010228@svn.freebsd.org> From: Marius Strobl Date: Tue, 3 May 2011 19:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221407 - in head/sys: dev/ae dev/age dev/alc dev/ale dev/bce dev/bfe dev/bge dev/dc dev/ed dev/et dev/fxp dev/hme dev/jme dev/lge dev/mii dev/nfe dev/nge dev/nve dev/pcn dev/sf dev/sge... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 19:51:30 -0000 Author: marius Date: Tue May 3 19:51:29 2011 New Revision: 221407 URL: http://svn.freebsd.org/changeset/base/221407 Log: - Remove attempts to implement setting of BMCR_LOOP/MIIF_NOLOOP (reporting IFM_LOOP based on BMCR_LOOP is left in place though as it might provide useful for debugging). For most mii(4) drivers it was unclear whether the PHYs driven by them actually support loopback or not. Moreover, typically loopback mode also needs to be activated on the MAC, which none of the Ethernet drivers using mii(4) implements. Given that loopback media has no real use (and obviously hardly had a chance to actually work) besides for driver development (which just loopback mode should be sufficient for though, i.e one doesn't necessary need support for loopback media) support for it is just dropped as both NetBSD and OpenBSD already did quite some time ago. - Let mii_phy_add_media() also announce the support of IFM_NONE. - Restructure the PHY entry points to use a structure of entry points instead of discrete function pointers, and extend this to include a "reset" entry point. Make sure any PHY-specific reset routine is always used, and provide one for lxtphy(4) which disables MII interrupts (as is done for a few other PHYs we have drivers for). This includes changing NIC drivers which previously just called the generic mii_phy_reset() to now actually call the PHY-specific reset routine, which might be crucial in some cases. While at it, the redundant checks in these NIC drivers for mii->mii_instance not being zero before calling the reset routines were removed because as soon as one PHY driver attaches mii->mii_instance is incremented and we hardly can end up in their media change callbacks etc if no PHY driver has attached as mii_attach() would have failed in that case and not attach a miibus(4) instance. Consequently, NIC drivers now no longer should call mii_phy_reset() directly, so it was removed from EXPORT_SYMS. - Add a mii_phy_dev_attach() as a companion helper to mii_phy_dev_probe(). The purpose of that function is to perform the common steps to attach a PHY driver instance and to hook it up to the miibus(4) instance and to optionally also handle the probing, addition and initialization of the supported media. So all a PHY driver without any special requirements has to do in its bus attach method is to call mii_phy_dev_attach() along with PHY-specific MIIF_* flags, a pointer to its PHY functions and the add_media set to one. All PHY drivers were updated to take advantage of mii_phy_dev_attach() as appropriate. Along with these changes the capability mask was added to the mii_softc structure so PHY drivers taking advantage of mii_phy_dev_attach() but still handling media on their own do not need to fiddle with the MII attach arguments anyway. - Keep track of the PHY offset in the mii_softc structure. This is done for compatibility with NetBSD/OpenBSD. - Keep track of the PHY's OUI, model and revision in the mii_softc structure. Several PHY drivers require this information also after attaching and previously had to wrap their own softc around mii_softc. NetBSD/OpenBSD also keep track of the model and revision on their mii_softc structure. All PHY drivers were updated to take advantage as appropriate. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - According to IEEE 802.3-2002 the bits actually have to be reversed when mapping an OUI to the MII ID registers. All PHY drivers and miidevs where changed as necessary. Actually this now again allows to largely share miidevs with NetBSD, which fixed this problem already 9 years ago. Consequently miidevs was synced as far as possible. - Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that weren't explicitly converted to support flow control before. It's unclear whether flow control actually works with these but typically it should and their net behavior should be more correct with these changes in place than without if the MAC driver sets MIIF_DOPAUSE. Obtained from: NetBSD (partially) Reviewed by: yongari (earlier version), silence on arch@ and net@ Modified: head/sys/dev/ae/if_ae.c head/sys/dev/age/if_age.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/bce/if_bce.c head/sys/dev/bfe/if_bfe.c head/sys/dev/bge/if_bge.c head/sys/dev/dc/dcphy.c head/sys/dev/dc/pnphy.c head/sys/dev/ed/if_ed_pccard.c head/sys/dev/et/if_et.c head/sys/dev/fxp/if_fxp.c head/sys/dev/hme/if_hme.c head/sys/dev/jme/if_jme.c head/sys/dev/lge/if_lge.c head/sys/dev/mii/acphy.c head/sys/dev/mii/amphy.c head/sys/dev/mii/atphy.c head/sys/dev/mii/axphy.c head/sys/dev/mii/bmtphy.c head/sys/dev/mii/brgphy.c head/sys/dev/mii/ciphy.c head/sys/dev/mii/e1000phy.c head/sys/dev/mii/exphy.c head/sys/dev/mii/gentbi.c head/sys/dev/mii/icsphy.c head/sys/dev/mii/inphy.c head/sys/dev/mii/ip1000phy.c head/sys/dev/mii/jmphy.c head/sys/dev/mii/lxtphy.c head/sys/dev/mii/mii.c head/sys/dev/mii/mii.h head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miidevs head/sys/dev/mii/miivar.h head/sys/dev/mii/mlphy.c head/sys/dev/mii/nsgphy.c head/sys/dev/mii/nsphy.c head/sys/dev/mii/nsphyter.c head/sys/dev/mii/pnaphy.c head/sys/dev/mii/qsphy.c head/sys/dev/mii/rdcphy.c head/sys/dev/mii/rgephy.c head/sys/dev/mii/rlphy.c head/sys/dev/mii/rlswitch.c head/sys/dev/mii/ruephy.c head/sys/dev/mii/smcphy.c head/sys/dev/mii/tdkphy.c head/sys/dev/mii/tlphy.c head/sys/dev/mii/truephy.c head/sys/dev/mii/ukphy.c head/sys/dev/mii/xmphy.c head/sys/dev/nfe/if_nfe.c head/sys/dev/nge/if_nge.c head/sys/dev/nve/if_nve.c head/sys/dev/pcn/if_pcn.c head/sys/dev/sf/if_sf.c head/sys/dev/sge/if_sge.c head/sys/dev/sis/if_sis.c head/sys/dev/ste/if_ste.c head/sys/dev/tx/if_tx.c head/sys/dev/usb/net/if_aue.c head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_rue.c head/sys/dev/usb/net/if_udav.c head/sys/dev/vr/if_vr.c head/sys/dev/vte/if_vte.c head/sys/dev/wb/if_wb.c head/sys/mips/atheros/if_arge.c head/sys/mips/cavium/octe/octe.c head/sys/mips/idt/if_kr.c head/sys/modules/mii/Makefile Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/ae/if_ae.c Tue May 3 19:51:29 2011 (r221407) @@ -903,10 +903,8 @@ ae_mediachange(struct ifnet *ifp) KASSERT(sc != NULL, ("[ae, %d]: sc is NULL", __LINE__)); AE_LOCK(sc); mii = device_get_softc(sc->miibus); - if (mii->mii_instance != 0) { - LIST_FOREACH(mii_sc, &mii->mii_phys, mii_list) - mii_phy_reset(mii_sc); - } + LIST_FOREACH(mii_sc, &mii->mii_phys, mii_list) + PHY_RESET(mii_sc); error = mii_mediachg(mii); AE_UNLOCK(sc); Modified: head/sys/dev/age/if_age.c ============================================================================== --- head/sys/dev/age/if_age.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/age/if_age.c Tue May 3 19:51:29 2011 (r221407) @@ -301,10 +301,8 @@ age_mediachange(struct ifnet *ifp) sc = ifp->if_softc; AGE_LOCK(sc); mii = device_get_softc(sc->age_miibus); - if (mii->mii_instance != 0) { - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); error = mii_mediachg(mii); AGE_UNLOCK(sc); Modified: head/sys/dev/alc/if_alc.c ============================================================================== --- head/sys/dev/alc/if_alc.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/alc/if_alc.c Tue May 3 19:51:29 2011 (r221407) @@ -365,10 +365,8 @@ alc_mediachange(struct ifnet *ifp) sc = ifp->if_softc; ALC_LOCK(sc); mii = device_get_softc(sc->alc_miibus); - if (mii->mii_instance != 0) { - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); error = mii_mediachg(mii); ALC_UNLOCK(sc); Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/ale/if_ale.c Tue May 3 19:51:29 2011 (r221407) @@ -286,10 +286,8 @@ ale_mediachange(struct ifnet *ifp) sc = ifp->if_softc; ALE_LOCK(sc); mii = device_get_softc(sc->ale_miibus); - if (mii->mii_instance != 0) { - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); error = mii_mediachg(mii); ALE_UNLOCK(sc); Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/bce/if_bce.c Tue May 3 19:51:29 2011 (r221407) @@ -6141,6 +6141,7 @@ bce_ifmedia_upd_locked(struct ifnet *ifp { struct bce_softc *sc = ifp->if_softc; struct mii_data *mii; + struct mii_softc *miisc; int error; DBENTER(BCE_VERBOSE_PHY); @@ -6153,12 +6154,8 @@ bce_ifmedia_upd_locked(struct ifnet *ifp /* Make sure the MII bus has been enumerated. */ if (mii) { sc->bce_link_up = FALSE; - if (mii->mii_instance) { - struct mii_softc *miisc; - - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); error = mii_mediachg(mii); } Modified: head/sys/dev/bfe/if_bfe.c ============================================================================== --- head/sys/dev/bfe/if_bfe.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/bfe/if_bfe.c Tue May 3 19:51:29 2011 (r221407) @@ -1736,18 +1736,15 @@ bfe_ifmedia_upd(struct ifnet *ifp) { struct bfe_softc *sc; struct mii_data *mii; + struct mii_softc *miisc; int error; sc = ifp->if_softc; BFE_LOCK(sc); mii = device_get_softc(sc->bfe_miibus); - if (mii->mii_instance) { - struct mii_softc *miisc; - for (miisc = LIST_FIRST(&mii->mii_phys); miisc != NULL; - miisc = LIST_NEXT(miisc, mii_list)) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); error = mii_mediachg(mii); BFE_UNLOCK(sc); Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/bge/if_bge.c Tue May 3 19:51:29 2011 (r221407) @@ -4854,9 +4854,8 @@ bge_ifmedia_upd_locked(struct ifnet *ifp sc->bge_link_evt++; mii = device_get_softc(sc->bge_miibus); - if (mii->mii_instance) - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - mii_phy_reset(miisc); + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); mii_mediachg(mii); /* Modified: head/sys/dev/dc/dcphy.c ============================================================================== --- head/sys/dev/dc/dcphy.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/dc/dcphy.c Tue May 3 19:51:29 2011 (r221407) @@ -114,6 +114,12 @@ static void dcphy_status(struct mii_soft static void dcphy_reset(struct mii_softc *); static int dcphy_auto(struct mii_softc *); +static const struct mii_phy_funcs dcphy_funcs = { + dcphy_service, + dcphy_status, + dcphy_reset +}; + static int dcphy_probe(device_t dev) { @@ -138,30 +144,16 @@ static int dcphy_attach(device_t dev) { struct mii_softc *sc; - struct mii_attach_args *ma; - struct mii_data *mii; struct dc_softc *dc_sc; device_t brdev; sc = device_get_softc(dev); - ma = device_get_ivars(dev); - sc->mii_dev = device_get_parent(dev); - mii = ma->mii_data; - LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - - sc->mii_flags = miibus_get_flags(dev); - sc->mii_inst = mii->mii_instance++; - sc->mii_phy = ma->mii_phyno; - sc->mii_service = dcphy_service; - sc->mii_pdata = mii; - /* - * Apparently, we can neither isolate nor do loopback. - */ - sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; + mii_phy_dev_attach(dev, MIIF_NOISOLATE | MIIF_NOMANPAUSE, + &dcphy_funcs, 0); - /*dcphy_reset(sc);*/ - dc_sc = mii->mii_ifp->if_softc; + /*PHY_RESET(sc);*/ + dc_sc = sc->mii_pdata->mii_ifp->if_softc; CSR_WRITE_4(dc_sc, DC_10BTSTAT, 0); CSR_WRITE_4(dc_sc, DC_10BTCTRL, 0); @@ -182,7 +174,7 @@ dcphy_attach(device_t dev) break; } - sc->mii_capabilities &= ma->mii_capmask; + sc->mii_capabilities &= sc->mii_capmask; device_printf(dev, " "); mii_phy_add_media(sc); printf("\n"); @@ -219,11 +211,11 @@ dcphy_service(struct mii_softc *sc, stru switch (IFM_SUBTYPE(ife->ifm_media)) { case IFM_AUTO: - /*dcphy_reset(sc);*/ - (void) dcphy_auto(sc); + /*PHY_RESET(sc);*/ + (void)dcphy_auto(sc); break; case IFM_100_TX: - dcphy_reset(sc); + PHY_RESET(sc); DC_CLRBIT(dc_sc, DC_10BTCTRL, DC_TCTL_AUTONEGENBL); mode |= DC_NETCFG_PORTSEL | DC_NETCFG_PCS | DC_NETCFG_SCRAMBLER; @@ -292,7 +284,7 @@ dcphy_service(struct mii_softc *sc, stru } /* Update the media status. */ - dcphy_status(sc); + PHY_STATUS(sc); /* Callback if something changed. */ mii_phy_update(sc, cmd); Modified: head/sys/dev/dc/pnphy.c ============================================================================== --- head/sys/dev/dc/pnphy.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/dc/pnphy.c Tue May 3 19:51:29 2011 (r221407) @@ -90,6 +90,13 @@ DRIVER_MODULE(pnphy, miibus, pnphy_drive static int pnphy_service(struct mii_softc *, struct mii_data *, int); static void pnphy_status(struct mii_softc *); +static void pnphy_reset(struct mii_softc *); + +static const struct mii_phy_funcs pnphy_funcs = { + pnphy_service, + pnphy_status, + pnphy_reset +}; static int pnphy_probe(device_t dev) @@ -115,29 +122,15 @@ static int pnphy_attach(device_t dev) { struct mii_softc *sc; - struct mii_attach_args *ma; - struct mii_data *mii; sc = device_get_softc(dev); - ma = device_get_ivars(dev); - sc->mii_dev = device_get_parent(dev); - mii = ma->mii_data; - LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - - sc->mii_flags = miibus_get_flags(dev); - sc->mii_inst = mii->mii_instance++; - sc->mii_phy = ma->mii_phyno; - sc->mii_service = pnphy_service; - sc->mii_pdata = mii; - /* - * Apparently, we can neither isolate nor do loopback. - */ - sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; + mii_phy_dev_attach(dev, MIIF_NOISOLATE | MIIF_NOMANPAUSE, + &pnphy_funcs, 0); sc->mii_capabilities = BMSR_100TXFDX | BMSR_100TXHDX | BMSR_10TFDX | BMSR_10THDX; - sc->mii_capabilities &= ma->mii_capmask; + sc->mii_capabilities &= sc->mii_capmask; device_printf(dev, " "); mii_phy_add_media(sc); printf("\n"); @@ -194,7 +187,7 @@ pnphy_service(struct mii_softc *sc, stru } /* Update the media status. */ - pnphy_status(sc); + PHY_STATUS(sc); /* Callback if something changed. */ mii_phy_update(sc, cmd); @@ -226,3 +219,9 @@ pnphy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_HDX; } + +static void +pnphy_reset(struct mii_softc *sc __unused) +{ + +} Modified: head/sys/dev/ed/if_ed_pccard.c ============================================================================== --- head/sys/dev/ed/if_ed_pccard.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/ed/if_ed_pccard.c Tue May 3 19:51:29 2011 (r221407) @@ -401,17 +401,9 @@ ed_pccard_kick_phy(struct ed_softc *sc) struct mii_softc *miisc; struct mii_data *mii; - /* - * Many of the PHYs that wind up on PC Cards are weird in - * this way. Generally, we don't need to worry so much about - * the Isolation protocol since there's only one PHY in - * these designs, so this workaround is reasonable. - */ mii = device_get_softc(sc->miibus); - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) { - miisc->mii_flags |= MIIF_FORCEANEG; - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); return (mii_mediachg(mii)); } @@ -582,13 +574,13 @@ ed_pccard_attach(device_t dev) ed_pccard_dl100xx_mii_reset(sc); (void)mii_attach(dev, &sc->miibus, sc->ifp, ed_ifmedia_upd, ed_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, - MII_OFFSET_ANY, 0); + MII_OFFSET_ANY, MIIF_FORCEANEG); } else if (sc->chip_type == ED_CHIP_TYPE_AX88190 || sc->chip_type == ED_CHIP_TYPE_AX88790 || sc->chip_type == ED_CHIP_TYPE_TC5299J) { error = mii_attach(dev, &sc->miibus, sc->ifp, ed_ifmedia_upd, ed_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, - MII_OFFSET_ANY, 0); + MII_OFFSET_ANY, MIIF_FORCEANEG); if (error != 0) { device_printf(dev, "attaching PHYs failed\n"); goto bad; Modified: head/sys/dev/et/if_et.c ============================================================================== --- head/sys/dev/et/if_et.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/et/if_et.c Tue May 3 19:51:29 2011 (r221407) @@ -515,13 +515,10 @@ et_ifmedia_upd_locked(struct ifnet *ifp) { struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + struct mii_softc *miisc; - if (mii->mii_instance != 0) { - struct mii_softc *miisc; - - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); mii_mediachg(mii); return (0); Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/fxp/if_fxp.c Tue May 3 19:51:29 2011 (r221407) @@ -2555,14 +2555,12 @@ fxp_ifmedia_upd(struct ifnet *ifp) { struct fxp_softc *sc = ifp->if_softc; struct mii_data *mii; + struct mii_softc *miisc; mii = device_get_softc(sc->miibus); FXP_LOCK(sc); - if (mii->mii_instance) { - struct mii_softc *miisc; - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); mii_mediachg(mii); FXP_UNLOCK(sc); return (0); Modified: head/sys/dev/hme/if_hme.c ============================================================================== --- head/sys/dev/hme/if_hme.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/hme/if_hme.c Tue May 3 19:51:29 2011 (r221407) @@ -1566,7 +1566,7 @@ hme_mediachange_locked(struct hme_softc */ if (sc->sc_phys[0] != -1 && sc->sc_phys[1] != -1) LIST_FOREACH(child, &sc->sc_mii->mii_phys, mii_list) - mii_phy_reset(child); + PHY_RESET(child); return (mii_mediachg(sc->sc_mii)); } Modified: head/sys/dev/jme/if_jme.c ============================================================================== --- head/sys/dev/jme/if_jme.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/jme/if_jme.c Tue May 3 19:51:29 2011 (r221407) @@ -318,10 +318,8 @@ jme_mediachange(struct ifnet *ifp) sc = ifp->if_softc; JME_LOCK(sc); mii = device_get_softc(sc->jme_miibus); - if (mii->mii_instance != 0) { - LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); error = mii_mediachg(mii); JME_UNLOCK(sc); Modified: head/sys/dev/lge/if_lge.c ============================================================================== --- head/sys/dev/lge/if_lge.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/lge/if_lge.c Tue May 3 19:51:29 2011 (r221407) @@ -1402,18 +1402,15 @@ lge_ifmedia_upd_locked(ifp) { struct lge_softc *sc; struct mii_data *mii; + struct mii_softc *miisc; sc = ifp->if_softc; LGE_LOCK_ASSERT(sc); mii = device_get_softc(sc->lge_miibus); sc->lge_link = 0; - if (mii->mii_instance) { - struct mii_softc *miisc; - for (miisc = LIST_FIRST(&mii->mii_phys); miisc != NULL; - miisc = LIST_NEXT(miisc, mii_list)) - mii_phy_reset(miisc); - } + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); mii_mediachg(mii); } Modified: head/sys/dev/mii/acphy.c ============================================================================== --- head/sys/dev/mii/acphy.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/mii/acphy.c Tue May 3 19:51:29 2011 (r221407) @@ -105,13 +105,19 @@ static void acphy_reset(struct mii_softc static void acphy_status(struct mii_softc *); static const struct mii_phydesc acphys[] = { - MII_PHY_DESC(xxALTIMA, AC101), - MII_PHY_DESC(xxALTIMA, AC101L), + MII_PHY_DESC(ALTIMA, AC101), + MII_PHY_DESC(ALTIMA, AC101L), /* XXX This is reported to work, but it's not from any data sheet. */ - MII_PHY_DESC(xxALTIMA, ACXXX), + MII_PHY_DESC(ALTIMA, ACXXX), MII_PHY_END }; +static const struct mii_phy_funcs acphy_funcs = { + acphy_service, + acphy_status, + acphy_reset +}; + static int acphy_probe(device_t dev) { @@ -123,27 +129,17 @@ static int acphy_attach(device_t dev) { struct mii_softc *sc; - struct mii_attach_args *ma; - struct mii_data *mii; sc = device_get_softc(dev); - ma = device_get_ivars(dev); - sc->mii_dev = device_get_parent(dev); - mii = ma->mii_data; - LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - - sc->mii_flags = miibus_get_flags(dev); - sc->mii_inst = mii->mii_instance++; - sc->mii_phy = ma->mii_phyno; - sc->mii_service = acphy_service; - sc->mii_pdata = mii; - acphy_reset(sc); + mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &acphy_funcs, 0); + + PHY_RESET(sc); - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; + sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & sc->mii_capmask; device_printf(dev, " "); -#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) +#define ADD(m, c) ifmedia_add(&sc->mii_pdata->mii_media, (m), (c), NULL) if ((PHY_READ(sc, MII_ACPHY_MCTL) & AC_MCTL_FX_SEL) != 0) { sc->mii_flags |= MIIF_HAVEFIBER; ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst), @@ -200,7 +196,7 @@ acphy_service(struct mii_softc *sc, stru } /* Update the media status. */ - acphy_status(sc); + PHY_STATUS(sc); /* Callback if something changed. */ mii_phy_update(sc, cmd); @@ -245,7 +241,8 @@ acphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_10_T; if (diag & AC_DIAG_DUPLEX) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= + IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; } else Modified: head/sys/dev/mii/amphy.c ============================================================================== --- head/sys/dev/mii/amphy.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/mii/amphy.c Tue May 3 19:51:29 2011 (r221407) @@ -83,12 +83,18 @@ static int amphy_service(struct mii_soft static void amphy_status(struct mii_softc *); static const struct mii_phydesc amphys[] = { - MII_PHY_DESC(DAVICOM, DM9102), - MII_PHY_DESC(xxAMD, 79C873), + MII_PHY_DESC(xxDAVICOM, DM9102), MII_PHY_DESC(xxDAVICOM, DM9101), + MII_PHY_DESC(yyDAVICOM, DM9101), MII_PHY_END }; +static const struct mii_phy_funcs amphy_funcs = { + amphy_service, + amphy_status, + mii_phy_reset +}; + static int amphy_probe(device_t dev) { @@ -99,37 +105,8 @@ amphy_probe(device_t dev) static int amphy_attach(device_t dev) { - struct mii_softc *sc; - struct mii_attach_args *ma; - struct mii_data *mii; - - sc = device_get_softc(dev); - ma = device_get_ivars(dev); - sc->mii_dev = device_get_parent(dev); - mii = ma->mii_data; - LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - - sc->mii_flags = miibus_get_flags(dev); - sc->mii_inst = mii->mii_instance++; - sc->mii_phy = ma->mii_phyno; - sc->mii_service = amphy_service; - sc->mii_pdata = mii; - -#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) - -#if 0 - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc->mii_inst), - MII_MEDIA_100_TX); -#endif - - mii_phy_reset(sc); - - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; - device_printf(dev, " "); - mii_phy_add_media(sc); - printf("\n"); -#undef ADD - MIIBUS_MEDIAINIT(sc->mii_dev); + + mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &hy_funcs, 1); return (0); } @@ -158,7 +135,7 @@ amphy_service(struct mii_softc *sc, stru } /* Update the media status. */ - amphy_status(sc); + PHY_STATUS(sc); /* Callback if something changed. */ mii_phy_update(sc, cmd); @@ -231,6 +208,8 @@ amphy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_10_T|IFM_HDX; else if (par & DSCSR_10HDX) mii->mii_media_active |= IFM_10_T|IFM_HDX; + if ((mii->mii_media_active & IFM_FDX) != 0) + mii->mii_media_active |= mii_phy_flowstatus(sc); } else mii->mii_media_active = ife->ifm_media; } Modified: head/sys/dev/mii/atphy.c ============================================================================== --- head/sys/dev/mii/atphy.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/mii/atphy.c Tue May 3 19:51:29 2011 (r221407) @@ -53,13 +53,6 @@ __FBSDID("$FreeBSD$"); static int atphy_probe(device_t); static int atphy_attach(device_t); -struct atphy_softc { - struct mii_softc mii_sc; - int mii_oui; - int mii_model; - int mii_rev; -}; - static device_method_t atphy_methods[] = { /* Device interface. */ DEVMETHOD(device_probe, atphy_probe), @@ -73,7 +66,7 @@ static devclass_t atphy_devclass; static driver_t atphy_driver = { "atphy", atphy_methods, - sizeof(struct atphy_softc) + sizeof(struct mii_softc) }; DRIVER_MODULE(atphy, miibus, atphy_driver, atphy_devclass, 0, 0); @@ -85,12 +78,18 @@ static uint16_t atphy_anar(struct ifmedi static int atphy_setmedia(struct mii_softc *, int); static const struct mii_phydesc atphys[] = { - MII_PHY_DESC(ATHEROS, F1), - MII_PHY_DESC(ATHEROS, F1_7), - MII_PHY_DESC(ATHEROS, F2), + MII_PHY_DESC(xxATHEROS, F1), + MII_PHY_DESC(xxATHEROS, F1_7), + MII_PHY_DESC(xxATHEROS, F2), MII_PHY_END }; +static const struct mii_phy_funcs atphy_funcs = { + atphy_service, + atphy_status, + atphy_reset +}; + static int atphy_probe(device_t dev) { @@ -101,41 +100,8 @@ atphy_probe(device_t dev) static int atphy_attach(device_t dev) { - struct atphy_softc *asc; - struct mii_softc *sc; - struct mii_attach_args *ma; - struct mii_data *mii; - - asc = device_get_softc(dev); - sc = &asc->mii_sc; - ma = device_get_ivars(dev); - sc->mii_dev = device_get_parent(dev); - mii = ma->mii_data; - LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - - sc->mii_flags = miibus_get_flags(dev); - sc->mii_inst = mii->mii_instance++; - sc->mii_phy = ma->mii_phyno; - sc->mii_service = atphy_service; - sc->mii_pdata = mii; - - asc->mii_oui = MII_OUI(ma->mii_id1, ma->mii_id2); - asc->mii_model = MII_MODEL(ma->mii_id2); - asc->mii_rev = MII_REV(ma->mii_id2); - if (bootverbose) - device_printf(dev, "OUI 0x%06x, model 0x%04x, rev. %d\n", - asc->mii_oui, asc->mii_model, asc->mii_rev); - - atphy_reset(sc); - - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; - if (sc->mii_capabilities & BMSR_EXTSTAT) - sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); - device_printf(dev, " "); - mii_phy_add_media(sc); - printf("\n"); - MIIBUS_MEDIAINIT(sc->mii_dev); + mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &atphy_funcs, 1); return (0); } @@ -244,7 +210,7 @@ done: } /* Update the media status. */ - atphy_status(sc); + PHY_STATUS(sc); /* Callback if something changed. */ mii_phy_update(sc, cmd); @@ -318,12 +284,9 @@ static void atphy_reset(struct mii_softc *sc) { struct ifmedia_entry *ife = sc->mii_pdata->mii_media.ifm_cur; - struct atphy_softc *asc; uint32_t reg; int i; - asc = (struct atphy_softc *)sc; - /* Take PHY out of power down mode. */ PHY_WRITE(sc, 29, 0x29); PHY_WRITE(sc, 30, 0); Modified: head/sys/dev/mii/axphy.c ============================================================================== --- head/sys/dev/mii/axphy.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/mii/axphy.c Tue May 3 19:51:29 2011 (r221407) @@ -73,10 +73,16 @@ static int axphy_service(struct mii_soft static void axphy_status(struct mii_softc *); static const struct mii_phydesc axphys[] = { - MII_PHY_DESC(ASIX, AX88X9X), + MII_PHY_DESC(xxASIX, AX88X9X), MII_PHY_END }; +static const struct mii_phy_funcs axphy_funcs = { + axphy_service, + axphy_status, + mii_phy_reset +}; + static int axphy_probe(device_t dev) { @@ -88,31 +94,11 @@ static int axphy_attach(device_t dev) { struct mii_softc *sc; - struct mii_attach_args *ma; - struct mii_data *mii; sc = device_get_softc(dev); - ma = device_get_ivars(dev); - sc->mii_dev = device_get_parent(dev); - mii = ma->mii_data; - LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - - sc->mii_flags = miibus_get_flags(dev); - sc->mii_inst = mii->mii_instance++; - sc->mii_phy = ma->mii_phyno; - sc->mii_service = axphy_service; - sc->mii_pdata = mii; - - sc->mii_flags |= MIIF_NOISOLATE; - - mii_phy_reset(sc); - - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; - device_printf(dev, " "); - mii_phy_add_media(sc); - printf("\n"); - MIIBUS_MEDIAINIT(sc->mii_dev); + mii_phy_dev_attach(dev, MIIF_NOISOLATE | MIIF_NOMANPAUSE, + &axphy_funcs, 1); mii_phy_setmedia(sc); return (0); @@ -143,7 +129,7 @@ axphy_service(struct mii_softc *sc, stru } /* Update the media status. */ - axphy_status(sc); + PHY_STATUS(sc); /* Callback if something changed. */ mii_phy_update(sc, cmd); @@ -187,7 +173,8 @@ axphy_status(struct mii_softc *sc) else mii->mii_media_active |= IFM_10_T; if (scr & SCR_FDX) - mii->mii_media_active |= IFM_FDX; + mii->mii_media_active |= + IFM_FDX | mii_phy_flowstatus(sc); else mii->mii_media_active |= IFM_HDX; #endif Modified: head/sys/dev/mii/bmtphy.c ============================================================================== --- head/sys/dev/mii/bmtphy.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/mii/bmtphy.c Tue May 3 19:51:29 2011 (r221407) @@ -85,11 +85,6 @@ __FBSDID("$FreeBSD$"); static int bmtphy_probe(device_t); static int bmtphy_attach(device_t); -struct bmtphy_softc { - struct mii_softc mii_sc; - int mii_model; -}; - static device_method_t bmtphy_methods[] = { /* Device interface */ DEVMETHOD(device_probe, bmtphy_probe), @@ -105,7 +100,7 @@ static devclass_t bmtphy_devclass; static driver_t bmtphy_driver = { "bmtphy", bmtphy_methods, - sizeof(struct bmtphy_softc) + sizeof(struct mii_softc) }; DRIVER_MODULE(bmtphy, miibus, bmtphy_driver, bmtphy_devclass, 0, 0); @@ -115,20 +110,26 @@ static void bmtphy_status(struct mii_sof static void bmtphy_reset(struct mii_softc *); static const struct mii_phydesc bmtphys_dp[] = { - MII_PHY_DESC(BROADCOM, BCM4401), - MII_PHY_DESC(BROADCOM, BCM5201), - MII_PHY_DESC(BROADCOM, BCM5214), - MII_PHY_DESC(BROADCOM, BCM5221), - MII_PHY_DESC(BROADCOM, BCM5222), + MII_PHY_DESC(xxBROADCOM, BCM4401), + MII_PHY_DESC(xxBROADCOM, BCM5201), + MII_PHY_DESC(xxBROADCOM, BCM5214), + MII_PHY_DESC(xxBROADCOM, BCM5221), + MII_PHY_DESC(xxBROADCOM, BCM5222), MII_PHY_END }; static const struct mii_phydesc bmtphys_lp[] = { - MII_PHY_DESC(BROADCOM, 3C905B), - MII_PHY_DESC(BROADCOM, 3C905C), + MII_PHY_DESC(xxBROADCOM, 3C905B), + MII_PHY_DESC(xxBROADCOM, 3C905C), MII_PHY_END }; +static const struct mii_phy_funcs bmtphy_funcs = { + bmtphy_service, + bmtphy_status, + bmtphy_reset +}; + static int bmtphy_probe(device_t dev) { @@ -145,37 +146,8 @@ bmtphy_probe(device_t dev) static int bmtphy_attach(device_t dev) { - struct bmtphy_softc *bsc; - struct mii_softc *sc; - struct mii_attach_args *ma; - struct mii_data *mii; - - bsc = device_get_softc(dev); - sc = &bsc->mii_sc; - ma = device_get_ivars(dev); - sc->mii_dev = device_get_parent(dev); - mii = ma->mii_data; - LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - - sc->mii_flags = miibus_get_flags(dev); - sc->mii_inst = mii->mii_instance++; - sc->mii_phy = ma->mii_phyno; - sc->mii_service = bmtphy_service; - sc->mii_pdata = mii; - - sc->mii_flags |= MIIF_NOMANPAUSE; - - bsc->mii_model = MII_MODEL(ma->mii_id2); - - bmtphy_reset(sc); - - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; - device_printf(dev, " "); - mii_phy_add_media(sc); - printf("\n"); - - MIIBUS_MEDIAINIT(sc->mii_dev); + mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &bmtphy_funcs, 1); return (0); } @@ -204,7 +176,7 @@ bmtphy_service(struct mii_softc *sc, str } /* Update the media status. */ - bmtphy_status(sc); + PHY_STATUS(sc); /* Callback if something changed. */ mii_phy_update(sc, cmd); @@ -267,14 +239,11 @@ bmtphy_status(struct mii_softc *sc) static void bmtphy_reset(struct mii_softc *sc) { - struct bmtphy_softc *bsc; u_int16_t data; - bsc = (struct bmtphy_softc *)sc; - mii_phy_reset(sc); - if (bsc->mii_model == MII_MODEL_BROADCOM_BCM5221) { + if (sc->mii_mpd_model == MII_MODEL_xxBROADCOM_BCM5221) { /* Enable shadow register mode. */ data = PHY_READ(sc, 0x1f); PHY_WRITE(sc, 0x1f, data | 0x0080); Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Tue May 3 19:50:39 2011 (r221406) +++ head/sys/dev/mii/brgphy.c Tue May 3 19:51:29 2011 (r221407) @@ -68,9 +68,6 @@ static int brgphy_attach(device_t); struct brgphy_softc { struct mii_softc mii_sc; - int mii_oui; - int mii_model; - int mii_rev; int serdes_flags; /* Keeps track of the serdes type used */ #define BRGPHY_5706S 0x0001 #define BRGPHY_5708S 0x0002 @@ -117,37 +114,43 @@ static void brgphy_ethernet_wirespeed(st static void brgphy_jumbo_settings(struct mii_softc *, u_long); static const struct mii_phydesc brgphys[] = { - MII_PHY_DESC(xxBROADCOM, BCM5400), - MII_PHY_DESC(xxBROADCOM, BCM5401), - MII_PHY_DESC(xxBROADCOM, BCM5411), - MII_PHY_DESC(xxBROADCOM, BCM54K2), - MII_PHY_DESC(xxBROADCOM, BCM5701), - MII_PHY_DESC(xxBROADCOM, BCM5703), - MII_PHY_DESC(xxBROADCOM, BCM5704), - MII_PHY_DESC(xxBROADCOM, BCM5705), - MII_PHY_DESC(xxBROADCOM, BCM5706), - MII_PHY_DESC(xxBROADCOM, BCM5714), - MII_PHY_DESC(xxBROADCOM, BCM5750), - MII_PHY_DESC(xxBROADCOM, BCM5752), - MII_PHY_DESC(xxBROADCOM, BCM5754), - MII_PHY_DESC(xxBROADCOM, BCM5780), - MII_PHY_DESC(xxBROADCOM, BCM5708C), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5482S), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5755), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5787), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5708S), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709CAX), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5722), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761), - MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S), - MII_PHY_DESC(xxBROADCOM_ALT2, BCM5717C), - MII_PHY_DESC(xxBROADCOM_ALT2, BCM57765), - MII_PHY_DESC(BROADCOM2, BCM5906), + MII_PHY_DESC(BROADCOM, BCM5400), + MII_PHY_DESC(BROADCOM, BCM5401), + MII_PHY_DESC(BROADCOM, BCM5411), + MII_PHY_DESC(BROADCOM, BCM54K2), + MII_PHY_DESC(BROADCOM, BCM5701), + MII_PHY_DESC(BROADCOM, BCM5703), + MII_PHY_DESC(BROADCOM, BCM5704), + MII_PHY_DESC(BROADCOM, BCM5705), + MII_PHY_DESC(BROADCOM, BCM5706), + MII_PHY_DESC(BROADCOM, BCM5714), + MII_PHY_DESC(BROADCOM, BCM5421), + MII_PHY_DESC(BROADCOM, BCM5750), + MII_PHY_DESC(BROADCOM, BCM5752), + MII_PHY_DESC(BROADCOM, BCM5780), + MII_PHY_DESC(BROADCOM, BCM5708C), + MII_PHY_DESC(BROADCOM2, BCM5482), + MII_PHY_DESC(BROADCOM2, BCM5708S), + MII_PHY_DESC(BROADCOM2, BCM5709C), + MII_PHY_DESC(BROADCOM2, BCM5709S), + MII_PHY_DESC(BROADCOM2, BCM5709CAX), + MII_PHY_DESC(BROADCOM2, BCM5722), + MII_PHY_DESC(BROADCOM2, BCM5755), + MII_PHY_DESC(BROADCOM2, BCM5754), + MII_PHY_DESC(BROADCOM2, BCM5761), + MII_PHY_DESC(BROADCOM2, BCM5784), + MII_PHY_DESC(BROADCOM3, BCM5717C), + MII_PHY_DESC(BROADCOM3, BCM57765), + MII_PHY_DESC(xxBROADCOM_ALT1, BCM5906), MII_PHY_END }; +static const struct mii_phy_funcs brgphy_funcs = { + brgphy_service, + brgphy_status, + brgphy_reset +}; + #define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" #define HS21_BCM_CHIPID 0x57081021 @@ -186,49 +189,22 @@ brgphy_attach(device_t dev) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct mii_softc *sc; - struct mii_attach_args *ma; - struct mii_data *mii; struct ifnet *ifp; bsc = device_get_softc(dev); sc = &bsc->mii_sc; - ma = device_get_ivars(dev); - sc->mii_dev = device_get_parent(dev); - mii = ma->mii_data; - LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); - - /* Initialize mii_softc structure */ - sc->mii_flags = miibus_get_flags(dev); - sc->mii_inst = mii->mii_instance++; - sc->mii_phy = ma->mii_phyno; - sc->mii_service = brgphy_service; - sc->mii_pdata = mii; - /* - * At least some variants wedge when isolating, at least some also - * don't support loopback. - */ - sc->mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP | MIIF_NOMANPAUSE; + mii_phy_dev_attach(dev, MIIF_NOISOLATE | MIIF_NOMANPAUSE, + &brgphy_funcs, 0); - /* Initialize brgphy_softc structure */ - bsc->mii_oui = MII_OUI(ma->mii_id1, ma->mii_id2); - bsc->mii_model = MII_MODEL(ma->mii_id2); - bsc->mii_rev = MII_REV(ma->mii_id2); bsc->serdes_flags = 0; - if (bootverbose) - device_printf(dev, "OUI 0x%06x, model 0x%04x, rev. %d\n", - bsc->mii_oui, bsc->mii_model, bsc->mii_rev); - /* Handle any special cases based on the PHY ID */ - switch (bsc->mii_oui) { + switch (sc->mii_mpd_oui) { case MII_OUI_BROADCOM: - case MII_OUI_BROADCOM2: - break; - case MII_OUI_xxBROADCOM: - switch (bsc->mii_model) { - case MII_MODEL_xxBROADCOM_BCM5706: - case MII_MODEL_xxBROADCOM_BCM5714: + switch (sc->mii_mpd_model) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 3 20:02:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A1CC106567A; Tue, 3 May 2011 20:02:19 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 0164F8FC12; Tue, 3 May 2011 20:02:18 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 499E914E5297; Tue, 3 May 2011 21:45:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1pTdEbbrhfDn; Tue, 3 May 2011 21:45:46 +0200 (CEST) Received: from [193.137.158.210] (unknown [193.137.158.210]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 8DB7314E51C2; Tue, 3 May 2011 21:45:46 +0200 (CEST) Message-ID: <4DC05B7C.9070501@FreeBSD.org> Date: Tue, 03 May 2011 20:46:04 +0100 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pt-PT; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Kostik Belousov References: <201105031933.p43JXAcB009122@svn.freebsd.org> <20110503194058.GJ48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110503194058.GJ48734@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r221402 - in vendor/tre: . dist dist/doc dist/lib dist/lib/.deps dist/m4 dist/po dist/python dist/src dist/src/.deps dist/tests dist/tests/.deps dist/tests/agrep dist/utils dist/win32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 20:02:19 -0000 Em 03-05-2011 20:40, Kostik Belousov escreveu: > On Tue, May 03, 2011 at 07:33:10PM +0000, Gabor Kovesdan wrote: >> Author: gabor >> Date: Tue May 3 19:33:09 2011 >> New Revision: 221402 >> URL: http://svn.freebsd.org/changeset/base/221402 >> >> Log: >> - Vendor import of TRE 0.8.0 > What is this ? Why we do need it in base ? This is for SoC 2011. With my SoC mentor (brooks), we discussed that it can go directly into /vendor and I can create my branch from there. > I am sure that all .deps dirs are garbage. Yes, I'll clean it up now. Gabor From owner-svn-src-all@FreeBSD.ORG Tue May 3 20:13:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A7251065677; Tue, 3 May 2011 20:13:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79EEE8FC0A; Tue, 3 May 2011 20:13:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43KDR0T011280; Tue, 3 May 2011 20:13:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43KDRf5011277; Tue, 3 May 2011 20:13:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105032013.p43KDRf5011277@svn.freebsd.org> From: Marius Strobl Date: Tue, 3 May 2011 20:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221409 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 20:13:27 -0000 Author: marius Date: Tue May 3 20:13:27 2011 New Revision: 221409 URL: http://svn.freebsd.org/changeset/base/221409 Log: Convert the last use of xcopyout() to ddi_copyout() and remove the now unused xcopyin() as well as xcopyout(). MFC together with r219089. Approved by: mm Modified: head/sys/cddl/compat/opensolaris/sys/systm.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/compat/opensolaris/sys/systm.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/systm.h Tue May 3 19:51:56 2011 (r221408) +++ head/sys/cddl/compat/opensolaris/sys/systm.h Tue May 3 20:13:27 2011 (r221409) @@ -42,9 +42,6 @@ #define delay(x) pause("soldelay", (x)) -#define xcopyin(u, k, s) copyin(u, k, s) -#define xcopyout(k, u, s) copyout(k, u, s) - #endif /* _KERNEL */ #endif /* _OPENSOLARIS_SYS_SYSTM_H_ */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 3 19:51:56 2011 (r221408) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 3 20:13:27 2011 (r221409) @@ -4068,9 +4068,9 @@ zfs_ioc_userspace_many(zfs_cmd_t *zc) buf, &zc->zc_nvlist_dst_size); if (error == 0) { - error = xcopyout(buf, + error = ddi_copyout(buf, (void *)(uintptr_t)zc->zc_nvlist_dst, - zc->zc_nvlist_dst_size); + zc->zc_nvlist_dst_size, zc->zc_iflags); } kmem_free(buf, bufsize); zfsvfs_rele(zfsvfs, FTAG); From owner-svn-src-all@FreeBSD.ORG Tue May 3 20:32:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 982B01065674; Tue, 3 May 2011 20:32:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88E6A8FC0C; Tue, 3 May 2011 20:32:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43KWLYn011856; Tue, 3 May 2011 20:32:21 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43KWL9I011854; Tue, 3 May 2011 20:32:21 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201105032032.p43KWL9I011854@svn.freebsd.org> From: Michael Tuexen Date: Tue, 3 May 2011 20:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221410 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 20:32:21 -0000 Author: tuexen Date: Tue May 3 20:32:21 2011 New Revision: 221410 URL: http://svn.freebsd.org/changeset/base/221410 Log: Add a missing break. This bug was introduced in r221249. MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Tue May 3 20:13:27 2011 (r221409) +++ head/sys/netinet/sctp_asconf.c Tue May 3 20:32:21 2011 (r221410) @@ -2930,6 +2930,7 @@ sctp_process_initack_addresses(struct sc } sin.sin_addr.s_addr = a4p->addr; sa = (struct sockaddr *)&sin; + break; } #endif default: From owner-svn-src-all@FreeBSD.ORG Tue May 3 20:34:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27445106566B; Tue, 3 May 2011 20:34:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C7308FC14; Tue, 3 May 2011 20:34:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43KY2L9012013; Tue, 3 May 2011 20:34:02 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43KY2GY012008; Tue, 3 May 2011 20:34:02 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201105032034.p43KY2GY012008@svn.freebsd.org> From: Michael Tuexen Date: Tue, 3 May 2011 20:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221411 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 20:34:03 -0000 Author: tuexen Date: Tue May 3 20:34:02 2011 New Revision: 221411 URL: http://svn.freebsd.org/changeset/base/221411 Log: Remove code with any effect. Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_auth.c head/sys/netinet/sctputil.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Tue May 3 20:32:21 2011 (r221410) +++ head/sys/netinet/sctp_asconf.c Tue May 3 20:34:02 2011 (r221411) @@ -2813,7 +2813,6 @@ sctp_compose_asconf(struct sctp_tcb *stc lookup->ph.param_length = htons(SCTP_SIZE32(p_size)); memcpy(lookup->addr, addr_ptr, addr_size); SCTP_BUF_LEN(m_asconf_chk) += SCTP_SIZE32(p_size); - lookup_used = 1; } else { /* uh oh... don't have any address?? */ SCTPDBG(SCTP_DEBUG_ASCONF1, @@ -2823,7 +2822,6 @@ sctp_compose_asconf(struct sctp_tcb *stc lookup->ph.param_length = htons(SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param))); bzero(lookup->addr, sizeof(struct in_addr)); SCTP_BUF_LEN(m_asconf_chk) += SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param)); - lookup_used = 1; } } /* chain it all together */ Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Tue May 3 20:32:21 2011 (r221410) +++ head/sys/netinet/sctp_auth.c Tue May 3 20:34:02 2011 (r221411) @@ -1949,9 +1949,6 @@ sctp_validate_init_auth_params(struct mb case SCTP_ASCONF_ACK: peer_supports_asconf = 1; break; - case SCTP_AUTHENTICATION: - peer_supports_auth = 1; - break; default: /* one we don't care about */ break; Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue May 3 20:32:21 2011 (r221410) +++ head/sys/netinet/sctputil.c Tue May 3 20:34:02 2011 (r221411) @@ -3850,8 +3850,6 @@ sctp_abort_an_association(struct sctp_in #endif ) { - uint32_t vtag; - #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -3872,7 +3870,6 @@ sctp_abort_an_association(struct sctp_in } else { stcb->asoc.state |= SCTP_STATE_WAS_ABORTED; } - vtag = stcb->asoc.peer_vtag; /* notify the ulp */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) sctp_abort_notification(stcb, error, so_locked); Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Tue May 3 20:32:21 2011 (r221410) +++ head/sys/netinet6/sctp6_usrreq.c Tue May 3 20:34:02 2011 (r221411) @@ -1066,10 +1066,8 @@ sctp6_connect(struct socket *so, struct SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EINVAL); return EINVAL; } - } else + } #endif /* INET */ - addr = addr; /* for true v6 address case */ - /* Now do we connect? */ if (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) { stcb = LIST_FIRST(&inp->sctp_asoc_list); From owner-svn-src-all@FreeBSD.ORG Tue May 3 21:53:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BB7A1065672; Tue, 3 May 2011 21:53:57 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 0949D8FC0C; Tue, 3 May 2011 21:53:57 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 03A811DD82C; Tue, 3 May 2011 23:53:55 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id F16BD1736B; Tue, 3 May 2011 23:53:54 +0200 (CEST) Date: Tue, 3 May 2011 23:53:54 +0200 From: Jilles Tjoelker To: Craig Rodrigues Message-ID: <20110503215354.GA93376@stack.nl> References: <201105030743.p437hl8M075368@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105030743.p437hl8M075368@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221365 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 21:53:57 -0000 On Tue, May 03, 2011 at 07:43:47AM +0000, Craig Rodrigues wrote: > Author: rodrigc > Date: Tue May 3 07:43:47 2011 > New Revision: 221365 > URL: http://svn.freebsd.org/changeset/base/221365 > Log: > - Add parentheses around expression to eliminate compiler warning. > Modified: > head/lib/libstand/dosfs.c > - d->d_fileno = dd.de.clus[1] << 8 + dd.de.clus[0]; > + d->d_fileno = (dd.de.clus[1] << 8) + dd.de.clus[0]; This certainly seems an improvement, however not because it avoids a compiler warning but because the original code was wrong. For some strange reason, + binds more strongly than <<, so fewer different d_fileno values were generated than likely intended. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Wed May 4 01:24:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6779106564A; Wed, 4 May 2011 01:24:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A6AD8FC0A; Wed, 4 May 2011 01:24:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p441O3pJ024827; Wed, 4 May 2011 01:24:03 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p441O3fn024825; Wed, 4 May 2011 01:24:03 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105040124.p441O3fn024825@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 01:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221416 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 01:24:03 -0000 Author: rmacklem Date: Wed May 4 01:24:03 2011 New Revision: 221416 URL: http://svn.freebsd.org/changeset/base/221416 Log: MFC: r220876 Modify the offset + size checks for read and write in the experimental NFS client to take care of overflows. Thanks go to dillon at apollo.backplane.com for providing the snippet of code that does this. Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.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/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Wed May 4 01:07:32 2011 (r221415) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Wed May 4 01:24:03 2011 (r221416) @@ -1285,12 +1285,13 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); struct nfsrv_descript *nd = &nfsd; int rsize; + off_t tmp_off; *attrflagp = 0; tsiz = uio_uio_resid(uiop); + tmp_off = uiop->uio_offset + tsiz; NFSLOCKMNT(nmp); - if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { - /* XXX Needs overflow/negative check for uio_offset */ + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uiop->uio_offset) { NFSUNLOCKMNT(nmp); return (EFBIG); } @@ -1458,12 +1459,14 @@ nfsrpc_writerpc(vnode_t vp, struct uio * struct nfsrv_descript nfsd; struct nfsrv_descript *nd = &nfsd; nfsattrbit_t attrbits; + off_t tmp_off; KASSERT(uiop->uio_iovcnt == 1, ("nfs: writerpc iovcnt > 1")); *attrflagp = 0; tsiz = uio_uio_resid(uiop); + tmp_off = uiop->uio_offset + tsiz; NFSLOCKMNT(nmp); - if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uiop->uio_offset) { NFSUNLOCKMNT(nmp); return (EFBIG); } From owner-svn-src-all@FreeBSD.ORG Wed May 4 01:39:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18454106567B; Wed, 4 May 2011 01:39:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E057B8FC12; Wed, 4 May 2011 01:39:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p441difq025340; Wed, 4 May 2011 01:39:44 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p441diji025338; Wed, 4 May 2011 01:39:44 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105040139.p441diji025338@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 01:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221417 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 01:39:45 -0000 Author: rmacklem Date: Wed May 4 01:39:44 2011 New Revision: 221417 URL: http://svn.freebsd.org/changeset/base/221417 Log: MFC: r220877 Modify the offset + size checks for read and write in the experimental NFS client to take care of overflows for the calls above the buffer cache layer in a manner similar to r220876. Thanks go to dillon at apollo.backplane.com for providing the snippet of code that does this. Modified: stable/8/sys/fs/nfsclient/nfs_clbio.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/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clbio.c Wed May 4 01:24:03 2011 (r221416) +++ stable/8/sys/fs/nfsclient/nfs_clbio.c Wed May 4 01:39:44 2011 (r221417) @@ -448,6 +448,7 @@ ncl_bioread(struct vnode *vp, struct uio int bcount; int seqcount; int nra, error = 0, n = 0, on = 0; + off_t tmp_off; KASSERT(uio->uio_rw == UIO_READ, ("ncl_read mode")); if (uio->uio_resid == 0) @@ -465,11 +466,14 @@ ncl_bioread(struct vnode *vp, struct uio } if (nmp->nm_rsize == 0 || nmp->nm_readdirsize == 0) (void) newnfs_iosize(nmp); - mtx_unlock(&nmp->nm_mtx); + tmp_off = uio->uio_offset + uio->uio_resid; if (vp->v_type != VDIR && - (uio->uio_offset + uio->uio_resid) > nmp->nm_maxfilesize) + (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset)) { + mtx_unlock(&nmp->nm_mtx); return (EFBIG); + } + mtx_unlock(&nmp->nm_mtx); if (newnfs_directio_enable && (ioflag & IO_DIRECT) && (vp->v_type == VREG)) /* No caching/ no readaheads. Just read data into the user buffer */ @@ -871,6 +875,7 @@ ncl_write(struct vop_write_args *ap) int bcount; int n, on, error = 0; struct proc *p = td?td->td_proc:NULL; + off_t tmp_off; KASSERT(uio->uio_rw == UIO_WRITE, ("ncl_write mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, @@ -937,8 +942,13 @@ flush_and_restart: if (uio->uio_offset < 0) return (EINVAL); - if ((uio->uio_offset + uio->uio_resid) > nmp->nm_maxfilesize) + tmp_off = uio->uio_offset + uio->uio_resid; + mtx_lock(&nmp->nm_mtx); + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) { + mtx_unlock(&nmp->nm_mtx); return (EFBIG); + } + mtx_unlock(&nmp->nm_mtx); if (uio->uio_resid == 0) return (0); From owner-svn-src-all@FreeBSD.ORG Wed May 4 02:23:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C13071065670; Wed, 4 May 2011 02:23:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A504A8FC0C; Wed, 4 May 2011 02:23:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p442NxWC026643; Wed, 4 May 2011 02:23:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p442Nx1r026636; Wed, 4 May 2011 02:23:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105040223.p442Nx1r026636@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 May 2011 02:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221418 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 02:23:59 -0000 Author: adrian Date: Wed May 4 02:23:59 2011 New Revision: 221418 URL: http://svn.freebsd.org/changeset/base/221418 Log: Fix some corner cases in the net80211 sequence number retransmission handling. The current sequence number code does a few things incorrectly: * It didn't try eliminating duplications from HT nodes. I guess it's assumed that out of order / retransmission handling would be handled by the AMPDU RX routines. If a HT node isn't doing AMPDU RX, then retransmissions need to be eliminated. Since most of my debugging is based on this (as AMPDU TX software packet aggregation isn't yet handled), handle this corner case. * When a sequence number of 4095 was received, any subsequent sequence number is going to be (by definition) less than 4095. So if the following sequence number (0) doesn't initially occur and the retransmit is received, it's incorrectly eliminated by the IEEE80211_FC1_RETRY && SEQ_LEQ() check. Try to handle this better. This almost completely eliminates out of order TCP statistics showing up during iperf testing for the 11a, 11g and non-aggregate 11n AMPDU RX case. The only other packet loss conditions leading to this are due to baseband resets or heavy interference. Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Wed May 4 01:39:44 2011 (r221417) +++ head/sys/net80211/ieee80211_adhoc.c Wed May 4 02:23:59 2011 (r221418) @@ -285,7 +285,6 @@ doprint(struct ieee80211vap *vap, int su static int adhoc_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; @@ -412,9 +411,7 @@ adhoc_input(struct ieee80211_node *ni, s TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; rxseq = le16toh(*(uint16_t *)wh->i_seq); - if ((ni->ni_flags & IEEE80211_NODE_HT) == 0 && - (wh->i_fc[1] & IEEE80211_FC1_RETRY) && - SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { + if (! ieee80211_check_rxseq(ni, wh)) { /* duplicate, discard */ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, bssid, "duplicate", @@ -660,7 +657,6 @@ out: m_freem(m); } return type; -#undef SEQ_LEQ } static int Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Wed May 4 01:39:44 2011 (r221417) +++ head/sys/net80211/ieee80211_hostap.c Wed May 4 02:23:59 2011 (r221418) @@ -472,7 +472,6 @@ doprint(struct ieee80211vap *vap, int su static int hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; @@ -572,9 +571,7 @@ hostap_input(struct ieee80211_node *ni, TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; rxseq = le16toh(*(uint16_t *)wh->i_seq); - if ((ni->ni_flags & IEEE80211_NODE_HT) == 0 && - (wh->i_fc[1] & IEEE80211_FC1_RETRY) && - SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { + if (! ieee80211_check_rxseq(ni, wh)) { /* duplicate, discard */ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, bssid, "duplicate", @@ -914,7 +911,6 @@ out: m_freem(m); } return type; -#undef SEQ_LEQ } static void Modified: head/sys/net80211/ieee80211_input.h ============================================================================== --- head/sys/net80211/ieee80211_input.h Wed May 4 01:39:44 2011 (r221417) +++ head/sys/net80211/ieee80211_input.h Wed May 4 02:23:59 2011 (r221418) @@ -142,6 +142,104 @@ ishtinfooui(const uint8_t *frm) return frm[1] > 3 && LE_READ_4(frm+2) == ((BCM_OUI_HTINFO<<24)|BCM_OUI); } +#include /* For le16toh() */ + +/* + * Check the current frame sequence number against the current TID + * state and return whether it's in sequence or should be dropped. + * + * Since out of order packet and duplicate packet eliminations should + * be done by the AMPDU RX code, this routine blindly accepts all + * frames from a HT station w/ a TID that is currently doing AMPDU-RX. + * HT stations without WME or where the TID is not doing AMPDU-RX + * are checked like non-HT stations. + * + * The routine only eliminates packets whose sequence/fragment + * match or are less than the last seen sequence/fragment number + * AND are retransmits It doesn't try to eliminate out of order packets. + * + * Since all frames after sequence number 4095 will be less than 4095 + * (as the seqnum wraps), handle that special case so packets aren't + * incorrectly dropped - ie, if the next packet is sequence number 0 + * but a retransmit since the initial packet didn't make it. + */ +static __inline int +ieee80211_check_rxseq(struct ieee80211_node *ni, struct ieee80211_frame *wh) +{ +#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) +#define SEQ_EQ(a,b) ((int)((a)-(b)) == 0) +#define HAS_SEQ(type) ((type & 0x4) == 0) +#define SEQNO(a) ((a) >> IEEE80211_SEQ_SEQ_SHIFT) +#define FRAGNO(a) ((a) & IEEE80211_SEQ_FRAG_MASK) + uint16_t rxseq; + uint8_t type; + uint8_t tid; + struct ieee80211_rx_ampdu *rap; + + rxseq = le16toh(*(uint16_t *)wh->i_seq); + type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + + /* Types with no sequence number are always treated valid */ + if (! HAS_SEQ(type)) + return 1; + + tid = ieee80211_gettid(wh); + + /* + * Only do the HT AMPDU check for WME stations; non-WME HT stations + * shouldn't exist outside of debugging. We should at least + * handle that. + */ + if (tid < WME_NUM_TID) { + rap = &ni->ni_rx_ampdu[tid]; + /* HT nodes currently doing RX AMPDU are always valid */ + if ((ni->ni_flags & IEEE80211_NODE_HT) && + (rap->rxa_flags & IEEE80211_AGGR_RUNNING)) + return 1; + } + + /* + * Otherwise, retries for packets below or equal to the last + * seen sequence number should be dropped. + */ + + /* + * Treat frame seqnum 4095 as special due to boundary + * wrapping conditions. + */ + if (SEQNO(ni->ni_rxseqs[tid]) == 4095) { + /* + * Drop retransmits on seqnum 4095/current fragment for itself. + */ + if (SEQ_EQ(rxseq, ni->ni_rxseqs[tid]) && + (wh->i_fc[1] & IEEE80211_FC1_RETRY)) + return 0; + /* + * Treat any subsequent frame as fine if the last seen frame + * is 4095 and it's not a retransmit for the same sequence + * number. However, this doesn't capture incorrectly ordered + * fragments w/ sequence number 4095. It shouldn't be seen + * in practice, but see the comment above for further info. + */ + return 1; + } + + /* + * At this point we assume that retransmitted seq/frag numbers below + * the current can simply be eliminated. + */ + if ((wh->i_fc[1] & IEEE80211_FC1_RETRY) && + SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) + return 0; + + return 1; +#undef SEQ_LEQ +#undef SEQ_EQ +#undef HAS_SEQ +#undef SEQNO +#undef FRAGNO +} + void ieee80211_deliver_data(struct ieee80211vap *, struct ieee80211_node *, struct mbuf *); struct mbuf *ieee80211_defrag(struct ieee80211_node *, Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Wed May 4 01:39:44 2011 (r221417) +++ head/sys/net80211/ieee80211_mesh.c Wed May 4 02:23:59 2011 (r221418) @@ -1040,7 +1040,6 @@ mesh_isucastforme(struct ieee80211vap *v static int mesh_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; @@ -1094,9 +1093,7 @@ mesh_input(struct ieee80211_node *ni, st TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; rxseq = le16toh(*(uint16_t *)wh->i_seq); - if ((ni->ni_flags & IEEE80211_NODE_HT) == 0 && - (wh->i_fc[1] & IEEE80211_FC1_RETRY) && - SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { + if (! ieee80211_check_rxseq(ni, wh)) { /* duplicate, discard */ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr1, "duplicate", Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Wed May 4 01:39:44 2011 (r221417) +++ head/sys/net80211/ieee80211_sta.c Wed May 4 02:23:59 2011 (r221418) @@ -512,7 +512,6 @@ doprint(struct ieee80211vap *vap, int su static int sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; @@ -591,9 +590,7 @@ sta_input(struct ieee80211_node *ni, str TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; rxseq = le16toh(*(uint16_t *)wh->i_seq); - if ((ni->ni_flags & IEEE80211_NODE_HT) == 0 && - (wh->i_fc[1] & IEEE80211_FC1_RETRY) && - SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { + if (! ieee80211_check_rxseq(ni, wh)) { /* duplicate, discard */ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, bssid, "duplicate", @@ -910,7 +907,6 @@ out: m_freem(m); } return type; -#undef SEQ_LEQ } static void Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Wed May 4 01:39:44 2011 (r221417) +++ head/sys/net80211/ieee80211_wds.c Wed May 4 02:23:59 2011 (r221418) @@ -406,7 +406,6 @@ wds_newstate(struct ieee80211vap *vap, e static int wds_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; @@ -495,9 +494,7 @@ wds_input(struct ieee80211_node *ni, str TID_TO_WME_AC(tid) >= WME_AC_VI) ic->ic_wme.wme_hipri_traffic++; rxseq = le16toh(*(uint16_t *)wh->i_seq); - if ((ni->ni_flags & IEEE80211_NODE_HT) == 0 && - (wh->i_fc[1] & IEEE80211_FC1_RETRY) && - SEQ_LEQ(rxseq, ni->ni_rxseqs[tid])) { + if (! ieee80211_check_rxseq(ni, wh)) { /* duplicate, discard */ IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr1, "duplicate", @@ -741,7 +738,6 @@ out: m_freem(m); } return type; -#undef SEQ_LEQ } static void From owner-svn-src-all@FreeBSD.ORG Wed May 4 02:52:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 982CA106566C; Wed, 4 May 2011 02:52:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86EBB8FC1A; Wed, 4 May 2011 02:52:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p442qflU027518; Wed, 4 May 2011 02:52:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p442qfI4027516; Wed, 4 May 2011 02:52:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105040252.p442qfI4027516@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 4 May 2011 02:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221419 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 02:52:41 -0000 Author: nwhitehorn Date: Wed May 4 02:52:41 2011 New Revision: 221419 URL: http://svn.freebsd.org/changeset/base/221419 Log: Make sure to run make obj before release. Trying to run them in one step doesn't always work reliably. Modified: head/release/generate-release.sh Modified: head/release/generate-release.sh ============================================================================== --- head/release/generate-release.sh Wed May 4 02:23:59 2011 (r221418) +++ head/release/generate-release.sh Wed May 4 02:52:41 2011 (r221419) @@ -60,6 +60,7 @@ if [ -d $2/usr/doc ]; then fi chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1 +chroot $2 /bin/sh -c "cd /usr/src/release && make obj" || exit 1 chroot $2 /bin/sh -c "cd /usr/src/release && make release" || exit 1 chroot $2 /bin/sh -c "cd /usr/src/release && make install DESTDIR=/R" || exit 1 From owner-svn-src-all@FreeBSD.ORG Wed May 4 03:03:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93032106566B; Wed, 4 May 2011 03:03:51 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 05B778FC15; Wed, 4 May 2011 03:03:51 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 6D5FF58140; Tue, 3 May 2011 22:03:50 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id 1LmXl476ytZq; Tue, 3 May 2011 22:03:50 -0500 (CDT) Received: from wanderer.tachypleus.net (unknown [76.210.65.155]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 65EC75813A; Tue, 3 May 2011 22:03:49 -0500 (CDT) Message-ID: <4DC0C214.3090004@freebsd.org> Date: Tue, 03 May 2011 22:03:48 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110317 Thunderbird/3.1.9 MIME-Version: 1.0 To: Baptiste Daroussin References: <201105031512.p43FC1Jr099140@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221387 - head/usr.sbin/makefs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 03:03:51 -0000 On 05/03/11 10:27, Baptiste Daroussin wrote: > 2011/5/3 Nathan Whitehorn: >> Author: nwhitehorn >> Date: Tue May 3 15:12:01 2011 >> New Revision: 221387 >> URL: http://svn.freebsd.org/changeset/base/221387 >> >> Log: >> Add support for synthesizing an APM partition map to map Mac PowerPC >> bootstrap partitions from the ISO9660 boot catalog. This preserves OS X's >> ability to mount the CD, while allowing us a way to provide HFS-ified >> bootstrap code for Open Firmware. >> >> Modified: >> head/usr.sbin/makefs/cd9660/cd9660_eltorito.c >> >> Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c >> ============================================================================== >> --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Tue May 3 14:43:16 2011 (r221386) >> +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Tue May 3 15:12:01 2011 (r221387) >> @@ -31,6 +31,9 @@ >> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY >> * OF SUCH DAMAGE. >> */ >> + >> +#include >> + >> #include "cd9660.h" >> #include "cd9660_eltorito.h" >> >> @@ -497,11 +500,43 @@ cd9660_setup_boot_volume_descriptor(volu >> return 1; >> } >> >> +static int >> +cd9660_write_apm_partition_entry(FILE *fd, int index, int total_partitions, >> + off_t sector_start, off_t nsectors, off_t sector_size, >> + const char *part_name, const char *part_type) { >> + uint32_t apm32; >> + uint16_t apm16; >> + >> + fseeko(fd, (off_t)(index + 1) * sector_size, SEEK_SET); >> + >> + /* Signature */ >> + apm16 = htons(0x504d); >> + fwrite(&apm16, sizeof(apm16), 1, fd); >> + apm16 = 0; >> + fwrite(&apm16, sizeof(apm16), 1, fd); >> + >> + /* Total number of partitions */ >> + apm32 = htonl(total_partitions); >> + fwrite(&apm32, sizeof(apm32), 1, fd); >> + /* Bounds */ >> + apm32 = htonl(sector_start); >> + fwrite(&apm32, sizeof(apm32), 1, fd); >> + apm32 = htonl(nsectors); >> + fwrite(&apm32, sizeof(apm32), 1, fd); >> + >> + fwrite(part_name, strlen(part_name) + 1, 1, fd); >> + fseek(fd, 32 - strlen(part_name) - 1, SEEK_CUR); >> + fwrite(part_type, strlen(part_type) + 1, 1, fd); >> + >> + return 0; >> +} >> + >> int >> cd9660_write_boot(FILE *fd) >> { >> struct boot_catalog_entry *e; >> struct cd9660_boot_image *t; >> + int apm_partitions = 0; >> >> /* write boot catalog */ >> if (fseeko(fd, (off_t)diskStructure.boot_catalog_sector * >> @@ -533,7 +568,51 @@ cd9660_write_boot(FILE *fd) >> t->filename, t->sector); >> } >> cd9660_copy_file(fd, t->sector, t->filename); >> + >> + if (t->system == ET_SYS_MAC) >> + apm_partitions++; >> + } >> + >> + if (apm_partitions> 0) { >> + /* Write DDR and global APM info */ >> + uint32_t apm32; >> + uint16_t apm16; >> + int total_parts; >> + >> + fseek(fd, 0, SEEK_SET); >> + apm16 = htons(0x4552); >> + fwrite(&apm16, sizeof(apm16), 1, fd); >> + apm16 = htons(diskStructure.sectorSize); >> + fwrite(&apm16, sizeof(apm16), 1, fd); >> + apm32 = htonl(diskStructure.totalSectors); >> + fwrite(&apm32, sizeof(apm32), 1, fd); >> + >> + /* Count total needed entries */ >> + total_parts = 2 + apm_partitions; /* Self + ISO9660 */ >> + >> + /* Write self-descriptor */ >> + cd9660_write_apm_partition_entry(fd, 0, >> + total_parts, 1, total_parts, diskStructure.sectorSize, >> + "Apple", "Apple_partition_map"); >> + >> + /* Write ISO9660 descriptor, enclosing the whole disk */ >> + cd9660_write_apm_partition_entry(fd, 1, >> + total_parts, 0, diskStructure.totalSectors, >> + diskStructure.sectorSize, "", "CD_ROM_Mode_1"); >> + >> + /* Write all partition entries */ >> + apm_partitions = 0; >> + TAILQ_FOREACH(t,&diskStructure.boot_images, image_list) { >> + if (t->system != ET_SYS_MAC) >> + continue; >> + >> + cd9660_write_apm_partition_entry(fd, >> + 2 + apm_partitions++, total_parts, >> + t->sector, t->num_sectors, diskStructure.sectorSize, >> + "CD Boot", "Apple_Bootstrap"); >> + } >> } >> >> return 0; >> } >> + >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >> > > Nice, > > Do not forget to send this to the netbsd folks so that both makefs > keep as in sync as possible, christos@NetBSD.org should be interested > by this. > > if you already did this, sorry for the noise. > > regards, > Bapt Will do. I have some more testing to do with this, and possibly some more changes, which I was planning on sending upstream as a batch when finished. -Nathan From owner-svn-src-all@FreeBSD.ORG Wed May 4 07:34:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74593106564A; Wed, 4 May 2011 07:34:45 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6244E8FC12; Wed, 4 May 2011 07:34:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p447YjX2036046; Wed, 4 May 2011 07:34:45 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p447YjPB036043; Wed, 4 May 2011 07:34:45 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201105040734.p447YjPB036043@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 4 May 2011 07:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221420 - in head: crypto/openssh crypto/openssh/openbsd-compat etc/rc.d secure/lib/libssh secure/usr.sbin/sshd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 07:34:45 -0000 Author: des Date: Wed May 4 07:34:44 2011 New Revision: 221420 URL: http://svn.freebsd.org/changeset/base/221420 Log: Upgrade to OpenSSH 5.8p2. Added: head/crypto/openssh/audit-linux.c - copied unchanged from r221394, vendor-crypto/openssh/dist/audit-linux.c head/crypto/openssh/bufec.c - copied unchanged from r221394, vendor-crypto/openssh/dist/bufec.c head/crypto/openssh/kexecdh.c - copied unchanged from r221394, vendor-crypto/openssh/dist/kexecdh.c head/crypto/openssh/kexecdhc.c - copied unchanged from r221394, vendor-crypto/openssh/dist/kexecdhc.c head/crypto/openssh/kexecdhs.c - copied unchanged from r221394, vendor-crypto/openssh/dist/kexecdhs.c head/crypto/openssh/openbsd-compat/charclass.h - copied unchanged from r221394, vendor-crypto/openssh/dist/openbsd-compat/charclass.h head/crypto/openssh/openbsd-compat/timingsafe_bcmp.c - copied unchanged from r221394, vendor-crypto/openssh/dist/openbsd-compat/timingsafe_bcmp.c head/crypto/openssh/ssh-ecdsa.c - copied unchanged from r221394, vendor-crypto/openssh/dist/ssh-ecdsa.c Modified: head/crypto/openssh/ChangeLog head/crypto/openssh/LICENCE head/crypto/openssh/PROTOCOL head/crypto/openssh/PROTOCOL.agent head/crypto/openssh/PROTOCOL.certkeys head/crypto/openssh/PROTOCOL.mux head/crypto/openssh/README head/crypto/openssh/atomicio.c head/crypto/openssh/atomicio.h head/crypto/openssh/audit-bsm.c head/crypto/openssh/audit.c head/crypto/openssh/audit.h head/crypto/openssh/auth-options.c head/crypto/openssh/auth-rsa.c head/crypto/openssh/auth.c head/crypto/openssh/auth1.c head/crypto/openssh/auth2-jpake.c head/crypto/openssh/auth2-pubkey.c head/crypto/openssh/auth2.c head/crypto/openssh/authfd.c head/crypto/openssh/authfile.c head/crypto/openssh/bufaux.c head/crypto/openssh/buffer.h head/crypto/openssh/canohost.c head/crypto/openssh/channels.c head/crypto/openssh/cipher-3des1.c head/crypto/openssh/cipher-acss.c head/crypto/openssh/cipher-aes.c head/crypto/openssh/cipher-bf1.c head/crypto/openssh/cipher-ctr.c head/crypto/openssh/clientloop.c head/crypto/openssh/compress.c head/crypto/openssh/config.h head/crypto/openssh/config.h.in head/crypto/openssh/defines.h head/crypto/openssh/dns.c head/crypto/openssh/entropy.c head/crypto/openssh/hostfile.c head/crypto/openssh/hostfile.h head/crypto/openssh/includes.h head/crypto/openssh/jpake.c head/crypto/openssh/kex.c head/crypto/openssh/kex.h head/crypto/openssh/kexdhc.c head/crypto/openssh/kexdhs.c head/crypto/openssh/kexgexc.c head/crypto/openssh/kexgexs.c head/crypto/openssh/key.c head/crypto/openssh/key.h head/crypto/openssh/loginrec.c head/crypto/openssh/loginrec.h head/crypto/openssh/misc.c head/crypto/openssh/misc.h head/crypto/openssh/moduli.c head/crypto/openssh/monitor.c head/crypto/openssh/monitor_wrap.c head/crypto/openssh/mux.c head/crypto/openssh/myproposal.h head/crypto/openssh/openbsd-compat/bindresvport.c head/crypto/openssh/openbsd-compat/bsd-misc.c head/crypto/openssh/openbsd-compat/bsd-misc.h head/crypto/openssh/openbsd-compat/glob.c head/crypto/openssh/openbsd-compat/glob.h head/crypto/openssh/openbsd-compat/openbsd-compat.h head/crypto/openssh/openbsd-compat/openssl-compat.c head/crypto/openssh/openbsd-compat/openssl-compat.h head/crypto/openssh/openbsd-compat/port-linux.c head/crypto/openssh/openbsd-compat/port-linux.h head/crypto/openssh/openbsd-compat/port-solaris.c head/crypto/openssh/openbsd-compat/port-solaris.h head/crypto/openssh/packet.c head/crypto/openssh/packet.h head/crypto/openssh/pathnames.h head/crypto/openssh/platform.c head/crypto/openssh/platform.h head/crypto/openssh/readconf.c head/crypto/openssh/readconf.h head/crypto/openssh/readpass.c head/crypto/openssh/schnorr.c head/crypto/openssh/scp.1 head/crypto/openssh/scp.c head/crypto/openssh/servconf.c head/crypto/openssh/servconf.h head/crypto/openssh/session.c head/crypto/openssh/sftp-client.c head/crypto/openssh/sftp-client.h head/crypto/openssh/sftp-server.c head/crypto/openssh/sftp.1 head/crypto/openssh/sftp.c head/crypto/openssh/ssh-add.1 head/crypto/openssh/ssh-add.c head/crypto/openssh/ssh-agent.1 head/crypto/openssh/ssh-agent.c head/crypto/openssh/ssh-dss.c head/crypto/openssh/ssh-keygen.1 head/crypto/openssh/ssh-keygen.c head/crypto/openssh/ssh-keyscan.1 head/crypto/openssh/ssh-keyscan.c head/crypto/openssh/ssh-keysign.8 head/crypto/openssh/ssh-keysign.c head/crypto/openssh/ssh-rsa.c head/crypto/openssh/ssh.1 head/crypto/openssh/ssh.c head/crypto/openssh/ssh2.h head/crypto/openssh/ssh_config head/crypto/openssh/ssh_config.5 head/crypto/openssh/ssh_namespace.h head/crypto/openssh/sshconnect.c head/crypto/openssh/sshconnect.h head/crypto/openssh/sshconnect2.c head/crypto/openssh/sshd.8 head/crypto/openssh/sshd.c head/crypto/openssh/sshd_config head/crypto/openssh/sshd_config.5 head/crypto/openssh/sshlogin.c head/crypto/openssh/uuencode.c head/crypto/openssh/uuencode.h head/crypto/openssh/version.h head/etc/rc.d/sshd head/secure/lib/libssh/Makefile head/secure/usr.sbin/sshd/Makefile Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/ChangeLog ============================================================================== --- head/crypto/openssh/ChangeLog Wed May 4 02:52:41 2011 (r221419) +++ head/crypto/openssh/ChangeLog Wed May 4 07:34:44 2011 (r221420) @@ -1,3 +1,742 @@ +20110403 + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] Prepare for 5.8p2 release. + - Release 5.8p2 + +20110329 + - (djm) [entropy.c] closefrom() before running ssh-rand-helper; leftover fds + noticed by tmraz AT redhat.com + +20110221 + - (dtucker) [contrib/cygwin/ssh-host-config] From Corinna: revamp of the + Cygwin-specific service installer script ssh-host-config. The actual + functionality is the same, the revisited version is just more + exact when it comes to check for problems which disallow to run + certain aspects of the script. So, part of this script and the also + rearranged service helper script library "csih" is to check if all + the tools required to run the script are available on the system. + The new script also is more thorough to inform the user why the + script failed. Patch from vinschen at redhat com. + +20110206 + - (dtucker) [openbsd-compat/port-linux.c] Bug #1851: fix syntax error in + selinux code. Patch from Leonardo Chiquitto + - (dtucker) [contrib/cygwin/ssh-{host,user}-config] Add ECDSA key + generation and simplify. Patch from Corinna Vinschen. + +20110204 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/01/31 21:42:15 + [PROTOCOL.mux] + cut'n'pasto; from bert.wesarg AT googlemail.com + - djm@cvs.openbsd.org 2011/02/04 00:44:21 + [key.c] + fix uninitialised nonce variable; reported by Mateusz Kocielski + - djm@cvs.openbsd.org 2011/02/04 00:44:43 + [version.h] + openssh-5.8 + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] update versions in docs and spec files. + - Release OpenSSH 5.8p1 + +20110128 + - (djm) [openbsd-compat/port-linux.c] Check whether SELinux is enabled + before attempting setfscreatecon(). Check whether matchpathcon() + succeeded before using its result. Patch from cjwatson AT debian.org; + bz#1851 + +20110125 + - (djm) [configure.ac Makefile.in ssh.c openbsd-compat/port-linux.c + openbsd-compat/port-linux.h] Move SELinux-specific code from ssh.c to + port-linux.c to avoid compilation errors. Add -lselinux to ssh when + building with SELinux support to avoid linking failure; report from + amk AT spamfence.net; ok dtucker + +20110122 + - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}] Add + RSA_get_default_method() for the benefit of openssl versions that don't + have it (at least openssl-engine-0.9.6b). Found and tested by Kevin Brott, + ok djm@. + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/01/22 09:18:53 + [version.h] + crank to OpenSSH-5.7 + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] update versions in docs and spec files. + - (djm) Release 5.7p1 + +20110119 + - (tim) [contrib/caldera/openssh.spec] Use CFLAGS from Makefile instead + of RPM so build completes. Signatures were changed to .asc since 4.1p1. + - (djm) [configure.ac] Disable ECC on OpenSSL <0.9.8g. Releases prior to + 0.9.8 lacked it, and 0.9.8a through 0.9.8d have proven buggy in pre- + release testing (random crashes and failure to load ECC keys). + ok dtucker@ + +20110117 + - (djm) [regress/Makefile] use $TEST_SSH_KEYGEN instead of the one in + $PATH, fix cleanup of droppings; reported by openssh AT + roumenpetrov.info; ok dtucker@ + - (djm) [regress/agent-ptrace.sh] Fix false failure on OS X by adding + its unique snowflake of a gdb error to the ones we look for. + - (djm) [regress/agent-getpeereid.sh] leave stdout attached when running + ssh-add to avoid $SUDO failures on Linux + - (dtucker) [openbsd-compat/port-linux.c] Bug #1838: Add support for the new + Linux OOM-killer magic values that changed in 2.6.36 kernels, with fallback + to the old values. Feedback from vapier at gentoo org and djm, ok djm. + - (djm) [configure.ac regress/agent-getpeereid.sh regress/multiplex.sh] + [regress/sftp-glob.sh regress/test-exec.sh] Rework how feature tests are + disabled on platforms that do not support them; add a "config_defined()" + shell function that greps for defines in config.h and use them to decide + on feature tests. + Convert a couple of existing grep's over config.h to use the new function + Add a define "FILESYSTEM_NO_BACKSLASH" for filesystem that can't represent + backslash characters in filenames, enable it for Cygwin and use it to turn + of tests for quotes backslashes in sftp-glob.sh. + based on discussion with vinschen AT redhat.com and dtucker@; ok dtucker@ + - (tim) [regress/agent-getpeereid.sh] shell portability fix. + - (dtucker) [openbsd-compat/port-linux.c] Fix minor bug caught by -Werror on + the tinderbox. + - (dtucker) [LICENCE Makefile.in audit-bsm.c audit-linux.c audit.c audit.h + configure.ac defines.h loginrec.c] Bug #1402: add linux audit subsystem + support, based on patches from Tomas Mraz and jchadima at redhat. + +20110116 + - (dtucker) [Makefile.in configure.ac regress/kextype.sh] Skip sha256-based + on configurations that don't have it. + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/01/16 11:50:05 + [clientloop.c] + Use atomicio when flushing protocol 1 std{out,err} buffers at + session close. This was a latent bug exposed by setting a SIGCHLD + handler and spotted by kevin.brott AT gmail.com; ok dtucker@ + - djm@cvs.openbsd.org 2011/01/16 11:50:36 + [sshconnect.c] + reset the SIGPIPE handler when forking to execute child processes; + ok dtucker@ + - djm@cvs.openbsd.org 2011/01/16 12:05:59 + [clientloop.c] + a couple more tweaks to the post-close protocol 1 stderr/stdout flush: + now that we use atomicio(), convert them from while loops to if statements + add test and cast to compile cleanly with -Wsigned + +20110114 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/01/13 21:54:53 + [mux.c] + correct error messages; patch from bert.wesarg AT googlemail.com + - djm@cvs.openbsd.org 2011/01/13 21:55:25 + [PROTOCOL.mux] + correct protocol names and add a couple of missing protocol number + defines; patch from bert.wesarg AT googlemail.com + - (djm) [Makefile.in] Use shell test to disable ecdsa key generating in + host-key-force target rather than a substitution that is replaced with a + comment so that the Makefile.in is still a syntactically valid Makefile + (useful to run the distprep target) + - (tim) [regress/cert-hostkey.sh] Typo. Missing $ on variable name. + - (tim) [regress/cert-hostkey.sh] Add missing TEST_SSH_ECC guard around some + ecdsa bits. + +20110113 + - (djm) [misc.c] include time.h for nanosleep() prototype + - (tim) [Makefile.in] test the ECC bits if we have the capability. ok djm + - (tim) [Makefile.in configure.ac opensshd.init.in] Add support for generating + ecdsa keys. ok djm. + - (djm) [entropy.c] cast OPENSSL_VERSION_NUMBER to u_long to avoid + gcc warning on platforms where it defaults to int + - (djm) [regress/Makefile] add a few more generated files to the clean + target + - (djm) [myproposal.h] Fix reversed OPENSSL_VERSION_NUMBER test and bad + #define that was causing diffie-hellman-group-exchange-sha256 to be + incorrectly disabled + - (djm) [regress/kextype.sh] Testing diffie-hellman-group-exchange-sha256 + should not depend on ECC support + +20110112 + - OpenBSD CVS Sync + - nicm@cvs.openbsd.org 2010/10/08 21:48:42 + [openbsd-compat/glob.c] + Extend GLOB_LIMIT to cover readdir and stat and bump the malloc limit + from ARG_MAX to 64K. + Fixes glob-using programs (notably ftp) able to be triggered to hit + resource limits. + Idea from a similar NetBSD change, original problem reported by jasper@. + ok millert tedu jasper + - djm@cvs.openbsd.org 2011/01/12 01:53:14 + avoid some integer overflows mostly with GLOB_APPEND and GLOB_DOOFFS + and sanity check arguments (these will be unnecessary when we switch + struct glob members from being type into to size_t in the future); + "looks ok" tedu@ feedback guenther@ + - (djm) [configure.ac] Turn on -Wno-unused-result for gcc >= 4.4 to avoid + silly warnings on write() calls we don't care succeed or not. + - (djm) [configure.ac] Fix broken test for gcc >= 4.4 with per-compiler + flag tests that don't depend on gcc version at all; suggested by and + ok dtucker@ + +20110111 + - (tim) [regress/host-expand.sh] Fix for building outside of read only + source tree. + - (djm) [platform.c] Some missing includes that show up under -Werror + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2011/01/08 10:51:51 + [clientloop.c] + use host and not options.hostname, as the latter may have unescaped + substitution characters + - djm@cvs.openbsd.org 2011/01/11 06:06:09 + [sshlogin.c] + fd leak on error paths; from zinovik@ + NB. Id sync only; we use loginrec.c that was also audited and fixed + recently + - djm@cvs.openbsd.org 2011/01/11 06:13:10 + [clientloop.c ssh-keygen.c sshd.c] + some unsigned long long casts that make things a bit easier for + portable without resorting to dropping PRIu64 formats everywhere + +20110109 + - (djm) [Makefile.in] list ssh_host_ecdsa key in PATHSUBS; spotted by + openssh AT roumenpetrov.info + +20110108 + - (djm) [regress/keytype.sh] s/echo -n/echon/ to repair failing regress + test on OSX and others. Reported by imorgan AT nas.nasa.gov + +20110107 + - (djm) [regress/cert-hostkey.sh regress/cert-userkey.sh] fix shell test + for no-ECC case. Patch from cristian.ionescu-idbohrn AT axis.com + - djm@cvs.openbsd.org 2011/01/06 22:23:53 + [ssh.c] + unbreak %n expansion in LocalCommand; patch from bert.wesarg AT + googlemail.com; ok markus@ + - djm@cvs.openbsd.org 2011/01/06 22:23:02 + [clientloop.c] + when exiting due to ServerAliveTimeout, mention the hostname that caused + it (useful with backgrounded controlmaster) + - djm@cvs.openbsd.org 2011/01/06 22:46:21 + [regress/Makefile regress/host-expand.sh] + regress test for LocalCommand %n expansion from bert.wesarg AT + googlemail.com; ok markus@ + - djm@cvs.openbsd.org 2011/01/06 23:01:35 + [sshconnect.c] + reset SIGCHLD handler to SIG_DFL when execuring LocalCommand; + ok markus@ + +20110106 + - (djm) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2010/12/08 22:46:03 + [scp.1 scp.c] + add a new -3 option to scp: Copies between two remote hosts are + transferred through the local host. Without this option the data + is copied directly between the two remote hosts. ok djm@ (bugzilla #1837) + - jmc@cvs.openbsd.org 2010/12/09 14:13:33 + [scp.1 scp.c] + scp.1: grammer fix + scp.c: add -3 to usage() + - markus@cvs.openbsd.org 2010/12/14 11:59:06 + [sshconnect.c] + don't mention key type in key-changed-warning, since we also print + this warning if a new key type appears. ok djm@ + - djm@cvs.openbsd.org 2010/12/15 00:49:27 + [readpass.c] + fix ControlMaster=ask regression + reset SIGCHLD handler before fork (and restore it after) so we don't miss + the the askpass child's exit status. Correct test for exit status/signal to + account for waitpid() failure; with claudio@ ok claudio@ markus@ + - djm@cvs.openbsd.org 2010/12/24 21:41:48 + [auth-options.c] + don't send the actual forced command in a debug message; ok markus deraadt + - otto@cvs.openbsd.org 2011/01/04 20:44:13 + [ssh-keyscan.c] + handle ecdsa-sha2 with various key lengths; hint and ok djm@ + +20110104 + - (djm) [configure.ac Makefile.in] Use mandoc as preferred manpage + formatter if it is present, followed by nroff and groff respectively. + Fixes distprep target on OpenBSD (which has bumped groff/nroff to ports + in favour of mandoc). feedback and ok tim + +20110103 + - (djm) [Makefile.in] revert local hack I didn't intend to commit + +20110102 + - (djm) [loginrec.c] Fix some fd leaks on error paths. ok dtucker + - (djm) [configure.ac] Check whether libdes is needed when building + with Heimdal krb5 support. On OpenBSD this library no longer exists, + so linking it unconditionally causes a build failure; ok dtucker + +20101226 + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2010/12/08 04:02:47 + [ssh_config.5 sshd_config.5] + explain that IPQoS arguments are separated by whitespace; iirc requested + by jmc@ a while back + +20101205 + - (dtucker) openbsd-compat/openssl-compat.c] remove sleep leftover from + debugging. Spotted by djm. + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2010/12/03 23:49:26 + [schnorr.c] + check that g^x^q === 1 mod p; recommended by JPAKE author Feng Hao + (this code is still disabled, but apprently people are treating it as + a reference implementation) + - djm@cvs.openbsd.org 2010/12/03 23:55:27 + [auth-rsa.c] + move check for revoked keys to run earlier (in auth_rsa_key_allowed) + bz#1829; patch from ldv AT altlinux.org; ok markus@ + - djm@cvs.openbsd.org 2010/12/04 00:18:01 + [sftp-server.c sftp.1 sftp-client.h sftp.c PROTOCOL sftp-client.c] + add a protocol extension to support a hard link operation. It is + available through the "ln" command in the client. The old "ln" + behaviour of creating a symlink is available using its "-s" option + or through the preexisting "symlink" command; based on a patch from + miklos AT szeredi.hu in bz#1555; ok markus@ + - djm@cvs.openbsd.org 2010/12/04 13:31:37 + [hostfile.c] + fix fd leak; spotted and ok dtucker + - djm@cvs.openbsd.org 2010/12/04 00:21:19 + [regress/sftp-cmds.sh] + adjust for hard-link support + - (dtucker) [regress/Makefile] Id sync. + +20101204 + - (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range) + instead of (arc4random() % range) + - (dtucker) [configure.ac moduli.c openbsd-compat/openssl-compat.{c,h}] Add + shims for the new, non-deprecated OpenSSL key generation functions for + platforms that don't have the new interfaces. + +20101201 + - OpenBSD CVS Sync + - deraadt@cvs.openbsd.org 2010/11/20 05:12:38 + [auth2-pubkey.c] + clean up cases of ;; + - djm@cvs.openbsd.org 2010/11/21 01:01:13 + [clientloop.c misc.c misc.h ssh-agent.1 ssh-agent.c] + honour $TMPDIR for client xauth and ssh-agent temporary directories; + feedback and ok markus@ + - djm@cvs.openbsd.org 2010/11/21 10:57:07 + [authfile.c] + Refactor internals of private key loading and saving to work on memory + buffers rather than directly on files. This will make a few things + easier to do in the future; ok markus@ + - djm@cvs.openbsd.org 2010/11/23 02:35:50 + [auth.c] + use strict_modes already passed as function argument over referencing + global options.strict_modes + - djm@cvs.openbsd.org 2010/11/23 23:57:24 + [clientloop.c] + avoid NULL deref on receiving a channel request on an unknown or invalid + channel; report bz#1842 from jchadima AT redhat.com; ok dtucker@ + - djm@cvs.openbsd.org 2010/11/24 01:24:14 + [channels.c] + remove a debug() that pollutes stderr on client connecting to a server + in debug mode (channel_close_fds is called transitively from the session + code post-fork); bz#1719, ok dtucker + - djm@cvs.openbsd.org 2010/11/25 04:10:09 + [session.c] + replace close() loop for fds 3->64 with closefrom(); + ok markus deraadt dtucker + - djm@cvs.openbsd.org 2010/11/26 05:52:49 + [scp.c] + Pass through ssh command-line flags and options when doing remote-remote + transfers, e.g. to enable agent forwarding which is particularly useful + in this case; bz#1837 ok dtucker@ + - markus@cvs.openbsd.org 2010/11/29 18:57:04 + [authfile.c] + correctly load comment for encrypted rsa1 keys; + report/fix Joachim Schipper; ok djm@ + - djm@cvs.openbsd.org 2010/11/29 23:45:51 + [auth.c hostfile.c hostfile.h ssh.c ssh_config.5 sshconnect.c] + [sshconnect.h sshconnect2.c] + automatically order the hostkeys requested by the client based on + which hostkeys are already recorded in known_hosts. This avoids + hostkey warnings when connecting to servers with new ECDSA keys + that are preferred by default; with markus@ + +20101124 + - (dtucker) [platform.c session.c] Move the getluid call out of session.c and + into the platform-specific code Only affects SCO, tested by and ok tim@. + - (djm) [loginrec.c] Relax permission requirement on btmp logs to allow + group read/write. ok dtucker@ + - (dtucker) [packet.c] Remove redundant local declaration of "int tos". + - (djm) [defines.h] Add IP DSCP defines + +20101122 + - (dtucker) Bug #1840: fix warning when configuring --with-ssl-engine, patch + from vapier at gentoo org. + +20101120 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2010/11/05 02:46:47 + [packet.c] + whitespace KNF + - djm@cvs.openbsd.org 2010/11/10 01:33:07 + [kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c moduli.c] + use only libcrypto APIs that are retained with OPENSSL_NO_DEPRECATED. + these have been around for years by this time. ok markus + - djm@cvs.openbsd.org 2010/11/13 23:27:51 + [clientloop.c misc.c misc.h packet.c packet.h readconf.c readconf.h] + [servconf.c servconf.h session.c ssh.c ssh_config.5 sshd_config.5] + allow ssh and sshd to set arbitrary TOS/DSCP/QoS values instead of + hardcoding lowdelay/throughput. + + bz#1733 patch from philipp AT redfish-solutions.com; ok markus@ deraadt@ + - jmc@cvs.openbsd.org 2010/11/15 07:40:14 + [ssh_config.5] + libary -> library; + - jmc@cvs.openbsd.org 2010/11/18 15:01:00 + [scp.1 sftp.1 ssh.1 sshd_config.5] + add IPQoS to the various -o lists, and zap some trailing whitespace; + +20101111 + - (djm) [servconf.c ssh-add.c ssh-keygen.c] don't look for ECDSA keys on + platforms that don't support ECC. Fixes some spurious warnings reported + by tim@ + +20101109 + - (tim) [regress/kextype.sh] Not all platforms have time in /usr/bin. + Feedback from dtucker@ + - (tim) [configure.ac openbsd-compat/bsd-misc.h openbsd-compat/bsd-misc.c] Add + support for platforms missing isblank(). ok djm@ + +20101108 + - (tim) [regress/Makefile] Fixes to allow building/testing outside source + tree. + - (tim) [regress/kextype.sh] Shell portability fix. + +20101107 + - (dtucker) [platform.c] includes.h instead of defines.h so that we get + the correct typedefs. + +20101105 + - (djm) [loginrec.c loginrec.h] Use correct uid_t/pid_t types instead of + int. Should fix bz#1817 cleanly; ok dtucker@ + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2010/09/22 12:26:05 + [regress/Makefile regress/kextype.sh] + regress test for each of the key exchange algorithms that we support + - djm@cvs.openbsd.org 2010/10/28 11:22:09 + [authfile.c key.c key.h ssh-keygen.c] + fix a possible NULL deref on loading a corrupt ECDH key + + store ECDH group information in private keys files as "named groups" + rather than as a set of explicit group parameters (by setting + the OPENSSL_EC_NAMED_CURVE flag). This makes for shorter key files and + retrieves the group's OpenSSL NID that we need for various things. + - jmc@cvs.openbsd.org 2010/10/28 18:33:28 + [scp.1 ssh-add.1 ssh-keygen.1 ssh.1 ssh_config.5 sshd.8 sshd_config.5] + knock out some "-*- nroff -*-" lines; + - djm@cvs.openbsd.org 2010/11/04 02:45:34 + [sftp-server.c] + umask should be parsed as octal. reported by candland AT xmission.com; + ok markus@ + - (dtucker) [configure.ac platform.{c,h} session.c + openbsd-compat/port-solaris.{c,h}] Bug #1824: Add Solaris Project support. + Patch from cory.erickson at csu mnscu edu with a bit of rework from me. + ok djm@ + - (dtucker) [platform.c platform.h session.c] Add a platform hook to run + after the user's groups are established and move the selinux calls into it. + - (dtucker) [platform.c session.c] Move the AIX setpcred+chroot hack into + platform.c + - (dtucker) [platform.c session.c] Move the BSDI setpgrp into platform.c. + - (dtucker) [platform.c] Only call setpgrp on BSDI if running as root to + retain previous behavior. + - (dtucker) [platform.c session.c] Move the PAM credential establishment for + the LOGIN_CAP case into platform.c. + - (dtucker) platform.c session.c] Move the USE_LIBIAF fragment into + platform.c + - (dtucker) [platform.c session.c] Move aix_usrinfo frament into platform.c. + - (dtucker) [platform.c session.c] Move irix setusercontext fragment into + platform.c. + - (dtucker) [platform.c session.c] Move PAM credential establishment for the + non-LOGIN_CAP case into platform.c. + - (dtucker) [platform.c platform.h session.c] Move the Cygwin special-case + check into platform.c + - (dtucker) [regress/keytype.sh] Import new test. + - (dtucker) [Makefile configure.ac regress/Makefile regress/keytype.sh] + Import recent changes to regress/Makefile, pass a flag to enable ECC tests + from configure through to regress/Makefile and use it in the tests. + - (dtucker) [regress/kextype.sh] Add missing "test". + - (dtucker) [regress/kextype.sh] Make sha256 test depend on ECC. This is not + strictly correct since while ECC requires sha256 the reverse is not true + however it does prevent spurious test failures. + - (dtucker) [platform.c] Need servconf.h and extern options. + +20101025 + - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with + 1.12 to unbreak Solaris build. + ok djm@ + - (dtucker) [defines.h] Use SIZE_T_MAX for SIZE_MAX for platforms that have a + native one. + +20101024 + - (dtucker) [includes.h] Add missing ifdef GLOB_HAS_GL_STATV to fix build. + - (dtucker) [regress/cert-hostkey.sh] Disable ECC-based tests on platforms + which don't have ECC support in libcrypto. + - (dtucker) [regress/cert-userkey.sh] Disable ECC-based tests on platforms + which don't have ECC support in libcrypto. + - (dtucker) [defines.h] Add SIZE_MAX for the benefit of platforms that don't + have it. + - (dtucker) OpenBSD CVS Sync + - sthen@cvs.openbsd.org 2010/10/23 22:06:12 + [sftp.c] + escape '[' in filename tab-completion; fix a type while there. + ok djm@ + +20101021 + - OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2010/10/12 02:22:24 + [mux.c] + Typo in confirmation message. bz#1827, patch from imorgan at + nas nasa gov + - djm@cvs.openbsd.org 2010/08/31 12:24:09 + [regress/cert-hostkey.sh regress/cert-userkey.sh] + tests for ECDSA certificates + +20101011 + - (djm) [canohost.c] Zero a4 instead of addr to better match type. + bz#1825, reported by foo AT mailinator.com + - (djm) [sshconnect.c] Need signal.h for prototype for kill(2) + +20101011 + - (djm) [configure.ac] Use = instead of == in shell tests. Patch from + dr AT vasco.com + +20101007 + - (djm) [ssh-agent.c] Fix type for curve name. + - (djm) OpenBSD CVS Sync + - matthew@cvs.openbsd.org 2010/09/24 13:33:00 + [misc.c misc.h configure.ac openbsd-compat/openbsd-compat.h] + [openbsd-compat/timingsafe_bcmp.c] + Add timingsafe_bcmp(3) to libc, mention that it's already in the + kernel in kern(9), and remove it from OpenSSH. + ok deraadt@, djm@ + NB. re-added under openbsd-compat/ for portable OpenSSH + - djm@cvs.openbsd.org 2010/09/25 09:30:16 + [sftp.c configure.ac openbsd-compat/glob.c openbsd-compat/glob.h] + make use of new glob(3) GLOB_KEEPSTAT extension to save extra server + rountrips to fetch per-file stat(2) information. + NB. update openbsd-compat/ glob(3) implementation from OpenBSD libc to + match. + - djm@cvs.openbsd.org 2010/09/26 22:26:33 + [sftp.c] + when performing an "ls" in columnated (short) mode, only call + ioctl(TIOCGWINSZ) once to get the window width instead of per- + filename + - djm@cvs.openbsd.org 2010/09/30 11:04:51 + [servconf.c] + prevent free() of string in .rodata when overriding AuthorizedKeys in + a Match block; patch from rein AT basefarm.no + - djm@cvs.openbsd.org 2010/10/01 23:05:32 + [cipher-3des1.c cipher-bf1.c cipher-ctr.c openbsd-compat/openssl-compat.h] + adapt to API changes in openssl-1.0.0a + NB. contains compat code to select correct API for older OpenSSL + - djm@cvs.openbsd.org 2010/10/05 05:13:18 + [sftp.c sshconnect.c] + use default shell /bin/sh if $SHELL is ""; ok markus@ + - djm@cvs.openbsd.org 2010/10/06 06:39:28 + [clientloop.c ssh.c sshconnect.c sshconnect.h] + kill proxy command on fatal() (we already kill it on clean exit); + ok markus@ + - djm@cvs.openbsd.org 2010/10/06 21:10:21 + [sshconnect.c] + swapped args to kill(2) + - (djm) [openbsd-compat/glob.c] restore ARG_MAX compat code. + - (djm) [cipher-acss.c] Add missing header. + - (djm) [openbsd-compat/Makefile.in] Actually link timingsafe_bcmp + +20100924 + - (djm) OpenBSD CVS Sync + - naddy@cvs.openbsd.org 2010/09/10 15:19:29 + [ssh-keygen.1] + * mention ECDSA in more places + * less repetition in FILES section + * SSHv1 keys are still encrypted with 3DES + help and ok jmc@ + - djm@cvs.openbsd.org 2010/09/11 21:44:20 + [ssh.1] + mention RFC 5656 for ECC stuff + - jmc@cvs.openbsd.org 2010/09/19 21:30:05 + [sftp.1] + more wacky macro fixing; + - djm@cvs.openbsd.org 2010/09/20 04:41:47 + [ssh.c] + install a SIGCHLD handler to reap expiried child process; ok markus@ + - djm@cvs.openbsd.org 2010/09/20 04:50:53 + [jpake.c schnorr.c] + check that received values are smaller than the group size in the + disabled and unfinished J-PAKE code. + avoids catastrophic security failure found by Sebastien Martini + - djm@cvs.openbsd.org 2010/09/20 04:54:07 + [jpake.c] + missing #include + - djm@cvs.openbsd.org 2010/09/20 07:19:27 + [mux.c] + "atomically" create the listening mux socket by binding it on a temorary + name and then linking it into position after listen() has succeeded. + this allows the mux clients to determine that the server socket is + either ready or stale without races. stale server sockets are now + automatically removed + ok deraadt + - djm@cvs.openbsd.org 2010/09/22 05:01:30 + [kex.c kex.h kexecdh.c kexecdhc.c kexecdhs.c readconf.c readconf.h] + [servconf.c servconf.h ssh_config.5 sshconnect2.c sshd.c sshd_config.5] + add a KexAlgorithms knob to the client and server configuration to allow + selection of which key exchange methods are used by ssh(1) and sshd(8) + and their order of preference. + ok markus@ + - jmc@cvs.openbsd.org 2010/09/22 08:30:08 + [ssh.1 ssh_config.5] + ssh.1: add kexalgorithms to the -o list + ssh_config.5: format the kexalgorithms in a more consistent + (prettier!) way + ok djm + - djm@cvs.openbsd.org 2010/09/22 22:58:51 + [atomicio.c atomicio.h misc.c misc.h scp.c sftp-client.c] + [sftp-client.h sftp.1 sftp.c] + add an option per-read/write callback to atomicio + + factor out bandwidth limiting code from scp(1) into a generic bandwidth + limiter that can be attached using the atomicio callback mechanism + + add a bandwidth limit option to sftp(1) using the above + "very nice" markus@ + - jmc@cvs.openbsd.org 2010/09/23 13:34:43 + [sftp.c] + add [-l limit] to usage(); + - jmc@cvs.openbsd.org 2010/09/23 13:36:46 + [scp.1 sftp.1] + add KexAlgorithms to the -o list; + +20100910 + - (dtucker) [openbsd-compat/port-linux.c] Check is_selinux_enabled for exact + return code since it can apparently return -1 under some conditions. From + openssh bugs werbittewas de, ok djm@ + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2010/08/31 12:33:38 + [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keysign.c ssh.c sshd.c] + reintroduce commit from tedu@, which I pulled out for release + engineering: + OpenSSL_add_all_algorithms is the name of the function we have a + man page for, so use that. ok djm + - jmc@cvs.openbsd.org 2010/08/31 17:40:54 + [ssh-agent.1] + fix some macro abuse; + - jmc@cvs.openbsd.org 2010/08/31 21:14:58 + [ssh.1] + small text tweak to accommodate previous; + - naddy@cvs.openbsd.org 2010/09/01 15:21:35 + [servconf.c] + pick up ECDSA host key by default; ok djm@ + - markus@cvs.openbsd.org 2010/09/02 16:07:25 + [ssh-keygen.c] + permit -b 256, 384 or 521 as key size for ECDSA; ok djm@ + - markus@cvs.openbsd.org 2010/09/02 16:08:39 + [ssh.c] + unbreak ControlPersist=yes for ControlMaster=yes; ok djm@ + - naddy@cvs.openbsd.org 2010/09/02 17:21:50 + [ssh-keygen.c] + Switch ECDSA default key size to 256 bits, which according to RFC5656 + should still be better than our current RSA-2048 default. + ok djm@, markus@ + - jmc@cvs.openbsd.org 2010/09/03 11:09:29 + [scp.1] + add an EXIT STATUS section for /usr/bin; + - jmc@cvs.openbsd.org 2010/09/04 09:38:34 + [ssh-add.1 ssh.1] + two more EXIT STATUS sections; + - naddy@cvs.openbsd.org 2010/09/06 17:10:19 + [sshd_config] + add ssh_host_ecdsa_key to /etc; from Mattieu Baptiste + + ok deraadt@ + - djm@cvs.openbsd.org 2010/09/08 03:54:36 + [authfile.c] + typo + - deraadt@cvs.openbsd.org 2010/09/08 04:13:31 + [compress.c] + work around name-space collisions some buggy compilers (looking at you + gcc, at least in earlier versions, but this does not forgive your current + transgressions) seen between zlib and openssl + ok djm + - djm@cvs.openbsd.org 2010/09/09 10:45:45 + [kex.c kex.h kexecdh.c key.c key.h monitor.c ssh-ecdsa.c] + ECDH/ECDSA compliance fix: these methods vary the hash function they use + (SHA256/384/512) depending on the length of the curve in use. The previous + code incorrectly used SHA256 in all cases. + + This fix will cause authentication failure when using 384 or 521-bit curve + keys if one peer hasn't been upgraded and the other has. (256-bit curve + keys work ok). In particular you may need to specify HostkeyAlgorithms + when connecting to a server that has not been upgraded from an upgraded + client. + + ok naddy@ + - (djm) [authfd.c authfile.c bufec.c buffer.h configure.ac kex.h kexecdh.c] + [kexecdhc.c kexecdhs.c key.c key.h myproposal.h packet.c readconf.c] + [ssh-agent.c ssh-ecdsa.c ssh-keygen.c ssh.c] Disable ECDH and ECDSA on + platforms that don't have the requisite OpenSSL support. ok dtucker@ + - (dtucker) [kex.h key.c packet.h ssh-agent.c ssh.c] A few more ECC ifdefs + for missing headers and compiler warnings. + +20100831 + - OpenBSD CVS Sync + - jmc@cvs.openbsd.org 2010/08/08 19:36:30 + [ssh-keysign.8 ssh.1 sshd.8] + use the same template for all FILES sections; i.e. -compact/.Pp where we + have multiple items, and .Pa for path names; + - tedu@cvs.openbsd.org 2010/08/12 23:34:39 + [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keysign.c ssh.c sshd.c] + OpenSSL_add_all_algorithms is the name of the function we have a man page + for, so use that. ok djm + - djm@cvs.openbsd.org 2010/08/16 04:06:06 + [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keysign.c ssh.c sshd.c] + backout previous temporarily; discussed with deraadt@ + - djm@cvs.openbsd.org 2010/08/31 09:58:37 + [auth-options.c auth1.c auth2.c bufaux.c buffer.h kex.c key.c packet.c] + [packet.h ssh-dss.c ssh-rsa.c] + Add buffer_get_cstring() and related functions that verify that the + string extracted from the buffer contains no embedded \0 characters* + This prevents random (possibly malicious) crap from being appended to + strings where it would not be noticed if the string is used with + a string(3) function. + + Use the new API in a few sensitive places. + + * actually, we allow a single one at the end of the string for now because + we don't know how many deployed implementations get this wrong, but don't + count on this to remain indefinitely. + - djm@cvs.openbsd.org 2010/08/31 11:54:45 + [PROTOCOL PROTOCOL.agent PROTOCOL.certkeys auth2-jpake.c authfd.c] + [authfile.c buffer.h dns.c kex.c kex.h key.c key.h monitor.c] + [monitor_wrap.c myproposal.h packet.c packet.h pathnames.h readconf.c] + [ssh-add.1 ssh-add.c ssh-agent.1 ssh-agent.c ssh-keygen.1 ssh-keygen.c] + [ssh-keyscan.1 ssh-keyscan.c ssh-keysign.8 ssh.1 ssh.c ssh2.h] + [ssh_config.5 sshconnect.c sshconnect2.c sshd.8 sshd.c sshd_config.5] + [uuencode.c uuencode.h bufec.c kexecdh.c kexecdhc.c kexecdhs.c ssh-ecdsa.c] + Implement Elliptic Curve Cryptography modes for key exchange (ECDH) and + host/user keys (ECDSA) as specified by RFC5656. ECDH and ECDSA offer + better performance than plain DH and DSA at the same equivalent symmetric + key length, as well as much shorter keys. + + Only the mandatory sections of RFC5656 are implemented, specifically the + three REQUIRED curves nistp256, nistp384 and nistp521 and only ECDH and + ECDSA. Point compression (optional in RFC5656 is NOT implemented). + + Certificate host and user keys using the new ECDSA key types are supported. + + Note that this code has not been tested for interoperability and may be + subject to change. + + feedback and ok markus@ + - (djm) [Makefile.in] Add new ECC files + - (djm) [bufec.c kexecdh.c kexecdhc.c kexecdhs.c ssh-ecdsa.c] include + includes.h + +20100827 + - (dtucker) [contrib/redhat/sshd.init] Bug #1810: initlog is deprecated, + remove. Patch from martynas at venck us + 20100823 - (djm) Release OpenSSH-5.6p1 @@ -517,2746 +1256,3 @@ ok markus@ -20100410 - - (dtucker) [configure.ac] Put the check for the existence of getaddrinfo - back so we disable the IPv6 tests if we don't have it. - -20100409 - - (dtucker) [contrib/cygwin/Makefile] Don't overwrite files with the wrong - ones. Based on a patch from Roumen Petrov. - - (dtucker) [configure.ac] Bug #1744: use pkg-config for libedit flags if we - have it and the path is not provided to --with-libedit. Based on a patch - from Iain Morgan. - - (dtucker) [configure.ac defines.h loginrec.c logintest.c] Bug #1732: enable - utmpx support on FreeBSD where possible. Patch from Ed Schouten, ok djm@ - -20100326 - - (djm) [openbsd-compat/bsd-arc4random.c] Fix preprocessor detection - for arc4random_buf() and arc4random_uniform(); from Josh Gilkerson - - (dtucker) [configure.ac] Bug #1741: Add section for Haiku, patch originally - by Ingo Weinhold via Scott McCreary, ok djm@ - - (djm) OpenBSD CVS Sync - - djm@cvs.openbsd.org 2010/03/25 23:38:28 - [servconf.c] - from portable: getcwd(NULL, 0) doesn't work on all platforms, so - use a stack buffer; ok dtucker@ - - djm@cvs.openbsd.org 2010/03/26 00:26:58 - [ssh.1] - mention that -S none disables connection sharing; from Colin Watson - - (djm) [session.c] Allow ChrootDirectory to work on SELinux platforms - - set up SELinux execution context before chroot() call. From Russell - Coker via Colin watson; bz#1726 ok dtucker@ - - (djm) [channels.c] Check for EPFNOSUPPORT as a socket() errno; bz#1721 - ok dtucker@ - - (dtucker) Bug #1725: explicitly link libX11 into gnome-ssh-askpass2 using - pkg-config, patch from Colin Watson. Needed for newer linkers (ie gold). - - (djm) [contrib/ssh-copy-id] Don't blow up when the agent has no keys; - bz#1723 patch from Adeodato Simóvia Colin Watson; ok dtucker@ - - (dtucker) OpenBSD CVS Sync - - dtucker@cvs.openbsd.org 2010/03/26 01:06:13 - [ssh_config.5] - Reformat default value of PreferredAuthentications entry (current - formatting implies ", " is acceptable as a separator, which it's not. - ok djm@ - -20100324 - - (dtucker) [contrib/cygwin/ssh-host-config] Mount the Windows directory - containing the services file explicitely case-insensitive. This allows to - tweak the Windows services file reliably. Patch from vinschen at redhat. - -20100321 - - (djm) OpenBSD CVS Sync - - jmc@cvs.openbsd.org 2010/03/08 09:41:27 - [ssh-keygen.1] - sort the list of constraints (to -O); ok djm - - jmc@cvs.openbsd.org 2010/03/10 07:40:35 - [ssh-keygen.1] - typos; from Ross Richardson - closes prs 6334 and 6335 - - djm@cvs.openbsd.org 2010/03/10 23:27:17 - [auth2-pubkey.c] - correct certificate logging and make it more consistent between - authorized_keys and TrustedCAKeys; ok markus@ - - djm@cvs.openbsd.org 2010/03/12 01:06:25 - [servconf.c] - unbreak AuthorizedKeys option with a $HOME-relative path; reported by - vinschen AT redhat.com, ok dtucker@ - - markus@cvs.openbsd.org 2010/03/12 11:37:40 - [servconf.c] - do not prepend AuthorizedKeysFile with getcwd(), unbreaks relative paths - free() (not xfree()) the buffer returned by getcwd() - - djm@cvs.openbsd.org 2010/03/13 21:10:38 - [clientloop.c] - protocol conformance fix: send language tag when disconnecting normally; - spotted by 1.41421 AT gmail.com, ok markus@ deraadt@ - - djm@cvs.openbsd.org 2010/03/13 21:45:46 - [ssh-keygen.1] - Certificates are named *-cert.pub, not *_cert.pub; committing a diff - from stevesk@ ok me - - jmc@cvs.openbsd.org 2010/03/13 23:38:13 - [ssh-keygen.1] - fix a formatting error (args need quoted); noted by stevesk - - stevesk@cvs.openbsd.org 2010/03/15 19:40:02 - [key.c key.h ssh-keygen.c] - also print certificate type (user or host) for ssh-keygen -L - ok djm kettenis - - stevesk@cvs.openbsd.org 2010/03/16 15:46:52 - [auth-options.c] - spelling in error message. ok djm kettenis - - djm@cvs.openbsd.org 2010/03/16 16:36:49 - [version.h] - crank version to openssh-5.5 since we have a few fixes since 5.4; - requested deraadt@ kettenis@ - - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] - [contrib/suse/openssh.spec] Crank version numbers - -20100314 - - (djm) [ssh-pkcs11-helper.c] Move #ifdef to after #defines to fix - compilation failure when !HAVE_DLOPEN. Reported by felix-mindrot - AT fefe.de - - (djm) [Makefile.in] Respecify -lssh after -lopenbsd-compat for - ssh-pkcs11-helper to repair static builds (we do the same for - ssh-keyscan). Reported by felix-mindrot AT fefe.de - -20100312 - - (tim) [Makefile.in] Now that scard is gone, no need to make $(datadir) - - (tim) [Makefile.in] Add missing $(EXEEXT) to install targets. - Patch from Corinna Vinschen. - - (tim) [contrib/cygwin/Makefile] Fix list of documentation files to install - on a Cygwin installation. Patch from Corinna Vinschen. - -20100311 - - (tim) [contrib/suse/openssh.spec] crank version number here too. - report by imorgan AT nas.nasa.gov - -20100309 - - (dtucker) [configure.ac] Use a proper AC_CHECK_DECL for BROKEN_GETADDRINFO - so setting it in CFLAGS correctly skips IPv6 tests. - -20100428 - - (djm) OpenBSD CVS Sync - - djm@cvs.openbsd.org 2010/03/07 22:16:01 - [ssh-keygen.c] - make internal strptime string match strftime format; - suggested by vinschen AT redhat.com and markus@ - - djm@cvs.openbsd.org 2010/03/08 00:28:55 - [ssh-keygen.1] - document permit-agent-forwarding certificate constraint; patch from - stevesk@ - - djm@cvs.openbsd.org 2010/03/07 22:01:32 - [version.h] - openssh-5.4 - - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] - crank version numbers - - (djm) Release OpenSSH-5.4p1 - -20100307 - - (dtucker) [auth.c] Bug #1710: call setauthdb on AIX before getpwuid so that - it gets the passwd struct from the LAM that knows about the user which is - not necessarily the default. Patch from Alexandre Letourneau. - - (dtucker) [session.c] Bug #1567: move setpcred call to before chroot and - do not set real uid, since that's needed for the chroot, and will be set - by permanently_set_uid. - - (dtucker) [session.c] Also initialize creds to NULL for handing to - setpcred. - - (dtucker) OpenBSD CVS Sync - - dtucker@cvs.openbsd.org 2010/03/07 11:57:13 - [auth-rhosts.c monitor.c monitor_wrap.c session.c auth-options.c sshd.c] - Hold authentication debug messages until after successful authentication. - Fixes an info leak of environment variables specified in authorized_keys, - reported by Jacob Appelbaum. ok djm@ - -20100305 - - OpenBSD CVS Sync - - jmc@cvs.openbsd.org 2010/03/04 12:51:25 - [ssh.1 sshd_config.5] - tweak previous; - - djm@cvs.openbsd.org 2010/03/04 20:35:08 - [ssh-keygen.1 ssh-keygen.c] - Add a -L flag to print the contents of a certificate; ok markus@ - - jmc@cvs.openbsd.org 2010/03/04 22:52:40 - [ssh-keygen.1] - fix Bk/Ek; - - djm@cvs.openbsd.org 2010/03/04 23:17:25 - [sshd_config.5] - missing word; spotted by jmc@ - - djm@cvs.openbsd.org 2010/03/04 23:19:29 - [ssh.1 sshd.8] - move section on CA and revoked keys from ssh.1 to sshd.8's known hosts - format section and rework it a bit; requested by jmc@ - - djm@cvs.openbsd.org 2010/03/04 23:27:25 - [auth-options.c ssh-keygen.c] - "force-command" is not spelled "forced-command"; spotted by - imorgan AT nas.nasa.gov - - djm@cvs.openbsd.org 2010/03/05 02:58:11 - [auth.c] - make the warning for a revoked key louder and more noticable - - jmc@cvs.openbsd.org 2010/03/05 06:50:35 - [ssh.1 sshd.8] - tweak previous; - - jmc@cvs.openbsd.org 2010/03/05 08:31:20 - [ssh.1] - document certificate authentication; help/ok djm - - djm@cvs.openbsd.org 2010/03/05 10:28:21 - [ssh-add.1 ssh.1 ssh_config.5] - mention loading of certificate files from [private]-cert.pub when - they are present; feedback and ok jmc@ - - (tim) [ssh-pkcs11.c] Fix "non-constant initializer" errors in older - compilers. OK djm@ - - (djm) [ssh-rand-helper.c] declare optind, avoiding compilation failure - on some platforms - - (djm) [configure.ac] set -fno-strict-aliasing for gcc4; ok dtucker@ - -20100304 - - (djm) [ssh-keygen.c] Use correct local variable, instead of - maybe-undefined global "optarg" - - (djm) [contrib/redhat/openssh.spec] Replace obsolete BuildPreReq - on XFree86-devel with neutral /usr/include/X11/Xlib.h; - imorgan AT nas.nasa.gov in bz#1731 - - (djm) [.cvsignore] Ignore ssh-pkcs11-helper - - (djm) [regress/Makefile] Cleanup sshd_proxy_orig - - OpenBSD CVS Sync - - djm@cvs.openbsd.org 2010/03/03 01:44:36 - [auth-options.c key.c] - reject strings with embedded ASCII nul chars in certificate key IDs, - principal names and constraints - - djm@cvs.openbsd.org 2010/03/03 22:49:50 - [sshd.8] - the authorized_keys option for CA keys is "cert-authority", not - "from=cert-authority". spotted by imorgan AT nas.nasa.gov - - djm@cvs.openbsd.org 2010/03/03 22:50:40 - [PROTOCOL.certkeys] - s/similar same/similar/; from imorgan AT nas.nasa.gov - - djm@cvs.openbsd.org 2010/03/04 01:44:57 - [key.c] - use buffer_get_string_ptr_ret() where we are checking the return - value explicitly instead of the fatal()-causing buffer_get_string_ptr() - - djm@cvs.openbsd.org 2010/03/04 10:36:03 - [auth-rh-rsa.c auth-rsa.c auth.c auth.h auth2-hostbased.c auth2-pubkey.c] - [authfile.c authfile.h hostfile.c hostfile.h servconf.c servconf.h] - [ssh-keygen.c ssh.1 sshconnect.c sshd_config.5] - Add a TrustedUserCAKeys option to sshd_config to specify CA keys that - are trusted to authenticate users (in addition than doing it per-user - in authorized_keys). - - Add a RevokedKeys option to sshd_config and a @revoked marker to - known_hosts to allow keys to me revoked and banned for user or host - authentication. - - feedback and ok markus@ - - djm@cvs.openbsd.org 2010/03/03 00:47:23 - [regress/cert-hostkey.sh regress/cert-userkey.sh] - add an extra test to ensure that authentication with the wrong - certificate fails as it should (and it does) - - djm@cvs.openbsd.org 2010/03/04 10:38:23 - [regress/cert-hostkey.sh regress/cert-userkey.sh] - additional regression tests for revoked keys and TrustedUserCAKeys - -20100303 - - (djm) [PROTOCOL.certkeys] Add RCS Ident - - OpenBSD CVS Sync - - jmc@cvs.openbsd.org 2010/02/26 22:09:28 - [ssh-keygen.1 ssh.1 sshd.8] - tweak previous; - - otto@cvs.openbsd.org 2010/03/01 11:07:06 - [ssh-add.c] - zap what seems to be a left-over debug message; ok markus@ - - djm@cvs.openbsd.org 2010/03/02 23:20:57 - [ssh-keygen.c] - POSIX strptime is stricter than OpenBSD's so do a little dance to - appease it. - - (djm) [regress/cert-userkey.sh] s/echo -n/echon/ here too - -20100302 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed May 4 08:21:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C931B1065672; Wed, 4 May 2011 08:21:24 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8E528FC12; Wed, 4 May 2011 08:21:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p448LOi2037472; Wed, 4 May 2011 08:21:24 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p448LOoN037471; Wed, 4 May 2011 08:21:24 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105040821.p448LOoN037471@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 08:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221421 - vendor/v4l/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 08:21:24 -0000 Author: netchild Date: Wed May 4 08:21:24 2011 New Revision: 221421 URL: http://svn.freebsd.org/changeset/base/221421 Log: Add the v4l2 header now that we have an use case for it. Added: vendor/v4l/dist/videodev2.h (contents, props changed) Added: vendor/v4l/dist/videodev2.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/v4l/dist/videodev2.h Wed May 4 08:21:24 2011 (r221421) @@ -0,0 +1,1164 @@ +#ifndef __LINUX_VIDEODEV2_H +#define __LINUX_VIDEODEV2_H +/* + * Video for Linux Two + * + * Header file for v4l or V4L2 drivers and applications, for + * Linux kernels 2.2.x or 2.4.x. + * + * See http://bytesex.org/v4l/ for API specs and other + * v4l2 documentation. + * + * Author: Bill Dirks + * Justin Schoeman + * et al. + */ +#ifdef __KERNEL__ +#include /* need struct timeval */ +#include +#include +#include +#endif +#include /* need __user */ + + +#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ +#define HAVE_V4L2 1 + +/* + * Common stuff for both V4L1 and V4L2 + * Moved from videodev.h + */ + +#define VIDEO_MAX_FRAME 32 + +#define VID_TYPE_CAPTURE 1 /* Can capture */ +#define VID_TYPE_TUNER 2 /* Can tune */ +#define VID_TYPE_TELETEXT 4 /* Does teletext */ +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ +#define VID_TYPE_CLIPPING 32 /* Can clip */ +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ +#define VID_TYPE_SCALES 128 /* Scalable */ +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ + +#ifdef __KERNEL__ + +/* Minor device allocation */ +#define MINOR_VFL_TYPE_GRABBER_MIN 0 +#define MINOR_VFL_TYPE_GRABBER_MAX 63 +#define MINOR_VFL_TYPE_RADIO_MIN 64 +#define MINOR_VFL_TYPE_RADIO_MAX 127 +#define MINOR_VFL_TYPE_VTX_MIN 192 +#define MINOR_VFL_TYPE_VTX_MAX 223 +#define MINOR_VFL_TYPE_VBI_MIN 224 +#define MINOR_VFL_TYPE_VBI_MAX 255 + +#define VFL_TYPE_GRABBER 0 +#define VFL_TYPE_VBI 1 +#define VFL_TYPE_RADIO 2 +#define VFL_TYPE_VTX 3 + +struct video_device +{ + /* device info */ + struct device *dev; + char name[32]; + int type; /* v4l1 */ + int type2; /* v4l2 */ + int hardware; + int minor; + + /* device ops + callbacks */ + const struct file_operations *fops; + void (*release)(struct video_device *vfd); + + +#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ + /* obsolete -- fops->owner is used instead */ + struct module *owner; + /* dev->driver_data will be used instead some day. + * Use the video_{get|set}_drvdata() helper functions, + * so the switch over will be transparent for you. + * Or use {pci|usb}_{get|set}_drvdata() directly. */ + void *priv; +#endif + + /* for videodev.c intenal usage -- please don't touch */ + int users; /* video_exclusive_{open|close} ... */ + struct mutex lock; /* ... helper function uses these */ + char devfs_name[64]; /* devfs */ + struct class_device class_dev; /* sysfs */ +}; + +#define VIDEO_MAJOR 81 + +extern int video_register_device(struct video_device *, int type, int nr); +extern void video_unregister_device(struct video_device *); +extern int video_usercopy(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg, + int (*func)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg)); + +/* helper functions to alloc / release struct video_device, the + later can be used for video_device->release() */ +struct video_device *video_device_alloc(void); +void video_device_release(struct video_device *vfd); + +#endif + +/* + * M I S C E L L A N E O U S + */ + +/* Four-character-code (FOURCC) */ +#define v4l2_fourcc(a,b,c,d)\ + (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) + +/* + * E N U M S + */ +enum v4l2_field { + V4L2_FIELD_ANY = 0, /* driver can choose from none, + top, bottom, interlaced + depending on whatever it thinks + is approximate ... */ + V4L2_FIELD_NONE = 1, /* this device has no fields ... */ + V4L2_FIELD_TOP = 2, /* top field only */ + V4L2_FIELD_BOTTOM = 3, /* bottom field only */ + V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */ + V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one + buffer, top-bottom order */ + V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */ + V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into + separate buffers */ +}; +#define V4L2_FIELD_HAS_TOP(field) \ + ((field) == V4L2_FIELD_TOP ||\ + (field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_BOTTOM(field) \ + ((field) == V4L2_FIELD_BOTTOM ||\ + (field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_BOTH(field) \ + ((field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) + +enum v4l2_buf_type { + V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, + V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, + V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, + V4L2_BUF_TYPE_VBI_CAPTURE = 4, + V4L2_BUF_TYPE_VBI_OUTPUT = 5, +#if 1 + /* Experimental Sliced VBI */ + V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, + V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, +#endif + V4L2_BUF_TYPE_PRIVATE = 0x80, +}; + +enum v4l2_ctrl_type { + V4L2_CTRL_TYPE_INTEGER = 1, + V4L2_CTRL_TYPE_BOOLEAN = 2, + V4L2_CTRL_TYPE_MENU = 3, + V4L2_CTRL_TYPE_BUTTON = 4, +}; + +enum v4l2_tuner_type { + V4L2_TUNER_RADIO = 1, + V4L2_TUNER_ANALOG_TV = 2, + V4L2_TUNER_DIGITAL_TV = 3, +}; + +enum v4l2_memory { + V4L2_MEMORY_MMAP = 1, + V4L2_MEMORY_USERPTR = 2, + V4L2_MEMORY_OVERLAY = 3, +}; + +/* see also http://vektor.theorem.ca/graphics/ycbcr/ */ +enum v4l2_colorspace { + /* ITU-R 601 -- broadcast NTSC/PAL */ + V4L2_COLORSPACE_SMPTE170M = 1, + + /* 1125-Line (US) HDTV */ + V4L2_COLORSPACE_SMPTE240M = 2, + + /* HD and modern captures. */ + V4L2_COLORSPACE_REC709 = 3, + + /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ + V4L2_COLORSPACE_BT878 = 4, + + /* These should be useful. Assume 601 extents. */ + V4L2_COLORSPACE_470_SYSTEM_M = 5, + V4L2_COLORSPACE_470_SYSTEM_BG = 6, + + /* I know there will be cameras that send this. So, this is + * unspecified chromaticities and full 0-255 on each of the + * Y'CbCr components + */ + V4L2_COLORSPACE_JPEG = 7, + + /* For RGB colourspaces, this is probably a good start. */ + V4L2_COLORSPACE_SRGB = 8, +}; + +enum v4l2_priority { + V4L2_PRIORITY_UNSET = 0, /* not initialized */ + V4L2_PRIORITY_BACKGROUND = 1, + V4L2_PRIORITY_INTERACTIVE = 2, + V4L2_PRIORITY_RECORD = 3, + V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE, +}; + +struct v4l2_rect { + __s32 left; + __s32 top; + __s32 width; + __s32 height; +}; + +struct v4l2_fract { + __u32 numerator; + __u32 denominator; +}; + +/* + * D R I V E R C A P A B I L I T I E S + */ +struct v4l2_capability +{ + __u8 driver[16]; /* i.e. "bttv" */ + __u8 card[32]; /* i.e. "Hauppauge WinTV" */ + __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ + __u32 version; /* should use KERNEL_VERSION() */ + __u32 capabilities; /* Device capabilities */ + __u32 reserved[4]; +}; + +/* Values for 'capabilities' field */ +#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ +#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ +#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ +#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ +#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ +#if 1 +#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ +#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ +#endif +#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ + +#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ +#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ +#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ + +#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ +#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ +#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ + +/* + * V I D E O I M A G E F O R M A T + */ + +struct v4l2_pix_format +{ + __u32 width; + __u32 height; + __u32 pixelformat; + enum v4l2_field field; + __u32 bytesperline; /* for padding, zero if unused */ + __u32 sizeimage; + enum v4l2_colorspace colorspace; + __u32 priv; /* private data, depends on pixelformat */ +}; + +/* Pixel format FOURCC depth Description */ +#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ +#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ +#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ +#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ +#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R') /* 16 RGB-5-6-5 BE */ +#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3') /* 24 BGR-8-8-8 */ +#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3') /* 24 RGB-8-8-8 */ +#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ +#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ +#define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ +#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ +#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ +#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ +#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ +#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ + +/* two planes -- one Y, one Cr + Cb interleaved */ +#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* 12 Y/CbCr 4:2:0 */ +#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1') /* 12 Y/CrCb 4:2:0 */ + +/* The following formats are not defined in the V4L2 specification */ +#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9') /* 9 YUV 4:1:0 */ +#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ +#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ + +/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ +#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ + +/* compressed formats */ +#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ +#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ +#define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ +#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG */ + +/* Vendor-specific formats */ +#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ +#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ +#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ +#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ +#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ + +/* + * F O R M A T E N U M E R A T I O N + */ +struct v4l2_fmtdesc +{ + __u32 index; /* Format number */ + enum v4l2_buf_type type; /* buffer type */ + __u32 flags; + __u8 description[32]; /* Description string */ + __u32 pixelformat; /* Format fourcc */ + __u32 reserved[4]; +}; + +#define V4L2_FMT_FLAG_COMPRESSED 0x0001 + + +/* + * T I M E C O D E + */ +struct v4l2_timecode +{ + __u32 type; + __u32 flags; + __u8 frames; + __u8 seconds; + __u8 minutes; + __u8 hours; + __u8 userbits[4]; +}; + +/* Type */ +#define V4L2_TC_TYPE_24FPS 1 +#define V4L2_TC_TYPE_25FPS 2 +#define V4L2_TC_TYPE_30FPS 3 +#define V4L2_TC_TYPE_50FPS 4 +#define V4L2_TC_TYPE_60FPS 5 + +/* Flags */ +#define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */ +#define V4L2_TC_FLAG_COLORFRAME 0x0002 +#define V4L2_TC_USERBITS_field 0x000C +#define V4L2_TC_USERBITS_USERDEFINED 0x0000 +#define V4L2_TC_USERBITS_8BITCHARS 0x0008 +/* The above is based on SMPTE timecodes */ + + +/* + * M P E G C O M P R E S S I O N P A R A M E T E R S + * + * ### WARNING: this is still work-in-progress right now, most likely + * ### there will be some incompatible changes. + * + */ + + +enum v4l2_bitrate_mode { + V4L2_BITRATE_NONE = 0, /* not specified */ + V4L2_BITRATE_CBR, /* constant bitrate */ + V4L2_BITRATE_VBR, /* variable bitrate */ +}; +struct v4l2_bitrate { + /* rates are specified in kbit/sec */ + enum v4l2_bitrate_mode mode; + __u32 min; + __u32 target; /* use this one for CBR */ + __u32 max; +}; + +enum v4l2_mpeg_streamtype { + V4L2_MPEG_SS_1, /* MPEG-1 system stream */ + V4L2_MPEG_PS_2, /* MPEG-2 program stream */ + V4L2_MPEG_TS_2, /* MPEG-2 transport stream */ + V4L2_MPEG_PS_DVD, /* MPEG-2 program stream with DVD header fixups */ +}; +enum v4l2_mpeg_audiotype { + V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */ + V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */ + V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */ + V4L2_MPEG_AC3, /* AC3 */ + V4L2_MPEG_LPCM, /* LPCM */ +}; +enum v4l2_mpeg_videotype { + V4L2_MPEG_VI_1, /* MPEG-1 */ + V4L2_MPEG_VI_2, /* MPEG-2 */ +}; +enum v4l2_mpeg_aspectratio { + V4L2_MPEG_ASPECT_SQUARE = 1, /* square pixel */ + V4L2_MPEG_ASPECT_4_3 = 2, /* 4 : 3 */ + V4L2_MPEG_ASPECT_16_9 = 3, /* 16 : 9 */ + V4L2_MPEG_ASPECT_1_221 = 4, /* 1 : 2,21 */ +}; + +struct v4l2_mpeg_compression { + /* general */ + enum v4l2_mpeg_streamtype st_type; + struct v4l2_bitrate st_bitrate; + + /* transport streams */ + __u16 ts_pid_pmt; + __u16 ts_pid_audio; + __u16 ts_pid_video; + __u16 ts_pid_pcr; + + /* program stream */ + __u16 ps_size; + __u16 reserved_1; /* align */ + + /* audio */ + enum v4l2_mpeg_audiotype au_type; + struct v4l2_bitrate au_bitrate; + __u32 au_sample_rate; + __u8 au_pesid; + __u8 reserved_2[3]; /* align */ + + /* video */ + enum v4l2_mpeg_videotype vi_type; + enum v4l2_mpeg_aspectratio vi_aspect_ratio; + struct v4l2_bitrate vi_bitrate; + __u32 vi_frame_rate; + __u16 vi_frames_per_gop; + __u16 vi_bframes_count; + __u8 vi_pesid; + __u8 reserved_3[3]; /* align */ + + /* misc flags */ + __u32 closed_gops:1; + __u32 pulldown:1; + __u32 reserved_4:30; /* align */ + + /* I don't expect the above being perfect yet ;) */ + __u32 reserved_5[8]; +}; + +struct v4l2_jpegcompression +{ + int quality; + + int APPn; /* Number of APP segment to be written, + * must be 0..15 */ + int APP_len; /* Length of data in JPEG APPn segment */ + char APP_data[60]; /* Data in the JPEG APPn segment. */ + + int COM_len; /* Length of data in JPEG COM segment */ + char COM_data[60]; /* Data in JPEG COM segment */ + + __u32 jpeg_markers; /* Which markers should go into the JPEG + * output. Unless you exactly know what + * you do, leave them untouched. + * Inluding less markers will make the + * resulting code smaller, but there will + * be fewer aplications which can read it. + * The presence of the APP and COM marker + * is influenced by APP_len and COM_len + * ONLY, not by this property! */ + +#define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ +#define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ +#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ +#define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */ +#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will + * allways use APP0 */ +}; + + +/* + * M E M O R Y - M A P P I N G B U F F E R S + */ +struct v4l2_requestbuffers +{ + __u32 count; + enum v4l2_buf_type type; + enum v4l2_memory memory; + __u32 reserved[2]; +}; + +struct v4l2_buffer +{ + __u32 index; + enum v4l2_buf_type type; + __u32 bytesused; + __u32 flags; + enum v4l2_field field; + struct timeval timestamp; + struct v4l2_timecode timecode; + __u32 sequence; + + /* memory location */ + enum v4l2_memory memory; + union { + __u32 offset; + unsigned long userptr; + } m; + __u32 length; + __u32 input; + __u32 reserved; +}; + +/* Flags for 'flags' field */ +#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */ +#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */ +#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */ +#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ +#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ +#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ +#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ +#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ + +/* + * O V E R L A Y P R E V I E W + */ +struct v4l2_framebuffer +{ + __u32 capability; + __u32 flags; +/* FIXME: in theory we should pass something like PCI device + memory + * region + offset instead of some physical address */ + void* base; + struct v4l2_pix_format fmt; +}; +/* Flags for the 'capability' field. Read only */ +#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 +#define V4L2_FBUF_CAP_CHROMAKEY 0x0002 +#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 +#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 +/* Flags for the 'flags' field. */ +#define V4L2_FBUF_FLAG_PRIMARY 0x0001 +#define V4L2_FBUF_FLAG_OVERLAY 0x0002 +#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 + +struct v4l2_clip +{ + struct v4l2_rect c; + struct v4l2_clip __user *next; +}; + +struct v4l2_window +{ + struct v4l2_rect w; + enum v4l2_field field; + __u32 chromakey; + struct v4l2_clip __user *clips; + __u32 clipcount; + void __user *bitmap; +}; + + +/* + * C A P T U R E P A R A M E T E R S + */ +struct v4l2_captureparm +{ + __u32 capability; /* Supported modes */ + __u32 capturemode; /* Current mode */ + struct v4l2_fract timeperframe; /* Time per frame in .1us units */ + __u32 extendedmode; /* Driver-specific extensions */ + __u32 readbuffers; /* # of buffers for read */ + __u32 reserved[4]; +}; +/* Flags for 'capability' and 'capturemode' fields */ +#define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ +#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ + +struct v4l2_outputparm +{ + __u32 capability; /* Supported modes */ + __u32 outputmode; /* Current mode */ + struct v4l2_fract timeperframe; /* Time per frame in seconds */ + __u32 extendedmode; /* Driver-specific extensions */ + __u32 writebuffers; /* # of buffers for write */ + __u32 reserved[4]; +}; + +/* + * I N P U T I M A G E C R O P P I N G + */ + +struct v4l2_cropcap { + enum v4l2_buf_type type; + struct v4l2_rect bounds; + struct v4l2_rect defrect; + struct v4l2_fract pixelaspect; +}; + +struct v4l2_crop { + enum v4l2_buf_type type; + struct v4l2_rect c; +}; + +/* + * A N A L O G V I D E O S T A N D A R D + */ + +typedef __u64 v4l2_std_id; + +/* one bit for each */ +#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) +#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002) +#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004) +#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008) +#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010) +#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020) +#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040) +#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080) + +#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100) +#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200) +#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400) +#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800) + +#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) +#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) +#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) +#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) + +#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) +#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) +#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000) +#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000) +#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000) +#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000) +#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000) +#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000) + +/* ATSC/HDTV */ +#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) +#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) + +/* some merged standards */ +#define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) +#define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) +#define V4L2_STD_GH (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H) +#define V4L2_STD_DK (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK) + +/* some common needed stuff */ +#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\ + V4L2_STD_PAL_B1 |\ + V4L2_STD_PAL_G) +#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\ + V4L2_STD_PAL_D1 |\ + V4L2_STD_PAL_K) +#define V4L2_STD_PAL (V4L2_STD_PAL_BG |\ + V4L2_STD_PAL_DK |\ + V4L2_STD_PAL_H |\ + V4L2_STD_PAL_I) +#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ + V4L2_STD_NTSC_M_JP |\ + V4L2_STD_NTSC_M_KR) +#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ + V4L2_STD_SECAM_K |\ + V4L2_STD_SECAM_K1) +#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ + V4L2_STD_SECAM_G |\ + V4L2_STD_SECAM_H |\ + V4L2_STD_SECAM_DK |\ + V4L2_STD_SECAM_L |\ + V4L2_STD_SECAM_LC) + +#define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ + V4L2_STD_PAL_60 |\ + V4L2_STD_NTSC |\ + V4L2_STD_NTSC_443) +#define V4L2_STD_625_50 (V4L2_STD_PAL |\ + V4L2_STD_PAL_N |\ + V4L2_STD_PAL_Nc |\ + V4L2_STD_SECAM) +#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ + V4L2_STD_ATSC_16_VSB) + +#define V4L2_STD_UNKNOWN 0 +#define V4L2_STD_ALL (V4L2_STD_525_60 |\ + V4L2_STD_625_50) + +struct v4l2_standard +{ + __u32 index; + v4l2_std_id id; + __u8 name[24]; + struct v4l2_fract frameperiod; /* Frames, not fields */ + __u32 framelines; + __u32 reserved[4]; +}; + + +/* + * V I D E O I N P U T S + */ +struct v4l2_input +{ + __u32 index; /* Which input */ + __u8 name[32]; /* Label */ + __u32 type; /* Type of input */ + __u32 audioset; /* Associated audios (bitfield) */ + __u32 tuner; /* Associated tuner */ + v4l2_std_id std; + __u32 status; + __u32 reserved[4]; +}; +/* Values for the 'type' field */ +#define V4L2_INPUT_TYPE_TUNER 1 +#define V4L2_INPUT_TYPE_CAMERA 2 + +/* field 'status' - general */ +#define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */ +#define V4L2_IN_ST_NO_SIGNAL 0x00000002 +#define V4L2_IN_ST_NO_COLOR 0x00000004 + +/* field 'status' - analog */ +#define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */ +#define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */ + +/* field 'status' - digital */ +#define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */ +#define V4L2_IN_ST_NO_EQU 0x00020000 /* No equalizer lock */ +#define V4L2_IN_ST_NO_CARRIER 0x00040000 /* Carrier recovery failed */ + +/* field 'status' - VCR and set-top box */ +#define V4L2_IN_ST_MACROVISION 0x01000000 /* Macrovision detected */ +#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ +#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ + +/* + * V I D E O O U T P U T S + */ +struct v4l2_output +{ + __u32 index; /* Which output */ + __u8 name[32]; /* Label */ + __u32 type; /* Type of output */ + __u32 audioset; /* Associated audios (bitfield) */ + __u32 modulator; /* Associated modulator */ + v4l2_std_id std; + __u32 reserved[4]; +}; +/* Values for the 'type' field */ +#define V4L2_OUTPUT_TYPE_MODULATOR 1 +#define V4L2_OUTPUT_TYPE_ANALOG 2 +#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 + +/* + * C O N T R O L S + */ +struct v4l2_control +{ + __u32 id; + __s32 value; +}; + +/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ +struct v4l2_queryctrl +{ + __u32 id; + enum v4l2_ctrl_type type; + __u8 name[32]; /* Whatever */ + __s32 minimum; /* Note signedness */ + __s32 maximum; + __s32 step; + __s32 default_value; + __u32 flags; + __u32 reserved[2]; +}; + +/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ +struct v4l2_querymenu +{ + __u32 id; + __u32 index; + __u8 name[32]; /* Whatever */ + __u32 reserved; +}; + +/* Control flags */ +#define V4L2_CTRL_FLAG_DISABLED 0x0001 +#define V4L2_CTRL_FLAG_GRABBED 0x0002 + +/* Control IDs defined by V4L2 */ +#define V4L2_CID_BASE 0x00980900 +/* IDs reserved for driver specific controls */ +#define V4L2_CID_PRIVATE_BASE 0x08000000 + +#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) +#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) +#define V4L2_CID_SATURATION (V4L2_CID_BASE+2) +#define V4L2_CID_HUE (V4L2_CID_BASE+3) +#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) +#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) +#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) +#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) +#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) +#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) +#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) +#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) +#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) +#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) +#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) +#define V4L2_CID_GAMMA (V4L2_CID_BASE+16) +#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* ? Not sure */ +#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) +#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) +#define V4L2_CID_GAIN (V4L2_CID_BASE+19) +#define V4L2_CID_HFLIP (V4L2_CID_BASE+20) +#define V4L2_CID_VFLIP (V4L2_CID_BASE+21) +#define V4L2_CID_HCENTER (V4L2_CID_BASE+22) +#define V4L2_CID_VCENTER (V4L2_CID_BASE+23) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ + +/* + * T U N I N G + */ +struct v4l2_tuner +{ + __u32 index; + __u8 name[32]; + enum v4l2_tuner_type type; + __u32 capability; + __u32 rangelow; + __u32 rangehigh; + __u32 rxsubchans; + __u32 audmode; + __s32 signal; + __s32 afc; + __u32 reserved[4]; +}; + +struct v4l2_modulator +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 rangelow; + __u32 rangehigh; + __u32 txsubchans; + __u32 reserved[4]; +}; + +/* Flags for the 'capability' field */ +#define V4L2_TUNER_CAP_LOW 0x0001 +#define V4L2_TUNER_CAP_NORM 0x0002 +#define V4L2_TUNER_CAP_STEREO 0x0010 +#define V4L2_TUNER_CAP_LANG2 0x0020 +#define V4L2_TUNER_CAP_SAP 0x0020 +#define V4L2_TUNER_CAP_LANG1 0x0040 + +/* Flags for the 'rxsubchans' field */ +#define V4L2_TUNER_SUB_MONO 0x0001 +#define V4L2_TUNER_SUB_STEREO 0x0002 +#define V4L2_TUNER_SUB_LANG2 0x0004 +#define V4L2_TUNER_SUB_SAP 0x0004 +#define V4L2_TUNER_SUB_LANG1 0x0008 + +/* Values for the 'audmode' field */ +#define V4L2_TUNER_MODE_MONO 0x0000 +#define V4L2_TUNER_MODE_STEREO 0x0001 +#define V4L2_TUNER_MODE_LANG2 0x0002 +#define V4L2_TUNER_MODE_SAP 0x0002 +#define V4L2_TUNER_MODE_LANG1 0x0003 +#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 + +struct v4l2_frequency +{ + __u32 tuner; + enum v4l2_tuner_type type; + __u32 frequency; + __u32 reserved[8]; +}; + +/* + * A U D I O + */ +struct v4l2_audio +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 mode; + __u32 reserved[2]; +}; +/* Flags for the 'capability' field */ +#define V4L2_AUDCAP_STEREO 0x00001 +#define V4L2_AUDCAP_AVL 0x00002 + +/* Flags for the 'mode' field */ +#define V4L2_AUDMODE_AVL 0x00001 + +struct v4l2_audioout +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 mode; + __u32 reserved[2]; +}; + +/* + * D A T A S E R V I C E S ( V B I ) + * + * Data services API by Michael Schimek + */ + +/* Raw VBI */ + +struct v4l2_vbi_format +{ + __u32 sampling_rate; /* in 1 Hz */ + __u32 offset; + __u32 samples_per_line; + __u32 sample_format; /* V4L2_PIX_FMT_* */ + __s32 start[2]; + __u32 count[2]; + __u32 flags; /* V4L2_VBI_* */ + __u32 reserved[2]; /* must be zero */ +}; + +/* VBI flags */ +#define V4L2_VBI_UNSYNC (1<< 0) +#define V4L2_VBI_INTERLACED (1<< 1) + +#if 1 +/* Sliced VBI + * + * This implements is a proposal V4L2 API to allow SLICED VBI + * required for some hardware encoders. It should change without + * notice in the definitive implementation. + */ + +struct v4l2_sliced_vbi_format +{ + __u16 service_set; + /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field + service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field + (equals frame lines 313-336 for 625 line video + standards, 263-286 for 525 line standards) */ + __u16 service_lines[2][24]; + __u32 io_size; + __u32 reserved[2]; /* must be zero */ +}; + +/* Teletext World System Teletext + (WST), defined on ITU-R BT.653-2 */ +#define V4L2_SLICED_TELETEXT_B (0x0001) +/* Video Program System, defined on ETS 300 231*/ +#define V4L2_SLICED_VPS (0x0400) +/* Closed Caption, defined on EIA-608 */ +#define V4L2_SLICED_CAPTION_525 (0x1000) +/* Wide Screen System, defined on ITU-R BT1119.1 */ +#define V4L2_SLICED_WSS_625 (0x4000) + +#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) +#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) + + +struct v4l2_sliced_vbi_cap +{ + __u16 service_set; + /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field + service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field + (equals frame lines 313-336 for 625 line video + standards, 263-286 for 525 line standards) */ + __u16 service_lines[2][24]; + __u32 reserved[4]; /* must be 0 */ +}; + +struct v4l2_sliced_vbi_data +{ + __u32 id; + __u32 field; /* 0: first field, 1: second field */ + __u32 line; /* 1-23 */ + __u32 reserved; /* must be 0 */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed May 4 08:22:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C2C3106564A; Wed, 4 May 2011 08:22:58 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BBBC8FC12; Wed, 4 May 2011 08:22:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p448MwRX037560; Wed, 4 May 2011 08:22:58 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p448MwK2037559; Wed, 4 May 2011 08:22:58 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105040822.p448MwK2037559@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 08:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221422 - vendor/v4l/2.6.17 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 08:22:58 -0000 Author: netchild Date: Wed May 4 08:22:58 2011 New Revision: 221422 URL: http://svn.freebsd.org/changeset/base/221422 Log: Tag the v4l2 header with the linux kernel version where I took it from. Added: vendor/v4l/2.6.17/videodev2.h - copied unchanged from r221421, vendor/v4l/dist/videodev2.h Copied: vendor/v4l/2.6.17/videodev2.h (from r221421, vendor/v4l/dist/videodev2.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/v4l/2.6.17/videodev2.h Wed May 4 08:22:58 2011 (r221422, copy of r221421, vendor/v4l/dist/videodev2.h) @@ -0,0 +1,1164 @@ +#ifndef __LINUX_VIDEODEV2_H +#define __LINUX_VIDEODEV2_H +/* + * Video for Linux Two + * + * Header file for v4l or V4L2 drivers and applications, for + * Linux kernels 2.2.x or 2.4.x. + * + * See http://bytesex.org/v4l/ for API specs and other + * v4l2 documentation. + * + * Author: Bill Dirks + * Justin Schoeman + * et al. + */ +#ifdef __KERNEL__ +#include /* need struct timeval */ +#include +#include +#include +#endif +#include /* need __user */ + + +#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ +#define HAVE_V4L2 1 + +/* + * Common stuff for both V4L1 and V4L2 + * Moved from videodev.h + */ + +#define VIDEO_MAX_FRAME 32 + +#define VID_TYPE_CAPTURE 1 /* Can capture */ +#define VID_TYPE_TUNER 2 /* Can tune */ +#define VID_TYPE_TELETEXT 4 /* Does teletext */ +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ +#define VID_TYPE_CLIPPING 32 /* Can clip */ +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ +#define VID_TYPE_SCALES 128 /* Scalable */ +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ + +#ifdef __KERNEL__ + +/* Minor device allocation */ +#define MINOR_VFL_TYPE_GRABBER_MIN 0 +#define MINOR_VFL_TYPE_GRABBER_MAX 63 +#define MINOR_VFL_TYPE_RADIO_MIN 64 +#define MINOR_VFL_TYPE_RADIO_MAX 127 +#define MINOR_VFL_TYPE_VTX_MIN 192 +#define MINOR_VFL_TYPE_VTX_MAX 223 +#define MINOR_VFL_TYPE_VBI_MIN 224 +#define MINOR_VFL_TYPE_VBI_MAX 255 + +#define VFL_TYPE_GRABBER 0 +#define VFL_TYPE_VBI 1 +#define VFL_TYPE_RADIO 2 +#define VFL_TYPE_VTX 3 + +struct video_device +{ + /* device info */ + struct device *dev; + char name[32]; + int type; /* v4l1 */ + int type2; /* v4l2 */ + int hardware; + int minor; + + /* device ops + callbacks */ + const struct file_operations *fops; + void (*release)(struct video_device *vfd); + + +#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ + /* obsolete -- fops->owner is used instead */ + struct module *owner; + /* dev->driver_data will be used instead some day. + * Use the video_{get|set}_drvdata() helper functions, + * so the switch over will be transparent for you. + * Or use {pci|usb}_{get|set}_drvdata() directly. */ + void *priv; +#endif + + /* for videodev.c intenal usage -- please don't touch */ + int users; /* video_exclusive_{open|close} ... */ + struct mutex lock; /* ... helper function uses these */ + char devfs_name[64]; /* devfs */ + struct class_device class_dev; /* sysfs */ +}; + +#define VIDEO_MAJOR 81 + +extern int video_register_device(struct video_device *, int type, int nr); +extern void video_unregister_device(struct video_device *); +extern int video_usercopy(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg, + int (*func)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg)); + +/* helper functions to alloc / release struct video_device, the + later can be used for video_device->release() */ +struct video_device *video_device_alloc(void); +void video_device_release(struct video_device *vfd); + +#endif + +/* + * M I S C E L L A N E O U S + */ + +/* Four-character-code (FOURCC) */ +#define v4l2_fourcc(a,b,c,d)\ + (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) + +/* + * E N U M S + */ +enum v4l2_field { + V4L2_FIELD_ANY = 0, /* driver can choose from none, + top, bottom, interlaced + depending on whatever it thinks + is approximate ... */ + V4L2_FIELD_NONE = 1, /* this device has no fields ... */ + V4L2_FIELD_TOP = 2, /* top field only */ + V4L2_FIELD_BOTTOM = 3, /* bottom field only */ + V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */ + V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one + buffer, top-bottom order */ + V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */ + V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into + separate buffers */ +}; +#define V4L2_FIELD_HAS_TOP(field) \ + ((field) == V4L2_FIELD_TOP ||\ + (field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_BOTTOM(field) \ + ((field) == V4L2_FIELD_BOTTOM ||\ + (field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_BOTH(field) \ + ((field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) + +enum v4l2_buf_type { + V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, + V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, + V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, + V4L2_BUF_TYPE_VBI_CAPTURE = 4, + V4L2_BUF_TYPE_VBI_OUTPUT = 5, +#if 1 + /* Experimental Sliced VBI */ + V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, + V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, +#endif + V4L2_BUF_TYPE_PRIVATE = 0x80, +}; + +enum v4l2_ctrl_type { + V4L2_CTRL_TYPE_INTEGER = 1, + V4L2_CTRL_TYPE_BOOLEAN = 2, + V4L2_CTRL_TYPE_MENU = 3, + V4L2_CTRL_TYPE_BUTTON = 4, +}; + +enum v4l2_tuner_type { + V4L2_TUNER_RADIO = 1, + V4L2_TUNER_ANALOG_TV = 2, + V4L2_TUNER_DIGITAL_TV = 3, +}; + +enum v4l2_memory { + V4L2_MEMORY_MMAP = 1, + V4L2_MEMORY_USERPTR = 2, + V4L2_MEMORY_OVERLAY = 3, +}; + +/* see also http://vektor.theorem.ca/graphics/ycbcr/ */ +enum v4l2_colorspace { + /* ITU-R 601 -- broadcast NTSC/PAL */ + V4L2_COLORSPACE_SMPTE170M = 1, + + /* 1125-Line (US) HDTV */ + V4L2_COLORSPACE_SMPTE240M = 2, + + /* HD and modern captures. */ + V4L2_COLORSPACE_REC709 = 3, + + /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ + V4L2_COLORSPACE_BT878 = 4, + + /* These should be useful. Assume 601 extents. */ + V4L2_COLORSPACE_470_SYSTEM_M = 5, + V4L2_COLORSPACE_470_SYSTEM_BG = 6, + + /* I know there will be cameras that send this. So, this is + * unspecified chromaticities and full 0-255 on each of the + * Y'CbCr components + */ + V4L2_COLORSPACE_JPEG = 7, + + /* For RGB colourspaces, this is probably a good start. */ + V4L2_COLORSPACE_SRGB = 8, +}; + +enum v4l2_priority { + V4L2_PRIORITY_UNSET = 0, /* not initialized */ + V4L2_PRIORITY_BACKGROUND = 1, + V4L2_PRIORITY_INTERACTIVE = 2, + V4L2_PRIORITY_RECORD = 3, + V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE, +}; + +struct v4l2_rect { + __s32 left; + __s32 top; + __s32 width; + __s32 height; +}; + +struct v4l2_fract { + __u32 numerator; + __u32 denominator; +}; + +/* + * D R I V E R C A P A B I L I T I E S + */ +struct v4l2_capability +{ + __u8 driver[16]; /* i.e. "bttv" */ + __u8 card[32]; /* i.e. "Hauppauge WinTV" */ + __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ + __u32 version; /* should use KERNEL_VERSION() */ + __u32 capabilities; /* Device capabilities */ + __u32 reserved[4]; +}; + +/* Values for 'capabilities' field */ +#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ +#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ +#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ +#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ +#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ +#if 1 +#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ +#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ +#endif +#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ + +#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ +#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ +#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ + +#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ +#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ +#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ + +/* + * V I D E O I M A G E F O R M A T + */ + +struct v4l2_pix_format +{ + __u32 width; + __u32 height; + __u32 pixelformat; + enum v4l2_field field; + __u32 bytesperline; /* for padding, zero if unused */ + __u32 sizeimage; + enum v4l2_colorspace colorspace; + __u32 priv; /* private data, depends on pixelformat */ +}; + +/* Pixel format FOURCC depth Description */ +#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ +#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ +#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ +#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ +#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R') /* 16 RGB-5-6-5 BE */ +#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3') /* 24 BGR-8-8-8 */ +#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3') /* 24 RGB-8-8-8 */ +#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ +#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ +#define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ +#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ +#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ +#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ +#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ +#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ + +/* two planes -- one Y, one Cr + Cb interleaved */ +#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* 12 Y/CbCr 4:2:0 */ +#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1') /* 12 Y/CrCb 4:2:0 */ + +/* The following formats are not defined in the V4L2 specification */ +#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9') /* 9 YUV 4:1:0 */ +#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ +#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ + +/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ +#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ + +/* compressed formats */ +#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ +#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ +#define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ +#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG */ + +/* Vendor-specific formats */ +#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ +#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ +#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ +#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ +#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ + +/* + * F O R M A T E N U M E R A T I O N + */ +struct v4l2_fmtdesc +{ + __u32 index; /* Format number */ + enum v4l2_buf_type type; /* buffer type */ + __u32 flags; + __u8 description[32]; /* Description string */ + __u32 pixelformat; /* Format fourcc */ + __u32 reserved[4]; +}; + +#define V4L2_FMT_FLAG_COMPRESSED 0x0001 + + +/* + * T I M E C O D E + */ +struct v4l2_timecode +{ + __u32 type; + __u32 flags; + __u8 frames; + __u8 seconds; + __u8 minutes; + __u8 hours; + __u8 userbits[4]; +}; + +/* Type */ +#define V4L2_TC_TYPE_24FPS 1 +#define V4L2_TC_TYPE_25FPS 2 +#define V4L2_TC_TYPE_30FPS 3 +#define V4L2_TC_TYPE_50FPS 4 +#define V4L2_TC_TYPE_60FPS 5 + +/* Flags */ +#define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */ +#define V4L2_TC_FLAG_COLORFRAME 0x0002 +#define V4L2_TC_USERBITS_field 0x000C +#define V4L2_TC_USERBITS_USERDEFINED 0x0000 +#define V4L2_TC_USERBITS_8BITCHARS 0x0008 +/* The above is based on SMPTE timecodes */ + + +/* + * M P E G C O M P R E S S I O N P A R A M E T E R S + * + * ### WARNING: this is still work-in-progress right now, most likely + * ### there will be some incompatible changes. + * + */ + + +enum v4l2_bitrate_mode { + V4L2_BITRATE_NONE = 0, /* not specified */ + V4L2_BITRATE_CBR, /* constant bitrate */ + V4L2_BITRATE_VBR, /* variable bitrate */ +}; +struct v4l2_bitrate { + /* rates are specified in kbit/sec */ + enum v4l2_bitrate_mode mode; + __u32 min; + __u32 target; /* use this one for CBR */ + __u32 max; +}; + +enum v4l2_mpeg_streamtype { + V4L2_MPEG_SS_1, /* MPEG-1 system stream */ + V4L2_MPEG_PS_2, /* MPEG-2 program stream */ + V4L2_MPEG_TS_2, /* MPEG-2 transport stream */ + V4L2_MPEG_PS_DVD, /* MPEG-2 program stream with DVD header fixups */ +}; +enum v4l2_mpeg_audiotype { + V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */ + V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */ + V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */ + V4L2_MPEG_AC3, /* AC3 */ + V4L2_MPEG_LPCM, /* LPCM */ +}; +enum v4l2_mpeg_videotype { + V4L2_MPEG_VI_1, /* MPEG-1 */ + V4L2_MPEG_VI_2, /* MPEG-2 */ +}; +enum v4l2_mpeg_aspectratio { + V4L2_MPEG_ASPECT_SQUARE = 1, /* square pixel */ + V4L2_MPEG_ASPECT_4_3 = 2, /* 4 : 3 */ + V4L2_MPEG_ASPECT_16_9 = 3, /* 16 : 9 */ + V4L2_MPEG_ASPECT_1_221 = 4, /* 1 : 2,21 */ +}; + +struct v4l2_mpeg_compression { + /* general */ + enum v4l2_mpeg_streamtype st_type; + struct v4l2_bitrate st_bitrate; + + /* transport streams */ + __u16 ts_pid_pmt; + __u16 ts_pid_audio; + __u16 ts_pid_video; + __u16 ts_pid_pcr; + + /* program stream */ + __u16 ps_size; + __u16 reserved_1; /* align */ + + /* audio */ + enum v4l2_mpeg_audiotype au_type; + struct v4l2_bitrate au_bitrate; + __u32 au_sample_rate; + __u8 au_pesid; + __u8 reserved_2[3]; /* align */ + + /* video */ + enum v4l2_mpeg_videotype vi_type; + enum v4l2_mpeg_aspectratio vi_aspect_ratio; + struct v4l2_bitrate vi_bitrate; + __u32 vi_frame_rate; + __u16 vi_frames_per_gop; + __u16 vi_bframes_count; + __u8 vi_pesid; + __u8 reserved_3[3]; /* align */ + + /* misc flags */ + __u32 closed_gops:1; + __u32 pulldown:1; + __u32 reserved_4:30; /* align */ + + /* I don't expect the above being perfect yet ;) */ + __u32 reserved_5[8]; +}; + +struct v4l2_jpegcompression +{ + int quality; + + int APPn; /* Number of APP segment to be written, + * must be 0..15 */ + int APP_len; /* Length of data in JPEG APPn segment */ + char APP_data[60]; /* Data in the JPEG APPn segment. */ + + int COM_len; /* Length of data in JPEG COM segment */ + char COM_data[60]; /* Data in JPEG COM segment */ + + __u32 jpeg_markers; /* Which markers should go into the JPEG + * output. Unless you exactly know what + * you do, leave them untouched. + * Inluding less markers will make the + * resulting code smaller, but there will + * be fewer aplications which can read it. + * The presence of the APP and COM marker + * is influenced by APP_len and COM_len + * ONLY, not by this property! */ + +#define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ +#define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ +#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ +#define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */ +#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will + * allways use APP0 */ +}; + + +/* + * M E M O R Y - M A P P I N G B U F F E R S + */ +struct v4l2_requestbuffers +{ + __u32 count; + enum v4l2_buf_type type; + enum v4l2_memory memory; + __u32 reserved[2]; +}; + +struct v4l2_buffer +{ + __u32 index; + enum v4l2_buf_type type; + __u32 bytesused; + __u32 flags; + enum v4l2_field field; + struct timeval timestamp; + struct v4l2_timecode timecode; + __u32 sequence; + + /* memory location */ + enum v4l2_memory memory; + union { + __u32 offset; + unsigned long userptr; + } m; + __u32 length; + __u32 input; + __u32 reserved; +}; + +/* Flags for 'flags' field */ +#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */ +#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */ +#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */ +#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ +#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ +#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ +#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ +#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ + +/* + * O V E R L A Y P R E V I E W + */ +struct v4l2_framebuffer +{ + __u32 capability; + __u32 flags; +/* FIXME: in theory we should pass something like PCI device + memory + * region + offset instead of some physical address */ + void* base; + struct v4l2_pix_format fmt; +}; +/* Flags for the 'capability' field. Read only */ +#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 +#define V4L2_FBUF_CAP_CHROMAKEY 0x0002 +#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 +#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 +/* Flags for the 'flags' field. */ +#define V4L2_FBUF_FLAG_PRIMARY 0x0001 +#define V4L2_FBUF_FLAG_OVERLAY 0x0002 +#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 + +struct v4l2_clip +{ + struct v4l2_rect c; + struct v4l2_clip __user *next; +}; + +struct v4l2_window +{ + struct v4l2_rect w; + enum v4l2_field field; + __u32 chromakey; + struct v4l2_clip __user *clips; + __u32 clipcount; + void __user *bitmap; +}; + + +/* + * C A P T U R E P A R A M E T E R S + */ +struct v4l2_captureparm +{ + __u32 capability; /* Supported modes */ + __u32 capturemode; /* Current mode */ + struct v4l2_fract timeperframe; /* Time per frame in .1us units */ + __u32 extendedmode; /* Driver-specific extensions */ + __u32 readbuffers; /* # of buffers for read */ + __u32 reserved[4]; +}; +/* Flags for 'capability' and 'capturemode' fields */ +#define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ +#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ + +struct v4l2_outputparm +{ + __u32 capability; /* Supported modes */ + __u32 outputmode; /* Current mode */ + struct v4l2_fract timeperframe; /* Time per frame in seconds */ + __u32 extendedmode; /* Driver-specific extensions */ + __u32 writebuffers; /* # of buffers for write */ + __u32 reserved[4]; +}; + +/* + * I N P U T I M A G E C R O P P I N G + */ + +struct v4l2_cropcap { + enum v4l2_buf_type type; + struct v4l2_rect bounds; + struct v4l2_rect defrect; + struct v4l2_fract pixelaspect; +}; + +struct v4l2_crop { + enum v4l2_buf_type type; + struct v4l2_rect c; +}; + +/* + * A N A L O G V I D E O S T A N D A R D + */ + +typedef __u64 v4l2_std_id; + +/* one bit for each */ +#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) +#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002) +#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004) +#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008) +#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010) +#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020) +#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040) +#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080) + +#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100) +#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200) +#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400) +#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800) + +#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) +#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) +#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) +#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) + +#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) +#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) +#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000) +#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000) +#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000) +#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000) +#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000) +#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000) + +/* ATSC/HDTV */ +#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) +#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) + +/* some merged standards */ +#define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) +#define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) +#define V4L2_STD_GH (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H) +#define V4L2_STD_DK (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK) + +/* some common needed stuff */ +#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\ + V4L2_STD_PAL_B1 |\ + V4L2_STD_PAL_G) +#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\ + V4L2_STD_PAL_D1 |\ + V4L2_STD_PAL_K) +#define V4L2_STD_PAL (V4L2_STD_PAL_BG |\ + V4L2_STD_PAL_DK |\ + V4L2_STD_PAL_H |\ + V4L2_STD_PAL_I) +#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ + V4L2_STD_NTSC_M_JP |\ + V4L2_STD_NTSC_M_KR) +#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ + V4L2_STD_SECAM_K |\ + V4L2_STD_SECAM_K1) +#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ + V4L2_STD_SECAM_G |\ + V4L2_STD_SECAM_H |\ + V4L2_STD_SECAM_DK |\ + V4L2_STD_SECAM_L |\ + V4L2_STD_SECAM_LC) + +#define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ + V4L2_STD_PAL_60 |\ + V4L2_STD_NTSC |\ + V4L2_STD_NTSC_443) +#define V4L2_STD_625_50 (V4L2_STD_PAL |\ + V4L2_STD_PAL_N |\ + V4L2_STD_PAL_Nc |\ + V4L2_STD_SECAM) +#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ + V4L2_STD_ATSC_16_VSB) + +#define V4L2_STD_UNKNOWN 0 +#define V4L2_STD_ALL (V4L2_STD_525_60 |\ + V4L2_STD_625_50) + +struct v4l2_standard +{ + __u32 index; + v4l2_std_id id; + __u8 name[24]; + struct v4l2_fract frameperiod; /* Frames, not fields */ + __u32 framelines; + __u32 reserved[4]; +}; + + +/* + * V I D E O I N P U T S + */ +struct v4l2_input +{ + __u32 index; /* Which input */ + __u8 name[32]; /* Label */ + __u32 type; /* Type of input */ + __u32 audioset; /* Associated audios (bitfield) */ + __u32 tuner; /* Associated tuner */ + v4l2_std_id std; + __u32 status; + __u32 reserved[4]; +}; +/* Values for the 'type' field */ +#define V4L2_INPUT_TYPE_TUNER 1 +#define V4L2_INPUT_TYPE_CAMERA 2 + +/* field 'status' - general */ +#define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */ +#define V4L2_IN_ST_NO_SIGNAL 0x00000002 +#define V4L2_IN_ST_NO_COLOR 0x00000004 + +/* field 'status' - analog */ +#define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */ +#define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */ + +/* field 'status' - digital */ +#define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */ +#define V4L2_IN_ST_NO_EQU 0x00020000 /* No equalizer lock */ +#define V4L2_IN_ST_NO_CARRIER 0x00040000 /* Carrier recovery failed */ + +/* field 'status' - VCR and set-top box */ +#define V4L2_IN_ST_MACROVISION 0x01000000 /* Macrovision detected */ +#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ +#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ + +/* + * V I D E O O U T P U T S + */ +struct v4l2_output +{ + __u32 index; /* Which output */ + __u8 name[32]; /* Label */ + __u32 type; /* Type of output */ + __u32 audioset; /* Associated audios (bitfield) */ + __u32 modulator; /* Associated modulator */ + v4l2_std_id std; + __u32 reserved[4]; +}; +/* Values for the 'type' field */ +#define V4L2_OUTPUT_TYPE_MODULATOR 1 +#define V4L2_OUTPUT_TYPE_ANALOG 2 +#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 + +/* + * C O N T R O L S + */ +struct v4l2_control +{ + __u32 id; + __s32 value; +}; + +/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ +struct v4l2_queryctrl +{ + __u32 id; + enum v4l2_ctrl_type type; + __u8 name[32]; /* Whatever */ + __s32 minimum; /* Note signedness */ + __s32 maximum; + __s32 step; + __s32 default_value; + __u32 flags; + __u32 reserved[2]; +}; + +/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ +struct v4l2_querymenu +{ + __u32 id; + __u32 index; + __u8 name[32]; /* Whatever */ + __u32 reserved; +}; + +/* Control flags */ +#define V4L2_CTRL_FLAG_DISABLED 0x0001 +#define V4L2_CTRL_FLAG_GRABBED 0x0002 + +/* Control IDs defined by V4L2 */ +#define V4L2_CID_BASE 0x00980900 +/* IDs reserved for driver specific controls */ +#define V4L2_CID_PRIVATE_BASE 0x08000000 + +#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) +#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) +#define V4L2_CID_SATURATION (V4L2_CID_BASE+2) +#define V4L2_CID_HUE (V4L2_CID_BASE+3) +#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) +#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) +#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) +#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) +#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) +#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) +#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) +#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) +#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) +#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) +#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) +#define V4L2_CID_GAMMA (V4L2_CID_BASE+16) +#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* ? Not sure */ +#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) +#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) +#define V4L2_CID_GAIN (V4L2_CID_BASE+19) +#define V4L2_CID_HFLIP (V4L2_CID_BASE+20) +#define V4L2_CID_VFLIP (V4L2_CID_BASE+21) +#define V4L2_CID_HCENTER (V4L2_CID_BASE+22) +#define V4L2_CID_VCENTER (V4L2_CID_BASE+23) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ + +/* + * T U N I N G + */ +struct v4l2_tuner +{ + __u32 index; + __u8 name[32]; + enum v4l2_tuner_type type; + __u32 capability; + __u32 rangelow; + __u32 rangehigh; + __u32 rxsubchans; + __u32 audmode; + __s32 signal; + __s32 afc; + __u32 reserved[4]; +}; + +struct v4l2_modulator +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 rangelow; + __u32 rangehigh; + __u32 txsubchans; + __u32 reserved[4]; +}; + +/* Flags for the 'capability' field */ +#define V4L2_TUNER_CAP_LOW 0x0001 +#define V4L2_TUNER_CAP_NORM 0x0002 +#define V4L2_TUNER_CAP_STEREO 0x0010 +#define V4L2_TUNER_CAP_LANG2 0x0020 +#define V4L2_TUNER_CAP_SAP 0x0020 +#define V4L2_TUNER_CAP_LANG1 0x0040 + +/* Flags for the 'rxsubchans' field */ +#define V4L2_TUNER_SUB_MONO 0x0001 +#define V4L2_TUNER_SUB_STEREO 0x0002 +#define V4L2_TUNER_SUB_LANG2 0x0004 +#define V4L2_TUNER_SUB_SAP 0x0004 +#define V4L2_TUNER_SUB_LANG1 0x0008 + +/* Values for the 'audmode' field */ +#define V4L2_TUNER_MODE_MONO 0x0000 +#define V4L2_TUNER_MODE_STEREO 0x0001 +#define V4L2_TUNER_MODE_LANG2 0x0002 +#define V4L2_TUNER_MODE_SAP 0x0002 +#define V4L2_TUNER_MODE_LANG1 0x0003 +#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 + +struct v4l2_frequency +{ + __u32 tuner; + enum v4l2_tuner_type type; + __u32 frequency; + __u32 reserved[8]; +}; + +/* + * A U D I O + */ +struct v4l2_audio +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 mode; + __u32 reserved[2]; +}; +/* Flags for the 'capability' field */ +#define V4L2_AUDCAP_STEREO 0x00001 +#define V4L2_AUDCAP_AVL 0x00002 + +/* Flags for the 'mode' field */ +#define V4L2_AUDMODE_AVL 0x00001 + +struct v4l2_audioout +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 mode; + __u32 reserved[2]; +}; + +/* + * D A T A S E R V I C E S ( V B I ) + * + * Data services API by Michael Schimek + */ + +/* Raw VBI */ + +struct v4l2_vbi_format +{ + __u32 sampling_rate; /* in 1 Hz */ + __u32 offset; + __u32 samples_per_line; + __u32 sample_format; /* V4L2_PIX_FMT_* */ + __s32 start[2]; + __u32 count[2]; + __u32 flags; /* V4L2_VBI_* */ + __u32 reserved[2]; /* must be zero */ +}; + +/* VBI flags */ +#define V4L2_VBI_UNSYNC (1<< 0) +#define V4L2_VBI_INTERLACED (1<< 1) + +#if 1 +/* Sliced VBI + * + * This implements is a proposal V4L2 API to allow SLICED VBI + * required for some hardware encoders. It should change without + * notice in the definitive implementation. + */ + +struct v4l2_sliced_vbi_format +{ + __u16 service_set; + /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field + service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field + (equals frame lines 313-336 for 625 line video + standards, 263-286 for 525 line standards) */ + __u16 service_lines[2][24]; + __u32 io_size; + __u32 reserved[2]; /* must be zero */ +}; + +/* Teletext World System Teletext + (WST), defined on ITU-R BT.653-2 */ +#define V4L2_SLICED_TELETEXT_B (0x0001) +/* Video Program System, defined on ETS 300 231*/ +#define V4L2_SLICED_VPS (0x0400) +/* Closed Caption, defined on EIA-608 */ +#define V4L2_SLICED_CAPTION_525 (0x1000) +/* Wide Screen System, defined on ITU-R BT1119.1 */ +#define V4L2_SLICED_WSS_625 (0x4000) + +#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) +#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) + + +struct v4l2_sliced_vbi_cap +{ + __u16 service_set; + /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field + service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field + (equals frame lines 313-336 for 625 line video + standards, 263-286 for 525 line standards) */ + __u16 service_lines[2][24]; + __u32 reserved[4]; /* must be 0 */ +}; + +struct v4l2_sliced_vbi_data +{ + __u32 id; + __u32 field; /* 0: first field, 1: second field */ + __u32 line; /* 1-23 */ + __u32 reserved; /* must be 0 */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed May 4 08:31:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E01F61065670; Wed, 4 May 2011 08:31:58 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFD208FC15; Wed, 4 May 2011 08:31:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p448VwvP037856; Wed, 4 May 2011 08:31:58 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p448VwBh037855; Wed, 4 May 2011 08:31:58 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105040831.p448VwBh037855@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 08:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221423 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 08:31:59 -0000 Author: netchild Date: Wed May 4 08:31:58 2011 New Revision: 221423 URL: http://svn.freebsd.org/changeset/base/221423 Log: Copy the v4l2 header unchanged from the vendor branch. Added: head/sys/compat/linux/linux_videodev2.h - copied unchanged from r221422, vendor/v4l/dist/videodev2.h Copied: head/sys/compat/linux/linux_videodev2.h (from r221422, vendor/v4l/dist/videodev2.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linux/linux_videodev2.h Wed May 4 08:31:58 2011 (r221423, copy of r221422, vendor/v4l/dist/videodev2.h) @@ -0,0 +1,1164 @@ +#ifndef __LINUX_VIDEODEV2_H +#define __LINUX_VIDEODEV2_H +/* + * Video for Linux Two + * + * Header file for v4l or V4L2 drivers and applications, for + * Linux kernels 2.2.x or 2.4.x. + * + * See http://bytesex.org/v4l/ for API specs and other + * v4l2 documentation. + * + * Author: Bill Dirks + * Justin Schoeman + * et al. + */ +#ifdef __KERNEL__ +#include /* need struct timeval */ +#include +#include +#include +#endif +#include /* need __user */ + + +#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ +#define HAVE_V4L2 1 + +/* + * Common stuff for both V4L1 and V4L2 + * Moved from videodev.h + */ + +#define VIDEO_MAX_FRAME 32 + +#define VID_TYPE_CAPTURE 1 /* Can capture */ +#define VID_TYPE_TUNER 2 /* Can tune */ +#define VID_TYPE_TELETEXT 4 /* Does teletext */ +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ +#define VID_TYPE_CLIPPING 32 /* Can clip */ +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ +#define VID_TYPE_SCALES 128 /* Scalable */ +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ + +#ifdef __KERNEL__ + +/* Minor device allocation */ +#define MINOR_VFL_TYPE_GRABBER_MIN 0 +#define MINOR_VFL_TYPE_GRABBER_MAX 63 +#define MINOR_VFL_TYPE_RADIO_MIN 64 +#define MINOR_VFL_TYPE_RADIO_MAX 127 +#define MINOR_VFL_TYPE_VTX_MIN 192 +#define MINOR_VFL_TYPE_VTX_MAX 223 +#define MINOR_VFL_TYPE_VBI_MIN 224 +#define MINOR_VFL_TYPE_VBI_MAX 255 + +#define VFL_TYPE_GRABBER 0 +#define VFL_TYPE_VBI 1 +#define VFL_TYPE_RADIO 2 +#define VFL_TYPE_VTX 3 + +struct video_device +{ + /* device info */ + struct device *dev; + char name[32]; + int type; /* v4l1 */ + int type2; /* v4l2 */ + int hardware; + int minor; + + /* device ops + callbacks */ + const struct file_operations *fops; + void (*release)(struct video_device *vfd); + + +#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ + /* obsolete -- fops->owner is used instead */ + struct module *owner; + /* dev->driver_data will be used instead some day. + * Use the video_{get|set}_drvdata() helper functions, + * so the switch over will be transparent for you. + * Or use {pci|usb}_{get|set}_drvdata() directly. */ + void *priv; +#endif + + /* for videodev.c intenal usage -- please don't touch */ + int users; /* video_exclusive_{open|close} ... */ + struct mutex lock; /* ... helper function uses these */ + char devfs_name[64]; /* devfs */ + struct class_device class_dev; /* sysfs */ +}; + +#define VIDEO_MAJOR 81 + +extern int video_register_device(struct video_device *, int type, int nr); +extern void video_unregister_device(struct video_device *); +extern int video_usercopy(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg, + int (*func)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg)); + +/* helper functions to alloc / release struct video_device, the + later can be used for video_device->release() */ +struct video_device *video_device_alloc(void); +void video_device_release(struct video_device *vfd); + +#endif + +/* + * M I S C E L L A N E O U S + */ + +/* Four-character-code (FOURCC) */ +#define v4l2_fourcc(a,b,c,d)\ + (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) + +/* + * E N U M S + */ +enum v4l2_field { + V4L2_FIELD_ANY = 0, /* driver can choose from none, + top, bottom, interlaced + depending on whatever it thinks + is approximate ... */ + V4L2_FIELD_NONE = 1, /* this device has no fields ... */ + V4L2_FIELD_TOP = 2, /* top field only */ + V4L2_FIELD_BOTTOM = 3, /* bottom field only */ + V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */ + V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one + buffer, top-bottom order */ + V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */ + V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into + separate buffers */ +}; +#define V4L2_FIELD_HAS_TOP(field) \ + ((field) == V4L2_FIELD_TOP ||\ + (field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_BOTTOM(field) \ + ((field) == V4L2_FIELD_BOTTOM ||\ + (field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_BOTH(field) \ + ((field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) + +enum v4l2_buf_type { + V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, + V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, + V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, + V4L2_BUF_TYPE_VBI_CAPTURE = 4, + V4L2_BUF_TYPE_VBI_OUTPUT = 5, +#if 1 + /* Experimental Sliced VBI */ + V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, + V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, +#endif + V4L2_BUF_TYPE_PRIVATE = 0x80, +}; + +enum v4l2_ctrl_type { + V4L2_CTRL_TYPE_INTEGER = 1, + V4L2_CTRL_TYPE_BOOLEAN = 2, + V4L2_CTRL_TYPE_MENU = 3, + V4L2_CTRL_TYPE_BUTTON = 4, +}; + +enum v4l2_tuner_type { + V4L2_TUNER_RADIO = 1, + V4L2_TUNER_ANALOG_TV = 2, + V4L2_TUNER_DIGITAL_TV = 3, +}; + +enum v4l2_memory { + V4L2_MEMORY_MMAP = 1, + V4L2_MEMORY_USERPTR = 2, + V4L2_MEMORY_OVERLAY = 3, +}; + +/* see also http://vektor.theorem.ca/graphics/ycbcr/ */ +enum v4l2_colorspace { + /* ITU-R 601 -- broadcast NTSC/PAL */ + V4L2_COLORSPACE_SMPTE170M = 1, + + /* 1125-Line (US) HDTV */ + V4L2_COLORSPACE_SMPTE240M = 2, + + /* HD and modern captures. */ + V4L2_COLORSPACE_REC709 = 3, + + /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ + V4L2_COLORSPACE_BT878 = 4, + + /* These should be useful. Assume 601 extents. */ + V4L2_COLORSPACE_470_SYSTEM_M = 5, + V4L2_COLORSPACE_470_SYSTEM_BG = 6, + + /* I know there will be cameras that send this. So, this is + * unspecified chromaticities and full 0-255 on each of the + * Y'CbCr components + */ + V4L2_COLORSPACE_JPEG = 7, + + /* For RGB colourspaces, this is probably a good start. */ + V4L2_COLORSPACE_SRGB = 8, +}; + +enum v4l2_priority { + V4L2_PRIORITY_UNSET = 0, /* not initialized */ + V4L2_PRIORITY_BACKGROUND = 1, + V4L2_PRIORITY_INTERACTIVE = 2, + V4L2_PRIORITY_RECORD = 3, + V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE, +}; + +struct v4l2_rect { + __s32 left; + __s32 top; + __s32 width; + __s32 height; +}; + +struct v4l2_fract { + __u32 numerator; + __u32 denominator; +}; + +/* + * D R I V E R C A P A B I L I T I E S + */ +struct v4l2_capability +{ + __u8 driver[16]; /* i.e. "bttv" */ + __u8 card[32]; /* i.e. "Hauppauge WinTV" */ + __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ + __u32 version; /* should use KERNEL_VERSION() */ + __u32 capabilities; /* Device capabilities */ + __u32 reserved[4]; +}; + +/* Values for 'capabilities' field */ +#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ +#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ +#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ +#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ +#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ +#if 1 +#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ +#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ +#endif +#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ + +#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ +#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ +#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ + +#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ +#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ +#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ + +/* + * V I D E O I M A G E F O R M A T + */ + +struct v4l2_pix_format +{ + __u32 width; + __u32 height; + __u32 pixelformat; + enum v4l2_field field; + __u32 bytesperline; /* for padding, zero if unused */ + __u32 sizeimage; + enum v4l2_colorspace colorspace; + __u32 priv; /* private data, depends on pixelformat */ +}; + +/* Pixel format FOURCC depth Description */ +#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ +#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ +#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ +#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ +#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R') /* 16 RGB-5-6-5 BE */ +#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3') /* 24 BGR-8-8-8 */ +#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3') /* 24 RGB-8-8-8 */ +#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ +#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ +#define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ +#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ +#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ +#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ +#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ +#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ + +/* two planes -- one Y, one Cr + Cb interleaved */ +#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* 12 Y/CbCr 4:2:0 */ +#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1') /* 12 Y/CrCb 4:2:0 */ + +/* The following formats are not defined in the V4L2 specification */ +#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9') /* 9 YUV 4:1:0 */ +#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ +#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ +#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ + +/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ +#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ + +/* compressed formats */ +#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ +#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ +#define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ +#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG */ + +/* Vendor-specific formats */ +#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ +#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ +#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ +#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ +#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ + +/* + * F O R M A T E N U M E R A T I O N + */ +struct v4l2_fmtdesc +{ + __u32 index; /* Format number */ + enum v4l2_buf_type type; /* buffer type */ + __u32 flags; + __u8 description[32]; /* Description string */ + __u32 pixelformat; /* Format fourcc */ + __u32 reserved[4]; +}; + +#define V4L2_FMT_FLAG_COMPRESSED 0x0001 + + +/* + * T I M E C O D E + */ +struct v4l2_timecode +{ + __u32 type; + __u32 flags; + __u8 frames; + __u8 seconds; + __u8 minutes; + __u8 hours; + __u8 userbits[4]; +}; + +/* Type */ +#define V4L2_TC_TYPE_24FPS 1 +#define V4L2_TC_TYPE_25FPS 2 +#define V4L2_TC_TYPE_30FPS 3 +#define V4L2_TC_TYPE_50FPS 4 +#define V4L2_TC_TYPE_60FPS 5 + +/* Flags */ +#define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */ +#define V4L2_TC_FLAG_COLORFRAME 0x0002 +#define V4L2_TC_USERBITS_field 0x000C +#define V4L2_TC_USERBITS_USERDEFINED 0x0000 +#define V4L2_TC_USERBITS_8BITCHARS 0x0008 +/* The above is based on SMPTE timecodes */ + + +/* + * M P E G C O M P R E S S I O N P A R A M E T E R S + * + * ### WARNING: this is still work-in-progress right now, most likely + * ### there will be some incompatible changes. + * + */ + + +enum v4l2_bitrate_mode { + V4L2_BITRATE_NONE = 0, /* not specified */ + V4L2_BITRATE_CBR, /* constant bitrate */ + V4L2_BITRATE_VBR, /* variable bitrate */ +}; +struct v4l2_bitrate { + /* rates are specified in kbit/sec */ + enum v4l2_bitrate_mode mode; + __u32 min; + __u32 target; /* use this one for CBR */ + __u32 max; +}; + +enum v4l2_mpeg_streamtype { + V4L2_MPEG_SS_1, /* MPEG-1 system stream */ + V4L2_MPEG_PS_2, /* MPEG-2 program stream */ + V4L2_MPEG_TS_2, /* MPEG-2 transport stream */ + V4L2_MPEG_PS_DVD, /* MPEG-2 program stream with DVD header fixups */ +}; +enum v4l2_mpeg_audiotype { + V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */ + V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */ + V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */ + V4L2_MPEG_AC3, /* AC3 */ + V4L2_MPEG_LPCM, /* LPCM */ +}; +enum v4l2_mpeg_videotype { + V4L2_MPEG_VI_1, /* MPEG-1 */ + V4L2_MPEG_VI_2, /* MPEG-2 */ +}; +enum v4l2_mpeg_aspectratio { + V4L2_MPEG_ASPECT_SQUARE = 1, /* square pixel */ + V4L2_MPEG_ASPECT_4_3 = 2, /* 4 : 3 */ + V4L2_MPEG_ASPECT_16_9 = 3, /* 16 : 9 */ + V4L2_MPEG_ASPECT_1_221 = 4, /* 1 : 2,21 */ +}; + +struct v4l2_mpeg_compression { + /* general */ + enum v4l2_mpeg_streamtype st_type; + struct v4l2_bitrate st_bitrate; + + /* transport streams */ + __u16 ts_pid_pmt; + __u16 ts_pid_audio; + __u16 ts_pid_video; + __u16 ts_pid_pcr; + + /* program stream */ + __u16 ps_size; + __u16 reserved_1; /* align */ + + /* audio */ + enum v4l2_mpeg_audiotype au_type; + struct v4l2_bitrate au_bitrate; + __u32 au_sample_rate; + __u8 au_pesid; + __u8 reserved_2[3]; /* align */ + + /* video */ + enum v4l2_mpeg_videotype vi_type; + enum v4l2_mpeg_aspectratio vi_aspect_ratio; + struct v4l2_bitrate vi_bitrate; + __u32 vi_frame_rate; + __u16 vi_frames_per_gop; + __u16 vi_bframes_count; + __u8 vi_pesid; + __u8 reserved_3[3]; /* align */ + + /* misc flags */ + __u32 closed_gops:1; + __u32 pulldown:1; + __u32 reserved_4:30; /* align */ + + /* I don't expect the above being perfect yet ;) */ + __u32 reserved_5[8]; +}; + +struct v4l2_jpegcompression +{ + int quality; + + int APPn; /* Number of APP segment to be written, + * must be 0..15 */ + int APP_len; /* Length of data in JPEG APPn segment */ + char APP_data[60]; /* Data in the JPEG APPn segment. */ + + int COM_len; /* Length of data in JPEG COM segment */ + char COM_data[60]; /* Data in JPEG COM segment */ + + __u32 jpeg_markers; /* Which markers should go into the JPEG + * output. Unless you exactly know what + * you do, leave them untouched. + * Inluding less markers will make the + * resulting code smaller, but there will + * be fewer aplications which can read it. + * The presence of the APP and COM marker + * is influenced by APP_len and COM_len + * ONLY, not by this property! */ + +#define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ +#define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ +#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ +#define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */ +#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will + * allways use APP0 */ +}; + + +/* + * M E M O R Y - M A P P I N G B U F F E R S + */ +struct v4l2_requestbuffers +{ + __u32 count; + enum v4l2_buf_type type; + enum v4l2_memory memory; + __u32 reserved[2]; +}; + +struct v4l2_buffer +{ + __u32 index; + enum v4l2_buf_type type; + __u32 bytesused; + __u32 flags; + enum v4l2_field field; + struct timeval timestamp; + struct v4l2_timecode timecode; + __u32 sequence; + + /* memory location */ + enum v4l2_memory memory; + union { + __u32 offset; + unsigned long userptr; + } m; + __u32 length; + __u32 input; + __u32 reserved; +}; + +/* Flags for 'flags' field */ +#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */ +#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */ +#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */ +#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ +#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ +#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ +#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ +#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ + +/* + * O V E R L A Y P R E V I E W + */ +struct v4l2_framebuffer +{ + __u32 capability; + __u32 flags; +/* FIXME: in theory we should pass something like PCI device + memory + * region + offset instead of some physical address */ + void* base; + struct v4l2_pix_format fmt; +}; +/* Flags for the 'capability' field. Read only */ +#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 +#define V4L2_FBUF_CAP_CHROMAKEY 0x0002 +#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 +#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 +/* Flags for the 'flags' field. */ +#define V4L2_FBUF_FLAG_PRIMARY 0x0001 +#define V4L2_FBUF_FLAG_OVERLAY 0x0002 +#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 + +struct v4l2_clip +{ + struct v4l2_rect c; + struct v4l2_clip __user *next; +}; + +struct v4l2_window +{ + struct v4l2_rect w; + enum v4l2_field field; + __u32 chromakey; + struct v4l2_clip __user *clips; + __u32 clipcount; + void __user *bitmap; +}; + + +/* + * C A P T U R E P A R A M E T E R S + */ +struct v4l2_captureparm +{ + __u32 capability; /* Supported modes */ + __u32 capturemode; /* Current mode */ + struct v4l2_fract timeperframe; /* Time per frame in .1us units */ + __u32 extendedmode; /* Driver-specific extensions */ + __u32 readbuffers; /* # of buffers for read */ + __u32 reserved[4]; +}; +/* Flags for 'capability' and 'capturemode' fields */ +#define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ +#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ + +struct v4l2_outputparm +{ + __u32 capability; /* Supported modes */ + __u32 outputmode; /* Current mode */ + struct v4l2_fract timeperframe; /* Time per frame in seconds */ + __u32 extendedmode; /* Driver-specific extensions */ + __u32 writebuffers; /* # of buffers for write */ + __u32 reserved[4]; +}; + +/* + * I N P U T I M A G E C R O P P I N G + */ + +struct v4l2_cropcap { + enum v4l2_buf_type type; + struct v4l2_rect bounds; + struct v4l2_rect defrect; + struct v4l2_fract pixelaspect; +}; + +struct v4l2_crop { + enum v4l2_buf_type type; + struct v4l2_rect c; +}; + +/* + * A N A L O G V I D E O S T A N D A R D + */ + +typedef __u64 v4l2_std_id; + +/* one bit for each */ +#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) +#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002) +#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004) +#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008) +#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010) +#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020) +#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040) +#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080) + +#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100) +#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200) +#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400) +#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800) + +#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) +#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) +#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) +#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) + +#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) +#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) +#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000) +#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000) +#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000) +#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000) +#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000) +#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000) + +/* ATSC/HDTV */ +#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) +#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) + +/* some merged standards */ +#define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) +#define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) +#define V4L2_STD_GH (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H) +#define V4L2_STD_DK (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK) + +/* some common needed stuff */ +#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\ + V4L2_STD_PAL_B1 |\ + V4L2_STD_PAL_G) +#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\ + V4L2_STD_PAL_D1 |\ + V4L2_STD_PAL_K) +#define V4L2_STD_PAL (V4L2_STD_PAL_BG |\ + V4L2_STD_PAL_DK |\ + V4L2_STD_PAL_H |\ + V4L2_STD_PAL_I) +#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ + V4L2_STD_NTSC_M_JP |\ + V4L2_STD_NTSC_M_KR) +#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ + V4L2_STD_SECAM_K |\ + V4L2_STD_SECAM_K1) +#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ + V4L2_STD_SECAM_G |\ + V4L2_STD_SECAM_H |\ + V4L2_STD_SECAM_DK |\ + V4L2_STD_SECAM_L |\ + V4L2_STD_SECAM_LC) + +#define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ + V4L2_STD_PAL_60 |\ + V4L2_STD_NTSC |\ + V4L2_STD_NTSC_443) +#define V4L2_STD_625_50 (V4L2_STD_PAL |\ + V4L2_STD_PAL_N |\ + V4L2_STD_PAL_Nc |\ + V4L2_STD_SECAM) +#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ + V4L2_STD_ATSC_16_VSB) + +#define V4L2_STD_UNKNOWN 0 +#define V4L2_STD_ALL (V4L2_STD_525_60 |\ + V4L2_STD_625_50) + +struct v4l2_standard +{ + __u32 index; + v4l2_std_id id; + __u8 name[24]; + struct v4l2_fract frameperiod; /* Frames, not fields */ + __u32 framelines; + __u32 reserved[4]; +}; + + +/* + * V I D E O I N P U T S + */ +struct v4l2_input +{ + __u32 index; /* Which input */ + __u8 name[32]; /* Label */ + __u32 type; /* Type of input */ + __u32 audioset; /* Associated audios (bitfield) */ + __u32 tuner; /* Associated tuner */ + v4l2_std_id std; + __u32 status; + __u32 reserved[4]; +}; +/* Values for the 'type' field */ +#define V4L2_INPUT_TYPE_TUNER 1 +#define V4L2_INPUT_TYPE_CAMERA 2 + +/* field 'status' - general */ +#define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */ +#define V4L2_IN_ST_NO_SIGNAL 0x00000002 +#define V4L2_IN_ST_NO_COLOR 0x00000004 + +/* field 'status' - analog */ +#define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */ +#define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */ + +/* field 'status' - digital */ +#define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */ +#define V4L2_IN_ST_NO_EQU 0x00020000 /* No equalizer lock */ +#define V4L2_IN_ST_NO_CARRIER 0x00040000 /* Carrier recovery failed */ + +/* field 'status' - VCR and set-top box */ +#define V4L2_IN_ST_MACROVISION 0x01000000 /* Macrovision detected */ +#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ +#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ + +/* + * V I D E O O U T P U T S + */ +struct v4l2_output +{ + __u32 index; /* Which output */ + __u8 name[32]; /* Label */ + __u32 type; /* Type of output */ + __u32 audioset; /* Associated audios (bitfield) */ + __u32 modulator; /* Associated modulator */ + v4l2_std_id std; + __u32 reserved[4]; +}; +/* Values for the 'type' field */ +#define V4L2_OUTPUT_TYPE_MODULATOR 1 +#define V4L2_OUTPUT_TYPE_ANALOG 2 +#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 + +/* + * C O N T R O L S + */ +struct v4l2_control +{ + __u32 id; + __s32 value; +}; + +/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ +struct v4l2_queryctrl +{ + __u32 id; + enum v4l2_ctrl_type type; + __u8 name[32]; /* Whatever */ + __s32 minimum; /* Note signedness */ + __s32 maximum; + __s32 step; + __s32 default_value; + __u32 flags; + __u32 reserved[2]; +}; + +/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ +struct v4l2_querymenu +{ + __u32 id; + __u32 index; + __u8 name[32]; /* Whatever */ + __u32 reserved; +}; + +/* Control flags */ +#define V4L2_CTRL_FLAG_DISABLED 0x0001 +#define V4L2_CTRL_FLAG_GRABBED 0x0002 + +/* Control IDs defined by V4L2 */ +#define V4L2_CID_BASE 0x00980900 +/* IDs reserved for driver specific controls */ +#define V4L2_CID_PRIVATE_BASE 0x08000000 + +#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) +#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) +#define V4L2_CID_SATURATION (V4L2_CID_BASE+2) +#define V4L2_CID_HUE (V4L2_CID_BASE+3) +#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) +#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) +#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) +#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) +#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) +#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) +#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) +#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) +#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) +#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) +#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) +#define V4L2_CID_GAMMA (V4L2_CID_BASE+16) +#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* ? Not sure */ +#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) +#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) +#define V4L2_CID_GAIN (V4L2_CID_BASE+19) +#define V4L2_CID_HFLIP (V4L2_CID_BASE+20) +#define V4L2_CID_VFLIP (V4L2_CID_BASE+21) +#define V4L2_CID_HCENTER (V4L2_CID_BASE+22) +#define V4L2_CID_VCENTER (V4L2_CID_BASE+23) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ + +/* + * T U N I N G + */ +struct v4l2_tuner +{ + __u32 index; + __u8 name[32]; + enum v4l2_tuner_type type; + __u32 capability; + __u32 rangelow; + __u32 rangehigh; + __u32 rxsubchans; + __u32 audmode; + __s32 signal; + __s32 afc; + __u32 reserved[4]; +}; + +struct v4l2_modulator +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 rangelow; + __u32 rangehigh; + __u32 txsubchans; + __u32 reserved[4]; +}; + +/* Flags for the 'capability' field */ +#define V4L2_TUNER_CAP_LOW 0x0001 +#define V4L2_TUNER_CAP_NORM 0x0002 +#define V4L2_TUNER_CAP_STEREO 0x0010 +#define V4L2_TUNER_CAP_LANG2 0x0020 +#define V4L2_TUNER_CAP_SAP 0x0020 +#define V4L2_TUNER_CAP_LANG1 0x0040 + +/* Flags for the 'rxsubchans' field */ +#define V4L2_TUNER_SUB_MONO 0x0001 +#define V4L2_TUNER_SUB_STEREO 0x0002 +#define V4L2_TUNER_SUB_LANG2 0x0004 +#define V4L2_TUNER_SUB_SAP 0x0004 +#define V4L2_TUNER_SUB_LANG1 0x0008 + +/* Values for the 'audmode' field */ +#define V4L2_TUNER_MODE_MONO 0x0000 +#define V4L2_TUNER_MODE_STEREO 0x0001 +#define V4L2_TUNER_MODE_LANG2 0x0002 +#define V4L2_TUNER_MODE_SAP 0x0002 +#define V4L2_TUNER_MODE_LANG1 0x0003 +#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 + +struct v4l2_frequency +{ + __u32 tuner; + enum v4l2_tuner_type type; + __u32 frequency; + __u32 reserved[8]; +}; + +/* + * A U D I O + */ +struct v4l2_audio +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 mode; + __u32 reserved[2]; +}; +/* Flags for the 'capability' field */ +#define V4L2_AUDCAP_STEREO 0x00001 +#define V4L2_AUDCAP_AVL 0x00002 + +/* Flags for the 'mode' field */ +#define V4L2_AUDMODE_AVL 0x00001 + +struct v4l2_audioout +{ + __u32 index; + __u8 name[32]; + __u32 capability; + __u32 mode; + __u32 reserved[2]; +}; + +/* + * D A T A S E R V I C E S ( V B I ) + * + * Data services API by Michael Schimek + */ + +/* Raw VBI */ + +struct v4l2_vbi_format +{ + __u32 sampling_rate; /* in 1 Hz */ + __u32 offset; + __u32 samples_per_line; + __u32 sample_format; /* V4L2_PIX_FMT_* */ + __s32 start[2]; + __u32 count[2]; + __u32 flags; /* V4L2_VBI_* */ + __u32 reserved[2]; /* must be zero */ +}; + +/* VBI flags */ +#define V4L2_VBI_UNSYNC (1<< 0) +#define V4L2_VBI_INTERLACED (1<< 1) + +#if 1 +/* Sliced VBI + * + * This implements is a proposal V4L2 API to allow SLICED VBI + * required for some hardware encoders. It should change without + * notice in the definitive implementation. + */ + +struct v4l2_sliced_vbi_format +{ + __u16 service_set; + /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field + service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field + (equals frame lines 313-336 for 625 line video + standards, 263-286 for 525 line standards) */ + __u16 service_lines[2][24]; + __u32 io_size; + __u32 reserved[2]; /* must be zero */ +}; + +/* Teletext World System Teletext + (WST), defined on ITU-R BT.653-2 */ +#define V4L2_SLICED_TELETEXT_B (0x0001) +/* Video Program System, defined on ETS 300 231*/ +#define V4L2_SLICED_VPS (0x0400) +/* Closed Caption, defined on EIA-608 */ +#define V4L2_SLICED_CAPTION_525 (0x1000) +/* Wide Screen System, defined on ITU-R BT1119.1 */ +#define V4L2_SLICED_WSS_625 (0x4000) + +#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) +#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) + + +struct v4l2_sliced_vbi_cap +{ + __u16 service_set; + /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field + service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field + (equals frame lines 313-336 for 625 line video + standards, 263-286 for 525 line standards) */ + __u16 service_lines[2][24]; + __u32 reserved[4]; /* must be 0 */ +}; + +struct v4l2_sliced_vbi_data +{ + __u32 id; + __u32 field; /* 0: first field, 1: second field */ + __u32 line; /* 1-23 */ + __u32 reserved; /* must be 0 */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed May 4 08:41:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9831106564A; Wed, 4 May 2011 08:41:55 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9FE58FC12; Wed, 4 May 2011 08:41:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p448ftwT038190; Wed, 4 May 2011 08:41:55 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p448ftQP038188; Wed, 4 May 2011 08:41:55 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105040841.p448ftQP038188@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 08:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221424 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 08:41:56 -0000 Author: netchild Date: Wed May 4 08:41:55 2011 New Revision: 221424 URL: http://svn.freebsd.org/changeset/base/221424 Log: Add explanation about the use-permission and FreeBSDify it. Modified: head/sys/compat/linux/linux_videodev2.h Modified: head/sys/compat/linux/linux_videodev2.h ============================================================================== --- head/sys/compat/linux/linux_videodev2.h Wed May 4 08:31:58 2011 (r221423) +++ head/sys/compat/linux/linux_videodev2.h Wed May 4 08:41:55 2011 (r221424) @@ -1,3 +1,12 @@ +/* + * This header comes from linux, but it has no license. The author + * (Bill Dirks) gave explicit permissions to use it in FreeBSD. + * The FreeBSD vendor branch for v4l gives a more detailed description + * about this in the README. + * + * $FreeBSD$ + */ + #ifndef __LINUX_VIDEODEV2_H #define __LINUX_VIDEODEV2_H /* @@ -13,6 +22,11 @@ * Justin Schoeman * et al. */ +#ifdef __FreeBSD__ +#define __user +typedef uint64_t __u64; +typedef int64_t __s64; +#else #ifdef __KERNEL__ #include /* need struct timeval */ #include @@ -20,6 +34,7 @@ #include #endif #include /* need __user */ +#endif #define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ From owner-svn-src-all@FreeBSD.ORG Wed May 4 08:42:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAE2B106566B; Wed, 4 May 2011 08:42:31 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AFAA8FC13; Wed, 4 May 2011 08:42:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p448gViX038246; Wed, 4 May 2011 08:42:31 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p448gV62038244; Wed, 4 May 2011 08:42:31 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105040842.p448gV62038244@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 08:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221425 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 08:42:31 -0000 Author: netchild Date: Wed May 4 08:42:31 2011 New Revision: 221425 URL: http://svn.freebsd.org/changeset/base/221425 Log: Fix typo in comment, improve comment. Modified: head/sys/compat/linux/linux_videodev.h Modified: head/sys/compat/linux/linux_videodev.h ============================================================================== --- head/sys/compat/linux/linux_videodev.h Wed May 4 08:41:55 2011 (r221424) +++ head/sys/compat/linux/linux_videodev.h Wed May 4 08:42:31 2011 (r221425) @@ -1,8 +1,8 @@ /* * This header comes from linux, but it has no license. The author * (Alan Cox @ Redhat) gave explicit permissions to use it in FreeBSD. - * The freeBSD vendor branch for v4l gives a more detailed description - * about this. + * The FreeBSD vendor branch for v4l gives a more detailed description + * about this in the README. * * $FreeBSD$ */ From owner-svn-src-all@FreeBSD.ORG Wed May 4 09:05:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 178B11065672; Wed, 4 May 2011 09:05:40 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 062CF8FC20; Wed, 4 May 2011 09:05:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4495e3V039070; Wed, 4 May 2011 09:05:40 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4495dqA039067; Wed, 4 May 2011 09:05:39 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105040905.p4495dqA039067@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 09:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221426 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 09:05:40 -0000 Author: netchild Date: Wed May 4 09:05:39 2011 New Revision: 221426 URL: http://svn.freebsd.org/changeset/base/221426 Log: This is v4l2 support for the linuxulator. This allows to access FreeBSD native devices which support the v4l2 API from processes running within the linuxulator, e.g. skype or flash can access the multimedia/pwcbsd or multimedia/webcamd supplied drivers. Submitted by: nox MFC after: 1 month Modified: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Wed May 4 08:42:31 2011 (r221425) +++ head/sys/compat/linux/linux_ioctl.c Wed May 4 09:05:39 2011 (r221426) @@ -59,6 +59,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include @@ -83,6 +86,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); static linux_ioctl_function_t linux_ioctl_cdrom; @@ -97,6 +103,7 @@ static linux_ioctl_function_t linux_ioct static linux_ioctl_function_t linux_ioctl_drm; static linux_ioctl_function_t linux_ioctl_sg; static linux_ioctl_function_t linux_ioctl_v4l; +static linux_ioctl_function_t linux_ioctl_v4l2; static linux_ioctl_function_t linux_ioctl_special; static linux_ioctl_function_t linux_ioctl_fbsd_usb; @@ -124,6 +131,8 @@ static struct linux_ioctl_handler sg_han { linux_ioctl_sg, LINUX_IOCTL_SG_MIN, LINUX_IOCTL_SG_MAX }; static struct linux_ioctl_handler video_handler = { linux_ioctl_v4l, LINUX_IOCTL_VIDEO_MIN, LINUX_IOCTL_VIDEO_MAX }; +static struct linux_ioctl_handler video2_handler = +{ linux_ioctl_v4l2, LINUX_IOCTL_VIDEO2_MIN, LINUX_IOCTL_VIDEO2_MAX }; static struct linux_ioctl_handler fbsd_usb = { linux_ioctl_fbsd_usb, FBSD_LUSB_MIN, FBSD_LUSB_MAX }; @@ -139,6 +148,7 @@ DATA_SET(linux_ioctl_handler_set, privat DATA_SET(linux_ioctl_handler_set, drm_handler); DATA_SET(linux_ioctl_handler_set, sg_handler); DATA_SET(linux_ioctl_handler_set, video_handler); +DATA_SET(linux_ioctl_handler_set, video2_handler); DATA_SET(linux_ioctl_handler_set, fbsd_usb); struct handler_element @@ -2988,6 +2998,302 @@ linux_ioctl_special(struct thread *td, s return (error); } +static int +linux_to_bsd_v4l2_standard(struct l_v4l2_standard *lvstd, struct v4l2_standard *vstd) +{ + vstd->index = lvstd->index; + vstd->id = lvstd->id; + memcpy(&vstd->name, &lvstd->name, sizeof(*lvstd) - offsetof(struct l_v4l2_standard, name)); + return (0); +} + +static int +bsd_to_linux_v4l2_standard(struct v4l2_standard *vstd, struct l_v4l2_standard *lvstd) +{ + lvstd->index = vstd->index; + lvstd->id = vstd->id; + memcpy(&lvstd->name, &vstd->name, sizeof(*lvstd) - offsetof(struct l_v4l2_standard, name)); + return (0); +} + +static int +linux_to_bsd_v4l2_buffer(struct l_v4l2_buffer *lvb, struct v4l2_buffer *vb) +{ + vb->index = lvb->index; + vb->type = lvb->type; + vb->bytesused = lvb->bytesused; + vb->flags = lvb->flags; + vb->field = lvb->field; + vb->timestamp.tv_sec = lvb->timestamp.tv_sec; + vb->timestamp.tv_usec = lvb->timestamp.tv_usec; + memcpy(&vb->timecode, &lvb->timecode, sizeof (lvb->timecode)); + vb->sequence = lvb->sequence; + vb->memory = lvb->memory; + if (lvb->memory == V4L2_MEMORY_USERPTR) + /* possible pointer size conversion */ + vb->m.userptr = (unsigned long)PTRIN(lvb->m.userptr); + else + vb->m.offset = lvb->m.offset; + vb->length = lvb->length; + vb->input = lvb->input; + vb->reserved = lvb->reserved; + return (0); +} + +static int +bsd_to_linux_v4l2_buffer(struct v4l2_buffer *vb, struct l_v4l2_buffer *lvb) +{ + lvb->index = vb->index; + lvb->type = vb->type; + lvb->bytesused = vb->bytesused; + lvb->flags = vb->flags; + lvb->field = vb->field; + lvb->timestamp.tv_sec = vb->timestamp.tv_sec; + lvb->timestamp.tv_usec = vb->timestamp.tv_usec; + memcpy(&lvb->timecode, &vb->timecode, sizeof (vb->timecode)); + lvb->sequence = vb->sequence; + lvb->memory = vb->memory; + if (vb->memory == V4L2_MEMORY_USERPTR) + /* possible pointer size conversion */ + lvb->m.userptr = PTROUT(vb->m.userptr); + else + lvb->m.offset = vb->m.offset; + lvb->length = vb->length; + lvb->input = vb->input; + lvb->reserved = vb->reserved; + return (0); +} + +static int +linux_to_bsd_v4l2_format(struct l_v4l2_format *lvf, struct v4l2_format *vf) +{ + vf->type = lvf->type; + if (lvf->type == V4L2_BUF_TYPE_VIDEO_OVERLAY +#ifdef V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY + || lvf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY +#endif + ) + /* + * XXX TODO - needs 32 -> 64 bit conversion: + * (unused by webcams?) + */ + return EINVAL; + memcpy(&vf->fmt, &lvf->fmt, sizeof(vf->fmt)); + return 0; +} + +static int +bsd_to_linux_v4l2_format(struct v4l2_format *vf, struct l_v4l2_format *lvf) +{ + lvf->type = vf->type; + if (vf->type == V4L2_BUF_TYPE_VIDEO_OVERLAY +#ifdef V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY + || vf->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY +#endif + ) + /* + * XXX TODO - needs 32 -> 64 bit conversion: + * (unused by webcams?) + */ + return EINVAL; + memcpy(&lvf->fmt, &vf->fmt, sizeof(vf->fmt)); + return 0; +} +static int +linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args) +{ + struct file *fp; + int error; + struct v4l2_format vformat; + struct l_v4l2_format l_vformat; + struct v4l2_standard vstd; + struct l_v4l2_standard l_vstd; + struct l_v4l2_buffer l_vbuf; + struct v4l2_buffer vbuf; + struct v4l2_input vinp; + + switch (args->cmd & 0xffff) { + case LINUX_VIDIOC_RESERVED: + case LINUX_VIDIOC_LOG_STATUS: + if ((args->cmd & IOC_DIRMASK) != LINUX_IOC_VOID) + return ENOIOCTL; + args->cmd = (args->cmd & 0xffff) | IOC_VOID; + break; + + case LINUX_VIDIOC_OVERLAY: + case LINUX_VIDIOC_STREAMON: + case LINUX_VIDIOC_STREAMOFF: + case LINUX_VIDIOC_S_STD: + case LINUX_VIDIOC_S_TUNER: + case LINUX_VIDIOC_S_AUDIO: + case LINUX_VIDIOC_S_AUDOUT: + case LINUX_VIDIOC_S_MODULATOR: + case LINUX_VIDIOC_S_FREQUENCY: + case LINUX_VIDIOC_S_CROP: + case LINUX_VIDIOC_S_JPEGCOMP: + case LINUX_VIDIOC_S_PRIORITY: + case LINUX_VIDIOC_DBG_S_REGISTER: + case LINUX_VIDIOC_S_HW_FREQ_SEEK: + case LINUX_VIDIOC_SUBSCRIBE_EVENT: + case LINUX_VIDIOC_UNSUBSCRIBE_EVENT: + args->cmd = (args->cmd & ~IOC_DIRMASK) | IOC_IN; + break; + + case LINUX_VIDIOC_QUERYCAP: + case LINUX_VIDIOC_G_STD: + case LINUX_VIDIOC_G_AUDIO: + case LINUX_VIDIOC_G_INPUT: + case LINUX_VIDIOC_G_OUTPUT: + case LINUX_VIDIOC_G_AUDOUT: + case LINUX_VIDIOC_G_JPEGCOMP: + case LINUX_VIDIOC_QUERYSTD: + case LINUX_VIDIOC_G_PRIORITY: + case LINUX_VIDIOC_QUERY_DV_PRESET: + args->cmd = (args->cmd & ~IOC_DIRMASK) | IOC_OUT; + break; + + case LINUX_VIDIOC_ENUM_FMT: + case LINUX_VIDIOC_REQBUFS: + case LINUX_VIDIOC_G_PARM: + case LINUX_VIDIOC_S_PARM: + case LINUX_VIDIOC_G_CTRL: + case LINUX_VIDIOC_S_CTRL: + case LINUX_VIDIOC_G_TUNER: + case LINUX_VIDIOC_QUERYCTRL: + case LINUX_VIDIOC_QUERYMENU: + case LINUX_VIDIOC_S_INPUT: + case LINUX_VIDIOC_S_OUTPUT: + case LINUX_VIDIOC_ENUMOUTPUT: + case LINUX_VIDIOC_G_MODULATOR: + case LINUX_VIDIOC_G_FREQUENCY: + case LINUX_VIDIOC_CROPCAP: + case LINUX_VIDIOC_G_CROP: + case LINUX_VIDIOC_ENUMAUDIO: + case LINUX_VIDIOC_ENUMAUDOUT: + case LINUX_VIDIOC_G_SLICED_VBI_CAP: +#ifdef VIDIOC_ENUM_FRAMESIZES + case LINUX_VIDIOC_ENUM_FRAMESIZES: + case LINUX_VIDIOC_ENUM_FRAMEINTERVALS: + case LINUX_VIDIOC_ENCODER_CMD: + case LINUX_VIDIOC_TRY_ENCODER_CMD: +#endif + case LINUX_VIDIOC_DBG_G_REGISTER: + case LINUX_VIDIOC_DBG_G_CHIP_IDENT: + case LINUX_VIDIOC_ENUM_DV_PRESETS: + case LINUX_VIDIOC_S_DV_PRESET: + case LINUX_VIDIOC_G_DV_PRESET: + case LINUX_VIDIOC_S_DV_TIMINGS: + case LINUX_VIDIOC_G_DV_TIMINGS: + args->cmd = (args->cmd & ~IOC_DIRMASK) | IOC_INOUT; + break; + + case LINUX_VIDIOC_G_FMT: + case LINUX_VIDIOC_S_FMT: + case LINUX_VIDIOC_TRY_FMT: + error = copyin((void *)args->arg, &l_vformat, sizeof(l_vformat)); + if (error) + return (error); + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + if (linux_to_bsd_v4l2_format(&l_vformat, &vformat) != 0) + error = EINVAL; + else if ((args->cmd & 0xffff) == LINUX_VIDIOC_G_FMT) + error = fo_ioctl(fp, VIDIOC_G_FMT, &vformat, + td->td_ucred, td); + else if ((args->cmd & 0xffff) == LINUX_VIDIOC_S_FMT) + error = fo_ioctl(fp, VIDIOC_S_FMT, &vformat, + td->td_ucred, td); + else + error = fo_ioctl(fp, VIDIOC_TRY_FMT, &vformat, + td->td_ucred, td); + bsd_to_linux_v4l2_format(&vformat, &l_vformat); + copyout(&l_vformat, (void *)args->arg, sizeof(l_vformat)); + fdrop(fp, td); + return (error); + + case LINUX_VIDIOC_ENUMSTD: + error = copyin((void *)args->arg, &l_vstd, sizeof(l_vstd)); + if (error) + return (error); + linux_to_bsd_v4l2_standard(&l_vstd, &vstd); + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = fo_ioctl(fp, VIDIOC_ENUMSTD, (caddr_t)&vstd, + td->td_ucred, td); + if (error) { + fdrop(fp, td); + return (error); + } + bsd_to_linux_v4l2_standard(&vstd, &l_vstd); + error = copyout(&l_vstd, (void *)args->arg, sizeof(l_vstd)); + fdrop(fp, td); + return (error); + + case LINUX_VIDIOC_ENUMINPUT: + /* + * The Linux struct l_v4l2_input differs only in size, + * it has no padding at the end. + */ + error = copyin((void *)args->arg, &vinp, + sizeof(struct l_v4l2_input)); + if (error != 0) + return (error); + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + error = fo_ioctl(fp, VIDIOC_ENUMINPUT, (caddr_t)&vinp, + td->td_ucred, td); + if (error) { + fdrop(fp, td); + return (error); + } + error = copyout(&vinp, (void *)args->arg, + sizeof(struct l_v4l2_input)); + fdrop(fp, td); + return (error); + + case LINUX_VIDIOC_QUERYBUF: + case LINUX_VIDIOC_QBUF: + case LINUX_VIDIOC_DQBUF: + error = copyin((void *)args->arg, &l_vbuf, sizeof(l_vbuf)); + if (error) + return (error); + if ((error = fget(td, args->fd, &fp)) != 0) + return (error); + linux_to_bsd_v4l2_buffer(&l_vbuf, &vbuf); + if ((args->cmd & 0xffff) == LINUX_VIDIOC_QUERYBUF) + error = fo_ioctl(fp, VIDIOC_QUERYBUF, &vbuf, + td->td_ucred, td); + else if ((args->cmd & 0xffff) == LINUX_VIDIOC_QBUF) + error = fo_ioctl(fp, VIDIOC_QBUF, &vbuf, + td->td_ucred, td); + else + error = fo_ioctl(fp, VIDIOC_DQBUF, &vbuf, + td->td_ucred, td); + bsd_to_linux_v4l2_buffer(&vbuf, &l_vbuf); + copyout(&l_vbuf, (void *)args->arg, sizeof(l_vbuf)); + fdrop(fp, td); + return (error); + + /* + * XXX TODO - these need 32 -> 64 bit conversion: + * (are any of them needed for webcams?) + */ + case LINUX_VIDIOC_G_FBUF: + case LINUX_VIDIOC_S_FBUF: + + case LINUX_VIDIOC_G_EXT_CTRLS: + case LINUX_VIDIOC_S_EXT_CTRLS: + case LINUX_VIDIOC_TRY_EXT_CTRLS: + + case LINUX_VIDIOC_DQEVENT: + + default: return (ENOIOCTL); + } + + error = ioctl(td, (struct ioctl_args *)args); + return (error); +} + /* * Support for emulators/linux-libusb. This port uses FBSD_LUSB* macros * instead of USB* ones. This lets us to provide correct values for cmd. Modified: head/sys/compat/linux/linux_ioctl.h ============================================================================== --- head/sys/compat/linux/linux_ioctl.h Wed May 4 08:42:31 2011 (r221425) +++ head/sys/compat/linux/linux_ioctl.h Wed May 4 09:05:39 2011 (r221426) @@ -32,6 +32,17 @@ #define _LINUX_IOCTL_H_ /* + * ioctl + * + * XXX comments in Linux' indicate these + * could be arch-dependant... + */ +#define LINUX_IOC_VOID 0 +#define LINUX_IOC_IN 0x40000000 +#define LINUX_IOC_OUT 0x80000000 +#define LINUX_IOC_INOUT (LINUX_IOC_IN|LINUX_IOC_OUT) + +/* * disk */ #define LINUX_BLKROSET 0x125d @@ -612,6 +623,92 @@ int linux_ifname(struct ifnet *, char #define LINUX_IOCTL_VIDEO_MIN LINUX_VIDIOCGCAP #define LINUX_IOCTL_VIDEO_MAX LINUX_VIDIOCSVBIFMT +/* videodev2 aka V4L2 */ + +#define LINUX_VIDIOC_QUERYCAP 0x5600 /* 0x80685600 */ +#define LINUX_VIDIOC_RESERVED 0x5601 /* 0x00005601 */ +#define LINUX_VIDIOC_ENUM_FMT 0x5602 /* 0xc0405602 */ +#define LINUX_VIDIOC_G_FMT 0x5604 /* 0xc0cc5604 */ +#define LINUX_VIDIOC_S_FMT 0x5605 /* 0xc0cc5605 */ +#define LINUX_VIDIOC_REQBUFS 0x5608 /* 0xc0145608 */ +#define LINUX_VIDIOC_QUERYBUF 0x5609 /* 0xc0445609 */ +#define LINUX_VIDIOC_G_FBUF 0x560a /* 0x802c560a */ +#define LINUX_VIDIOC_S_FBUF 0x560b /* 0x402c560b */ +#define LINUX_VIDIOC_OVERLAY 0x560e /* 0x4004560e */ +#define LINUX_VIDIOC_QBUF 0x560f /* 0xc044560f */ +#define LINUX_VIDIOC_DQBUF 0x5611 /* 0xc0445611 */ +#define LINUX_VIDIOC_STREAMON 0x5612 /* 0x40045612 */ +#define LINUX_VIDIOC_STREAMOFF 0x5613 /* 0x40045613 */ +#define LINUX_VIDIOC_G_PARM 0x5615 /* 0xc0cc5615 */ +#define LINUX_VIDIOC_S_PARM 0x5616 /* 0xc0cc5616 */ +#define LINUX_VIDIOC_G_STD 0x5617 /* 0x80085617 */ +#define LINUX_VIDIOC_S_STD 0x5618 /* 0x40085618 */ +#define LINUX_VIDIOC_ENUMSTD 0x5619 /* 0xc0405619 */ +#define LINUX_VIDIOC_ENUMINPUT 0x561a /* 0xc04c561a */ +#define LINUX_VIDIOC_G_CTRL 0x561b /* 0xc008561b */ +#define LINUX_VIDIOC_S_CTRL 0x561c /* 0xc008561c */ +#define LINUX_VIDIOC_G_TUNER 0x561d /* 0xc054561d */ +#define LINUX_VIDIOC_S_TUNER 0x561e /* 0x4054561e */ +#define LINUX_VIDIOC_G_AUDIO 0x5621 /* 0x80345621 */ +#define LINUX_VIDIOC_S_AUDIO 0x5622 /* 0x40345622 */ +#define LINUX_VIDIOC_QUERYCTRL 0x5624 /* 0xc0445624 */ +#define LINUX_VIDIOC_QUERYMENU 0x5625 /* 0xc02c5625 */ +#define LINUX_VIDIOC_G_INPUT 0x5626 /* 0x80045626 */ +#define LINUX_VIDIOC_S_INPUT 0x5627 /* 0xc0045627 */ +#define LINUX_VIDIOC_G_OUTPUT 0x562e /* 0x8004562e */ +#define LINUX_VIDIOC_S_OUTPUT 0x562f /* 0xc004562f */ +#define LINUX_VIDIOC_ENUMOUTPUT 0x5630 /* 0xc0485630 */ +#define LINUX_VIDIOC_G_AUDOUT 0x5631 /* 0x80345631 */ +#define LINUX_VIDIOC_S_AUDOUT 0x5632 /* 0x40345632 */ +#define LINUX_VIDIOC_G_MODULATOR 0x5636 /* 0xc0445636 */ +#define LINUX_VIDIOC_S_MODULATOR 0x5637 /* 0x40445637 */ +#define LINUX_VIDIOC_G_FREQUENCY 0x5638 /* 0xc02c5638 */ +#define LINUX_VIDIOC_S_FREQUENCY 0x5639 /* 0x402c5639 */ +#define LINUX_VIDIOC_CROPCAP 0x563a /* 0xc02c563a */ +#define LINUX_VIDIOC_G_CROP 0x563b /* 0xc014563b */ +#define LINUX_VIDIOC_S_CROP 0x563c /* 0x4014563c */ +#define LINUX_VIDIOC_G_JPEGCOMP 0x563d /* 0x808c563d */ +#define LINUX_VIDIOC_S_JPEGCOMP 0x563e /* 0x408c563e */ +#define LINUX_VIDIOC_QUERYSTD 0x563f /* 0x8008563f */ +#define LINUX_VIDIOC_TRY_FMT 0x5640 /* 0xc0cc5640 */ +#define LINUX_VIDIOC_ENUMAUDIO 0x5641 /* 0xc0345641 */ +#define LINUX_VIDIOC_ENUMAUDOUT 0x5642 /* 0xc0345642 */ +#define LINUX_VIDIOC_G_PRIORITY 0x5643 /* 0x80045643 */ +#define LINUX_VIDIOC_S_PRIORITY 0x5644 /* 0x40045644 */ +#define LINUX_VIDIOC_G_SLICED_VBI_CAP 0x5645 /* 0xc0745645 */ +#define LINUX_VIDIOC_LOG_STATUS 0x5646 /* 0x00005646 */ +#define LINUX_VIDIOC_G_EXT_CTRLS 0x5647 /* 0xc0185647 */ +#define LINUX_VIDIOC_S_EXT_CTRLS 0x5648 /* 0xc0185648 */ +#define LINUX_VIDIOC_TRY_EXT_CTRLS 0x5649 /* 0xc0185649 */ +#define LINUX_VIDIOC_ENUM_FRAMESIZES 0x564a /* 0xc02c564a */ +#define LINUX_VIDIOC_ENUM_FRAMEINTERVALS 0x564b /* 0xc034564b */ +#define LINUX_VIDIOC_G_ENC_INDEX 0x564c /* 0x8818564c */ +#define LINUX_VIDIOC_ENCODER_CMD 0x564d /* 0xc028564d */ +#define LINUX_VIDIOC_TRY_ENCODER_CMD 0x564e /* 0xc028564e */ +#define LINUX_VIDIOC_DBG_S_REGISTER 0x564f /* 0x4038564f */ +#define LINUX_VIDIOC_DBG_G_REGISTER 0x5650 /* 0xc0385650 */ +#define LINUX_VIDIOC_DBG_G_CHIP_IDENT 0x5651 /* 0xc02c5651 */ +#define LINUX_VIDIOC_S_HW_FREQ_SEEK 0x5652 /* 0x40305652 */ +#define LINUX_VIDIOC_ENUM_DV_PRESETS 0x5653 /* 0xc0405653 */ +#define LINUX_VIDIOC_S_DV_PRESET 0x5654 /* 0xc0145654 */ +#define LINUX_VIDIOC_G_DV_PRESET 0x5655 /* 0xc0145655 */ +#define LINUX_VIDIOC_QUERY_DV_PRESET 0x5656 /* 0x80145656 */ +#define LINUX_VIDIOC_S_DV_TIMINGS 0x5657 /* 0xc0845657 */ +#define LINUX_VIDIOC_G_DV_TIMINGS 0x5658 /* 0xc0845658 */ +#define LINUX_VIDIOC_DQEVENT 0x5659 /* 0x80785659 */ +#define LINUX_VIDIOC_SUBSCRIBE_EVENT 0x565a /* 0x4020565a */ +#define LINUX_VIDIOC_UNSUBSCRIBE_EVENT 0x565b /* 0x4020565b */ + +#define LINUX_VIDIOC_OVERLAY_OLD 0x560e /* 0xc004560e */ +#define LINUX_VIDIOC_S_PARM_OLD 0x5616 /* 0x40cc5616 */ +#define LINUX_VIDIOC_S_CTRL_OLD 0x561c /* 0x4008561c */ +#define LINUX_VIDIOC_G_AUDIO_OLD 0x5621 /* 0xc0345621 */ +#define LINUX_VIDIOC_G_AUDOUT_OLD 0x5631 /* 0xc0345631 */ +#define LINUX_VIDIOC_CROPCAP_OLD 0x563a /* 0x802c563a */ + +#define LINUX_IOCTL_VIDEO2_MIN LINUX_VIDIOC_QUERYCAP +#define LINUX_IOCTL_VIDEO2_MAX LINUX_VIDIOC_UNSUBSCRIBE_EVENT + /* * Our libusb(8) calls emulated within linux(4). */ From owner-svn-src-all@FreeBSD.ORG Wed May 4 09:26:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EB18106566B; Wed, 4 May 2011 09:26:33 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DFC88FC08; Wed, 4 May 2011 09:26:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p449QXlE039715; Wed, 4 May 2011 09:26:33 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p449QXPr039713; Wed, 4 May 2011 09:26:33 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105040926.p449QXPr039713@svn.freebsd.org> From: Adrian Chadd Date: Wed, 4 May 2011 09:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221427 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 09:26:33 -0000 Author: adrian Date: Wed May 4 09:26:33 2011 New Revision: 221427 URL: http://svn.freebsd.org/changeset/base/221427 Log: Remove this useless bit of code for Kite. The RIFS register value is overriden by the initvals, so disabling RIFS before calling writeIni() effectively does nothing. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Wed May 4 09:05:39 2011 (r221426) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Wed May 4 09:26:33 2011 (r221427) @@ -168,13 +168,6 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO if (AR_SREV_MERLIN_10_OR_LATER(ah)) OS_REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE); - if (AR_SREV_KITE(ah)) { - uint32_t val; - val = OS_REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS); - val &= ~AR_PHY_RIFS_INIT_DELAY; - OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val); - } - AH5416(ah)->ah_writeIni(ah, chan); /* Override ini values (that can be overriden in this fashion) */ From owner-svn-src-all@FreeBSD.ORG Wed May 4 09:52:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8FE61065670; Wed, 4 May 2011 09:52:34 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A777B8FC18; Wed, 4 May 2011 09:52:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p449qYNX040492; Wed, 4 May 2011 09:52:34 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p449qYkt040490; Wed, 4 May 2011 09:52:34 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105040952.p449qYkt040490@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 09:52:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221428 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 09:52:34 -0000 Author: netchild Date: Wed May 4 09:52:34 2011 New Revision: 221428 URL: http://svn.freebsd.org/changeset/base/221428 Log: Add FEATURE macros for v4l and v4l2 to the linuxulator. Suggested by: ae Modified: head/sys/compat/linux/linux_ioctl.c Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Wed May 4 09:26:33 2011 (r221427) +++ head/sys/compat/linux/linux_ioctl.c Wed May 4 09:52:34 2011 (r221428) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -91,6 +92,9 @@ __FBSDID("$FreeBSD$"); CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); +FEATURE(linuxulator_v4l, "V4L ioctl wrapper support in the linuxulator"); +FEATURE(linuxulator_v4l2, "V4L2 ioctl wrapper support in the linuxulator"); + static linux_ioctl_function_t linux_ioctl_cdrom; static linux_ioctl_function_t linux_ioctl_vfat; static linux_ioctl_function_t linux_ioctl_console; From owner-svn-src-all@FreeBSD.ORG Wed May 4 11:18:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33FED1065670; Wed, 4 May 2011 11:18:02 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id BEE738FC23; Wed, 4 May 2011 11:18:01 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 901182A2915A; Wed, 4 May 2011 13:17:59 +0200 (CEST) Date: Wed, 4 May 2011 13:17:59 +0200 From: Ed Schouten To: Nathan Whitehorn Message-ID: <20110504111759.GK2183@hoeg.nl> References: <201105040252.p442qfI4027516@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvuyDaC2GNSBQusT" Content-Disposition: inline In-Reply-To: <201105040252.p442qfI4027516@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221419 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 11:18:02 -0000 --GvuyDaC2GNSBQusT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Nathan, * Nathan Whitehorn , 20110504 04:52: > chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildke= rnel" || exit 1 > +chroot $2 /bin/sh -c "cd /usr/src/release && make obj" || exit 1 > chroot $2 /bin/sh -c "cd /usr/src/release && make release" || exit 1 > chroot $2 /bin/sh -c "cd /usr/src/release && make install DESTDIR=3D/R" = || exit 1 Wouldn't it be a bit more elegant to do something like this? chroot $2 make -C /usr/src/release obj Also, if you enable set -e, the script terminates upon error. Greetings, --=20 Ed Schouten WWW: http://80386.nl/ --GvuyDaC2GNSBQusT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQIcBAEBAgAGBQJNwTXnAAoJEG5e2P40kaK7VboQAJlUVWbg1IGd1RojNStV65h9 4zMMxgjzaD/dcUoysCdTMNXCpI82f2XUTDi+mu//qeyuI3ZVfUquddF+dW1+lOmT SKD8vc4aCD6Z1uLJ49wRImjBCyTWl25Gs8JYqwo5GUueNNmTlBc/7mYtuKkrLEAU WLKE72A/cXRqxg8iksCRpsCAjh7HfnwQwhxcNAjChgDQoLiaY2XHaxv2I3lpFgAL HU6xSqY72Olb2wD3/dfthUAYamd8lqRLEGPrlt6fI6CTDu0Y5G1WY4hGgtt9GQOS F6NMnl7W+sCZzK2eReOxiZ+VUOPF2eD1ZmJImThcOeEK/2wsGwLYDMb7ZPssdtau rY6CjglaOLnbyhN9sDT5LDn1hZgSEizNurJ9pHxv1ueaHS94r2Nner2k/GVLe6kX COFoGB6b+x6y2+eaUfIo+oFwDCKn4ZtfVFgXU/MVSwk3J6uUaoXu3P+eA015DVge 9iECxamIDWxwCP5P7W2Eu3e4+v1h287KEaldNipptEqXf2y4bgN7IfpRHlIR5/SS WlE9z7Wv0oeGvpdoN/ove2UBBHIUAAzHtdM920p3sDEnOUqy6qQn3WL/QGKPSP9n wXfguAsdDF9hwMk/AilNhDPemLeid4q2+h2VK07NMW0iXXYqCmFdguZw/NZrt/m3 cjkW+pE7SqhdAseROKIk =zcss -----END PGP SIGNATURE----- --GvuyDaC2GNSBQusT-- From owner-svn-src-all@FreeBSD.ORG Wed May 4 11:22:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E216106566B; Wed, 4 May 2011 11:22:52 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB218FC08; Wed, 4 May 2011 11:22:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44BMq7a047398; Wed, 4 May 2011 11:22:52 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44BMqEl047396; Wed, 4 May 2011 11:22:52 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105041122.p44BMqEl047396@svn.freebsd.org> From: Ruslan Ermilov Date: Wed, 4 May 2011 11:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221429 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 11:22:52 -0000 Author: ru Date: Wed May 4 11:22:52 2011 New Revision: 221429 URL: http://svn.freebsd.org/changeset/base/221429 Log: In ncl_printf(), call vprintf() instead of printf(). MFC after: 3 days Modified: head/sys/fs/nfsclient/nfs_clsubs.c Modified: head/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clsubs.c Wed May 4 09:52:34 2011 (r221428) +++ head/sys/fs/nfsclient/nfs_clsubs.c Wed May 4 11:22:52 2011 (r221429) @@ -167,7 +167,7 @@ ncl_printf(const char *fmt, ...) mtx_lock(&Giant); va_start(ap, fmt); - printf(fmt, ap); + vprintf(fmt, ap); va_end(ap); mtx_unlock(&Giant); } From owner-svn-src-all@FreeBSD.ORG Wed May 4 11:29:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B5D0106566C; Wed, 4 May 2011 11:29:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id C86318FC0C; Wed, 4 May 2011 11:29:44 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 5E97F25D3860; Wed, 4 May 2011 11:29:43 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5CDC9159EA70; Wed, 4 May 2011 11:29:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id l6o5e4Asnl+3; Wed, 4 May 2011 11:29:41 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 3C3C5159EA6F; Wed, 4 May 2011 11:29:41 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <20110504111759.GK2183@hoeg.nl> Date: Wed, 4 May 2011 11:29:40 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105040252.p442qfI4027516@svn.freebsd.org> <20110504111759.GK2183@hoeg.nl> To: Ed Schouten X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Nathan Whitehorn Subject: Re: svn commit: r221419 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 11:29:45 -0000 On May 4, 2011, at 11:17 AM, Ed Schouten wrote: > Hi Nathan, >=20 > * Nathan Whitehorn , 20110504 04:52: >> chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld = buildkernel" || exit 1 >> +chroot $2 /bin/sh -c "cd /usr/src/release && make obj" || exit 1 >> chroot $2 /bin/sh -c "cd /usr/src/release && make release" || exit 1 >> chroot $2 /bin/sh -c "cd /usr/src/release && make install DESTDIR=3D/R"= || exit 1 >=20 > Wouldn't it be a bit more elegant to do something like this? >=20 > chroot $2 make -C /usr/src/release obj >=20 > Also, if you enable set -e, the script terminates upon error. Which is as bad as well as it needs to cleanup devfs mounts etc. in case = of errors. I am trying to get one finished and will post the results as = well as possible error cases I have hit so we can generally improve the script = and make it more robust. So far I am on build #4 ;-) /bz --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Wed May 4 12:25:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF3271065670; Wed, 4 May 2011 12:25:16 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm1.ukr.net (fsm1.ukr.net [195.214.192.120]) by mx1.freebsd.org (Postfix) with ESMTP id 2F9048FC1F; Wed, 4 May 2011 12:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=SNhnbh+tnPRIAnqmhuk4cf2KgY0+6RkaXI62dYZqvrw=; b=WYDbgKwMXQb9HGL7ZfvAM302P6z1aw1kFCk0Nl9rBB6SdP5YoP/pTmDP0PPfSoOTC1QXYPlqFM6QT1eW/t9vPgWaWsdlhqp9Qj/K22VgjaJ5lK4Es1DnVkxyOibJKy1GuDtNuidWEAaOwHYou+CPVXMKXrDDkgoypjIwf8CGyU0=; Received: from [46.185.0.237] (helo=localhost) by fsm1.ukr.net with esmtps ID 1QHaIM-000PAE-BK ; Wed, 04 May 2011 14:31:06 +0300 Date: Wed, 4 May 2011 14:32:20 +0300 From: Ivan Klymenko To: Alexander Leidinger Message-ID: <20110504143220.2c997f6b@ukr.net> In-Reply-To: <201105040905.p4495dqA039067@svn.freebsd.org> References: <201105040905.p4495dqA039067@svn.freebsd.org> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221426 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 12:25:16 -0000 =D0=92 Wed, 4 May 2011 09:05:39 +0000 (UTC) Alexander Leidinger =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Author: netchild > Date: Wed May 4 09:05:39 2011 > New Revision: 221426 > URL: http://svn.freebsd.org/changeset/base/221426 >=20 > Log: > This is v4l2 support for the linuxulator. This allows to access > FreeBSD native devices which support the v4l2 API from processes > running within the linuxulator, e.g. skype or flash can access the > multimedia/pwcbsd or multimedia/webcamd supplied drivers. > =20 > Submitted by: nox > MFC after: 1 month >=20 > Modified: > head/sys/compat/linux/linux_ioctl.c > head/sys/compat/linux/linux_ioctl.h >=20 > Modified: head/sys/compat/linux/linux_ioctl.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/compat/linux/linux_ioctl.c Wed May 4 08:42:31 > 2011 (r221425) +++ head/sys/compat/linux/linux_ioctl.c > Wed May 4 09:05:39 2011 (r221426) @@ -59,6 +59,9 @@ > __FBSDID("$FreeBSD$"); #include > #include > #include > +#include > +#include > +#include > =20 > #include > #include > @@ -83,6 +86,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > =20 > +#include > +#include > + > CTASSERT(LINUX_IFNAMSIZ =3D=3D IFNAMSIZ); > =20 > static linux_ioctl_function_t linux_ioctl_cdrom; > @@ -97,6 +103,7 @@ static linux_ioctl_function_t linux_ioct > static linux_ioctl_function_t linux_ioctl_drm; > static linux_ioctl_function_t linux_ioctl_sg; > static linux_ioctl_function_t linux_ioctl_v4l; > +static linux_ioctl_function_t linux_ioctl_v4l2; > static linux_ioctl_function_t linux_ioctl_special; > static linux_ioctl_function_t linux_ioctl_fbsd_usb; > =20 > @@ -124,6 +131,8 @@ static struct linux_ioctl_handler sg_han > { linux_ioctl_sg, LINUX_IOCTL_SG_MIN, LINUX_IOCTL_SG_MAX }; > static struct linux_ioctl_handler video_handler =3D > { linux_ioctl_v4l, LINUX_IOCTL_VIDEO_MIN, LINUX_IOCTL_VIDEO_MAX }; > +static struct linux_ioctl_handler video2_handler =3D > +{ linux_ioctl_v4l2, LINUX_IOCTL_VIDEO2_MIN, LINUX_IOCTL_VIDEO2_MAX }; > static struct linux_ioctl_handler fbsd_usb =3D > { linux_ioctl_fbsd_usb, FBSD_LUSB_MIN, FBSD_LUSB_MAX }; > =20 > @@ -139,6 +148,7 @@ DATA_SET(linux_ioctl_handler_set, privat > DATA_SET(linux_ioctl_handler_set, drm_handler); > DATA_SET(linux_ioctl_handler_set, sg_handler); > DATA_SET(linux_ioctl_handler_set, video_handler); > +DATA_SET(linux_ioctl_handler_set, video2_handler); > DATA_SET(linux_ioctl_handler_set, fbsd_usb); > =20 > struct handler_element > @@ -2988,6 +2998,302 @@ linux_ioctl_special(struct thread *td, s > return (error); > } > =20 > +static int > +linux_to_bsd_v4l2_standard(struct l_v4l2_standard *lvstd, struct > v4l2_standard *vstd) +{ > + vstd->index =3D lvstd->index; > + vstd->id =3D lvstd->id; > + memcpy(&vstd->name, &lvstd->name, sizeof(*lvstd) - > offsetof(struct l_v4l2_standard, name)); > + return (0); > +} > + > +static int > +bsd_to_linux_v4l2_standard(struct v4l2_standard *vstd, struct > l_v4l2_standard *lvstd) +{ > + lvstd->index =3D vstd->index; > + lvstd->id =3D vstd->id; > + memcpy(&lvstd->name, &vstd->name, sizeof(*lvstd) - > offsetof(struct l_v4l2_standard, name)); > + return (0); > +} > + > +static int > +linux_to_bsd_v4l2_buffer(struct l_v4l2_buffer *lvb, struct > v4l2_buffer *vb) +{ > + vb->index =3D lvb->index; > + vb->type =3D lvb->type; > + vb->bytesused =3D lvb->bytesused; > + vb->flags =3D lvb->flags; > + vb->field =3D lvb->field; > + vb->timestamp.tv_sec =3D lvb->timestamp.tv_sec; > + vb->timestamp.tv_usec =3D lvb->timestamp.tv_usec; > + memcpy(&vb->timecode, &lvb->timecode, sizeof > (lvb->timecode)); > + vb->sequence =3D lvb->sequence; > + vb->memory =3D lvb->memory; > + if (lvb->memory =3D=3D V4L2_MEMORY_USERPTR) > + /* possible pointer size conversion */ > + vb->m.userptr =3D (unsigned long)PTRIN(lvb->m.userptr); > + else > + vb->m.offset =3D lvb->m.offset; > + vb->length =3D lvb->length; > + vb->input =3D lvb->input; > + vb->reserved =3D lvb->reserved; > + return (0); > +} > + > +static int > +bsd_to_linux_v4l2_buffer(struct v4l2_buffer *vb, struct > l_v4l2_buffer *lvb) +{ > + lvb->index =3D vb->index; > + lvb->type =3D vb->type; > + lvb->bytesused =3D vb->bytesused; > + lvb->flags =3D vb->flags; > + lvb->field =3D vb->field; > + lvb->timestamp.tv_sec =3D vb->timestamp.tv_sec; > + lvb->timestamp.tv_usec =3D vb->timestamp.tv_usec; > + memcpy(&lvb->timecode, &vb->timecode, sizeof (vb->timecode)); > + lvb->sequence =3D vb->sequence; > + lvb->memory =3D vb->memory; > + if (vb->memory =3D=3D V4L2_MEMORY_USERPTR) > + /* possible pointer size conversion */ > + lvb->m.userptr =3D PTROUT(vb->m.userptr); > + else > + lvb->m.offset =3D vb->m.offset; > + lvb->length =3D vb->length; > + lvb->input =3D vb->input; > + lvb->reserved =3D vb->reserved; > + return (0); > +} > + > +static int > +linux_to_bsd_v4l2_format(struct l_v4l2_format *lvf, struct > v4l2_format *vf) +{ > + vf->type =3D lvf->type; > + if (lvf->type =3D=3D V4L2_BUF_TYPE_VIDEO_OVERLAY > +#ifdef V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY > + || lvf->type =3D=3D V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY > +#endif > + ) > + /* > + * XXX TODO - needs 32 -> 64 bit conversion: > + * (unused by webcams?) > + */ > + return EINVAL; > + memcpy(&vf->fmt, &lvf->fmt, sizeof(vf->fmt)); > + return 0; > +} > + > +static int > +bsd_to_linux_v4l2_format(struct v4l2_format *vf, struct > l_v4l2_format *lvf) +{ > + lvf->type =3D vf->type; > + if (vf->type =3D=3D V4L2_BUF_TYPE_VIDEO_OVERLAY > +#ifdef V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY > + || vf->type =3D=3D V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY > +#endif > + ) > + /* > + * XXX TODO - needs 32 -> 64 bit conversion: > + * (unused by webcams?) > + */ > + return EINVAL; > + memcpy(&lvf->fmt, &vf->fmt, sizeof(vf->fmt)); > + return 0; > +} > +static int > +linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args) > +{ > + struct file *fp; > + int error; > + struct v4l2_format vformat; > + struct l_v4l2_format l_vformat; > + struct v4l2_standard vstd; > + struct l_v4l2_standard l_vstd; > + struct l_v4l2_buffer l_vbuf; > + struct v4l2_buffer vbuf; > + struct v4l2_input vinp; > + > + switch (args->cmd & 0xffff) { > + case LINUX_VIDIOC_RESERVED: > + case LINUX_VIDIOC_LOG_STATUS: > + if ((args->cmd & IOC_DIRMASK) !=3D LINUX_IOC_VOID) > + return ENOIOCTL; > + args->cmd =3D (args->cmd & 0xffff) | IOC_VOID; > + break; > + > + case LINUX_VIDIOC_OVERLAY: > + case LINUX_VIDIOC_STREAMON: > + case LINUX_VIDIOC_STREAMOFF: > + case LINUX_VIDIOC_S_STD: > + case LINUX_VIDIOC_S_TUNER: > + case LINUX_VIDIOC_S_AUDIO: > + case LINUX_VIDIOC_S_AUDOUT: > + case LINUX_VIDIOC_S_MODULATOR: > + case LINUX_VIDIOC_S_FREQUENCY: > + case LINUX_VIDIOC_S_CROP: > + case LINUX_VIDIOC_S_JPEGCOMP: > + case LINUX_VIDIOC_S_PRIORITY: > + case LINUX_VIDIOC_DBG_S_REGISTER: > + case LINUX_VIDIOC_S_HW_FREQ_SEEK: > + case LINUX_VIDIOC_SUBSCRIBE_EVENT: > + case LINUX_VIDIOC_UNSUBSCRIBE_EVENT: > + args->cmd =3D (args->cmd & ~IOC_DIRMASK) | IOC_IN; > + break; > + > + case LINUX_VIDIOC_QUERYCAP: > + case LINUX_VIDIOC_G_STD: > + case LINUX_VIDIOC_G_AUDIO: > + case LINUX_VIDIOC_G_INPUT: > + case LINUX_VIDIOC_G_OUTPUT: > + case LINUX_VIDIOC_G_AUDOUT: > + case LINUX_VIDIOC_G_JPEGCOMP: > + case LINUX_VIDIOC_QUERYSTD: > + case LINUX_VIDIOC_G_PRIORITY: > + case LINUX_VIDIOC_QUERY_DV_PRESET: > + args->cmd =3D (args->cmd & ~IOC_DIRMASK) | IOC_OUT; > + break; > + > + case LINUX_VIDIOC_ENUM_FMT: > + case LINUX_VIDIOC_REQBUFS: > + case LINUX_VIDIOC_G_PARM: > + case LINUX_VIDIOC_S_PARM: > + case LINUX_VIDIOC_G_CTRL: > + case LINUX_VIDIOC_S_CTRL: > + case LINUX_VIDIOC_G_TUNER: > + case LINUX_VIDIOC_QUERYCTRL: > + case LINUX_VIDIOC_QUERYMENU: > + case LINUX_VIDIOC_S_INPUT: > + case LINUX_VIDIOC_S_OUTPUT: > + case LINUX_VIDIOC_ENUMOUTPUT: > + case LINUX_VIDIOC_G_MODULATOR: > + case LINUX_VIDIOC_G_FREQUENCY: > + case LINUX_VIDIOC_CROPCAP: > + case LINUX_VIDIOC_G_CROP: > + case LINUX_VIDIOC_ENUMAUDIO: > + case LINUX_VIDIOC_ENUMAUDOUT: > + case LINUX_VIDIOC_G_SLICED_VBI_CAP: > +#ifdef VIDIOC_ENUM_FRAMESIZES > + case LINUX_VIDIOC_ENUM_FRAMESIZES: > + case LINUX_VIDIOC_ENUM_FRAMEINTERVALS: > + case LINUX_VIDIOC_ENCODER_CMD: > + case LINUX_VIDIOC_TRY_ENCODER_CMD: > +#endif > + case LINUX_VIDIOC_DBG_G_REGISTER: > + case LINUX_VIDIOC_DBG_G_CHIP_IDENT: > + case LINUX_VIDIOC_ENUM_DV_PRESETS: > + case LINUX_VIDIOC_S_DV_PRESET: > + case LINUX_VIDIOC_G_DV_PRESET: > + case LINUX_VIDIOC_S_DV_TIMINGS: > + case LINUX_VIDIOC_G_DV_TIMINGS: > + args->cmd =3D (args->cmd & ~IOC_DIRMASK) | IOC_INOUT; > + break; > + > + case LINUX_VIDIOC_G_FMT: > + case LINUX_VIDIOC_S_FMT: > + case LINUX_VIDIOC_TRY_FMT: > + error =3D copyin((void *)args->arg, &l_vformat, > sizeof(l_vformat)); > + if (error) > + return (error); > + if ((error =3D fget(td, args->fd, &fp)) !=3D 0) > + return (error); > + if (linux_to_bsd_v4l2_format(&l_vformat, > &vformat) !=3D 0) > + error =3D EINVAL; > + else if ((args->cmd & 0xffff) =3D=3D LINUX_VIDIOC_G_FMT) > + error =3D fo_ioctl(fp, VIDIOC_G_FMT, &vformat, > + td->td_ucred, td); > + else if ((args->cmd & 0xffff) =3D=3D LINUX_VIDIOC_S_FMT) > + error =3D fo_ioctl(fp, VIDIOC_S_FMT, &vformat, > + td->td_ucred, td); > + else > + error =3D fo_ioctl(fp, VIDIOC_TRY_FMT, > &vformat, > + td->td_ucred, td); > + bsd_to_linux_v4l2_format(&vformat, &l_vformat); > + copyout(&l_vformat, (void *)args->arg, > sizeof(l_vformat)); > + fdrop(fp, td); > + return (error); > + > + case LINUX_VIDIOC_ENUMSTD: > + error =3D copyin((void *)args->arg, &l_vstd, > sizeof(l_vstd)); > + if (error) > + return (error); > + linux_to_bsd_v4l2_standard(&l_vstd, &vstd); > + if ((error =3D fget(td, args->fd, &fp)) !=3D 0) > + return (error); > + error =3D fo_ioctl(fp, VIDIOC_ENUMSTD, (caddr_t)&vstd, > + td->td_ucred, td); > + if (error) { > + fdrop(fp, td); > + return (error); > + } > + bsd_to_linux_v4l2_standard(&vstd, &l_vstd); > + error =3D copyout(&l_vstd, (void *)args->arg, > sizeof(l_vstd)); > + fdrop(fp, td); > + return (error); > + > + case LINUX_VIDIOC_ENUMINPUT: > + /* > + * The Linux struct l_v4l2_input differs only in > size, > + * it has no padding at the end. > + */ > + error =3D copyin((void *)args->arg, &vinp, > + sizeof(struct l_v4l2_input)); > + if (error !=3D 0) > + return (error); > + if ((error =3D fget(td, args->fd, &fp)) !=3D 0) > + return (error); > + error =3D fo_ioctl(fp, VIDIOC_ENUMINPUT, > (caddr_t)&vinp, > + td->td_ucred, td); > + if (error) { > + fdrop(fp, td); > + return (error); > + } > + error =3D copyout(&vinp, (void *)args->arg, > + sizeof(struct l_v4l2_input)); > + fdrop(fp, td); > + return (error); > + > + case LINUX_VIDIOC_QUERYBUF: > + case LINUX_VIDIOC_QBUF: > + case LINUX_VIDIOC_DQBUF: > + error =3D copyin((void *)args->arg, &l_vbuf, > sizeof(l_vbuf)); > + if (error) > + return (error); > + if ((error =3D fget(td, args->fd, &fp)) !=3D 0) > + return (error); > + linux_to_bsd_v4l2_buffer(&l_vbuf, &vbuf); > + if ((args->cmd & 0xffff) =3D=3D LINUX_VIDIOC_QUERYBUF) > + error =3D fo_ioctl(fp, VIDIOC_QUERYBUF, &vbuf, > + td->td_ucred, td); > + else if ((args->cmd & 0xffff) =3D=3D LINUX_VIDIOC_QBUF) > + error =3D fo_ioctl(fp, VIDIOC_QBUF, &vbuf, > + td->td_ucred, td); > + else > + error =3D fo_ioctl(fp, VIDIOC_DQBUF, &vbuf, > + td->td_ucred, td); > + bsd_to_linux_v4l2_buffer(&vbuf, &l_vbuf); > + copyout(&l_vbuf, (void *)args->arg, sizeof(l_vbuf)); > + fdrop(fp, td); > + return (error); > + > + /* > + * XXX TODO - these need 32 -> 64 bit conversion: > + * (are any of them needed for webcams?) > + */ > + case LINUX_VIDIOC_G_FBUF: > + case LINUX_VIDIOC_S_FBUF: > + > + case LINUX_VIDIOC_G_EXT_CTRLS: > + case LINUX_VIDIOC_S_EXT_CTRLS: > + case LINUX_VIDIOC_TRY_EXT_CTRLS: > + > + case LINUX_VIDIOC_DQEVENT: > + > + default: return (ENOIOCTL); > + } > + > + error =3D ioctl(td, (struct ioctl_args *)args); > + return (error); > +} > + > /* > * Support for emulators/linux-libusb. This port uses FBSD_LUSB* > macros > * instead of USB* ones. This lets us to provide correct values for > cmd. >=20 > Modified: head/sys/compat/linux/linux_ioctl.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/compat/linux/linux_ioctl.h Wed May 4 08:42:31 > 2011 (r221425) +++ head/sys/compat/linux/linux_ioctl.h > Wed May 4 09:05:39 2011 (r221426) @@ -32,6 +32,17 @@ > #define _LINUX_IOCTL_H_ > =20 > /* > + * ioctl > + * > + * XXX comments in Linux' indicate these > + * could be arch-dependant... > + */ > +#define LINUX_IOC_VOID 0 > +#define LINUX_IOC_IN 0x40000000 > +#define LINUX_IOC_OUT 0x80000000 > +#define LINUX_IOC_INOUT (LINUX_IOC_IN|LINUX_IOC_OUT) > + > +/* > * disk > */ > #define LINUX_BLKROSET 0x125d > @@ -612,6 +623,92 @@ int linux_ifname(struct ifnet *, > char #define LINUX_IOCTL_VIDEO_MIN LINUX_VIDIOCGCAP > #define LINUX_IOCTL_VIDEO_MAX LINUX_VIDIOCSVBIFMT > =20 > +/* videodev2 aka V4L2 */ > + > +#define LINUX_VIDIOC_QUERYCAP 0x5600 /* > 0x80685600 */ +#define LINUX_VIDIOC_RESERVED > 0x5601 /* 0x00005601 */ +#define > LINUX_VIDIOC_ENUM_FMT 0x5602 /* 0xc0405602 */ > +#define LINUX_VIDIOC_G_FMT 0x5604 /* > 0xc0cc5604 */ +#define LINUX_VIDIOC_S_FMT > 0x5605 /* 0xc0cc5605 */ +#define > LINUX_VIDIOC_REQBUFS 0x5608 /* 0xc0145608 */ > +#define LINUX_VIDIOC_QUERYBUF 0x5609 /* > 0xc0445609 */ +#define LINUX_VIDIOC_G_FBUF > 0x560a /* 0x802c560a */ +#define > LINUX_VIDIOC_S_FBUF 0x560b /* 0x402c560b */ > +#define LINUX_VIDIOC_OVERLAY 0x560e /* > 0x4004560e */ +#define LINUX_VIDIOC_QBUF > 0x560f /* 0xc044560f */ +#define > LINUX_VIDIOC_DQBUF 0x5611 /* 0xc0445611 */ > +#define LINUX_VIDIOC_STREAMON 0x5612 /* > 0x40045612 */ +#define LINUX_VIDIOC_STREAMOFF > 0x5613 /* 0x40045613 */ +#define > LINUX_VIDIOC_G_PARM 0x5615 /* 0xc0cc5615 */ > +#define LINUX_VIDIOC_S_PARM 0x5616 /* > 0xc0cc5616 */ +#define LINUX_VIDIOC_G_STD > 0x5617 /* 0x80085617 */ +#define > LINUX_VIDIOC_S_STD 0x5618 /* 0x40085618 */ > +#define LINUX_VIDIOC_ENUMSTD 0x5619 /* > 0xc0405619 */ +#define LINUX_VIDIOC_ENUMINPUT > 0x561a /* 0xc04c561a */ +#define > LINUX_VIDIOC_G_CTRL 0x561b /* 0xc008561b */ > +#define LINUX_VIDIOC_S_CTRL 0x561c /* > 0xc008561c */ +#define LINUX_VIDIOC_G_TUNER > 0x561d /* 0xc054561d */ +#define > LINUX_VIDIOC_S_TUNER 0x561e /* 0x4054561e */ > +#define LINUX_VIDIOC_G_AUDIO 0x5621 /* > 0x80345621 */ +#define LINUX_VIDIOC_S_AUDIO > 0x5622 /* 0x40345622 */ +#define > LINUX_VIDIOC_QUERYCTRL 0x5624 /* 0xc0445624 */ > +#define LINUX_VIDIOC_QUERYMENU 0x5625 /* > 0xc02c5625 */ +#define LINUX_VIDIOC_G_INPUT > 0x5626 /* 0x80045626 */ +#define > LINUX_VIDIOC_S_INPUT 0x5627 /* 0xc0045627 */ > +#define LINUX_VIDIOC_G_OUTPUT 0x562e /* > 0x8004562e */ +#define LINUX_VIDIOC_S_OUTPUT > 0x562f /* 0xc004562f */ +#define > LINUX_VIDIOC_ENUMOUTPUT 0x5630 /* 0xc0485630 > */ +#define LINUX_VIDIOC_G_AUDOUT 0x5631 /* > 0x80345631 */ +#define LINUX_VIDIOC_S_AUDOUT > 0x5632 /* 0x40345632 */ +#define > LINUX_VIDIOC_G_MODULATOR 0x5636 /* 0xc0445636 */ > +#define LINUX_VIDIOC_S_MODULATOR 0x5637 /* 0x40445637 > */ +#define LINUX_VIDIOC_G_FREQUENCY 0x5638 /* > 0xc02c5638 */ +#define LINUX_VIDIOC_S_FREQUENCY > 0x5639 /* 0x402c5639 */ +#define > LINUX_VIDIOC_CROPCAP 0x563a /* 0xc02c563a */ > +#define LINUX_VIDIOC_G_CROP 0x563b /* > 0xc014563b */ +#define LINUX_VIDIOC_S_CROP > 0x563c /* 0x4014563c */ +#define > LINUX_VIDIOC_G_JPEGCOMP 0x563d /* 0x808c563d > */ +#define LINUX_VIDIOC_S_JPEGCOMP 0x563e /* > 0x408c563e */ +#define LINUX_VIDIOC_QUERYSTD > 0x563f /* 0x8008563f */ +#define > LINUX_VIDIOC_TRY_FMT 0x5640 /* 0xc0cc5640 */ > +#define LINUX_VIDIOC_ENUMAUDIO 0x5641 /* > 0xc0345641 */ +#define LINUX_VIDIOC_ENUMAUDOUT > 0x5642 /* 0xc0345642 */ +#define > LINUX_VIDIOC_G_PRIORITY 0x5643 /* 0x80045643 > */ +#define LINUX_VIDIOC_S_PRIORITY 0x5644 /* > 0x40045644 */ +#define LINUX_VIDIOC_G_SLICED_VBI_CAP > 0x5645 /* 0xc0745645 */ +#define > LINUX_VIDIOC_LOG_STATUS 0x5646 /* 0x00005646 > */ +#define LINUX_VIDIOC_G_EXT_CTRLS 0x5647 /* > 0xc0185647 */ +#define LINUX_VIDIOC_S_EXT_CTRLS > 0x5648 /* 0xc0185648 */ +#define > LINUX_VIDIOC_TRY_EXT_CTRLS 0x5649 /* 0xc0185649 */ > +#define LINUX_VIDIOC_ENUM_FRAMESIZES 0x564a /* > 0xc02c564a */ +#define LINUX_VIDIOC_ENUM_FRAMEINTERVALS > 0x564b /* 0xc034564b */ +#define > LINUX_VIDIOC_G_ENC_INDEX 0x564c /* 0x8818564c */ > +#define LINUX_VIDIOC_ENCODER_CMD 0x564d /* 0xc028564d > */ +#define LINUX_VIDIOC_TRY_ENCODER_CMD 0x564e /* > 0xc028564e */ +#define LINUX_VIDIOC_DBG_S_REGISTER > 0x564f /* 0x4038564f */ +#define > LINUX_VIDIOC_DBG_G_REGISTER 0x5650 /* 0xc0385650 */ > +#define LINUX_VIDIOC_DBG_G_CHIP_IDENT 0x5651 /* > 0xc02c5651 */ +#define LINUX_VIDIOC_S_HW_FREQ_SEEK > 0x5652 /* 0x40305652 */ +#define > LINUX_VIDIOC_ENUM_DV_PRESETS 0x5653 /* 0xc0405653 */ > +#define LINUX_VIDIOC_S_DV_PRESET 0x5654 /* 0xc0145654 > */ +#define LINUX_VIDIOC_G_DV_PRESET 0x5655 /* > 0xc0145655 */ +#define LINUX_VIDIOC_QUERY_DV_PRESET > 0x5656 /* 0x80145656 */ +#define > LINUX_VIDIOC_S_DV_TIMINGS 0x5657 /* 0xc0845657 */ > +#define LINUX_VIDIOC_G_DV_TIMINGS 0x5658 /* > 0xc0845658 */ +#define LINUX_VIDIOC_DQEVENT > 0x5659 /* 0x80785659 */ +#define > LINUX_VIDIOC_SUBSCRIBE_EVENT 0x565a /* 0x4020565a */ > +#define LINUX_VIDIOC_UNSUBSCRIBE_EVENT 0x565b /* > 0x4020565b */ + +#define LINUX_VIDIOC_OVERLAY_OLD > 0x560e /* 0xc004560e */ +#define > LINUX_VIDIOC_S_PARM_OLD 0x5616 /* 0x40cc5616 > */ +#define LINUX_VIDIOC_S_CTRL_OLD 0x561c /* > 0x4008561c */ +#define LINUX_VIDIOC_G_AUDIO_OLD > 0x5621 /* 0xc0345621 */ +#define > LINUX_VIDIOC_G_AUDOUT_OLD 0x5631 /* 0xc0345631 */ > +#define LINUX_VIDIOC_CROPCAP_OLD 0x563a /* 0x802c563a > */ + +#define LINUX_IOCTL_VIDEO2_MIN LINUX_VIDIOC_QUERYCAP > +#define LINUX_IOCTL_VIDEO2_MAX LINUX_VIDIOC_UNSUBSCRIBE_EVENT > + /* > * Our libusb(8) calls emulated within linux(4). > */ > _______________________________________________ > 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-unsubscribe@freebsd.org" >=20 >=20 ... /usr/src/sys/modules/linux/../../compat/linux/linux_ioctl.c:91:49: error: c= ompat/linux/linux_videodev2_compat.h: No such file or directory ... From owner-svn-src-all@FreeBSD.ORG Wed May 4 12:37:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1948106564A; Wed, 4 May 2011 12:37:10 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E055B8FC18; Wed, 4 May 2011 12:37:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44CbAIq049627; Wed, 4 May 2011 12:37:10 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44CbAcW049625; Wed, 4 May 2011 12:37:10 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105041237.p44CbAcW049625@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 12:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221430 - head/etc/periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 12:37:11 -0000 Author: netchild Date: Wed May 4 12:37:10 2011 New Revision: 221430 URL: http://svn.freebsd.org/changeset/base/221430 Log: Use proper return codes (valuable output, invalid config, problems). MFC after: 1 week Modified: head/etc/periodic/daily/800.scrub-zfs Modified: head/etc/periodic/daily/800.scrub-zfs ============================================================================== --- head/etc/periodic/daily/800.scrub-zfs Wed May 4 11:22:52 2011 (r221429) +++ head/etc/periodic/daily/800.scrub-zfs Wed May 4 12:37:10 2011 (r221430) @@ -26,10 +26,12 @@ case "$daily_scrub_zfs_enable" in daily_scrub_zfs_pools="$(zpool list -H -o name)" fi + rc=0 for pool in ${daily_scrub_zfs_pools}; do # sanity check _status=$(zpool list "${pool}" 2> /dev/null) if [ $? -ne 0 ]; then + rc=2 echo " WARNING: pool '${pool}' specified in" echo " '/etc/periodic.conf:daily_scrub_zfs_pools'" echo " does not exist" @@ -38,13 +40,11 @@ case "$daily_scrub_zfs_enable" in _status=${_status##*$newline} case ${_status} in *FAULTED*) + rc=3 echo "Skipping faulted pool: ${pool}" continue ;; esac - # successful only if there is at least one pool to scrub - rc=0 - # determine how many days shall be between scrubs eval _pool_threshold=\${daily_scrub_zfs_${pool}_threshold} if [ -z "${_pool_threshold}" ];then @@ -77,10 +77,12 @@ case "$daily_scrub_zfs_enable" in *"none requested"*) echo " starting first scrub (since reboot) of pool '${pool}':" zpool scrub ${pool} + [ $rc -eq 0 ] && rc=1 ;; *) echo " starting scrub of pool '${pool}':" zpool scrub ${pool} + [ $rc -eq 0 ] && rc=1 ;; esac From owner-svn-src-all@FreeBSD.ORG Wed May 4 12:44:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6569D1065675; Wed, 4 May 2011 12:44:46 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 526168FC12; Wed, 4 May 2011 12:44:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44CiktT049916; Wed, 4 May 2011 12:44:46 GMT (envelope-from jonathan@svn.freebsd.org) Received: (from jonathan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44CikvT049911; Wed, 4 May 2011 12:44:46 GMT (envelope-from jonathan@svn.freebsd.org) Message-Id: <201105041244.p44CikvT049911@svn.freebsd.org> From: Jonathan Anderson Date: Wed, 4 May 2011 12:44:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221431 - head/tools/regression/security/cap_test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 12:44:46 -0000 Author: jonathan Date: Wed May 4 12:44:46 2011 New Revision: 221431 URL: http://svn.freebsd.org/changeset/base/221431 Log: Regression tests for Capsicum capability mode. Ensure that system calls that access global namespaces, e.g. open(2), are not permitted, and that whitelisted sysctls like kern.osreldate are. Approved by: rwatson Sponsored by: Google, Inc. Added: head/tools/regression/security/cap_test/ head/tools/regression/security/cap_test/Makefile (contents, props changed) head/tools/regression/security/cap_test/cap_test.c (contents, props changed) head/tools/regression/security/cap_test/cap_test.h (contents, props changed) head/tools/regression/security/cap_test/cap_test_capmode.c (contents, props changed) head/tools/regression/security/cap_test/cap_test_sysctl.c (contents, props changed) Added: head/tools/regression/security/cap_test/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/security/cap_test/Makefile Wed May 4 12:44:46 2011 (r221431) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PROG= cap_test +SRCS= cap_test.c cap_test_capmode.c cap_test_sysctl.c +WARNS= 3 +NO_MAN= +CFLAGS+= -DMACHINE=\"${MACHINE}\" + +.include Added: head/tools/regression/security/cap_test/cap_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/security/cap_test/cap_test.c Wed May 4 12:44:46 2011 (r221431) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2008-2011 Robert N. M. Watson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "cap_test.h" + +int +main(int argc, char *argv[]) +{ + test_capmode(); + test_sysctl(); + /* + test_capabilities(); + test_syscalls(); + test_fcntl(); + */ + exit(0); +} Added: head/tools/regression/security/cap_test/cap_test.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/security/cap_test/cap_test.h Wed May 4 12:44:46 2011 (r221431) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2008-2011 Robert N. M. Watson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef CAP_TEST_H +#define CAP_TEST_H + +void test_capmode(void); +void test_capabilities(void); +void test_syscalls(void); +void test_sysctl(void); +void test_fcntl(void); + +#endif /* CAP_TEST_H */ Added: head/tools/regression/security/cap_test/cap_test_capmode.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/security/cap_test/cap_test_capmode.c Wed May 4 12:44:46 2011 (r221431) @@ -0,0 +1,426 @@ +/*- + * Copyright (c) 2008-2009 Robert N. M. Watson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Test routines to make sure a variety of system calls are or are not + * available in capability mode. The goal is not to see if they work, just + * whether or not they return the expected ECAPMODE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +/* Need to check machine-dependent sysarch(). */ +#define ARCH_IS(s) (!strncmp(s, MACHINE, sizeof(s) + 1)) + +#include "cap_test.h" + +void +test_capmode(void) +{ + struct sockaddr_in sin; + struct statfs statfs; + struct stat sb; + ssize_t len; + long sysarch_arg = 0; + int fd, fd_close, fd_dir, fd_file, fd_socket, fd2[2], ret; + pid_t pid, wpid; + char ch; + + fd_file = open("/tmp/cap_test_syscalls", O_RDWR|O_CREAT, 0644); + if (fd_file < 0) + err(-1, "test_syscalls:prep: open cap_test_syscalls"); + + fd_close = open("/dev/null", O_RDWR); + if (fd_close < 0) + err(-1, "test_syscalls:prep: open /dev/null"); + + fd_dir = open("/tmp", O_RDONLY); + if (fd_dir < 0) + err(-1, "test_syscalls:prep: open /tmp"); + + fd_socket = socket(PF_INET, SOCK_DGRAM, 0); + if (fd_socket < 0) + err(-1, "test_syscalls:prep: socket"); + + if (cap_enter() < 0) + err(-1, "test_syscalls:prep: cap_enter"); + + + bzero(&sin, sizeof(sin)); + sin.sin_len = sizeof(sin); + sin.sin_family = AF_INET; + + /* + * Here begin the tests, sorted roughly alphabetically by system call + * name. + */ + fd = accept(fd_socket, NULL, NULL); + if (fd < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:accept"); + } else { + warnx("test_syscalls:accept succeeded"); + close(fd); + } + + if (access("/tmp/cap_test_syscalls_access", F_OK) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:access"); + } else + warnx("test_syscalls:access succeeded"); + + if (acct("/tmp/cap_test_syscalls_acct") < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:acct"); + } else + warnx("test_syscalls:acct succeeded"); + + if (bind(PF_INET, (struct sockaddr *)&sin, sizeof(sin)) < 0) { + if (errno != ECAPMODE) + warn("test_syscall:bind"); + } else + warnx("test_syscall:bind succeeded"); + + if (chdir("/tmp/cap_test_syscalls_chdir") < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:chdir"); + } else + warnx("test_syscalls:chdir succeeded"); + + if (chflags("/tmp/cap_test_syscalls_chflags", UF_NODUMP) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:chflags"); + } else + warnx("test_syscalls:chflags succeeded"); + + if (chmod("/tmp/cap_test_syscalls_chmod", 0644) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:chmod"); + } else + warnx("test_syscalls:chmod succeeded"); + + if (chown("/tmp/cap_test_syscalls_chown", -1, -1) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:chown"); + } else + warnx("test_syscalls:chown succeeded"); + + if (chroot("/tmp/cap_test_syscalls_chroot") < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:chroot"); + } else + warnx("test_syscalls:chroot succeeded"); + + if (close(fd_close)) { + if (errno == ECAPMODE) + warnx("test_syscalls:close"); + else + warn("test_syscalls:close"); + } + + if (connect(PF_INET, (struct sockaddr *)&sin, sizeof(sin)) < 0) { + if (errno != ECAPMODE) + warn("test_syscall:connect"); + } else + warnx("test_syscall:connect succeeded"); + + fd = creat("/tmp/cap_test_syscalls_creat", 0644); + if (fd >= 0) { + warnx("test_syscalls:creat succeeded"); + close(fd); + } else if (errno != ECAPMODE) + warn("test_syscalls:creat"); + + fd = dup(fd_file); + if (fd < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:dup"); + } else + close(fd); + + if (fchdir(fd_dir) < 0) { + if (errno != ECAPMODE) + warn("test_syscall:fchdir"); + } else + warnx("test_syscalls:fchdir succeeded"); + + if (fchflags(fd_file, UF_NODUMP) < 0) { + if (errno == ECAPMODE) + warnx("test_syscall:fchflags"); + } + + pid = fork(); + if (pid >= 0) { + if (pid == 0) { + exit(0); + } else if (pid > 0) { + wpid = waitpid(pid, NULL, 0); + if (wpid < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:waitpid"); + } else + warnx("test_syscalls:waitpid succeeded"); + } + } else + warn("test_syscalls:fork"); + + if (fstat(fd_file, &sb) < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:fstat"); + } + + /* + * getegid() can't return an error but check for it anyway. + */ + errno = 0; + (void)getegid(); + if (errno == ECAPMODE) + warnx("test_syscalls:getegid"); + + /* + * geteuid() can't return an error but check for it anyway. + */ + errno = 0; + geteuid(); + if (errno == ECAPMODE) + warnx("test_syscalls:geteuid"); + + if (getfsstat(&statfs, sizeof(statfs), MNT_NOWAIT) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:getfsstat"); + } else + warnx("test_syscalls:getfsstat succeeded"); + + /* + * getgid() can't return an error but check for it anyway. + */ + errno = 0; + getgid(); + if (errno == ECAPMODE) + warnx("test_syscalls:getgid"); + + if (getpeername(fd_socket, NULL, NULL) < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:getpeername"); + } + + if (getlogin() == NULL) + warn("test_sycalls:getlogin %d", errno); + + /* + * getpid() can't return an error but check for it anyway. + */ + errno = 0; + (void)getpid(); + if (errno == ECAPMODE) + warnx("test_syscalls:getpid"); + + /* + * getppid() can't return an error but check for it anyway. + */ + errno = 0; + (void)getppid(); + if (errno == ECAPMODE) + warnx("test_syscalls:getppid"); + + if (getsockname(fd_socket, NULL, NULL) < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:getsockname"); + } + + /* + * getuid() can't return an error but check for it anyway. + */ + errno = 0; + (void)getuid(); + if (errno == ECAPMODE) + warnx("test_syscalls:getuid"); + + /* XXXRW: ktrace */ + + if (link("/tmp/foo", "/tmp/bar") < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:link"); + } else + warnx("test_syscalls:link succeeded"); + + ret = lseek(fd_file, SEEK_SET, 0); + if (ret < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:lseek"); + else + warn("test_syscalls:lseek"); + } + + if (lstat("/tmp/cap_test_syscalls_lstat", &sb) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:lstat"); + } else + warnx("test_syscalls:lstat succeeded"); + + if (mknod("/tmp/test_syscalls_mknod", 06440, 0) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:mknod"); + } else + warnx("test_syscalls:mknod succeeded"); + + /* + * mount() is a bit tricky but do our best. + */ + if (mount("procfs", "/not_mounted", 0, NULL) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:mount"); + } else + warnx("test_syscalls:mount succeeded"); + + if (msync(&fd_file, 8192, MS_ASYNC) < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:msync"); + } + + fd = open("/dev/null", O_RDWR); + if (fd >= 0) { + warnx("test_syscalls:open succeeded"); + close(fd); + } + + if (pipe(fd2) == 0) { + close(fd2[0]); + close(fd2[1]); + } else if (errno == ECAPMODE) + warnx("test_syscalls:pipe"); + + if (profil(NULL, 0, 0, 0) < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:profile"); + } + + /* XXXRW: ptrace. */ + + len = read(fd_file, &ch, sizeof(ch)); + if (len < 0 && errno == ECAPMODE) + warnx("test_syscalls:read"); + + if (readlink("/tmp/cap_test_syscalls_readlink", NULL, 0) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:readlink"); + } else + warnx("test_syscalls:readlink succeeded"); + + len = recvfrom(fd_socket, NULL, 0, 0, NULL, NULL); + if (len < 0 && errno == ECAPMODE) + warnx("test_syscalls:recvfrom"); + + len = recvmsg(fd_socket, NULL, 0); + if (len < 0 && errno == ECAPMODE) + warnx("test_syscalls:recvmsg"); + + if (revoke("/tmp/cap_test_syscalls_revoke") < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:revoke"); + } else + warnx("test_syscalls:revoke succeeded"); + + len = sendmsg(fd_socket, NULL, 0); + if (len < 0 && errno == ECAPMODE) + warnx("test_syscalls:sendmsg"); + + len = sendto(fd_socket, NULL, 0, 0, NULL, 0); + if (len < 0 && errno == ECAPMODE) + warn("test_syscalls:sendto(NULL)"); + + if (setuid(getuid()) < 0) { + if (errno == ECAPMODE) + warnx("test_syscalls:setuid"); + } + + if (stat("/tmp/cap_test_syscalls_stat", &sb) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:stat"); + } else + warnx("test_syscalls:stat succeeded"); + + if (symlink("/tmp/cap_test_syscalls_symlink_from", + "/tmp/cap_test_syscalls_symlink_to") < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:symlink"); + } else + warnx("test_syscalls:symlink succeeded"); + + /* sysarch() is, by definition, architecture-dependent */ + if (ARCH_IS("i386") || ARCH_IS("amd64")) { + if (sysarch(I386_SET_IOPERM, &sysarch_arg) != -1) + warnx("test_syscalls:sysarch succeeded"); + else if (errno != ECAPMODE) + warn("test_syscalls:sysarch errno != ECAPMODE"); + + /* XXXJA: write a test for arm */ + } else { + warnx("test_syscalls:no sysarch() test for architecture '%s'", MACHINE); + } + + /* XXXRW: No error return from sync(2) to test. */ + + if (unlink("/tmp/cap_test_syscalls_unlink") < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:unlink"); + } else + warnx("test_syscalls:unlink succeeded"); + + if (unmount("/not_mounted", 0) < 0) { + if (errno != ECAPMODE) + warn("test_syscalls:unmount"); + } else + warnx("test_syscalls:unmount succeeded"); + + len = write(fd_file, &ch, sizeof(ch)); + if (len < 0 && errno == ECAPMODE) + warnx("test_syscalls:write"); + + exit(0); +} Added: head/tools/regression/security/cap_test/cap_test_sysctl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/security/cap_test/cap_test_sysctl.c Wed May 4 12:44:46 2011 (r221431) @@ -0,0 +1,67 @@ +/*- + * Copyright (c) 2008-2011 Robert N. M. Watson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Test that various sysctls are (and aren't) available on capability mode. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "cap_test.h" + +/* + * Certain sysctls are permitted in capability mode, but most are not. Test + * for the ones that should be, and try one or two that shouldn't. + */ +void +test_sysctl(void) +{ + int error, i, oid[2]; + size_t len; + + oid[0] = CTL_KERN; + oid[1] = KERN_OSRELDATE; + len = sizeof(i); + error = sysctl(oid, 2, &i, &len, NULL, 0); + if (error) + warnx("capmode and kern.osreldate failed error %d", errno); + + exit(0); +} From owner-svn-src-all@FreeBSD.ORG Wed May 4 12:48:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FBEC106564A; Wed, 4 May 2011 12:48:03 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6C88FC14; Wed, 4 May 2011 12:48:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44Cm2lE050049; Wed, 4 May 2011 12:48:02 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44Cm2Ni050047; Wed, 4 May 2011 12:48:02 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105041248.p44Cm2Ni050047@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 12:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221432 - head/etc/periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 12:48:03 -0000 Author: netchild Date: Wed May 4 12:48:02 2011 New Revision: 221432 URL: http://svn.freebsd.org/changeset/base/221432 Log: The security run requests unmaskable output, even if the only output is to tell that there is a separate email or that the output is logged to a file. This commit changes the return code for the non-inline case to tell that this message is not important enough and can be masked if necessary. The messages from the security checks themself are not affected by this and show up as before in the periodic security email/file. The inline case still requests to not mask the output, as with the current way of handling this there is no easy way to handle this. PR: 138692 Analysis/patch atch by: Chris Cowart X-MFC after: on request Modified: head/etc/periodic/daily/450.status-security Modified: head/etc/periodic/daily/450.status-security ============================================================================== --- head/etc/periodic/daily/450.status-security Wed May 4 12:44:46 2011 (r221431) +++ head/etc/periodic/daily/450.status-security Wed May 4 12:48:02 2011 (r221432) @@ -23,16 +23,17 @@ case "$daily_status_security_enable" in export security_output="${daily_status_security_output}" case "${daily_status_security_output}" in "") - ;; + rc=3;; /*) - echo " (output logged separately)";; + echo " (output logged separately)" + rc=0;; *) - echo " (output mailed separately)";; + echo " (output mailed separately)" + rc=0;; esac;; esac - periodic security - rc=3;; + periodic security || rc=3;; *) rc=0;; esac From owner-svn-src-all@FreeBSD.ORG Wed May 4 12:59:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B0141065675; Wed, 4 May 2011 12:59:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3146E8FC12; Wed, 4 May 2011 12:59:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44CxCja050390; Wed, 4 May 2011 12:59:12 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44CxCfn050388; Wed, 4 May 2011 12:59:12 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105041259.p44CxCfn050388@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 4 May 2011 12:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221433 - head/sys/geom/label X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 12:59:12 -0000 Author: ae Date: Wed May 4 12:59:11 2011 New Revision: 221433 URL: http://svn.freebsd.org/changeset/base/221433 Log: When checking existence of providers skip those which are orphaned. PR: kern/132273 MFC after: 2 week Modified: head/sys/geom/label/g_label.c Modified: head/sys/geom/label/g_label.c ============================================================================== --- head/sys/geom/label/g_label.c Wed May 4 12:48:02 2011 (r221432) +++ head/sys/geom/label/g_label.c Wed May 4 12:59:11 2011 (r221433) @@ -164,6 +164,8 @@ g_label_create(struct gctl_req *req, str pp2 = LIST_FIRST(&gp->provider); if (pp2 == NULL) continue; + if ((pp2->flags & G_PF_ORPHAN) != 0) + continue; if (strcmp(pp2->name, name) == 0) { G_LABEL_DEBUG(1, "Label %s(%s) already exists (%s).", label, name, pp->name); From owner-svn-src-all@FreeBSD.ORG Wed May 4 13:09:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA0EF106564A; Wed, 4 May 2011 13:09:20 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDD498FC15; Wed, 4 May 2011 13:09:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44D9Kho050751; Wed, 4 May 2011 13:09:20 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44D9KwC050750; Wed, 4 May 2011 13:09:20 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201105041309.p44D9KwC050750@svn.freebsd.org> From: Alexander Leidinger Date: Wed, 4 May 2011 13:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221434 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:09:21 -0000 Author: netchild Date: Wed May 4 13:09:20 2011 New Revision: 221434 URL: http://svn.freebsd.org/changeset/base/221434 Log: Commit the missing linux_videdev2_compat.h (lost somewhere between commit tree patch generation -> successful compile tree build test -> commmit). Pointy hat to: netchild Added: head/sys/compat/linux/linux_videodev2_compat.h (contents, props changed) Added: head/sys/compat/linux/linux_videodev2_compat.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/compat/linux/linux_videodev2_compat.h Wed May 4 13:09:20 2011 (r221434) @@ -0,0 +1,137 @@ +/* + * $FreeBSD$ + */ + +/* + * This file defines compatibility versions of several video structures + * defined in the Linux videodev2.h header (linux_videodev2.h). The + * structures defined in this file are the ones that have been determined + * to have 32- to 64-bit size dependencies. + */ + +#ifndef _LINUX_VIDEODEV2_COMPAT_H_ +#define _LINUX_VIDEODEV2_COMPAT_H_ + +struct l_v4l2_buffer { + uint32_t index; + enum v4l2_buf_type type; + uint32_t bytesused; + uint32_t flags; + enum v4l2_field field; + l_timeval timestamp; + struct v4l2_timecode timecode; + uint32_t sequence; + + /* memory location */ + enum v4l2_memory memory; + union { + uint32_t offset; + l_ulong userptr; + } m; + uint32_t length; + uint32_t input; + uint32_t reserved; +}; + +struct l_v4l2_framebuffer { + uint32_t capability; + uint32_t flags; +/* FIXME: in theory we should pass something like PCI device + memory + * region + offset instead of some physical address */ + l_uintptr_t base; + struct v4l2_pix_format fmt; +}; + +struct l_v4l2_clip { + struct v4l2_rect c; + l_uintptr_t next; +}; + +struct l_v4l2_window { + struct v4l2_rect w; + enum v4l2_field field; + uint32_t chromakey; + l_uintptr_t clips; + uint32_t clipcount; + l_uintptr_t bitmap; + uint8_t global_alpha; +}; + +struct l_v4l2_standard { + uint32_t index; + v4l2_std_id id; + uint8_t name[24]; + struct v4l2_fract frameperiod; /* Frames, not fields */ + uint32_t framelines; + uint32_t reserved[4]; +} +#ifdef COMPAT_LINUX32 /* 32bit linuxolator */ +__attribute__ ((packed)) +#endif +; + +struct l_v4l2_ext_control { + uint32_t id; + uint32_t size; + uint32_t reserved2[1]; + union { + int32_t value; + int64_t value64; + l_uintptr_t string; + } u; +} __attribute__ ((packed)); + +struct l_v4l2_ext_controls { + uint32_t ctrl_class; + uint32_t count; + uint32_t error_idx; + uint32_t reserved[2]; + l_uintptr_t controls; +}; + +struct l_v4l2_format { + enum v4l2_buf_type type; + union { + struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ + struct l_v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ + struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ + struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ + uint8_t raw_data[200]; /* user-defined */ + } fmt; +} +#ifdef COMPAT_LINUX32 /* 32bit linuxolator */ +__attribute__ ((packed)) +#endif +; + +#ifdef VIDIOC_DQEVENT +struct l_v4l2_event { + uint32_t type; + union { + struct v4l2_event_vsync vsync; + uint8_t data[64]; + } u; + uint32_t pending; + uint32_t sequence; + struct l_timespec timestamp; + uint32_t reserved[9]; +}; +#endif + +struct l_v4l2_input { + uint32_t index; /* Which input */ + uint8_t name[32]; /* Label */ + uint32_t type; /* Type of input */ + uint32_t audioset; /* Associated audios (bitfield) */ + uint32_t tuner; /* Associated tuner */ + v4l2_std_id std; + uint32_t status; + uint32_t capabilities; + uint32_t reserved[3]; +} +#ifdef COMPAT_LINUX32 /* 32bit linuxolator */ +__attribute__ ((packed)) +#endif +; + +#endif /* _LINUX_VIDEODEV2_COMPAT_H_ */ From owner-svn-src-all@FreeBSD.ORG Wed May 4 13:20:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF457106566B; Wed, 4 May 2011 13:20:44 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE7938FC17; Wed, 4 May 2011 13:20:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44DKiuU051173; Wed, 4 May 2011 13:20:44 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44DKitH051171; Wed, 4 May 2011 13:20:44 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105041320.p44DKitH051171@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 13:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221435 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:20:44 -0000 Author: rmacklem Date: Wed May 4 13:20:44 2011 New Revision: 221435 URL: http://svn.freebsd.org/changeset/base/221435 Log: Revert r221308, since it incorrectly zero'd both client and server stats when "-c" or "-s" was specified. Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Wed May 4 13:09:20 2011 (r221434) +++ head/usr.bin/nfsstat/nfsstat.c Wed May 4 13:20:44 2011 (r221435) @@ -85,7 +85,6 @@ static int zflag = 0; static int run_v4 = 0; static int printtitle = 1; static struct ext_nfsstats ext_nfsstats; -static int nfssvc_flag; void intpr(int, int); void printhdr(int, int); @@ -108,7 +107,6 @@ main(int argc, char **argv) char *memf, *nlistf; char errbuf[_POSIX2_LINE_MAX]; - nfssvc_flag = NFSSVC_GETSTATS; interval = 0; memf = nlistf = NULL; while ((ch = getopt(argc, argv, "cesWM:N:w:z")) != -1) @@ -137,7 +135,6 @@ main(int argc, char **argv) break; case 'z': zflag = 1; - nfssvc_flag |= NFSSVC_ZEROSTATS; break; case 'e': run_v4 = 1; @@ -164,7 +161,7 @@ main(int argc, char **argv) errx(1, "experimental client/server not loaded"); if (run_v4 != 0) { - if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) + if (nfssvc(NFSSVC_GETSTATS, &ext_nfsstats) < 0) err(1, "Can't get stats"); } else if (nlistf != NULL || memf != NULL) { deadkernel = 1; @@ -796,13 +793,13 @@ exp_sidewaysintpr(u_int interval, int cl int hdrcnt = 1; ext_nfsstatsp = &lastst; - if (nfssvc(nfssvc_flag, ext_nfsstatsp) < 0) + if (nfssvc(NFSSVC_GETSTATS, ext_nfsstatsp) < 0) err(1, "Can't get stats"); sleep(interval); for (;;) { ext_nfsstatsp = &nfsstats; - if (nfssvc(nfssvc_flag, ext_nfsstatsp) < 0) + if (nfssvc(NFSSVC_GETSTATS, ext_nfsstatsp) < 0) err(1, "Can't get stats"); if (--hdrcnt == 0) { From owner-svn-src-all@FreeBSD.ORG Wed May 4 13:27:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56ACF106566B; Wed, 4 May 2011 13:27:30 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 093C38FC21; Wed, 4 May 2011 13:27:29 +0000 (UTC) Received: from outgoing.leidinger.net (p5B155BB6.dip.t-dialin.net [91.21.91.182]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 3C38B844010; Wed, 4 May 2011 15:11:04 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id 7C17D11DC; Wed, 4 May 2011 15:11:01 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p44DB1t3052190; Wed, 4 May 2011 15:11:01 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 04 May 2011 15:11:01 +0200 Message-ID: <20110504151101.114973fmqbdad084@webmail.leidinger.net> Date: Wed, 04 May 2011 15:11:01 +0200 From: Alexander Leidinger To: Ivan Klymenko References: <201105040905.p4495dqA039067@svn.freebsd.org> <20110504143220.2c997f6b@ukr.net> In-Reply-To: <20110504143220.2c997f6b@ukr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.6) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 3C38B844010.AA052 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=0.077, required 6, autolearn=disabled, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1305119466.61172@/fZx/oPJg1miGJ90ExLsng X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r221426 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:27:30 -0000 Quoting Ivan Klymenko (from Wed, 4 May 2011 14:32:20 +0300): > ... > /usr/src/sys/modules/linux/../../compat/linux/linux_ioctl.c:91:49: > error: compat/linux/linux_videodev2_compat.h: No such file or > directory > ... Fixed. Thanks, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 In every hierarchy the cream rises until it sours. -- Dr. Laurence J. Peter From owner-svn-src-all@FreeBSD.ORG Wed May 4 13:27:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCCF91065678; Wed, 4 May 2011 13:27:45 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB2B78FC20; Wed, 4 May 2011 13:27:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44DRjaf051440; Wed, 4 May 2011 13:27:45 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44DRjfh051432; Wed, 4 May 2011 13:27:45 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105041327.p44DRjfh051432@svn.freebsd.org> From: Ruslan Ermilov Date: Wed, 4 May 2011 13:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221436 - in head: sbin/mount_nfs sys/fs/nfsclient sys/nfs sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:27:46 -0000 Author: ru Date: Wed May 4 13:27:45 2011 New Revision: 221436 URL: http://svn.freebsd.org/changeset/base/221436 Log: Implemented a mount option "nocto" that disables cache coherency checking at open time. It may improve performance for read-only NFS mounts. Use deliberately. MFC after: 1 week Reviewed by: rmacklem, jhb (earlier version) Modified: head/sbin/mount_nfs/mount_nfs.8 head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/nfs/nfs_diskless.c head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsclient/nfsargs.h Modified: head/sbin/mount_nfs/mount_nfs.8 ============================================================================== --- head/sbin/mount_nfs/mount_nfs.8 Wed May 4 13:20:44 2011 (r221435) +++ head/sbin/mount_nfs/mount_nfs.8 Wed May 4 13:27:45 2011 (r221436) @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd April 27, 2011 +.Dd May 3, 2011 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -180,6 +180,17 @@ NFS port number 2049 or replies to reque Setting the .Va vfs.nfs.nfs_ip_paranoia sysctl to 0 will make this option the default. +.It Cm nocto +Normally, NFS clients maintain the close-to-open cache coherency. +This works by flushing at close time and checking at open time. +Checking at open time is implemented by getting attributes from +the server and purging the data cache if they do not match +attributes cached by the client. +.Pp +This option disables checking at open time. +It may improve performance for read-only mounts, +but should only be used if the data on the server changes rarely. +Be sure to understand the consequences before enabling this option. .It Cm noinet4 , noinet6 Disables .Dv AF_INET Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Wed May 4 13:20:44 2011 (r221435) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Wed May 4 13:27:45 2011 (r221436) @@ -716,7 +716,7 @@ static const char *nfs_opts[] = { "from" "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport", "readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec", "principal", "nfsv4", "gssname", "allgssname", "dirpath", - "negnametimeo", + "negnametimeo", "nocto", NULL }; /* @@ -833,6 +833,8 @@ nfs_mount(struct mount *mp) } if (vfs_getopt(mp->mnt_optnew, "allgssname", NULL, NULL) == 0) args.flags |= NFSMNT_ALLGSSNAME; + if (vfs_getopt(mp->mnt_optnew, "nocto", NULL, NULL) == 0) + args.flags |= NFSMNT_NOCTO; if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) { if (opt == NULL) { vfs_mount_error(mp, "illegal readdirsize"); Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed May 4 13:20:44 2011 (r221435) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed May 4 13:27:45 2011 (r221436) @@ -1026,7 +1026,8 @@ nfs_lookup(struct vop_lookup_args *ap) */ newvp = *vpp; newnp = VTONFS(newvp); - if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + if (!(nmp->nm_flag & NFSMNT_NOCTO) && + (flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && !(newnp->n_flag & NMODIFIED)) { mtx_lock(&newnp->n_mtx); newnp->n_attrstamp = 0; Modified: head/sys/nfs/nfs_diskless.c ============================================================================== --- head/sys/nfs/nfs_diskless.c Wed May 4 13:20:44 2011 (r221435) +++ head/sys/nfs/nfs_diskless.c Wed May 4 13:27:45 2011 (r221436) @@ -112,6 +112,8 @@ nfs_parse_options(const char *envopts, s nd->flags |= NFSMNT_NOCONN; else if (strcmp(o, "nolockd") == 0) nd->flags |= NFSMNT_NOLOCKD; + else if (strcmp(o, "nocto") == 0) + nd->flags |= NFSMNT_NOCTO; else if (strcmp(o, "nfsv2") == 0) nd->flags &= ~(NFSMNT_NFSV3 | NFSMNT_NFSV4); else if (strcmp(o, "nfsv3") == 0) { Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Wed May 4 13:20:44 2011 (r221435) +++ head/sys/nfsclient/nfs_vfsops.c Wed May 4 13:27:45 2011 (r221436) @@ -786,7 +786,7 @@ static const char *nfs_opts[] = { "from" "readahead", "readdirsize", "soft", "hard", "mntudp", "tcp", "udp", "wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3", - "sec", "maxgroups", "principal", "negnametimeo", + "sec", "maxgroups", "principal", "negnametimeo", "nocto", NULL }; /* @@ -901,6 +901,8 @@ nfs_mount(struct mount *mp) args.sotype = SOCK_STREAM; if (vfs_getopt(mp->mnt_optnew, "nfsv3", NULL, NULL) == 0) args.flags |= NFSMNT_NFSV3; + if (vfs_getopt(mp->mnt_optnew, "nocto", NULL, NULL) == 0) + args.flags |= NFSMNT_NOCTO; if (vfs_getopt(mp->mnt_optnew, "readdirsize", (void **)&opt, NULL) == 0) { if (opt == NULL) { vfs_mount_error(mp, "illegal readdirsize"); Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Wed May 4 13:20:44 2011 (r221435) +++ head/sys/nfsclient/nfs_vnops.c Wed May 4 13:27:45 2011 (r221436) @@ -960,7 +960,8 @@ nfs_lookup(struct vop_lookup_args *ap) */ newvp = *vpp; newnp = VTONFS(newvp); - if ((flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && + if (!(nmp->nm_flag & NFSMNT_NOCTO) && + (flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN) && !(newnp->n_flag & NMODIFIED)) { mtx_lock(&newnp->n_mtx); newnp->n_attrstamp = 0; Modified: head/sys/nfsclient/nfsargs.h ============================================================================== --- head/sys/nfsclient/nfsargs.h Wed May 4 13:20:44 2011 (r221435) +++ head/sys/nfsclient/nfsargs.h Wed May 4 13:27:45 2011 (r221436) @@ -97,5 +97,6 @@ struct nfs_args { #define NFSMNT_PRIVACY 0x04000000 /* Use privacy with RPCSEC_GSS */ #define NFSMNT_ALLGSSNAME 0x08000000 /* Use principal for all accesses */ #define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */ +#define NFSMNT_NOCTO 0x20000000 /* Don't flush attrcache on open */ #endif From owner-svn-src-all@FreeBSD.ORG Wed May 4 13:28:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 017F71065678; Wed, 4 May 2011 13:28:54 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E46B38FC27; Wed, 4 May 2011 13:28:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44DSriJ051514; Wed, 4 May 2011 13:28:53 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44DSrT2051513; Wed, 4 May 2011 13:28:53 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201105041328.p44DSrT2051513@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 4 May 2011 13:28:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221437 - in vendor/tre/dist: . doc lib m4 po src tests tests/agrep utils win32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:28:54 -0000 Author: gabor Date: Wed May 4 13:28:53 2011 New Revision: 221437 URL: http://svn.freebsd.org/changeset/base/221437 Log: - Trim some unnecessary files Deleted: vendor/tre/dist/Makefile vendor/tre/dist/Makefile.am vendor/tre/dist/Makefile.in vendor/tre/dist/aclocal.m4 vendor/tre/dist/config.h vendor/tre/dist/config.h.in vendor/tre/dist/config.log vendor/tre/dist/config.status vendor/tre/dist/configure vendor/tre/dist/configure.ac vendor/tre/dist/doc/Makefile vendor/tre/dist/lib/Makefile vendor/tre/dist/lib/stamp-h2 vendor/tre/dist/lib/tre-config.h vendor/tre/dist/libtool vendor/tre/dist/m4/ vendor/tre/dist/po/Makefile vendor/tre/dist/po/Makefile.in vendor/tre/dist/po/POTFILES vendor/tre/dist/src/Makefile vendor/tre/dist/stamp-h1 vendor/tre/dist/tests/Makefile vendor/tre/dist/tests/agrep/Makefile vendor/tre/dist/tre.pc vendor/tre/dist/tre.pc.in vendor/tre/dist/tre.spec vendor/tre/dist/tre.spec.in vendor/tre/dist/utils/Makefile vendor/tre/dist/win32/ From owner-svn-src-all@FreeBSD.ORG Wed May 4 13:30:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0742A1065673; Wed, 4 May 2011 13:30:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EABE68FC1B; Wed, 4 May 2011 13:30:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44DUcVJ051604; Wed, 4 May 2011 13:30:38 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44DUcwl051601; Wed, 4 May 2011 13:30:38 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105041330.p44DUcwl051601@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 13:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221438 - in head/sys: fs/nfs nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:30:39 -0000 Author: rmacklem Date: Wed May 4 13:30:38 2011 New Revision: 221438 URL: http://svn.freebsd.org/changeset/base/221438 Log: Revert r221306, since NFSSVC_ZEROSTATS zero'd both client and server stats, when separate modifiers for NFSSVC_GETSTATS for each of client and server stats is what it required by nfsstat(1). Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/nfs/nfssvc.h Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Wed May 4 13:28:53 2011 (r221437) +++ head/sys/fs/nfs/nfs_commonport.c Wed May 4 13:30:38 2011 (r221438) @@ -404,8 +404,6 @@ nfssvc_call(struct thread *p, struct nfs } else if (uap->flag & NFSSVC_GETSTATS) { error = copyout(&newnfsstats, CAST_USER_ADDR_T(uap->argp), sizeof (newnfsstats)); - if ((uap->flag & NFSSVC_ZEROSTATS) != 0 && error == 0) - bzero(&newnfsstats, sizeof(newnfsstats)); return (error); } else if (uap->flag & NFSSVC_NFSUSERDPORT) { u_short sockport; Modified: head/sys/nfs/nfssvc.h ============================================================================== --- head/sys/nfs/nfssvc.h Wed May 4 13:28:53 2011 (r221437) +++ head/sys/nfs/nfssvc.h Wed May 4 13:30:38 2011 (r221438) @@ -64,6 +64,5 @@ #define NFSSVC_CBADDSOCK 0x00200000 #define NFSSVC_GETSTATS 0x00400000 #define NFSSVC_BACKUPSTABLE 0x00800000 -#define NFSSVC_ZEROSTATS 0x01000000 /* modifier for GETSTATS */ #endif /* _NFS_NFSSVC_H */ From owner-svn-src-all@FreeBSD.ORG Wed May 4 13:36:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33B83106567A; Wed, 4 May 2011 13:36:19 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22D708FC13; Wed, 4 May 2011 13:36:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44DaJhg051814; Wed, 4 May 2011 13:36:19 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44DaJER051811; Wed, 4 May 2011 13:36:19 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105041336.p44DaJER051811@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 13:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221439 - in head/sys: fs/nfs nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:36:19 -0000 Author: rmacklem Date: Wed May 4 13:36:18 2011 New Revision: 221439 URL: http://svn.freebsd.org/changeset/base/221439 Log: Add kernel support for NFSSVC_ZEROCLTSTATS and NFSSVC_ZEROSRVSTATS so that they can be used by nfsstat(1) to implement the "-z" option for the new NFS subsystem. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/nfs/nfssvc.h Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Wed May 4 13:30:38 2011 (r221438) +++ head/sys/fs/nfs/nfs_commonport.c Wed May 4 13:36:18 2011 (r221439) @@ -404,6 +404,64 @@ nfssvc_call(struct thread *p, struct nfs } else if (uap->flag & NFSSVC_GETSTATS) { error = copyout(&newnfsstats, CAST_USER_ADDR_T(uap->argp), sizeof (newnfsstats)); + if (error == 0) { + if ((uap->flag & NFSSVC_ZEROCLTSTATS) != 0) { + newnfsstats.attrcache_hits = 0; + newnfsstats.attrcache_misses = 0; + newnfsstats.lookupcache_hits = 0; + newnfsstats.lookupcache_misses = 0; + newnfsstats.direofcache_hits = 0; + newnfsstats.direofcache_misses = 0; + newnfsstats.accesscache_hits = 0; + newnfsstats.accesscache_misses = 0; + newnfsstats.biocache_reads = 0; + newnfsstats.read_bios = 0; + newnfsstats.read_physios = 0; + newnfsstats.biocache_writes = 0; + newnfsstats.write_bios = 0; + newnfsstats.write_physios = 0; + newnfsstats.biocache_readlinks = 0; + newnfsstats.readlink_bios = 0; + newnfsstats.biocache_readdirs = 0; + newnfsstats.readdir_bios = 0; + newnfsstats.rpcretries = 0; + newnfsstats.rpcrequests = 0; + newnfsstats.rpctimeouts = 0; + newnfsstats.rpcunexpected = 0; + newnfsstats.rpcinvalid = 0; + bzero(newnfsstats.rpccnt, + sizeof(newnfsstats.rpccnt)); + } + if ((uap->flag & NFSSVC_ZEROSRVSTATS) != 0) { + newnfsstats.srvrpc_errs = 0; + newnfsstats.srv_errs = 0; + newnfsstats.srvcache_inproghits = 0; + newnfsstats.srvcache_idemdonehits = 0; + newnfsstats.srvcache_nonidemdonehits = 0; + newnfsstats.srvcache_misses = 0; + newnfsstats.srvcache_tcppeak = 0; + newnfsstats.srvcache_size = 0; + newnfsstats.srvclients = 0; + newnfsstats.srvopenowners = 0; + newnfsstats.srvopens = 0; + newnfsstats.srvlockowners = 0; + newnfsstats.srvlocks = 0; + newnfsstats.srvdelegates = 0; + newnfsstats.clopenowners = 0; + newnfsstats.clopens = 0; + newnfsstats.cllockowners = 0; + newnfsstats.cllocks = 0; + newnfsstats.cldelegates = 0; + newnfsstats.cllocalopenowners = 0; + newnfsstats.cllocalopens = 0; + newnfsstats.cllocallockowners = 0; + newnfsstats.cllocallocks = 0; + bzero(newnfsstats.srvrpccnt, + sizeof(newnfsstats.srvrpccnt)); + bzero(newnfsstats.cbrpccnt, + sizeof(newnfsstats.cbrpccnt)); + } + } return (error); } else if (uap->flag & NFSSVC_NFSUSERDPORT) { u_short sockport; Modified: head/sys/nfs/nfssvc.h ============================================================================== --- head/sys/nfs/nfssvc.h Wed May 4 13:30:38 2011 (r221438) +++ head/sys/nfs/nfssvc.h Wed May 4 13:36:18 2011 (r221439) @@ -64,5 +64,7 @@ #define NFSSVC_CBADDSOCK 0x00200000 #define NFSSVC_GETSTATS 0x00400000 #define NFSSVC_BACKUPSTABLE 0x00800000 +#define NFSSVC_ZEROCLTSTATS 0x01000000 /* modifier for GETSTATS */ +#define NFSSVC_ZEROSRVSTATS 0x02000000 /* modifier for GETSTATS */ #endif /* _NFS_NFSSVC_H */ From owner-svn-src-all@FreeBSD.ORG Wed May 4 13:50:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA32E106564A; Wed, 4 May 2011 13:50:37 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9CDA8FC15; Wed, 4 May 2011 13:50:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44Dobmd053355; Wed, 4 May 2011 13:50:37 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44DobOq053353; Wed, 4 May 2011 13:50:37 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105041350.p44DobOq053353@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 13:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221440 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 13:50:37 -0000 Author: rmacklem Date: Wed May 4 13:50:37 2011 New Revision: 221440 URL: http://svn.freebsd.org/changeset/base/221440 Log: Fix nfsstat.c so that the "-z" option works for the new NFS subsystem. MFC after: 2 weeks Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Wed May 4 13:36:18 2011 (r221439) +++ head/usr.bin/nfsstat/nfsstat.c Wed May 4 13:50:37 2011 (r221440) @@ -160,10 +160,7 @@ main(int argc, char **argv) if (run_v4 != 0 && modfind("nfscommon") < 0) errx(1, "experimental client/server not loaded"); - if (run_v4 != 0) { - if (nfssvc(NFSSVC_GETSTATS, &ext_nfsstats) < 0) - err(1, "Can't get stats"); - } else if (nlistf != NULL || memf != NULL) { + if (run_v4 == 0 && (nlistf != NULL || memf != NULL)) { deadkernel = 1; if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, @@ -545,7 +542,17 @@ sperc2(int ttl, int misses) void exp_intpr(int clientOnly, int serverOnly) { + int nfssvc_flag; + nfssvc_flag = NFSSVC_GETSTATS; + if (zflag != 0) { + if (clientOnly != 0) + nfssvc_flag |= NFSSVC_ZEROCLTSTATS; + if (serverOnly != 0) + nfssvc_flag |= NFSSVC_ZEROSRVSTATS; + } + if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) + err(1, "Can't get stats"); if (clientOnly != 0) { if (printtitle) { printf("Client Info:\n"); From owner-svn-src-all@FreeBSD.ORG Wed May 4 14:37:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6865A1065670; Wed, 4 May 2011 14:37:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E0B38FC15; Wed, 4 May 2011 14:37:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44Eb23p054778; Wed, 4 May 2011 14:37:02 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44Eb2pP054777; Wed, 4 May 2011 14:37:02 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105041437.p44Eb2pP054777@svn.freebsd.org> From: Attilio Rao Date: Wed, 4 May 2011 14:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221441 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 14:37:02 -0000 Author: attilio Date: Wed May 4 14:37:01 2011 New Revision: 221441 URL: http://svn.freebsd.org/changeset/base/221441 Log: Remove the previously added comment. Probabilly me is the only one who didn't know userland and kerneland sizes were mismatching. Added: head/sys/sys/_cpuset.h (contents, props changed) Added: head/sys/sys/_cpuset.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/_cpuset.h Wed May 4 14:37:01 2011 (r221441) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2008, Jeffrey Roberson + * All rights reserved. + * + * Copyright (c) 2008 Nokia Corporation + * 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$ + */ + +#ifndef _SYS__CPUSET_H_ +#define _SYS__CPUSET_H_ + +#include + +#ifdef _KERNEL +#define CPU_SETSIZE MAXCPU +#endif + +#define CPU_MAXSIZE (4 * MAXCPU) + +#ifndef CPU_SETSIZE +#define CPU_SETSIZE CPU_MAXSIZE +#endif + +#define _NCPUBITS (sizeof(long) * NBBY) /* bits per mask */ +#define _NCPUWORDS howmany(CPU_SETSIZE, _NCPUBITS) + +typedef struct _cpuset { + long __bits[howmany(CPU_SETSIZE, _NCPUBITS)]; +} cpuset_t; + +#endif /* !_SYS__CPUSET_H_ */ From owner-svn-src-all@FreeBSD.ORG Wed May 4 14:46:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A7CC106564A; Wed, 4 May 2011 14:46:21 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 08FF18FC0A; Wed, 4 May 2011 14:46:20 +0000 (UTC) Received: by vxc34 with SMTP id 34so1686069vxc.13 for ; Wed, 04 May 2011 07:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=C3S3TrDl6wOb1ru2avZOdfNks4/pX8ZQFcOWzlUhiNU=; b=M0CComaMRkE6/UXjzWfXLVKHd5h2/6Xoc9pziyZYOfUeu5z5Wj+Qk/UrCgo4wW/7Cr Yfm80wZyMnR7IGVTRMFNGw87/FW/GWlAwL5OdjthmeZDW9m2efMmxKd9vgCVNTHerAEU 7A8lTTpZTHYl1m1GX2pkD3XrzxBb9tDTK9RRM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=SLUJ04r1S1bXtSA2Ci8qI0oxDZ1PtbnzM0WSjI3Jkfl4nOdAJzcQ5oq1P7MXIYmWds nELjA+gJJJU83PxEZyUK/bplNie94dmZOafm+p25v8i1tjo7oyLzTGAlB9AH09ew4HYe PNSpS2tv/wd0TxKRKraK9JcE+y16MrSyI/s5I= MIME-Version: 1.0 Received: by 10.52.93.115 with SMTP id ct19mr1431107vdb.238.1304520379835; Wed, 04 May 2011 07:46:19 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.201.3 with HTTP; Wed, 4 May 2011 07:46:19 -0700 (PDT) In-Reply-To: <201105041437.p44Eb2pP054777@svn.freebsd.org> References: <201105041437.p44Eb2pP054777@svn.freebsd.org> Date: Wed, 4 May 2011 10:46:19 -0400 X-Google-Sender-Auth: 3ob4ZccNwQDbgn2oyZjiU1GNZxE Message-ID: From: Attilio Rao To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: svn commit: r221441 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 14:46:21 -0000 Argh, sorry, I committed this file by accident, reverting it. Attilio 2011/5/4 Attilio Rao : > Author: attilio > Date: Wed May =C2=A04 14:37:01 2011 > New Revision: 221441 > URL: http://svn.freebsd.org/changeset/base/221441 > > Log: > =C2=A0Remove the previously added comment. > =C2=A0Probabilly me is the only one who didn't know userland and kernelan= d sizes > =C2=A0were mismatching. > > Added: > =C2=A0head/sys/sys/_cpuset.h =C2=A0 (contents, props changed) > > Added: head/sys/sys/_cpuset.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null =C2=A0 00:00:00 1970 =C2=A0 (empty, because file is newly a= dded) > +++ head/sys/sys/_cpuset.h =C2=A0 =C2=A0 =C2=A0Wed May =C2=A04 14:37:01 2= 011 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r221441) > @@ -0,0 +1,54 @@ > +/*- > + * Copyright (c) 2008, Jeffrey Roberson > + * All rights reserved. > + * > + * Copyright (c) 2008 Nokia Corporation > + * 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 > + * =C2=A0 =C2=A0notice unmodified, this list of conditions, and the foll= owing > + * =C2=A0 =C2=A0disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * =C2=A0 =C2=A0notice, this list of conditions and the following discla= imer in the > + * =C2=A0 =C2=A0documentation and/or other materials provided with the d= istribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR > + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRAN= TIES > + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIME= D. > + * 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$ > + */ > + > +#ifndef _SYS__CPUSET_H_ > +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0_SYS__CPUSET_H_ > + > +#include > + > +#ifdef _KERNEL > +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0CPU_SETSIZE =C2=A0 =C2=A0 MAXCPU > +#endif > + > +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0CPU_MAXSIZE =C2=A0 =C2=A0 (4 * MAXCPU= ) > + > +#ifndef =C2=A0 =C2=A0 =C2=A0 =C2=A0CPU_SETSIZE > +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0CPU_SETSIZE =C2=A0 =C2=A0 CPU_MAXSIZE > +#endif > + > +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0_NCPUBITS =C2=A0 =C2=A0 =C2=A0 (sizeo= f(long) * NBBY) =C2=A0 /* bits per mask */ > +#define =C2=A0 =C2=A0 =C2=A0 =C2=A0_NCPUWORDS =C2=A0 =C2=A0 =C2=A0howman= y(CPU_SETSIZE, _NCPUBITS) > + > +typedef =C2=A0 =C2=A0 =C2=A0 =C2=A0struct _cpuset { > + =C2=A0 =C2=A0 =C2=A0 long =C2=A0 =C2=A0__bits[howmany(CPU_SETSIZE, _NCP= UBITS)]; > +} cpuset_t; > + > +#endif /* !_SYS__CPUSET_H_ */ > --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed May 4 14:52:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D53B1106564A; Wed, 4 May 2011 14:52:17 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB3A18FC18; Wed, 4 May 2011 14:52:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44EqHvi055238; Wed, 4 May 2011 14:52:17 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44EqH5w055237; Wed, 4 May 2011 14:52:17 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105041452.p44EqH5w055237@svn.freebsd.org> From: Attilio Rao Date: Wed, 4 May 2011 14:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221442 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 14:52:17 -0000 Author: attilio Date: Wed May 4 14:52:17 2011 New Revision: 221442 URL: http://svn.freebsd.org/changeset/base/221442 Log: Revert by accident r221441. Deleted: head/sys/sys/_cpuset.h From owner-svn-src-all@FreeBSD.ORG Wed May 4 15:31:03 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D226106568D; Wed, 4 May 2011 15:31:03 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from fsm2.ukr.net (fsm2.ukr.net [195.214.192.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF608FC0C; Wed, 4 May 2011 15:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=F63gniOXW4Z/9JI3H6P126klDKzkudUa6/vv4SuD4Oo=; b=GOX4bRUA7ChFtbYKpEZaCl+jYvB0p5LiZ8Qn9sxbasgRPhSzpuCRjLW0OhKM1dM9Zdo38NGgZmOX+fOq/veUxbvii3+OdFV1BmItUREYt66IG0AeC6PLgKvhs6+SsIi/CRrTBvHIsfU2vyWXqVRCBwhQUyOchGwLimiwEJeGFNY=; Received: from [46.185.0.237] (helo=localhost) by fsm2.ukr.net with esmtps ID 1QHe2X-000K7p-1x ; Wed, 04 May 2011 18:31:01 +0300 Date: Wed, 4 May 2011 18:31:00 +0300 From: Ivan Klymenko To: Alexander Leidinger Message-ID: <20110504183100.18f444f9@ukr.net> In-Reply-To: <20110504151101.114973fmqbdad084@webmail.leidinger.net> References: <201105040905.p4495dqA039067@svn.freebsd.org> <20110504143220.2c997f6b@ukr.net> <20110504151101.114973fmqbdad084@webmail.leidinger.net> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r221426 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 15:31:03 -0000 =D0=92 Wed, 04 May 2011 15:11:01 +0200 Alexander Leidinger =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Quoting Ivan Klymenko (from Wed, 4 May 2011 14:32:20 > +0300): >=20 > > ... > > /usr/src/sys/modules/linux/../../compat/linux/linux_ioctl.c:91:49: =20 > > error: compat/linux/linux_videodev2_compat.h: No such file or =20 > > directory > > ... >=20 > Fixed. >=20 > Thanks, > Alexander. >=20 Thanks! From owner-svn-src-all@FreeBSD.ORG Wed May 4 17:04:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A46F3106566C; Wed, 4 May 2011 17:04:31 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 949AF8FC15; Wed, 4 May 2011 17:04:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44H4VPS059435; Wed, 4 May 2011 17:04:31 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44H4VPn059432; Wed, 4 May 2011 17:04:31 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105041704.p44H4VPn059432@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 May 2011 17:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221445 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 17:04:31 -0000 Author: yongari Date: Wed May 4 17:04:31 2011 New Revision: 221445 URL: http://svn.freebsd.org/changeset/base/221445 Log: Add initial BCM57765 family support. The BCM57765 family seems to have similar hardware features of BCM5718 family except the number of receive return ring is 4. The BCM57765 family is known to support IEEE 802.3az EEE(Energy Efficient Ethernet) but this change does not include EEE support code. I hope EEE is implemented in near future. This change will support BCM57761, BCM57765, BCM57781, BCM57785, BCM57791 and BCM57795. All hardware offloading features are supported and suspend/resume also should work. Many thanks to Broadcom for continuing support of FreeBSD. Tested by: Paul Thornton (prt <> prt dot org) HW donated by: Broadcom Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed May 4 15:45:23 2011 (r221444) +++ head/sys/dev/bge/if_bge.c Wed May 4 17:04:31 2011 (r221445) @@ -214,9 +214,15 @@ static const struct bge_type { { BCOM_VENDORID, BCOM_DEVICEID_BCM5906 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5906M }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57760 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57761 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57765 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57780 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57781 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57785 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57788 }, { BCOM_VENDORID, BCOM_DEVICEID_BCM57790 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57791 }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM57795 }, { SK_VENDORID, SK_DEVICEID_ALTIMA }, @@ -307,6 +313,8 @@ static const struct bge_revision { { BGE_CHIPID_BCM5787_A2, "BCM5754/5787 A2" }, { BGE_CHIPID_BCM5906_A1, "BCM5906 A1" }, { BGE_CHIPID_BCM5906_A2, "BCM5906 A2" }, + { BGE_CHIPID_BCM57765_A0, "BCM57765 A0" }, + { BGE_CHIPID_BCM57765_B0, "BCM57765 B0" }, { BGE_CHIPID_BCM57780_A0, "BCM57780 A0" }, { BGE_CHIPID_BCM57780_A1, "BCM57780 A1" }, @@ -335,6 +343,7 @@ static const struct bge_revision const b /* 5754 and 5787 share the same ASIC ID */ { BGE_ASICREV_BCM5787, "unknown BCM5754/5787" }, { BGE_ASICREV_BCM5906, "unknown BCM5906" }, + { BGE_ASICREV_BCM57765, "unknown BCM57765" }, { BGE_ASICREV_BCM57780, "unknown BCM57780" }, { BGE_ASICREV_BCM5717, "unknown BCM5717" }, @@ -1467,8 +1476,11 @@ bge_chipinit(struct bge_softc *sc) if (sc->bge_asicrev == BGE_ASICREV_BCM5703 || sc->bge_asicrev == BGE_ASICREV_BCM5704) dma_rw_ctl &= ~BGE_PCIDMARWCTL_MINDMA; - if (BGE_IS_5717_PLUS(sc)) + if (BGE_IS_5717_PLUS(sc)) { dma_rw_ctl &= ~BGE_PCIDMARWCTL_DIS_CACHE_ALIGNMENT; + if (sc->bge_chipid == BGE_CHIPID_BCM57765_A0) + dma_rw_ctl &= ~BGE_PCIDMARWCTL_CRDRDR_RDMA_MRRS_MSK; + } pci_write_config(sc->bge_dev, BGE_PCI_DMA_RW_CTL, dma_rw_ctl, 4); /* @@ -1552,7 +1564,8 @@ bge_blockinit(struct bge_softc *sc) } /* Configure mbuf pool watermarks */ - if (sc->bge_asicrev == BGE_ASICREV_BCM5717) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5717 || + sc->bge_asicrev == BGE_ASICREV_BCM57765) { CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_READDMA_LOWAT, 0x0); if (sc->bge_ifp->if_mtu > ETHERMTU) { CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 0x7e); @@ -1819,7 +1832,8 @@ bge_blockinit(struct bge_softc *sc) limit = 16; } else if (!BGE_IS_5705_PLUS(sc)) limit = BGE_RX_RINGS_MAX; - else if (sc->bge_asicrev == BGE_ASICREV_BCM5755) + else if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || + sc->bge_asicrev == BGE_ASICREV_BCM57765) limit = 4; else limit = 1; @@ -2180,6 +2194,15 @@ bge_probe(device_t dev) id = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; + case BCOM_DEVICEID_BCM57761: + case BCOM_DEVICEID_BCM57765: + case BCOM_DEVICEID_BCM57781: + case BCOM_DEVICEID_BCM57785: + case BCOM_DEVICEID_BCM57791: + case BCOM_DEVICEID_BCM57795: + id = pci_read_config(dev, + BGE_PCI_GEN15_PRODID_ASICREV, 4); + break; default: id = pci_read_config(dev, BGE_PCI_PRODID_ASICREV, 4); @@ -2694,6 +2717,15 @@ bge_attach(device_t dev) sc->bge_chipid = pci_read_config(dev, BGE_PCI_GEN2_PRODID_ASICREV, 4); break; + case BCOM_DEVICEID_BCM57761: + case BCOM_DEVICEID_BCM57765: + case BCOM_DEVICEID_BCM57781: + case BCOM_DEVICEID_BCM57785: + case BCOM_DEVICEID_BCM57791: + case BCOM_DEVICEID_BCM57795: + sc->bge_chipid = pci_read_config(dev, + BGE_PCI_GEN15_PRODID_ASICREV, 4); + break; default: sc->bge_chipid = pci_read_config(dev, BGE_PCI_PRODID_ASICREV, 4); @@ -2750,9 +2782,11 @@ bge_attach(device_t dev) /* Save chipset family. */ switch (sc->bge_asicrev) { case BGE_ASICREV_BCM5717: + sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG; + case BGE_ASICREV_BCM57765: sc->bge_flags |= BGE_FLAG_5717_PLUS | BGE_FLAG_5755_PLUS | BGE_FLAG_575X_PLUS | BGE_FLAG_5705_PLUS | BGE_FLAG_JUMBO | - BGE_FLAG_SHORT_DMA_BUG | BGE_FLAG_JUMBO_FRAME; + BGE_FLAG_JUMBO_FRAME; break; case BGE_ASICREV_BCM5755: case BGE_ASICREV_BCM5761: @@ -2801,6 +2835,7 @@ bge_attach(device_t dev) sc->bge_asicrev != BGE_ASICREV_BCM5906 && sc->bge_asicrev != BGE_ASICREV_BCM5717 && sc->bge_asicrev != BGE_ASICREV_BCM5785 && + sc->bge_asicrev != BGE_ASICREV_BCM57765 && sc->bge_asicrev != BGE_ASICREV_BCM57780) { if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || sc->bge_asicrev == BGE_ASICREV_BCM5761 || @@ -3466,6 +3501,9 @@ bge_reset(struct bge_softc *sc) device_printf(dev, "firmware handshake timed out, found 0x%08x\n", val); + /* BCM57765 A0 needs additional time before accessing. */ + if (sc->bge_chipid == BGE_CHIPID_BCM57765_A0) + DELAY(10 * 1000); /* XXX */ } /* @@ -3506,7 +3544,7 @@ bge_reset(struct bge_softc *sc) /* XXX: Broadcom Linux driver. */ if (sc->bge_flags & BGE_FLAG_PCIE && - sc->bge_asicrev != BGE_ASICREV_BCM5717 && + !BGE_IS_5717_PLUS(sc) && sc->bge_chipid != BGE_CHIPID_BCM5750_A0 && sc->bge_asicrev != BGE_ASICREV_BCM5785) { /* Enable Data FIFO protection. */ @@ -4739,7 +4777,10 @@ bge_init_locked(struct bge_softc *sc) * this number of frames, it will drop subsequent incoming * frames until the MBUF High Watermark is reached. */ - CSR_WRITE_4(sc, BGE_MAX_RX_FRAME_LOWAT, 2); + if (sc->bge_asicrev == BGE_ASICREV_BCM57765) + CSR_WRITE_4(sc, BGE_MAX_RX_FRAME_LOWAT, 1); + else + CSR_WRITE_4(sc, BGE_MAX_RX_FRAME_LOWAT, 2); /* Clear MAC statistics. */ if (BGE_IS_5705_PLUS(sc)) Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Wed May 4 15:45:23 2011 (r221444) +++ head/sys/dev/bge/if_bgereg.h Wed May 4 17:04:31 2011 (r221445) @@ -223,6 +223,7 @@ #define BGE_PCI_ISR_MBX_LO 0xB4 #define BGE_PCI_PRODID_ASICREV 0xBC #define BGE_PCI_GEN2_PRODID_ASICREV 0xF4 +#define BGE_PCI_GEN15_PRODID_ASICREV 0xFC /* PCI Misc. Host control register */ #define BGE_PCIMISCCTL_CLEAR_INTA 0x00000001 @@ -318,6 +319,8 @@ #define BGE_CHIPID_BCM57780_A1 0x57780001 #define BGE_CHIPID_BCM5717_A0 0x05717000 #define BGE_CHIPID_BCM5717_B0 0x05717100 +#define BGE_CHIPID_BCM57765_A0 0x57785000 +#define BGE_CHIPID_BCM57765_B0 0x57785100 /* shorthand one */ #define BGE_ASICREV(x) ((x) >> 12) @@ -342,6 +345,7 @@ #define BGE_ASICREV_BCM5761 0x5761 #define BGE_ASICREV_BCM5784 0x5784 #define BGE_ASICREV_BCM5785 0x5785 +#define BGE_ASICREV_BCM57765 0x57785 #define BGE_ASICREV_BCM57780 0x57780 /* chip revisions */ @@ -381,6 +385,8 @@ #define BGE_PCIDMARWCTL_RD_CMD_SHIFT(x) ((x) << 24) #define BGE_PCIDMARWCTL_WR_CMD_SHIFT(x) ((x) << 28) +#define BGE_PCIDMARWCTL_CRDRDR_RDMA_MRRS_MSK 0x00000380 + #define BGE_PCI_READ_BNDRY_DISABLE 0x00000000 #define BGE_PCI_READ_BNDRY_16BYTES 0x00000100 #define BGE_PCI_READ_BNDRY_32BYTES 0x00000200 @@ -2298,9 +2304,15 @@ struct bge_status_block { #define BCOM_DEVICEID_BCM5906 0x1712 #define BCOM_DEVICEID_BCM5906M 0x1713 #define BCOM_DEVICEID_BCM57760 0x1690 +#define BCOM_DEVICEID_BCM57761 0x16B0 +#define BCOM_DEVICEID_BCM57765 0x16B4 #define BCOM_DEVICEID_BCM57780 0x1692 +#define BCOM_DEVICEID_BCM57781 0x16B1 +#define BCOM_DEVICEID_BCM57785 0x16B5 #define BCOM_DEVICEID_BCM57788 0x1691 #define BCOM_DEVICEID_BCM57790 0x1694 +#define BCOM_DEVICEID_BCM57791 0x16B2 +#define BCOM_DEVICEID_BCM57795 0x16B6 /* * Alteon AceNIC PCI vendor/device ID. From owner-svn-src-all@FreeBSD.ORG Wed May 4 17:04:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59B5F10657A3 for ; Wed, 4 May 2011 17:04:43 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 39D608FC08 for ; Wed, 4 May 2011 17:04:43 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id p44H4gZ4057492; Wed, 4 May 2011 10:04:42 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id p44H4gxQ057491; Wed, 4 May 2011 10:04:42 -0700 (PDT) (envelope-from obrien) Date: Wed, 4 May 2011 10:04:42 -0700 From: "David O'Brien" To: Vadim Goncharov Message-ID: <20110504170442.GC57373@dragon.NUXI.org> References: <201104221710.p3MHApbu051050__38279.4176498011$1303492287$gmane$org@svn.freebsd.org> <201105030741.p437fBOa030879@kernblitz.nuclight.avtf.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105030741.p437fBOa030879@kernblitz.nuclight.avtf.net> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-all@freebsd.org, dhw@freebsd.org Subject: Re: svn commit: r220954 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 17:04:43 -0000 On Tue, May 03, 2011 at 02:41:10PM +0700, Vadim Goncharov wrote: > > PR: 156579 > > Submitted by: dhw [..] > I have lines like the following in /etc/make.conf on some hosts: > > # build specified kernels by default and install first of them > KERNCONF?=ROUTER GENERIC > and do just cd /usr/src && make buildkernel > Will this patch print the correct first kernel, or this will be entire list? Hi Vadim, There seems to be a bug in r220954. dhw is taking a look at it. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Wed May 4 17:37:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94691106564A; Wed, 4 May 2011 17:37:37 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6ADDD8FC0A; Wed, 4 May 2011 17:37:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44HbbOV060443; Wed, 4 May 2011 17:37:37 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44HbbZM060441; Wed, 4 May 2011 17:37:37 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105041737.p44HbbZM060441@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 4 May 2011 17:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221446 - head/sys/geom/cache X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 17:37:37 -0000 Author: ae Date: Wed May 4 17:37:37 2011 New Revision: 221446 URL: http://svn.freebsd.org/changeset/base/221446 Log: Remove unneeded checks, g_new_xxx functions can not fail. MFC after: 1 week Modified: head/sys/geom/cache/g_cache.c Modified: head/sys/geom/cache/g_cache.c ============================================================================== --- head/sys/geom/cache/g_cache.c Wed May 4 17:04:31 2011 (r221445) +++ head/sys/geom/cache/g_cache.c Wed May 4 17:37:37 2011 (r221446) @@ -501,12 +501,6 @@ g_cache_create(struct g_class *mp, struc } gp = g_new_geomf(mp, md->md_name); - if (gp == NULL) { - G_CACHE_DEBUG(0, "Cannot create geom %s.", md->md_name); - return (NULL); - } - gp->softc = NULL; /* for a moment */ - sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); sc->sc_type = type; sc->sc_bshift = bshift; @@ -527,10 +521,6 @@ g_cache_create(struct g_class *mp, struc gp->dumpconf = g_cache_dumpconf; newpp = g_new_providerf(gp, "cache/%s", gp->name); - if (newpp == NULL) { - G_CACHE_DEBUG(0, "Cannot create provider cache/%s.", gp->name); - goto fail; - } newpp->sectorsize = pp->sectorsize; newpp->mediasize = pp->mediasize; if (type == G_CACHE_TYPE_AUTOMATIC) @@ -538,35 +528,20 @@ g_cache_create(struct g_class *mp, struc sc->sc_tail = BNO2OFF(OFF2BNO(newpp->mediasize, sc), sc); cp = g_new_consumer(gp); - if (cp == NULL) { - G_CACHE_DEBUG(0, "Cannot create consumer for %s.", gp->name); - goto fail; - } if (g_attach(cp, pp) != 0) { G_CACHE_DEBUG(0, "Cannot attach to provider %s.", pp->name); - goto fail; + g_destroy_consumer(cp); + g_destroy_provider(newpp); + mtx_destroy(&sc->sc_mtx); + g_free(sc); + g_destroy_geom(gp); + return (NULL); } g_error_provider(newpp, 0); G_CACHE_DEBUG(0, "Device %s created.", gp->name); callout_reset(&sc->sc_callout, g_cache_timeout * hz, g_cache_go, sc); return (gp); -fail: - if (cp != NULL) { - if (cp->provider != NULL) - g_detach(cp); - g_destroy_consumer(cp); - } - if (newpp != NULL) - g_destroy_provider(newpp); - if (gp != NULL) { - if (gp->softc != NULL) { - mtx_destroy(&sc->sc_mtx); - g_free(gp->softc); - } - g_destroy_geom(gp); - } - return (NULL); } static int From owner-svn-src-all@FreeBSD.ORG Wed May 4 17:56:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF31B1065673; Wed, 4 May 2011 17:56:53 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94B6B8FC1A; Wed, 4 May 2011 17:56:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44HurSW061038; Wed, 4 May 2011 17:56:53 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44Hurt6061033; Wed, 4 May 2011 17:56:53 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105041756.p44Hurt6061033@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 4 May 2011 17:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221447 - in head/sys/geom: concat eli shsec stripe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 17:56:53 -0000 Author: ae Date: Wed May 4 17:56:53 2011 New Revision: 221447 URL: http://svn.freebsd.org/changeset/base/221447 Log: Remove "for a moment" assignment. struct g_geom zeroed when allocated. MFC after: 1 week Modified: head/sys/geom/concat/g_concat.c head/sys/geom/eli/g_eli.c head/sys/geom/shsec/g_shsec.c head/sys/geom/stripe/g_stripe.c Modified: head/sys/geom/concat/g_concat.c ============================================================================== --- head/sys/geom/concat/g_concat.c Wed May 4 17:37:37 2011 (r221446) +++ head/sys/geom/concat/g_concat.c Wed May 4 17:56:53 2011 (r221447) @@ -547,8 +547,6 @@ g_concat_create(struct g_class *mp, cons } } gp = g_new_geomf(mp, "%s", md->md_name); - gp->softc = NULL; /* for a moment */ - sc = malloc(sizeof(*sc), M_CONCAT, M_WAITOK | M_ZERO); gp->start = g_concat_start; gp->spoiled = g_concat_orphan; Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Wed May 4 17:37:37 2011 (r221446) +++ head/sys/geom/eli/g_eli.c Wed May 4 17:56:53 2011 (r221447) @@ -682,8 +682,6 @@ g_eli_create(struct gctl_req *req, struc G_ELI_DEBUG(1, "Creating device %s%s.", bpp->name, G_ELI_SUFFIX); gp = g_new_geomf(mp, "%s%s", bpp->name, G_ELI_SUFFIX); - gp->softc = NULL; /* for a moment */ - sc = malloc(sizeof(*sc), M_ELI, M_WAITOK | M_ZERO); gp->start = g_eli_start; /* Modified: head/sys/geom/shsec/g_shsec.c ============================================================================== --- head/sys/geom/shsec/g_shsec.c Wed May 4 17:37:37 2011 (r221446) +++ head/sys/geom/shsec/g_shsec.c Wed May 4 17:56:53 2011 (r221447) @@ -546,8 +546,6 @@ g_shsec_create(struct g_class *mp, const } } gp = g_new_geomf(mp, "%s", md->md_name); - gp->softc = NULL; /* for a moment */ - sc = malloc(sizeof(*sc), M_SHSEC, M_WAITOK | M_ZERO); gp->start = g_shsec_start; gp->spoiled = g_shsec_orphan; Modified: head/sys/geom/stripe/g_stripe.c ============================================================================== --- head/sys/geom/stripe/g_stripe.c Wed May 4 17:37:37 2011 (r221446) +++ head/sys/geom/stripe/g_stripe.c Wed May 4 17:56:53 2011 (r221447) @@ -819,8 +819,6 @@ g_stripe_create(struct g_class *mp, cons } } gp = g_new_geomf(mp, "%s", md->md_name); - gp->softc = NULL; /* for a moment */ - sc = malloc(sizeof(*sc), M_STRIPE, M_WAITOK | M_ZERO); gp->start = g_stripe_start; gp->spoiled = g_stripe_orphan; From owner-svn-src-all@FreeBSD.ORG Wed May 4 17:58:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C323A1065674; Wed, 4 May 2011 17:58:15 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B37B18FC1A; Wed, 4 May 2011 17:58:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44HwFO0061117; Wed, 4 May 2011 17:58:15 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44HwFfs061115; Wed, 4 May 2011 17:58:15 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201105041758.p44HwFfs061115@svn.freebsd.org> From: Maksim Yevmenkin Date: Wed, 4 May 2011 17:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221448 - head/usr.sbin/bluetooth/bthidd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 17:58:15 -0000 Author: emax Date: Wed May 4 17:58:15 2011 New Revision: 221448 URL: http://svn.freebsd.org/changeset/base/221448 Log: Encode horizontal scroll events (AC Pan) as button presses (bit 5 and 6) Submitted by: David Demelier demelier dot david at gmail dot com MFC after: 1 week Modified: head/usr.sbin/bluetooth/bthidd/hid.c Modified: head/usr.sbin/bluetooth/bthidd/hid.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/hid.c Wed May 4 17:56:53 2011 (r221447) +++ head/usr.sbin/bluetooth/bthidd/hid.c Wed May 4 17:58:15 2011 (r221448) @@ -229,6 +229,17 @@ hid_interrupt(bthid_session_p s, uint8_t break; switch (usage) { + case HUC_AC_PAN: + /* Horizontal scroll */ + if (val < 0) + mouse_butt |= (1 << 5); + else + mouse_butt |= (1 << 6); + + mevents ++; + val = 0; + break; + case 0xb5: /* Scan Next Track */ val = 0x19; break; From owner-svn-src-all@FreeBSD.ORG Wed May 4 18:06:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60F14106564A; Wed, 4 May 2011 18:06:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 510EE8FC13; Wed, 4 May 2011 18:06:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44I6eGf061465; Wed, 4 May 2011 18:06:40 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44I6edT061463; Wed, 4 May 2011 18:06:40 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105041806.p44I6edT061463@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 4 May 2011 18:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221449 - head/sys/geom/journal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 18:06:40 -0000 Author: ae Date: Wed May 4 18:06:40 2011 New Revision: 221449 URL: http://svn.freebsd.org/changeset/base/221449 Log: Removed KASSERT, g_new_providerf() can not fail. MFC after: 1 week Modified: head/sys/geom/journal/g_journal.c Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Wed May 4 17:58:15 2011 (r221448) +++ head/sys/geom/journal/g_journal.c Wed May 4 18:06:40 2011 (r221449) @@ -2097,7 +2097,6 @@ g_journal_worker(void *arg) gp = sc->sc_geom; g_topology_lock(); pp = g_new_providerf(gp, "%s.journal", sc->sc_name); - KASSERT(pp != NULL, ("Cannot create %s.journal.", sc->sc_name)); pp->mediasize = sc->sc_mediasize; /* * There could be a problem when data provider and journal providers From owner-svn-src-all@FreeBSD.ORG Wed May 4 18:16:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1CA6106564A; Wed, 4 May 2011 18:16:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1DCC8FC0A; Wed, 4 May 2011 18:16:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44IG51Y061876; Wed, 4 May 2011 18:16:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44IG5s6061874; Wed, 4 May 2011 18:16:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201105041816.p44IG5s6061874@svn.freebsd.org> From: Glen Barber Date: Wed, 4 May 2011 18:16:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221450 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 18:16:05 -0000 Author: gjb (doc committer) Date: Wed May 4 18:16:05 2011 New Revision: 221450 URL: http://svn.freebsd.org/changeset/base/221450 Log: Remove unneeded tab after .Ed to make manlint happy. Reported by: manlint Modified: head/share/man/man9/bus_adjust_resource.9 Modified: head/share/man/man9/bus_adjust_resource.9 ============================================================================== --- head/share/man/man9/bus_adjust_resource.9 Wed May 4 18:06:40 2011 (r221449) +++ head/share/man/man9/bus_adjust_resource.9 Wed May 4 18:16:05 2011 (r221450) @@ -93,7 +93,7 @@ Grow an existing memory resource by 4096 error = bus_adjust_resource(dev, SYS_RES_MEMORY, res, rman_get_start(res), rman_get_end(res) + 0x1000); -.Ed +.Ed .Sh SEE ALSO .Xr bus_alloc_resource 9 , .Xr bus_release_resource 9 , From owner-svn-src-all@FreeBSD.ORG Wed May 4 18:17:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 146111065670; Wed, 4 May 2011 18:17:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDFE18FC0C; Wed, 4 May 2011 18:17:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44IHLrt061949; Wed, 4 May 2011 18:17:21 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44IHLeg061947; Wed, 4 May 2011 18:17:21 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105041817.p44IHLeg061947@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 4 May 2011 18:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221451 - head/sys/geom/mountver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 18:17:22 -0000 Author: ae Date: Wed May 4 18:17:21 2011 New Revision: 221451 URL: http://svn.freebsd.org/changeset/base/221451 Log: Remove unneeded code. MFC after: 1 week Modified: head/sys/geom/mountver/g_mountver.c Modified: head/sys/geom/mountver/g_mountver.c ============================================================================== --- head/sys/geom/mountver/g_mountver.c Wed May 4 18:16:05 2011 (r221450) +++ head/sys/geom/mountver/g_mountver.c Wed May 4 18:17:21 2011 (r221451) @@ -248,10 +248,6 @@ g_mountver_create(struct gctl_req *req, } } gp = g_new_geomf(mp, name); - if (gp == NULL) { - gctl_error(req, "Cannot create geom %s.", name); - return (ENOMEM); - } sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); mtx_init(&sc->sc_mtx, "gmountver", NULL, MTX_DEF); TAILQ_INIT(&sc->sc_queue); @@ -263,20 +259,10 @@ g_mountver_create(struct gctl_req *req, gp->dumpconf = g_mountver_dumpconf; newpp = g_new_providerf(gp, gp->name); - if (newpp == NULL) { - gctl_error(req, "Cannot create provider %s.", name); - error = ENOMEM; - goto fail; - } newpp->mediasize = pp->mediasize; newpp->sectorsize = pp->sectorsize; cp = g_new_consumer(gp); - if (cp == NULL) { - gctl_error(req, "Cannot create consumer for %s.", gp->name); - error = ENOMEM; - goto fail; - } error = g_attach(cp, pp); if (error != 0) { gctl_error(req, "Cannot attach to provider %s.", pp->name); @@ -303,20 +289,13 @@ g_mountver_create(struct gctl_req *req, G_MOUNTVER_DEBUG(0, "Device %s created.", gp->name); return (0); fail: - if (sc->sc_provider_name != NULL) - g_free(sc->sc_provider_name); - if (cp != NULL) { - if (cp->provider != NULL) - g_detach(cp); - g_destroy_consumer(cp); - } - if (newpp != NULL) - g_destroy_provider(newpp); - if (gp != NULL) { - if (gp->softc != NULL) - g_free(gp->softc); - g_destroy_geom(gp); - } + g_free(sc->sc_provider_name); + if (cp->provider != NULL) + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_provider(newpp); + g_free(gp->softc); + g_destroy_geom(gp); return (error); } From owner-svn-src-all@FreeBSD.ORG Wed May 4 18:26:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24FDE106564A; Wed, 4 May 2011 18:26:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1471E8FC08; Wed, 4 May 2011 18:26:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44IQjiE062255; Wed, 4 May 2011 18:26:45 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44IQjxf062253; Wed, 4 May 2011 18:26:45 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105041826.p44IQjxf062253@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 4 May 2011 18:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221452 - head/sys/geom/multipath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 18:26:46 -0000 Author: ae Date: Wed May 4 18:26:45 2011 New Revision: 221452 URL: http://svn.freebsd.org/changeset/base/221452 Log: Remove unneeded code. MFC after: 1 week Modified: head/sys/geom/multipath/g_multipath.c Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Wed May 4 18:17:21 2011 (r221451) +++ head/sys/geom/multipath/g_multipath.c Wed May 4 18:26:45 2011 (r221452) @@ -293,9 +293,6 @@ g_multipath_create(struct g_class *mp, s } gp = g_new_geomf(mp, md->md_name); - if (gp == NULL) - goto fail; - sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); gp->softc = sc; gp->start = g_multipath_start; @@ -305,21 +302,12 @@ g_multipath_create(struct g_class *mp, s memcpy(sc->sc_name, md->md_name, sizeof (sc->sc_name)); pp = g_new_providerf(gp, "multipath/%s", md->md_name); - if (pp == NULL) - goto fail; /* limit the provider to not have it stomp on metadata */ pp->mediasize = md->md_size - md->md_sectorsize; pp->sectorsize = md->md_sectorsize; sc->pp = pp; g_error_provider(pp, 0); return (gp); -fail: - if (gp != NULL) { - if (gp->softc != NULL) - g_free(gp->softc); - g_destroy_geom(gp); - } - return (NULL); } static int @@ -348,8 +336,6 @@ g_multipath_add_disk(struct g_geom *gp, } nxtcp = LIST_FIRST(&gp->consumer); cp = g_new_consumer(gp); - if (cp == NULL) - return (ENOMEM); error = g_attach(cp, pp); if (error != 0) { printf("GEOM_MULTIPATH: cannot attach %s to %s", From owner-svn-src-all@FreeBSD.ORG Wed May 4 18:41:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E5E5106566B; Wed, 4 May 2011 18:41:26 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5B58FC15; Wed, 4 May 2011 18:41:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44IfQwx062713; Wed, 4 May 2011 18:41:26 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44IfQmM062711; Wed, 4 May 2011 18:41:26 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105041841.p44IfQmM062711@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 4 May 2011 18:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221453 - head/sys/geom/sched X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 18:41:26 -0000 Author: ae Date: Wed May 4 18:41:26 2011 New Revision: 221453 URL: http://svn.freebsd.org/changeset/base/221453 Log: Remove unneeded code. MFC after: 1 week Modified: head/sys/geom/sched/g_sched.c Modified: head/sys/geom/sched/g_sched.c ============================================================================== --- head/sys/geom/sched/g_sched.c Wed May 4 18:26:45 2011 (r221452) +++ head/sys/geom/sched/g_sched.c Wed May 4 18:41:26 2011 (r221453) @@ -1004,11 +1004,6 @@ g_sched_create(struct gctl_req *req, str gp = g_new_geomf(mp, name); dstgp = proxy ? pp->geom : gp; /* where do we link the provider */ - if (gp == NULL) { - gctl_error(req, "Cannot create geom %s.", name); - error = ENOMEM; - goto fail; - } sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); sc->sc_gsched = gsp; @@ -1034,23 +1029,10 @@ g_sched_create(struct gctl_req *req, str gp->dumpconf = g_sched_dumpconf; newpp = g_new_providerf(dstgp, gp->name); - if (newpp == NULL) { - gctl_error(req, "Cannot create provider %s.", name); - error = ENOMEM; - goto fail; - } - newpp->mediasize = pp->mediasize; newpp->sectorsize = pp->sectorsize; cp = g_new_consumer(gp); - if (cp == NULL) { - gctl_error(req, "Cannot create consumer for %s.", - gp->name); - error = ENOMEM; - goto fail; - } - error = g_attach(cp, proxy ? newpp : pp); if (error != 0) { gctl_error(req, "Cannot attach to provider %s.", @@ -1076,23 +1058,15 @@ fail: g_detach(cp); g_destroy_consumer(cp); } - if (newpp != NULL) g_destroy_provider(newpp); - - if (sc && sc->sc_hash) { + if (sc->sc_hash) g_sched_hash_fini(gp, sc->sc_hash, sc->sc_mask, gsp, sc->sc_data); - } - - if (sc && sc->sc_data) + if (sc->sc_data) gsp->gs_fini(sc->sc_data); - - if (gp != NULL) { - if (gp->softc != NULL) - g_free(gp->softc); - g_destroy_geom(gp); - } + g_free(gp->softc); + g_destroy_geom(gp); return (error); } From owner-svn-src-all@FreeBSD.ORG Wed May 4 19:05:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602D4106566B for ; Wed, 4 May 2011 19:05:21 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE848FC12 for ; Wed, 4 May 2011 19:05:20 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.4/8.14.4) with ESMTP id p44IZ52H006917; Wed, 4 May 2011 11:35:05 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.4/8.14.4/Submit) id p44IZ5Nm006916; Wed, 4 May 2011 11:35:05 -0700 (PDT) (envelope-from david) Date: Wed, 4 May 2011 11:35:05 -0700 From: David Wolfskill To: "David O'Brien" Message-ID: <20110504183505.GD2037@albert.catwhisker.org> References: <201104221710.p3MHApbu051050__38279.4176498011$1303492287$gmane$org@svn.freebsd.org> <201105030741.p437fBOa030879@kernblitz.nuclight.avtf.net> <20110504170442.GC57373@dragon.NUXI.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k3qmt+ucFURmlhDS" Content-Disposition: inline In-Reply-To: <20110504170442.GC57373@dragon.NUXI.org> User-Agent: Mutt/1.4.2.3i Cc: Vadim Goncharov , svn-src-all@FreeBSD.org, dhw@FreeBSD.org Subject: Re: svn commit: r220954 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 19:05:21 -0000 --k3qmt+ucFURmlhDS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 04, 2011 at 10:04:42AM -0700, David O'Brien wrote: > On Tue, May 03, 2011 at 02:41:10PM +0700, Vadim Goncharov wrote: > > > PR: 156579 > > > Submitted by: dhw > [..]=20 > > I have lines like the following in /etc/make.conf on some hosts: > >=20 > > # build specified kernels by default and install first of them > > KERNCONF?=3DROUTER GENERIC > > and do just cd /usr/src && make buildkernel > > Will this patch print the correct first kernel, or this will be entire = list? >=20 > Hi Vadim, > There seems to be a bug in r220954. dhw is taking a look at it. Yeah, it was the whole list; sorry. It should have been ${INSTALLKERNEL} -- as in: Index: Makefile.inc1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile.inc1 (revision 221428) +++ Makefile.inc1 (working copy) @@ -868,7 +868,7 @@ false .endif @echo "--------------------------------------------------------------" - @echo ">>> Installing kernel ${KERNCONF}" + @echo ">>> Installing kernel ${INSTALLKERNEL}" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=3D${TMPPATH} \ At least, that seems to work for me. I would hardly object to a reality check. :-} Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --k3qmt+ucFURmlhDS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk3BnFgACgkQmprOCmdXAD3ArgCghDxyoBj/gTFmACQw8Zhb+gig RRoAn0kPNsybFl42uO9VSH23PwmQ8LsX =KcPM -----END PGP SIGNATURE----- --k3qmt+ucFURmlhDS-- From owner-svn-src-all@FreeBSD.ORG Wed May 4 19:28:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57782106575B; Wed, 4 May 2011 19:28:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45CFE8FC16; Wed, 4 May 2011 19:28:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44JSjqO064151; Wed, 4 May 2011 19:28:45 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44JSjUv064149; Wed, 4 May 2011 19:28:45 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105041928.p44JSjUv064149@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 19:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221454 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 19:28:45 -0000 Author: rmacklem Date: Wed May 4 19:28:44 2011 New Revision: 221454 URL: http://svn.freebsd.org/changeset/base/221454 Log: Modify nfsstat(1) so that it prints out the buffer cache stats in the same way for the new client as the old one. MFC after: 2 weeks Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Wed May 4 18:41:26 2011 (r221453) +++ head/usr.bin/nfsstat/nfsstat.c Wed May 4 19:28:44 2011 (r221454) @@ -650,9 +650,9 @@ exp_intpr(int clientOnly, int serverOnly ext_nfsstats.lookupcache_hits, ext_nfsstats.lookupcache_misses); printf(" %9d %9d %9d %9d\n", - ext_nfsstats.biocache_reads, + ext_nfsstats.biocache_reads - ext_nfsstats.read_bios, ext_nfsstats.read_bios, - ext_nfsstats.biocache_writes, + ext_nfsstats.biocache_writes - ext_nfsstats.write_bios, ext_nfsstats.write_bios); if (printtitle) { printf("%9.9s %9.9s %9.9s %9.9s", @@ -660,9 +660,11 @@ exp_intpr(int clientOnly, int serverOnly printf(" %9.9s %9.9s\n", "DirE Hits", "Misses"); } printf("%9d %9d %9d %9d", - ext_nfsstats.biocache_readlinks, + ext_nfsstats.biocache_readlinks - ext_nfsstats.readlink_bios, - ext_nfsstats.biocache_readdirs, + ext_nfsstats.readlink_bios, + ext_nfsstats.biocache_readdirs - + ext_nfsstats.readdir_bios, ext_nfsstats.readdir_bios); printf(" %9d %9d\n", ext_nfsstats.direofcache_hits, From owner-svn-src-all@FreeBSD.ORG Wed May 4 20:13:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 200C21065672; Wed, 4 May 2011 20:13:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2838FC1A; Wed, 4 May 2011 20:13:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44KDRSl065597; Wed, 4 May 2011 20:13:27 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44KDRCM065595; Wed, 4 May 2011 20:13:27 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105042013.p44KDRCM065595@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 20:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221455 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 20:13:27 -0000 Author: rmacklem Date: Wed May 4 20:13:26 2011 New Revision: 221455 URL: http://svn.freebsd.org/changeset/base/221455 Log: Modify nfsstat(1) so that it reports statistics for the new NFS client/server by default, in a format compatible with the old NFS client/server. Also add a "-o" flag that forces nfsstat(1) to get statistics for the old NFS client/server. Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Wed May 4 19:28:44 2011 (r221454) +++ head/usr.bin/nfsstat/nfsstat.c Wed May 4 20:13:26 2011 (r221455) @@ -82,9 +82,10 @@ kvm_t *kd; static int deadkernel = 0; static int widemode = 0; static int zflag = 0; -static int run_v4 = 0; +static int run_v4 = 1; static int printtitle = 1; static struct ext_nfsstats ext_nfsstats; +static int extra_output = 0; void intpr(int, int); void printhdr(int, int); @@ -109,7 +110,7 @@ main(int argc, char **argv) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "cesWM:N:w:z")) != -1) + while ((ch = getopt(argc, argv, "cesWM:N:ow:z")) != -1) switch(ch) { case 'M': memf = optarg; @@ -136,8 +137,15 @@ main(int argc, char **argv) case 'z': zflag = 1; break; + case 'o': + if (extra_output != 0) + err(1, "-o incompatible with -e"); + run_v4 = 0; + break; case 'e': - run_v4 = 1; + if (run_v4 == 0) + err(1, "-e incompatible with -o"); + extra_output = 1; break; case '?': default: @@ -158,7 +166,7 @@ main(int argc, char **argv) } #endif if (run_v4 != 0 && modfind("nfscommon") < 0) - errx(1, "experimental client/server not loaded"); + errx(1, "new client/server not loaded"); if (run_v4 == 0 && (nlistf != NULL || memf != NULL)) { deadkernel = 1; @@ -178,7 +186,7 @@ main(int argc, char **argv) else sidewaysintpr(interval, clientOnly, serverOnly); } else { - if (run_v4 > 0) + if (extra_output != 0) exp_intpr(clientOnly, serverOnly); else intpr(clientOnly, serverOnly); @@ -238,25 +246,38 @@ intpr(int clientOnly, int serverOnly) { struct nfsstats nfsstats, *nfsstatsp; struct nfsrvstats nfsrvstats, *nfsrvstatsp; + int nfssvc_flag; - /* - * Only read the stats we are going to display to avoid zeroing - * stats the user didn't request. - */ - if (clientOnly) - nfsstatsp = &nfsstats; - else - nfsstatsp = NULL; - if (serverOnly) - nfsrvstatsp = &nfsrvstats; - else - nfsrvstatsp = NULL; - - readstats(&nfsstatsp, &nfsrvstatsp, zflag); - - if (clientOnly && !nfsstatsp) { - printf("Client not present!\n"); - clientOnly = 0; + if (run_v4 == 0) { + /* + * Only read the stats we are going to display to avoid zeroing + * stats the user didn't request. + */ + if (clientOnly) + nfsstatsp = &nfsstats; + else + nfsstatsp = NULL; + if (serverOnly) + nfsrvstatsp = &nfsrvstats; + else + nfsrvstatsp = NULL; + + readstats(&nfsstatsp, &nfsrvstatsp, zflag); + + if (clientOnly && !nfsstatsp) { + printf("Client not present!\n"); + clientOnly = 0; + } + } else { + nfssvc_flag = NFSSVC_GETSTATS; + if (zflag != 0) { + if (clientOnly != 0) + nfssvc_flag |= NFSSVC_ZEROCLTSTATS; + if (serverOnly != 0) + nfssvc_flag |= NFSSVC_ZEROSRVSTATS; + } + if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) + err(1, "Can't get stats"); } if (clientOnly) { printf("Client Info:\n"); @@ -264,71 +285,145 @@ intpr(int clientOnly, int serverOnly) printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_GETATTR], - nfsstats.rpccnt[NFSPROC_SETATTR], - nfsstats.rpccnt[NFSPROC_LOOKUP], - nfsstats.rpccnt[NFSPROC_READLINK], - nfsstats.rpccnt[NFSPROC_READ], - nfsstats.rpccnt[NFSPROC_WRITE], - nfsstats.rpccnt[NFSPROC_CREATE], - nfsstats.rpccnt[NFSPROC_REMOVE]); + if (run_v4 == 0) + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + nfsstats.rpccnt[NFSPROC_GETATTR], + nfsstats.rpccnt[NFSPROC_SETATTR], + nfsstats.rpccnt[NFSPROC_LOOKUP], + nfsstats.rpccnt[NFSPROC_READLINK], + nfsstats.rpccnt[NFSPROC_READ], + nfsstats.rpccnt[NFSPROC_WRITE], + nfsstats.rpccnt[NFSPROC_CREATE], + nfsstats.rpccnt[NFSPROC_REMOVE]); + else + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_GETATTR], + ext_nfsstats.rpccnt[NFSPROC_SETATTR], + ext_nfsstats.rpccnt[NFSPROC_LOOKUP], + ext_nfsstats.rpccnt[NFSPROC_READLINK], + ext_nfsstats.rpccnt[NFSPROC_READ], + ext_nfsstats.rpccnt[NFSPROC_WRITE], + ext_nfsstats.rpccnt[NFSPROC_CREATE], + ext_nfsstats.rpccnt[NFSPROC_REMOVE]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_RENAME], - nfsstats.rpccnt[NFSPROC_LINK], - nfsstats.rpccnt[NFSPROC_SYMLINK], - nfsstats.rpccnt[NFSPROC_MKDIR], - nfsstats.rpccnt[NFSPROC_RMDIR], - nfsstats.rpccnt[NFSPROC_READDIR], - nfsstats.rpccnt[NFSPROC_READDIRPLUS], - nfsstats.rpccnt[NFSPROC_ACCESS]); + if (run_v4 == 0) + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + nfsstats.rpccnt[NFSPROC_RENAME], + nfsstats.rpccnt[NFSPROC_LINK], + nfsstats.rpccnt[NFSPROC_SYMLINK], + nfsstats.rpccnt[NFSPROC_MKDIR], + nfsstats.rpccnt[NFSPROC_RMDIR], + nfsstats.rpccnt[NFSPROC_READDIR], + nfsstats.rpccnt[NFSPROC_READDIRPLUS], + nfsstats.rpccnt[NFSPROC_ACCESS]); + else + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_RENAME], + ext_nfsstats.rpccnt[NFSPROC_LINK], + ext_nfsstats.rpccnt[NFSPROC_SYMLINK], + ext_nfsstats.rpccnt[NFSPROC_MKDIR], + ext_nfsstats.rpccnt[NFSPROC_RMDIR], + ext_nfsstats.rpccnt[NFSPROC_READDIR], + ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], + ext_nfsstats.rpccnt[NFSPROC_ACCESS]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit"); - printf("%9d %9d %9d %9d %9d\n", - nfsstats.rpccnt[NFSPROC_MKNOD], - nfsstats.rpccnt[NFSPROC_FSSTAT], - nfsstats.rpccnt[NFSPROC_FSINFO], - nfsstats.rpccnt[NFSPROC_PATHCONF], - nfsstats.rpccnt[NFSPROC_COMMIT]); + if (run_v4 == 0) + printf("%9d %9d %9d %9d %9d\n", + nfsstats.rpccnt[NFSPROC_MKNOD], + nfsstats.rpccnt[NFSPROC_FSSTAT], + nfsstats.rpccnt[NFSPROC_FSINFO], + nfsstats.rpccnt[NFSPROC_PATHCONF], + nfsstats.rpccnt[NFSPROC_COMMIT]); + else + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.rpccnt[NFSPROC_MKNOD], + ext_nfsstats.rpccnt[NFSPROC_FSSTAT], + ext_nfsstats.rpccnt[NFSPROC_FSINFO], + ext_nfsstats.rpccnt[NFSPROC_PATHCONF], + ext_nfsstats.rpccnt[NFSPROC_COMMIT]); printf("Rpc Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "TimedOut", "Invalid", "X Replies", "Retries", "Requests"); - printf("%9d %9d %9d %9d %9d\n", - nfsstats.rpctimeouts, - nfsstats.rpcinvalid, - nfsstats.rpcunexpected, - nfsstats.rpcretries, - nfsstats.rpcrequests); + if (run_v4 == 0) + printf("%9d %9d %9d %9d %9d\n", + nfsstats.rpctimeouts, + nfsstats.rpcinvalid, + nfsstats.rpcunexpected, + nfsstats.rpcretries, + nfsstats.rpcrequests); + else + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.rpctimeouts, + ext_nfsstats.rpcinvalid, + ext_nfsstats.rpcunexpected, + ext_nfsstats.rpcretries, + ext_nfsstats.rpcrequests); printf("Cache Info:\n"); printf("%9.9s %9.9s %9.9s %9.9s", "Attr Hits", "Misses", "Lkup Hits", "Misses"); printf(" %9.9s %9.9s %9.9s %9.9s\n", "BioR Hits", "Misses", "BioW Hits", "Misses"); - printf("%9d %9d %9d %9d", - nfsstats.attrcache_hits, nfsstats.attrcache_misses, - nfsstats.lookupcache_hits, nfsstats.lookupcache_misses); - printf(" %9d %9d %9d %9d\n", - nfsstats.biocache_reads-nfsstats.read_bios, - nfsstats.read_bios, - nfsstats.biocache_writes-nfsstats.write_bios, - nfsstats.write_bios); + if (run_v4 == 0) { + printf("%9d %9d %9d %9d", + nfsstats.attrcache_hits, + nfsstats.attrcache_misses, + nfsstats.lookupcache_hits, + nfsstats.lookupcache_misses); + printf(" %9d %9d %9d %9d\n", + nfsstats.biocache_reads-nfsstats.read_bios, + nfsstats.read_bios, + nfsstats.biocache_writes-nfsstats.write_bios, + nfsstats.write_bios); + } else { + printf("%9d %9d %9d %9d", + ext_nfsstats.attrcache_hits, + ext_nfsstats.attrcache_misses, + ext_nfsstats.lookupcache_hits, + ext_nfsstats.lookupcache_misses); + printf(" %9d %9d %9d %9d\n", + ext_nfsstats.biocache_reads - + ext_nfsstats.read_bios, + ext_nfsstats.read_bios, + ext_nfsstats.biocache_writes - + ext_nfsstats.write_bios, + ext_nfsstats.write_bios); + } printf("%9.9s %9.9s %9.9s %9.9s", "BioRLHits", "Misses", "BioD Hits", "Misses"); printf(" %9.9s %9.9s %9.9s %9.9s\n", "DirE Hits", "Misses", "Accs Hits", "Misses"); - printf("%9d %9d %9d %9d", - nfsstats.biocache_readlinks-nfsstats.readlink_bios, - nfsstats.readlink_bios, - nfsstats.biocache_readdirs-nfsstats.readdir_bios, - nfsstats.readdir_bios); - printf(" %9d %9d %9d %9d\n", - nfsstats.direofcache_hits, nfsstats.direofcache_misses, - nfsstats.accesscache_hits, nfsstats.accesscache_misses); + if (run_v4 == 0) { + printf("%9d %9d %9d %9d", + nfsstats.biocache_readlinks - + nfsstats.readlink_bios, + nfsstats.readlink_bios, + nfsstats.biocache_readdirs - + nfsstats.readdir_bios, + nfsstats.readdir_bios); + printf(" %9d %9d %9d %9d\n", + nfsstats.direofcache_hits, + nfsstats.direofcache_misses, + nfsstats.accesscache_hits, + nfsstats.accesscache_misses); + } else { + printf("%9d %9d %9d %9d", + ext_nfsstats.biocache_readlinks - + ext_nfsstats.readlink_bios, + ext_nfsstats.readlink_bios, + ext_nfsstats.biocache_readdirs - + ext_nfsstats.readdir_bios, + ext_nfsstats.readdir_bios); + printf(" %9d %9d %9d %9d\n", + ext_nfsstats.direofcache_hits, + ext_nfsstats.direofcache_misses, + ext_nfsstats.accesscache_hits, + ext_nfsstats.accesscache_misses); + } } - if (serverOnly && !nfsrvstatsp) { + if (run_v4 == 0 && serverOnly && !nfsrvstatsp) { printf("Server not present!\n"); serverOnly = 0; } @@ -337,55 +432,107 @@ intpr(int clientOnly, int serverOnly) printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Getattr", "Setattr", "Lookup", "Readlink", "Read", "Write", "Create", "Remove"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_GETATTR], - nfsrvstats.srvrpccnt[NFSPROC_SETATTR], - nfsrvstats.srvrpccnt[NFSPROC_LOOKUP], - nfsrvstats.srvrpccnt[NFSPROC_READLINK], - nfsrvstats.srvrpccnt[NFSPROC_READ], - nfsrvstats.srvrpccnt[NFSPROC_WRITE], - nfsrvstats.srvrpccnt[NFSPROC_CREATE], - nfsrvstats.srvrpccnt[NFSPROC_REMOVE]); + if (run_v4 == 0) + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + nfsrvstats.srvrpccnt[NFSPROC_GETATTR], + nfsrvstats.srvrpccnt[NFSPROC_SETATTR], + nfsrvstats.srvrpccnt[NFSPROC_LOOKUP], + nfsrvstats.srvrpccnt[NFSPROC_READLINK], + nfsrvstats.srvrpccnt[NFSPROC_READ], + nfsrvstats.srvrpccnt[NFSPROC_WRITE], + nfsrvstats.srvrpccnt[NFSPROC_CREATE], + nfsrvstats.srvrpccnt[NFSPROC_REMOVE]); + else + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSPROC_GETATTR], + ext_nfsstats.srvrpccnt[NFSPROC_SETATTR], + ext_nfsstats.srvrpccnt[NFSPROC_LOOKUP], + ext_nfsstats.srvrpccnt[NFSPROC_READLINK], + ext_nfsstats.srvrpccnt[NFSPROC_READ], + ext_nfsstats.srvrpccnt[NFSPROC_WRITE], + ext_nfsstats.srvrpccnt[NFSPROC_CREATE], + ext_nfsstats.srvrpccnt[NFSPROC_REMOVE]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s %9.9s\n", "Rename", "Link", "Symlink", "Mkdir", "Rmdir", "Readdir", "RdirPlus", "Access"); - printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_RENAME], - nfsrvstats.srvrpccnt[NFSPROC_LINK], - nfsrvstats.srvrpccnt[NFSPROC_SYMLINK], - nfsrvstats.srvrpccnt[NFSPROC_MKDIR], - nfsrvstats.srvrpccnt[NFSPROC_RMDIR], - nfsrvstats.srvrpccnt[NFSPROC_READDIR], - nfsrvstats.srvrpccnt[NFSPROC_READDIRPLUS], - nfsrvstats.srvrpccnt[NFSPROC_ACCESS]); + if (run_v4 == 0) + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + nfsrvstats.srvrpccnt[NFSPROC_RENAME], + nfsrvstats.srvrpccnt[NFSPROC_LINK], + nfsrvstats.srvrpccnt[NFSPROC_SYMLINK], + nfsrvstats.srvrpccnt[NFSPROC_MKDIR], + nfsrvstats.srvrpccnt[NFSPROC_RMDIR], + nfsrvstats.srvrpccnt[NFSPROC_READDIR], + nfsrvstats.srvrpccnt[NFSPROC_READDIRPLUS], + nfsrvstats.srvrpccnt[NFSPROC_ACCESS]); + else + printf("%9d %9d %9d %9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSPROC_RENAME], + ext_nfsstats.srvrpccnt[NFSPROC_LINK], + ext_nfsstats.srvrpccnt[NFSPROC_SYMLINK], + ext_nfsstats.srvrpccnt[NFSPROC_MKDIR], + ext_nfsstats.srvrpccnt[NFSPROC_RMDIR], + ext_nfsstats.srvrpccnt[NFSPROC_READDIR], + ext_nfsstats.srvrpccnt[NFSPROC_READDIRPLUS], + ext_nfsstats.srvrpccnt[NFSPROC_ACCESS]); printf("%9.9s %9.9s %9.9s %9.9s %9.9s\n", "Mknod", "Fsstat", "Fsinfo", "PathConf", "Commit"); - printf("%9d %9d %9d %9d %9d\n", - nfsrvstats.srvrpccnt[NFSPROC_MKNOD], - nfsrvstats.srvrpccnt[NFSPROC_FSSTAT], - nfsrvstats.srvrpccnt[NFSPROC_FSINFO], - nfsrvstats.srvrpccnt[NFSPROC_PATHCONF], - nfsrvstats.srvrpccnt[NFSPROC_COMMIT]); + if (run_v4 == 0) + printf("%9d %9d %9d %9d %9d\n", + nfsrvstats.srvrpccnt[NFSPROC_MKNOD], + nfsrvstats.srvrpccnt[NFSPROC_FSSTAT], + nfsrvstats.srvrpccnt[NFSPROC_FSINFO], + nfsrvstats.srvrpccnt[NFSPROC_PATHCONF], + nfsrvstats.srvrpccnt[NFSPROC_COMMIT]); + else + printf("%9d %9d %9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSPROC_MKNOD], + ext_nfsstats.srvrpccnt[NFSPROC_FSSTAT], + ext_nfsstats.srvrpccnt[NFSPROC_FSINFO], + ext_nfsstats.srvrpccnt[NFSPROC_PATHCONF], + ext_nfsstats.srvrpccnt[NFSPROC_COMMIT]); printf("Server Ret-Failed\n"); - printf("%17d\n", nfsrvstats.srvrpc_errs); + if (run_v4 == 0) + printf("%17d\n", nfsrvstats.srvrpc_errs); + else + printf("%17d\n", ext_nfsstats.srvrpc_errs); printf("Server Faults\n"); - printf("%13d\n", nfsrvstats.srv_errs); + if (run_v4 == 0) + printf("%13d\n", nfsrvstats.srv_errs); + else + printf("%13d\n", ext_nfsstats.srv_errs); printf("Server Cache Stats:\n"); printf("%9.9s %9.9s %9.9s %9.9s\n", "Inprog", "Idem", "Non-idem", "Misses"); - printf("%9d %9d %9d %9d\n", - nfsrvstats.srvcache_inproghits, - nfsrvstats.srvcache_idemdonehits, - nfsrvstats.srvcache_nonidemdonehits, - nfsrvstats.srvcache_misses); + if (run_v4 == 0) + printf("%9d %9d %9d %9d\n", + nfsrvstats.srvcache_inproghits, + nfsrvstats.srvcache_idemdonehits, + nfsrvstats.srvcache_nonidemdonehits, + nfsrvstats.srvcache_misses); + else + printf("%9d %9d %9d %9d\n", + ext_nfsstats.srvcache_inproghits, + ext_nfsstats.srvcache_idemdonehits, + ext_nfsstats.srvcache_nonidemdonehits, + ext_nfsstats.srvcache_misses); printf("Server Write Gathering:\n"); printf("%9.9s %9.9s %9.9s\n", "WriteOps", "WriteRPC", "Opsaved"); - printf("%9d %9d %9d\n", - nfsrvstats.srvvop_writes, - nfsrvstats.srvrpccnt[NFSPROC_WRITE], - nfsrvstats.srvrpccnt[NFSPROC_WRITE] - - nfsrvstats.srvvop_writes); + if (run_v4 == 0) + printf("%9d %9d %9d\n", + nfsrvstats.srvvop_writes, + nfsrvstats.srvrpccnt[NFSPROC_WRITE], + nfsrvstats.srvrpccnt[NFSPROC_WRITE] - + nfsrvstats.srvvop_writes); + else + /* + * The new client doesn't do write gathering. It was + * only useful for NFSv2. + */ + printf("%9d %9d %9d\n", + ext_nfsstats.srvrpccnt[NFSPROC_WRITE], + ext_nfsstats.srvrpccnt[NFSPROC_WRITE], 0); } } From owner-svn-src-all@FreeBSD.ORG Wed May 4 20:28:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0A89106566C; Wed, 4 May 2011 20:28:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 940598FC0C; Wed, 4 May 2011 20:28:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44KS6PV066106; Wed, 4 May 2011 20:28:06 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44KS6JZ066104; Wed, 4 May 2011 20:28:06 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105042028.p44KS6JZ066104@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 20:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221457 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 20:28:06 -0000 Author: rmacklem Date: Wed May 4 20:28:06 2011 New Revision: 221457 URL: http://svn.freebsd.org/changeset/base/221457 Log: Update nfsstat.1 to reflect the changes done to nfsstat(1) by r221455. This includes a new "-o" option for displaying statistics from the old NFS client/server and a slightly different description for the "-e" option. This is a content change. Modified: head/usr.bin/nfsstat/nfsstat.1 Modified: head/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- head/usr.bin/nfsstat/nfsstat.1 Wed May 4 20:26:48 2011 (r221456) +++ head/usr.bin/nfsstat/nfsstat.1 Wed May 4 20:28:06 2011 (r221457) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 1, 2011 +.Dd May 4, 2011 .Dt NFSSTAT 1 .Os .Sh NAME @@ -38,7 +38,7 @@ statistics .Sh SYNOPSIS .Nm -.Op Fl ceszW +.Op Fl ceoszW .Op Fl M Ar core .Op Fl N Ar system .Op Fl w Ar wait @@ -53,6 +53,11 @@ The options are as follows: .Bl -tag -width indent .It Fl c Only display client side statistics. +.It Fl e +Report the extra statistics collected by the new NFS client and +server for NFSv4. +This option is incompatible with +.Fl o . .It Fl M Extract values associated with the name list from the specified core instead of the default @@ -60,6 +65,9 @@ instead of the default .It Fl N Extract the name list from the specified system instead of the default .Pa /boot/kernel/kernel . +.It Fl o +Report statistics for the old NFS client and/or server. Without this +option statistics for the new NFS client and/or server will be reported. .It Fl s Only display server side statistics. .It Fl W @@ -78,9 +86,6 @@ activity for both the client and server second intervals. .It Fl z Reset statistics after displaying them. -.It Fl e -Gather statistics from the experimental nfs subsystem that includes -support for NFSv4 instead of the regular nfs subsystem. .El .Sh FILES .Bl -tag -width ".Pa /boot/kernel/kernel" -compact From owner-svn-src-all@FreeBSD.ORG Wed May 4 21:00:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD821065672; Wed, 4 May 2011 21:00:18 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id C588E8FC0C; Wed, 4 May 2011 21:00:17 +0000 (UTC) Received: from julian-mac.elischer.org ([216.51.42.66]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p44L0ESY022498 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 4 May 2011 14:00:15 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4DC1BE5A.1090201@freebsd.org> Date: Wed, 04 May 2011 15:00:10 -0600 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Alexander Leidinger References: <201105040822.p448MwK2037559@svn.freebsd.org> In-Reply-To: <201105040822.p448MwK2037559@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r221422 - vendor/v4l/2.6.17 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 21:00:19 -0000 On 5/4/11 2:22 AM, Alexander Leidinger wrote: > Author: netchild > Date: Wed May 4 08:22:58 2011 > New Revision: 221422 > URL: http://svn.freebsd.org/changeset/base/221422 note that I have email from Bill dirks (somewhere) explicitly allowing us to use this file also from alan cox (the linux one) for the original v4l.h > Log: > Tag the v4l2 header with the linux kernel version where I took it from. > > Added: > vendor/v4l/2.6.17/videodev2.h > - copied unchanged from r221421, vendor/v4l/dist/videodev2.h > > Copied: vendor/v4l/2.6.17/videodev2.h (from r221421, vendor/v4l/dist/videodev2.h) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ vendor/v4l/2.6.17/videodev2.h Wed May 4 08:22:58 2011 (r221422, copy of r221421, vendor/v4l/dist/videodev2.h) > @@ -0,0 +1,1164 @@ > +#ifndef __LINUX_VIDEODEV2_H > +#define __LINUX_VIDEODEV2_H > +/* > + * Video for Linux Two > + * > + * Header file for v4l or V4L2 drivers and applications, for > + * Linux kernels 2.2.x or 2.4.x. > + * > + * See http://bytesex.org/v4l/ for API specs and other > + * v4l2 documentation. > + * > + * Author: Bill Dirks > + * Justin Schoeman > + * et al. > + */ > +#ifdef __KERNEL__ > +#include /* need struct timeval */ > +#include > +#include > +#include > +#endif > +#include /* need __user */ > + > + > +#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ > +#define HAVE_V4L2 1 > + > +/* > + * Common stuff for both V4L1 and V4L2 > + * Moved from videodev.h > + */ > + > +#define VIDEO_MAX_FRAME 32 > + > +#define VID_TYPE_CAPTURE 1 /* Can capture */ > +#define VID_TYPE_TUNER 2 /* Can tune */ > +#define VID_TYPE_TELETEXT 4 /* Does teletext */ > +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ > +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ > +#define VID_TYPE_CLIPPING 32 /* Can clip */ > +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ > +#define VID_TYPE_SCALES 128 /* Scalable */ > +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ > +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ > +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ > +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ > +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ > +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ > + > +#ifdef __KERNEL__ > + > +/* Minor device allocation */ > +#define MINOR_VFL_TYPE_GRABBER_MIN 0 > +#define MINOR_VFL_TYPE_GRABBER_MAX 63 > +#define MINOR_VFL_TYPE_RADIO_MIN 64 > +#define MINOR_VFL_TYPE_RADIO_MAX 127 > +#define MINOR_VFL_TYPE_VTX_MIN 192 > +#define MINOR_VFL_TYPE_VTX_MAX 223 > +#define MINOR_VFL_TYPE_VBI_MIN 224 > +#define MINOR_VFL_TYPE_VBI_MAX 255 > + > +#define VFL_TYPE_GRABBER 0 > +#define VFL_TYPE_VBI 1 > +#define VFL_TYPE_RADIO 2 > +#define VFL_TYPE_VTX 3 > + > +struct video_device > +{ > + /* device info */ > + struct device *dev; > + char name[32]; > + int type; /* v4l1 */ > + int type2; /* v4l2 */ > + int hardware; > + int minor; > + > + /* device ops + callbacks */ > + const struct file_operations *fops; > + void (*release)(struct video_device *vfd); > + > + > +#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ > + /* obsolete -- fops->owner is used instead */ > + struct module *owner; > + /* dev->driver_data will be used instead some day. > + * Use the video_{get|set}_drvdata() helper functions, > + * so the switch over will be transparent for you. > + * Or use {pci|usb}_{get|set}_drvdata() directly. */ > + void *priv; > +#endif > + > + /* for videodev.c intenal usage -- please don't touch */ > + int users; /* video_exclusive_{open|close} ... */ > + struct mutex lock; /* ... helper function uses these */ > + char devfs_name[64]; /* devfs */ > + struct class_device class_dev; /* sysfs */ > +}; > + > +#define VIDEO_MAJOR 81 > + > +extern int video_register_device(struct video_device *, int type, int nr); > +extern void video_unregister_device(struct video_device *); > +extern int video_usercopy(struct inode *inode, struct file *file, > + unsigned int cmd, unsigned long arg, > + int (*func)(struct inode *inode, struct file *file, > + unsigned int cmd, void *arg)); > + > +/* helper functions to alloc / release struct video_device, the > + later can be used for video_device->release() */ > +struct video_device *video_device_alloc(void); > +void video_device_release(struct video_device *vfd); > + > +#endif > + > +/* > + * M I S C E L L A N E O U S > + */ > + > +/* Four-character-code (FOURCC) */ > +#define v4l2_fourcc(a,b,c,d)\ > + (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) > + > +/* > + * E N U M S > + */ > +enum v4l2_field { > + V4L2_FIELD_ANY = 0, /* driver can choose from none, > + top, bottom, interlaced > + depending on whatever it thinks > + is approximate ... */ > + V4L2_FIELD_NONE = 1, /* this device has no fields ... */ > + V4L2_FIELD_TOP = 2, /* top field only */ > + V4L2_FIELD_BOTTOM = 3, /* bottom field only */ > + V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */ > + V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one > + buffer, top-bottom order */ > + V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */ > + V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into > + separate buffers */ > +}; > +#define V4L2_FIELD_HAS_TOP(field) \ > + ((field) == V4L2_FIELD_TOP ||\ > + (field) == V4L2_FIELD_INTERLACED ||\ > + (field) == V4L2_FIELD_SEQ_TB ||\ > + (field) == V4L2_FIELD_SEQ_BT) > +#define V4L2_FIELD_HAS_BOTTOM(field) \ > + ((field) == V4L2_FIELD_BOTTOM ||\ > + (field) == V4L2_FIELD_INTERLACED ||\ > + (field) == V4L2_FIELD_SEQ_TB ||\ > + (field) == V4L2_FIELD_SEQ_BT) > +#define V4L2_FIELD_HAS_BOTH(field) \ > + ((field) == V4L2_FIELD_INTERLACED ||\ > + (field) == V4L2_FIELD_SEQ_TB ||\ > + (field) == V4L2_FIELD_SEQ_BT) > + > +enum v4l2_buf_type { > + V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, > + V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, > + V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, > + V4L2_BUF_TYPE_VBI_CAPTURE = 4, > + V4L2_BUF_TYPE_VBI_OUTPUT = 5, > +#if 1 > + /* Experimental Sliced VBI */ > + V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, > + V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, > +#endif > + V4L2_BUF_TYPE_PRIVATE = 0x80, > +}; > + > +enum v4l2_ctrl_type { > + V4L2_CTRL_TYPE_INTEGER = 1, > + V4L2_CTRL_TYPE_BOOLEAN = 2, > + V4L2_CTRL_TYPE_MENU = 3, > + V4L2_CTRL_TYPE_BUTTON = 4, > +}; > + > +enum v4l2_tuner_type { > + V4L2_TUNER_RADIO = 1, > + V4L2_TUNER_ANALOG_TV = 2, > + V4L2_TUNER_DIGITAL_TV = 3, > +}; > + > +enum v4l2_memory { > + V4L2_MEMORY_MMAP = 1, > + V4L2_MEMORY_USERPTR = 2, > + V4L2_MEMORY_OVERLAY = 3, > +}; > + > +/* see also http://vektor.theorem.ca/graphics/ycbcr/ */ > +enum v4l2_colorspace { > + /* ITU-R 601 -- broadcast NTSC/PAL */ > + V4L2_COLORSPACE_SMPTE170M = 1, > + > + /* 1125-Line (US) HDTV */ > + V4L2_COLORSPACE_SMPTE240M = 2, > + > + /* HD and modern captures. */ > + V4L2_COLORSPACE_REC709 = 3, > + > + /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ > + V4L2_COLORSPACE_BT878 = 4, > + > + /* These should be useful. Assume 601 extents. */ > + V4L2_COLORSPACE_470_SYSTEM_M = 5, > + V4L2_COLORSPACE_470_SYSTEM_BG = 6, > + > + /* I know there will be cameras that send this. So, this is > + * unspecified chromaticities and full 0-255 on each of the > + * Y'CbCr components > + */ > + V4L2_COLORSPACE_JPEG = 7, > + > + /* For RGB colourspaces, this is probably a good start. */ > + V4L2_COLORSPACE_SRGB = 8, > +}; > + > +enum v4l2_priority { > + V4L2_PRIORITY_UNSET = 0, /* not initialized */ > + V4L2_PRIORITY_BACKGROUND = 1, > + V4L2_PRIORITY_INTERACTIVE = 2, > + V4L2_PRIORITY_RECORD = 3, > + V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE, > +}; > + > +struct v4l2_rect { > + __s32 left; > + __s32 top; > + __s32 width; > + __s32 height; > +}; > + > +struct v4l2_fract { > + __u32 numerator; > + __u32 denominator; > +}; > + > +/* > + * D R I V E R C A P A B I L I T I E S > + */ > +struct v4l2_capability > +{ > + __u8 driver[16]; /* i.e. "bttv" */ > + __u8 card[32]; /* i.e. "Hauppauge WinTV" */ > + __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ > + __u32 version; /* should use KERNEL_VERSION() */ > + __u32 capabilities; /* Device capabilities */ > + __u32 reserved[4]; > +}; > + > +/* Values for 'capabilities' field */ > +#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ > +#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ > +#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ > +#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ > +#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ > +#if 1 > +#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ > +#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ > +#endif > +#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ > + > +#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ > +#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ > +#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ > + > +#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ > +#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ > +#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ > + > +/* > + * V I D E O I M A G E F O R M A T > + */ > + > +struct v4l2_pix_format > +{ > + __u32 width; > + __u32 height; > + __u32 pixelformat; > + enum v4l2_field field; > + __u32 bytesperline; /* for padding, zero if unused */ > + __u32 sizeimage; > + enum v4l2_colorspace colorspace; > + __u32 priv; /* private data, depends on pixelformat */ > +}; > + > +/* Pixel format FOURCC depth Description */ > +#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ > +#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ > +#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ > +#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ > +#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R') /* 16 RGB-5-6-5 BE */ > +#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3') /* 24 BGR-8-8-8 */ > +#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3') /* 24 RGB-8-8-8 */ > +#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ > +#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ > +#define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ > +#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ > +#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ > +#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ > +#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y') /* 16 YUV 4:2:2 */ > +#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ > +#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ > +#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ > + > +/* two planes -- one Y, one Cr + Cb interleaved */ > +#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* 12 Y/CbCr 4:2:0 */ > +#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1') /* 12 Y/CrCb 4:2:0 */ > + > +/* The following formats are not defined in the V4L2 specification */ > +#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9') /* 9 YUV 4:1:0 */ > +#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ > +#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ > +#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ > + > +/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ > +#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ > + > +/* compressed formats */ > +#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ > +#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ > +#define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ > +#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG */ > + > +/* Vendor-specific formats */ > +#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ > +#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ > +#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ > +#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ > +#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ > + > +/* > + * F O R M A T E N U M E R A T I O N > + */ > +struct v4l2_fmtdesc > +{ > + __u32 index; /* Format number */ > + enum v4l2_buf_type type; /* buffer type */ > + __u32 flags; > + __u8 description[32]; /* Description string */ > + __u32 pixelformat; /* Format fourcc */ > + __u32 reserved[4]; > +}; > + > +#define V4L2_FMT_FLAG_COMPRESSED 0x0001 > + > + > +/* > + * T I M E C O D E > + */ > +struct v4l2_timecode > +{ > + __u32 type; > + __u32 flags; > + __u8 frames; > + __u8 seconds; > + __u8 minutes; > + __u8 hours; > + __u8 userbits[4]; > +}; > + > +/* Type */ > +#define V4L2_TC_TYPE_24FPS 1 > +#define V4L2_TC_TYPE_25FPS 2 > +#define V4L2_TC_TYPE_30FPS 3 > +#define V4L2_TC_TYPE_50FPS 4 > +#define V4L2_TC_TYPE_60FPS 5 > + > +/* Flags */ > +#define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */ > +#define V4L2_TC_FLAG_COLORFRAME 0x0002 > +#define V4L2_TC_USERBITS_field 0x000C > +#define V4L2_TC_USERBITS_USERDEFINED 0x0000 > +#define V4L2_TC_USERBITS_8BITCHARS 0x0008 > +/* The above is based on SMPTE timecodes */ > + > + > +/* > + * M P E G C O M P R E S S I O N P A R A M E T E R S > + * > + * ### WARNING: this is still work-in-progress right now, most likely > + * ### there will be some incompatible changes. > + * > + */ > + > + > +enum v4l2_bitrate_mode { > + V4L2_BITRATE_NONE = 0, /* not specified */ > + V4L2_BITRATE_CBR, /* constant bitrate */ > + V4L2_BITRATE_VBR, /* variable bitrate */ > +}; > +struct v4l2_bitrate { > + /* rates are specified in kbit/sec */ > + enum v4l2_bitrate_mode mode; > + __u32 min; > + __u32 target; /* use this one for CBR */ > + __u32 max; > +}; > + > +enum v4l2_mpeg_streamtype { > + V4L2_MPEG_SS_1, /* MPEG-1 system stream */ > + V4L2_MPEG_PS_2, /* MPEG-2 program stream */ > + V4L2_MPEG_TS_2, /* MPEG-2 transport stream */ > + V4L2_MPEG_PS_DVD, /* MPEG-2 program stream with DVD header fixups */ > +}; > +enum v4l2_mpeg_audiotype { > + V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */ > + V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */ > + V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */ > + V4L2_MPEG_AC3, /* AC3 */ > + V4L2_MPEG_LPCM, /* LPCM */ > +}; > +enum v4l2_mpeg_videotype { > + V4L2_MPEG_VI_1, /* MPEG-1 */ > + V4L2_MPEG_VI_2, /* MPEG-2 */ > +}; > +enum v4l2_mpeg_aspectratio { > + V4L2_MPEG_ASPECT_SQUARE = 1, /* square pixel */ > + V4L2_MPEG_ASPECT_4_3 = 2, /* 4 : 3 */ > + V4L2_MPEG_ASPECT_16_9 = 3, /* 16 : 9 */ > + V4L2_MPEG_ASPECT_1_221 = 4, /* 1 : 2,21 */ > +}; > + > +struct v4l2_mpeg_compression { > + /* general */ > + enum v4l2_mpeg_streamtype st_type; > + struct v4l2_bitrate st_bitrate; > + > + /* transport streams */ > + __u16 ts_pid_pmt; > + __u16 ts_pid_audio; > + __u16 ts_pid_video; > + __u16 ts_pid_pcr; > + > + /* program stream */ > + __u16 ps_size; > + __u16 reserved_1; /* align */ > + > + /* audio */ > + enum v4l2_mpeg_audiotype au_type; > + struct v4l2_bitrate au_bitrate; > + __u32 au_sample_rate; > + __u8 au_pesid; > + __u8 reserved_2[3]; /* align */ > + > + /* video */ > + enum v4l2_mpeg_videotype vi_type; > + enum v4l2_mpeg_aspectratio vi_aspect_ratio; > + struct v4l2_bitrate vi_bitrate; > + __u32 vi_frame_rate; > + __u16 vi_frames_per_gop; > + __u16 vi_bframes_count; > + __u8 vi_pesid; > + __u8 reserved_3[3]; /* align */ > + > + /* misc flags */ > + __u32 closed_gops:1; > + __u32 pulldown:1; > + __u32 reserved_4:30; /* align */ > + > + /* I don't expect the above being perfect yet ;) */ > + __u32 reserved_5[8]; > +}; > + > +struct v4l2_jpegcompression > +{ > + int quality; > + > + int APPn; /* Number of APP segment to be written, > + * must be 0..15 */ > + int APP_len; /* Length of data in JPEG APPn segment */ > + char APP_data[60]; /* Data in the JPEG APPn segment. */ > + > + int COM_len; /* Length of data in JPEG COM segment */ > + char COM_data[60]; /* Data in JPEG COM segment */ > + > + __u32 jpeg_markers; /* Which markers should go into the JPEG > + * output. Unless you exactly know what > + * you do, leave them untouched. > + * Inluding less markers will make the > + * resulting code smaller, but there will > + * be fewer aplications which can read it. > + * The presence of the APP and COM marker > + * is influenced by APP_len and COM_len > + * ONLY, not by this property! */ > + > +#define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ > +#define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ > +#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ > +#define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */ > +#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will > + * allways use APP0 */ > +}; > + > + > +/* > + * M E M O R Y - M A P P I N G B U F F E R S > + */ > +struct v4l2_requestbuffers > +{ > + __u32 count; > + enum v4l2_buf_type type; > + enum v4l2_memory memory; > + __u32 reserved[2]; > +}; > + > +struct v4l2_buffer > +{ > + __u32 index; > + enum v4l2_buf_type type; > + __u32 bytesused; > + __u32 flags; > + enum v4l2_field field; > + struct timeval timestamp; > + struct v4l2_timecode timecode; > + __u32 sequence; > + > + /* memory location */ > + enum v4l2_memory memory; > + union { > + __u32 offset; > + unsigned long userptr; > + } m; > + __u32 length; > + __u32 input; > + __u32 reserved; > +}; > + > +/* Flags for 'flags' field */ > +#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */ > +#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */ > +#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */ > +#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ > +#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ > +#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ > +#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ > +#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ > + > +/* > + * O V E R L A Y P R E V I E W > + */ > +struct v4l2_framebuffer > +{ > + __u32 capability; > + __u32 flags; > +/* FIXME: in theory we should pass something like PCI device + memory > + * region + offset instead of some physical address */ > + void* base; > + struct v4l2_pix_format fmt; > +}; > +/* Flags for the 'capability' field. Read only */ > +#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 > +#define V4L2_FBUF_CAP_CHROMAKEY 0x0002 > +#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 > +#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 > +/* Flags for the 'flags' field. */ > +#define V4L2_FBUF_FLAG_PRIMARY 0x0001 > +#define V4L2_FBUF_FLAG_OVERLAY 0x0002 > +#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 > + > +struct v4l2_clip > +{ > + struct v4l2_rect c; > + struct v4l2_clip __user *next; > +}; > + > +struct v4l2_window > +{ > + struct v4l2_rect w; > + enum v4l2_field field; > + __u32 chromakey; > + struct v4l2_clip __user *clips; > + __u32 clipcount; > + void __user *bitmap; > +}; > + > + > +/* > + * C A P T U R E P A R A M E T E R S > + */ > +struct v4l2_captureparm > +{ > + __u32 capability; /* Supported modes */ > + __u32 capturemode; /* Current mode */ > + struct v4l2_fract timeperframe; /* Time per frame in .1us units */ > + __u32 extendedmode; /* Driver-specific extensions */ > + __u32 readbuffers; /* # of buffers for read */ > + __u32 reserved[4]; > +}; > +/* Flags for 'capability' and 'capturemode' fields */ > +#define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ > +#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ > + > +struct v4l2_outputparm > +{ > + __u32 capability; /* Supported modes */ > + __u32 outputmode; /* Current mode */ > + struct v4l2_fract timeperframe; /* Time per frame in seconds */ > + __u32 extendedmode; /* Driver-specific extensions */ > + __u32 writebuffers; /* # of buffers for write */ > + __u32 reserved[4]; > +}; > + > +/* > + * I N P U T I M A G E C R O P P I N G > + */ > + > +struct v4l2_cropcap { > + enum v4l2_buf_type type; > + struct v4l2_rect bounds; > + struct v4l2_rect defrect; > + struct v4l2_fract pixelaspect; > +}; > + > +struct v4l2_crop { > + enum v4l2_buf_type type; > + struct v4l2_rect c; > +}; > + > +/* > + * A N A L O G V I D E O S T A N D A R D > + */ > + > +typedef __u64 v4l2_std_id; > + > +/* one bit for each */ > +#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) > +#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002) > +#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004) > +#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008) > +#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010) > +#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020) > +#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040) > +#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080) > + > +#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100) > +#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200) > +#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400) > +#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800) > + > +#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) > +#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) > +#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000) > +#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) > + > +#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) > +#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) > +#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000) > +#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000) > +#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000) > +#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000) > +#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000) > +#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000) > + > +/* ATSC/HDTV */ > +#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) > +#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) > + > +/* some merged standards */ > +#define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) > +#define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B) > +#define V4L2_STD_GH (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H) > +#define V4L2_STD_DK (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK) > + > +/* some common needed stuff */ > +#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\ > + V4L2_STD_PAL_B1 |\ > + V4L2_STD_PAL_G) > +#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\ > + V4L2_STD_PAL_D1 |\ > + V4L2_STD_PAL_K) > +#define V4L2_STD_PAL (V4L2_STD_PAL_BG |\ > + V4L2_STD_PAL_DK |\ > + V4L2_STD_PAL_H |\ > + V4L2_STD_PAL_I) > +#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ > + V4L2_STD_NTSC_M_JP |\ > + V4L2_STD_NTSC_M_KR) > +#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ > + V4L2_STD_SECAM_K |\ > + V4L2_STD_SECAM_K1) > +#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ > + V4L2_STD_SECAM_G |\ > + V4L2_STD_SECAM_H |\ > + V4L2_STD_SECAM_DK |\ > + V4L2_STD_SECAM_L |\ > + V4L2_STD_SECAM_LC) > + > +#define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ > + V4L2_STD_PAL_60 |\ > + V4L2_STD_NTSC |\ > + V4L2_STD_NTSC_443) > +#define V4L2_STD_625_50 (V4L2_STD_PAL |\ > + V4L2_STD_PAL_N |\ > + V4L2_STD_PAL_Nc |\ > + V4L2_STD_SECAM) > +#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ > + V4L2_STD_ATSC_16_VSB) > + > +#define V4L2_STD_UNKNOWN 0 > +#define V4L2_STD_ALL (V4L2_STD_525_60 |\ > + V4L2_STD_625_50) > + > +struct v4l2_standard > +{ > + __u32 index; > + v4l2_std_id id; > + __u8 name[24]; > + struct v4l2_fract frameperiod; /* Frames, not fields */ > + __u32 framelines; > + __u32 reserved[4]; > +}; > + > + > +/* > + * V I D E O I N P U T S > + */ > +struct v4l2_input > +{ > + __u32 index; /* Which input */ > + __u8 name[32]; /* Label */ > + __u32 type; /* Type of input */ > + __u32 audioset; /* Associated audios (bitfield) */ > + __u32 tuner; /* Associated tuner */ > + v4l2_std_id std; > + __u32 status; > + __u32 reserved[4]; > +}; > +/* Values for the 'type' field */ > +#define V4L2_INPUT_TYPE_TUNER 1 > +#define V4L2_INPUT_TYPE_CAMERA 2 > + > +/* field 'status' - general */ > +#define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */ > +#define V4L2_IN_ST_NO_SIGNAL 0x00000002 > +#define V4L2_IN_ST_NO_COLOR 0x00000004 > + > +/* field 'status' - analog */ > +#define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */ > +#define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */ > + > +/* field 'status' - digital */ > +#define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */ > +#define V4L2_IN_ST_NO_EQU 0x00020000 /* No equalizer lock */ > +#define V4L2_IN_ST_NO_CARRIER 0x00040000 /* Carrier recovery failed */ > + > +/* field 'status' - VCR and set-top box */ > +#define V4L2_IN_ST_MACROVISION 0x01000000 /* Macrovision detected */ > +#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ > +#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ > + > +/* > + * V I D E O O U T P U T S > + */ > +struct v4l2_output > +{ > + __u32 index; /* Which output */ > + __u8 name[32]; /* Label */ > + __u32 type; /* Type of output */ > + __u32 audioset; /* Associated audios (bitfield) */ > + __u32 modulator; /* Associated modulator */ > + v4l2_std_id std; > + __u32 reserved[4]; > +}; > +/* Values for the 'type' field */ > +#define V4L2_OUTPUT_TYPE_MODULATOR 1 > +#define V4L2_OUTPUT_TYPE_ANALOG 2 > +#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 > + > +/* > + * C O N T R O L S > + */ > +struct v4l2_control > +{ > + __u32 id; > + __s32 value; > +}; > + > +/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ > +struct v4l2_queryctrl > +{ > + __u32 id; > + enum v4l2_ctrl_type type; > + __u8 name[32]; /* Whatever */ > + __s32 minimum; /* Note signedness */ > + __s32 maximum; > + __s32 step; > + __s32 default_value; > + __u32 flags; > + __u32 reserved[2]; > +}; > + > +/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ > +struct v4l2_querymenu > +{ > + __u32 id; > + __u32 index; > + __u8 name[32]; /* Whatever */ > + __u32 reserved; > +}; > + > +/* Control flags */ > +#define V4L2_CTRL_FLAG_DISABLED 0x0001 > +#define V4L2_CTRL_FLAG_GRABBED 0x0002 > + > +/* Control IDs defined by V4L2 */ > +#define V4L2_CID_BASE 0x00980900 > +/* IDs reserved for driver specific controls */ > +#define V4L2_CID_PRIVATE_BASE 0x08000000 > + > +#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) > +#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) > +#define V4L2_CID_SATURATION (V4L2_CID_BASE+2) > +#define V4L2_CID_HUE (V4L2_CID_BASE+3) > +#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) > +#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) > +#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) > +#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) > +#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) > +#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) > +#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) > +#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) > +#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) > +#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) > +#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) > +#define V4L2_CID_GAMMA (V4L2_CID_BASE+16) > +#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* ? Not sure */ > +#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) > +#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) > +#define V4L2_CID_GAIN (V4L2_CID_BASE+19) > +#define V4L2_CID_HFLIP (V4L2_CID_BASE+20) > +#define V4L2_CID_VFLIP (V4L2_CID_BASE+21) > +#define V4L2_CID_HCENTER (V4L2_CID_BASE+22) > +#define V4L2_CID_VCENTER (V4L2_CID_BASE+23) > +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ > + > +/* > + * T U N I N G > + */ > +struct v4l2_tuner > +{ > + __u32 index; > + __u8 name[32]; > + enum v4l2_tuner_type type; > + __u32 capability; > + __u32 rangelow; > + __u32 rangehigh; > + __u32 rxsubchans; > + __u32 audmode; > + __s32 signal; > + __s32 afc; > + __u32 reserved[4]; > +}; > + > +struct v4l2_modulator > +{ > + __u32 index; > + __u8 name[32]; > + __u32 capability; > + __u32 rangelow; > + __u32 rangehigh; > + __u32 txsubchans; > + __u32 reserved[4]; > +}; > + > +/* Flags for the 'capability' field */ > +#define V4L2_TUNER_CAP_LOW 0x0001 > +#define V4L2_TUNER_CAP_NORM 0x0002 > +#define V4L2_TUNER_CAP_STEREO 0x0010 > +#define V4L2_TUNER_CAP_LANG2 0x0020 > +#define V4L2_TUNER_CAP_SAP 0x0020 > +#define V4L2_TUNER_CAP_LANG1 0x0040 > + > +/* Flags for the 'rxsubchans' field */ > +#define V4L2_TUNER_SUB_MONO 0x0001 > +#define V4L2_TUNER_SUB_STEREO 0x0002 > +#define V4L2_TUNER_SUB_LANG2 0x0004 > +#define V4L2_TUNER_SUB_SAP 0x0004 > +#define V4L2_TUNER_SUB_LANG1 0x0008 > + > +/* Values for the 'audmode' field */ > +#define V4L2_TUNER_MODE_MONO 0x0000 > +#define V4L2_TUNER_MODE_STEREO 0x0001 > +#define V4L2_TUNER_MODE_LANG2 0x0002 > +#define V4L2_TUNER_MODE_SAP 0x0002 > +#define V4L2_TUNER_MODE_LANG1 0x0003 > +#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 > + > +struct v4l2_frequency > +{ > + __u32 tuner; > + enum v4l2_tuner_type type; > + __u32 frequency; > + __u32 reserved[8]; > +}; > + > +/* > + * A U D I O > + */ > +struct v4l2_audio > +{ > + __u32 index; > + __u8 name[32]; > + __u32 capability; > + __u32 mode; > + __u32 reserved[2]; > +}; > +/* Flags for the 'capability' field */ > +#define V4L2_AUDCAP_STEREO 0x00001 > +#define V4L2_AUDCAP_AVL 0x00002 > + > +/* Flags for the 'mode' field */ > +#define V4L2_AUDMODE_AVL 0x00001 > + > +struct v4l2_audioout > +{ > + __u32 index; > + __u8 name[32]; > + __u32 capability; > + __u32 mode; > + __u32 reserved[2]; > +}; > + > +/* > + * D A T A S E R V I C E S ( V B I ) > + * > + * Data services API by Michael Schimek > + */ > + > +/* Raw VBI */ > + > +struct v4l2_vbi_format > +{ > + __u32 sampling_rate; /* in 1 Hz */ > + __u32 offset; > + __u32 samples_per_line; > + __u32 sample_format; /* V4L2_PIX_FMT_* */ > + __s32 start[2]; > + __u32 count[2]; > + __u32 flags; /* V4L2_VBI_* */ > + __u32 reserved[2]; /* must be zero */ > +}; > + > +/* VBI flags */ > +#define V4L2_VBI_UNSYNC (1<< 0) > +#define V4L2_VBI_INTERLACED (1<< 1) > + > +#if 1 > +/* Sliced VBI > + * > + * This implements is a proposal V4L2 API to allow SLICED VBI > + * required for some hardware encoders. It should change without > + * notice in the definitive implementation. > + */ > + > +struct v4l2_sliced_vbi_format > +{ > + __u16 service_set; > + /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field > + service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field > + (equals frame lines 313-336 for 625 line video > + standards, 263-286 for 525 line standards) */ > + __u16 service_lines[2][24]; > + __u32 io_size; > + __u32 reserved[2]; /* must be zero */ > +}; > + > +/* Teletext World System Teletext > + (WST), defined on ITU-R BT.653-2 */ > +#define V4L2_SLICED_TELETEXT_B (0x0001) > +/* Video Program System, defined on ETS 300 231*/ > +#define V4L2_SLICED_VPS (0x0400) > +/* Closed Caption, defined on EIA-608 */ > +#define V4L2_SLICED_CAPTION_525 (0x1000) > +/* Wide Screen System, defined on ITU-R BT1119.1 */ > +#define V4L2_SLICED_WSS_625 (0x4000) > + > +#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) > +#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) > + > + > +struct v4l2_sliced_vbi_cap > +{ > + __u16 service_set; > + /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field > + service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field > + (equals frame lines 313-336 for 625 line video > + standards, 263-286 for 525 line standards) */ > + __u16 service_lines[2][24]; > + __u32 reserved[4]; /* must be 0 */ > +}; > + > +struct v4l2_sliced_vbi_data > +{ > + __u32 id; > + __u32 field; /* 0: first field, 1: second field */ > + __u32 line; /* 1-23 */ > + __u32 reserved; /* must be 0 */ > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > From owner-svn-src-all@FreeBSD.ORG Wed May 4 21:27:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA2C31065672; Wed, 4 May 2011 21:27:05 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9691C8FC16; Wed, 4 May 2011 21:27:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44LR5X7067934; Wed, 4 May 2011 21:27:05 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44LR5Ho067929; Wed, 4 May 2011 21:27:05 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201105042127.p44LR5Ho067929@svn.freebsd.org> From: Michael Tuexen Date: Wed, 4 May 2011 21:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221460 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 21:27:05 -0000 Author: tuexen Date: Wed May 4 21:27:05 2011 New Revision: 221460 URL: http://svn.freebsd.org/changeset/base/221460 Log: Implement Resource Pooling V2 and an MPTCP like congestion control. Based on a patch received from Martin Becke. MFC after: 2 weeks. Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp.h ============================================================================== --- head/sys/netinet/sctp.h Wed May 4 20:29:40 2011 (r221459) +++ head/sys/netinet/sctp.h Wed May 4 21:27:05 2011 (r221460) @@ -265,6 +265,13 @@ struct sctp_paramhdr { #define SCTP_CC_OPT_USE_DCCC_ECN 0x00002001 #define SCTP_CC_OPT_STEADY_STEP 0x00002002 +#define SCTP_CMT_OFF 0 +#define SCTP_CMT_BASE 1 +#define SCTP_CMT_RPV1 2 +#define SCTP_CMT_RPV2 3 +#define SCTP_CMT_MPTCP 4 +#define SCTP_CMT_MAX SCTP_CMT_MPTCP + /* RS - Supported stream scheduling modules for pluggable * stream scheduling */ Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Wed May 4 20:29:40 2011 (r221459) +++ head/sys/netinet/sctp_cc_functions.c Wed May 4 21:27:05 2011 (r221460) @@ -47,6 +47,10 @@ #include __FBSDID("$FreeBSD$"); +#define SHIFT_MPTCP_MULTI_N 40 +#define SHIFT_MPTCP_MULTI_Z 16 +#define SHIFT_MPTCP_MULTI 8 + static void sctp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net) { @@ -67,7 +71,8 @@ sctp_set_initial_cc_param(struct sctp_tc cwnd_in_mtu = assoc->max_burst; net->cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu; } - if (stcb->asoc.sctp_cmt_on_off == 2) { + if ((stcb->asoc.sctp_cmt_on_off == SCTP_CMT_RPV1) || + (stcb->asoc.sctp_cmt_on_off == SCTP_CMT_RPV2)) { /* In case of resource pooling initialize appropriately */ net->cwnd /= assoc->numnets; if (net->cwnd < (net->mtu - sizeof(struct sctphdr))) { @@ -91,14 +96,23 @@ sctp_cwnd_update_after_fr(struct sctp_tc { struct sctp_nets *net; uint32_t t_ssthresh, t_cwnd; + uint64_t t_ucwnd_sbw; /* MT FIXME: Don't compute this over and over again */ t_ssthresh = 0; t_cwnd = 0; - if (asoc->sctp_cmt_on_off == 2) { + t_ucwnd_sbw = 0; + if ((asoc->sctp_cmt_on_off == SCTP_CMT_RPV1) || + (asoc->sctp_cmt_on_off == SCTP_CMT_RPV2)) { TAILQ_FOREACH(net, &asoc->nets, sctp_next) { t_ssthresh += net->ssthresh; t_cwnd += net->cwnd; + if (net->lastsa > 0) { + t_ucwnd_sbw += (uint64_t) net->cwnd / (uint64_t) net->lastsa; + } + } + if (t_ucwnd_sbw == 0) { + t_ucwnd_sbw = 1; } } /*- @@ -119,11 +133,37 @@ sctp_cwnd_update_after_fr(struct sctp_tc struct sctp_tmit_chunk *lchk; int old_cwnd = net->cwnd; - if (asoc->sctp_cmt_on_off == 2) { - net->ssthresh = (uint32_t) (((uint64_t) 4 * - (uint64_t) net->mtu * - (uint64_t) net->ssthresh) / - (uint64_t) t_ssthresh); + if ((asoc->sctp_cmt_on_off == SCTP_CMT_RPV1) || + (asoc->sctp_cmt_on_off == SCTP_CMT_RPV2)) { + if (asoc->sctp_cmt_on_off == SCTP_CMT_RPV1) { + net->ssthresh = (uint32_t) (((uint64_t) 4 * + (uint64_t) net->mtu * + (uint64_t) net->ssthresh) / + (uint64_t) t_ssthresh); + + } + if (asoc->sctp_cmt_on_off == SCTP_CMT_RPV2) { + uint32_t srtt; + + srtt = net->lastsa; + /* + * lastsa>>3; we don't need + * to devide ... + */ + if (srtt == 0) { + srtt = 1; + } + /* + * Short Version => Equal to + * Contel Version MBe + */ + net->ssthresh = (uint32_t) (((uint64_t) 4 * + (uint64_t) net->mtu * + (uint64_t) net->cwnd) / + ((uint64_t) srtt * + t_ucwnd_sbw)); + /* INCREASE FACTOR */ ; + } if ((net->cwnd > t_cwnd / 2) && (net->ssthresh < net->cwnd - t_cwnd / 2)) { net->ssthresh = net->cwnd - t_cwnd / 2; @@ -629,14 +669,47 @@ sctp_cwnd_update_after_sack_common(struc struct sctp_nets *net; int old_cwnd; uint32_t t_ssthresh, t_cwnd, incr; + uint64_t t_ucwnd_sbw; + uint64_t t_path_mptcp; + uint64_t mptcp_like_alpha; + uint32_t srtt; + uint64_t max_path; /* MT FIXME: Don't compute this over and over again */ t_ssthresh = 0; t_cwnd = 0; - if (stcb->asoc.sctp_cmt_on_off == 2) { + t_ucwnd_sbw = 0; + t_path_mptcp = 0; + mptcp_like_alpha = 1; + if ((stcb->asoc.sctp_cmt_on_off == SCTP_CMT_RPV1) || + (stcb->asoc.sctp_cmt_on_off == SCTP_CMT_RPV2) || + (stcb->asoc.sctp_cmt_on_off == SCTP_CMT_MPTCP)) { + max_path = 0; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { t_ssthresh += net->ssthresh; t_cwnd += net->cwnd; + /* lastsa>>3; we don't need to devide ... */ + srtt = net->lastsa; + if (srtt > 0) { + uint64_t tmp; + + t_ucwnd_sbw += (uint64_t) net->cwnd / (uint64_t) srtt; + t_path_mptcp += (((uint64_t) net->cwnd) << SHIFT_MPTCP_MULTI_Z) / + (((uint64_t) net->mtu) * (uint64_t) srtt); + tmp = (((uint64_t) net->cwnd) << SHIFT_MPTCP_MULTI_N) / + ((uint64_t) net->mtu * (uint64_t) (srtt * srtt)); + if (tmp > max_path) { + max_path = tmp; + } + } + } + if (t_ucwnd_sbw == 0) { + t_ucwnd_sbw = 1; + } + if (t_path_mptcp > 0) { + mptcp_like_alpha = max_path / (t_path_mptcp * t_path_mptcp); + } else { + mptcp_like_alpha = 1; } } /******************************/ @@ -818,10 +891,11 @@ sctp_cwnd_update_after_sack_common(struc if (net->cwnd <= net->ssthresh) { /* We are in slow start */ if (net->flight_size + net->net_ack >= net->cwnd) { - old_cwnd = net->cwnd; - if (stcb->asoc.sctp_cmt_on_off == 2) { - uint32_t limit; + uint32_t limit; + old_cwnd = net->cwnd; + switch (asoc->sctp_cmt_on_off) { + case SCTP_CMT_RPV1: limit = (uint32_t) (((uint64_t) net->mtu * (uint64_t) SCTP_BASE_SYSCTL(sctp_L2_abc_variable) * (uint64_t) net->ssthresh) / @@ -835,11 +909,56 @@ sctp_cwnd_update_after_sack_common(struc if (incr == 0) { incr = 1; } - } else { + break; + case SCTP_CMT_RPV2: + /* + * lastsa>>3; we don't need + * to divide ... + */ + srtt = net->lastsa; + if (srtt == 0) { + srtt = 1; + } + limit = (uint32_t) (((uint64_t) net->mtu * + (uint64_t) SCTP_BASE_SYSCTL(sctp_L2_abc_variable) * + (uint64_t) net->cwnd) / + ((uint64_t) srtt * t_ucwnd_sbw)); + /* INCREASE FACTOR */ + incr = (uint32_t) (((uint64_t) net->net_ack * + (uint64_t) net->cwnd) / + ((uint64_t) srtt * t_ucwnd_sbw)); + /* INCREASE FACTOR */ + if (incr > limit) { + incr = limit; + } + if (incr == 0) { + incr = 1; + } + break; + case SCTP_CMT_MPTCP: + limit = (uint32_t) (((uint64_t) net->mtu * + mptcp_like_alpha * + (uint64_t) SCTP_BASE_SYSCTL(sctp_L2_abc_variable)) >> + SHIFT_MPTCP_MULTI); + incr = (uint32_t) (((uint64_t) net->net_ack * + mptcp_like_alpha) >> + SHIFT_MPTCP_MULTI); + if (incr > limit) { + incr = limit; + } + if (incr > net->net_ack) { + incr = net->net_ack; + } + if (incr > net->mtu) { + incr = net->mtu; + } + break; + default: incr = net->net_ack; if (incr > net->mtu * SCTP_BASE_SYSCTL(sctp_L2_abc_variable)) { incr = net->mtu * SCTP_BASE_SYSCTL(sctp_L2_abc_variable); } + break; } net->cwnd += incr; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { @@ -868,15 +987,44 @@ sctp_cwnd_update_after_sack_common(struc (net->partial_bytes_acked >= net->cwnd)) { net->partial_bytes_acked -= net->cwnd; old_cwnd = net->cwnd; - if (asoc->sctp_cmt_on_off == 2) { + switch (asoc->sctp_cmt_on_off) { + case SCTP_CMT_RPV1: incr = (uint32_t) (((uint64_t) net->mtu * (uint64_t) net->ssthresh) / (uint64_t) t_ssthresh); if (incr == 0) { incr = 1; } - } else { + break; + case SCTP_CMT_RPV2: + /* + * lastsa>>3; we don't need + * to divide ... + */ + srtt = net->lastsa; + if (srtt == 0) { + srtt = 1; + } + incr = (uint32_t) ((uint64_t) net->mtu * + (uint64_t) net->cwnd / + ((uint64_t) srtt * + t_ucwnd_sbw)); + /* INCREASE FACTOR */ + if (incr == 0) { + incr = 1; + } + break; + case SCTP_CMT_MPTCP: + incr = (uint32_t) ((mptcp_like_alpha * + (uint64_t) net->cwnd) >> + SHIFT_MPTCP_MULTI); + if (incr > net->mtu) { + incr = net->mtu; + } + break; + default: incr = net->mtu; + break; } net->cwnd += incr; SDT_PROBE(sctp, cwnd, net, ack, @@ -926,21 +1074,49 @@ sctp_cwnd_update_after_timeout(struct sc { int old_cwnd = net->cwnd; uint32_t t_ssthresh, t_cwnd; + uint64_t t_ucwnd_sbw; /* MT FIXME: Don't compute this over and over again */ t_ssthresh = 0; t_cwnd = 0; - if (stcb->asoc.sctp_cmt_on_off == 2) { + if ((stcb->asoc.sctp_cmt_on_off == SCTP_CMT_RPV1) || + (stcb->asoc.sctp_cmt_on_off == SCTP_CMT_RPV2)) { struct sctp_nets *lnet; + uint32_t srtt; + t_ucwnd_sbw = 0; TAILQ_FOREACH(lnet, &stcb->asoc.nets, sctp_next) { t_ssthresh += lnet->ssthresh; t_cwnd += lnet->cwnd; + srtt = lnet->lastsa; + /* lastsa>>3; we don't need to divide ... */ + if (srtt > 0) { + t_ucwnd_sbw += (uint64_t) lnet->cwnd / (uint64_t) srtt; + } + } + if (t_ucwnd_sbw < 1) { + t_ucwnd_sbw = 1; + } + if (stcb->asoc.sctp_cmt_on_off == SCTP_CMT_RPV1) { + net->ssthresh = (uint32_t) (((uint64_t) 4 * + (uint64_t) net->mtu * + (uint64_t) net->ssthresh) / + (uint64_t) t_ssthresh); + } else { + uint64_t cc_delta; + + srtt = net->lastsa; + /* lastsa>>3; we don't need to divide ... */ + if (srtt == 0) { + srtt = 1; + } + cc_delta = t_ucwnd_sbw * (uint64_t) srtt / 2; + if (cc_delta < t_cwnd) { + net->ssthresh = (uint32_t) ((uint64_t) t_cwnd - cc_delta); + } else { + net->ssthresh = net->mtu; + } } - net->ssthresh = (uint32_t) (((uint64_t) 4 * - (uint64_t) net->mtu * - (uint64_t) net->ssthresh) / - (uint64_t) t_ssthresh); if ((net->cwnd > t_cwnd / 2) && (net->ssthresh < net->cwnd - t_cwnd / 2)) { net->ssthresh = net->cwnd - t_cwnd / 2; Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Wed May 4 20:29:40 2011 (r221459) +++ head/sys/netinet/sctp_sysctl.h Wed May 4 21:27:05 2011 (r221460) @@ -336,9 +336,9 @@ struct sctp_sysctl { /* cmt_on_off: CMT on/off flag */ #define SCTPCTL_CMT_ON_OFF_DESC "CMT settings" -#define SCTPCTL_CMT_ON_OFF_MIN 0 -#define SCTPCTL_CMT_ON_OFF_MAX 2 -#define SCTPCTL_CMT_ON_OFF_DEFAULT 0 +#define SCTPCTL_CMT_ON_OFF_MIN SCTP_CMT_OFF +#define SCTPCTL_CMT_ON_OFF_MAX SCTP_CMT_MAX +#define SCTPCTL_CMT_ON_OFF_DEFAULT SCTP_CMT_OFF /* EY - nr_sack_on_off: NR_SACK on/off flag */ #define SCTPCTL_NR_SACK_ON_OFF_DESC "NR_SACK on/off flag" Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Wed May 4 20:29:40 2011 (r221459) +++ head/sys/netinet/sctp_usrreq.c Wed May 4 21:27:05 2011 (r221460) @@ -2992,18 +2992,22 @@ sctp_setopt(struct socket *so, int optna SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, optsize); SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - stcb->asoc.sctp_cmt_on_off = av->assoc_value; - if (stcb->asoc.sctp_cmt_on_off > 2) { - stcb->asoc.sctp_cmt_on_off = 2; + if (av->assoc_value > SCTP_CMT_MAX) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } else { + stcb->asoc.sctp_cmt_on_off = av->assoc_value; } SCTP_TCB_UNLOCK(stcb); } else { - SCTP_INP_WLOCK(inp); - inp->sctp_cmt_on_off = av->assoc_value; - if (inp->sctp_cmt_on_off > 2) { - inp->sctp_cmt_on_off = 2; + if (av->assoc_value > SCTP_CMT_MAX) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + error = EINVAL; + } else { + SCTP_INP_WLOCK(inp); + inp->sctp_cmt_on_off = av->assoc_value; + SCTP_INP_WUNLOCK(inp); } - SCTP_INP_WUNLOCK(inp); } } else { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOPROTOOPT); From owner-svn-src-all@FreeBSD.ORG Wed May 4 21:49:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E39E106564A; Wed, 4 May 2011 21:49:35 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AAB18FC0A; Wed, 4 May 2011 21:49:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44LnZgu068627; Wed, 4 May 2011 21:49:35 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44LnYr1068623; Wed, 4 May 2011 21:49:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105042149.p44LnYr1068623@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 4 May 2011 21:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221461 - in head: bin/sh tools/regression/bin/sh/errors X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 21:49:35 -0000 Author: jilles Date: Wed May 4 21:49:34 2011 New Revision: 221461 URL: http://svn.freebsd.org/changeset/base/221461 Log: sh: Detect an error for ${#var}. In particular, this makes things like ${#foo[0]} and ${#foo[@]} errors rather than silent equivalents of ${#foo}. PR: bin/151720 Submitted by: Mark Johnston Exp-run done by: pav (with some other sh(1) changes) Added: head/tools/regression/bin/sh/errors/bad-parm-exp6.2 (contents, props changed) head/tools/regression/bin/sh/errors/bad-parm-exp6.2.stderr (contents, props changed) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Wed May 4 21:27:05 2011 (r221460) +++ head/bin/sh/parser.c Wed May 4 21:49:34 2011 (r221461) @@ -1569,6 +1569,8 @@ varname: } } } else if (subtype != VSERROR) { + if (subtype == VSLENGTH && c != '}') + subtype = VSERROR; pungetc(); } STPUTC('=', out); Added: head/tools/regression/bin/sh/errors/bad-parm-exp6.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/errors/bad-parm-exp6.2 Wed May 4 21:49:34 2011 (r221461) @@ -0,0 +1,2 @@ +# $FreeBSD$ +${#foo^} Added: head/tools/regression/bin/sh/errors/bad-parm-exp6.2.stderr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/errors/bad-parm-exp6.2.stderr Wed May 4 21:49:34 2011 (r221461) @@ -0,0 +1 @@ +./errors/bad-parm-exp6.2: ${foo...}: Bad substitution From owner-svn-src-all@FreeBSD.ORG Wed May 4 22:02:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BB25106564A; Wed, 4 May 2011 22:02:34 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 288EC8FC12; Wed, 4 May 2011 22:02:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44M2Y4D069060; Wed, 4 May 2011 22:02:34 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44M2YeZ069058; Wed, 4 May 2011 22:02:34 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105042202.p44M2YeZ069058@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 22:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221462 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 22:02:34 -0000 Author: rmacklem Date: Wed May 4 22:02:33 2011 New Revision: 221462 URL: http://svn.freebsd.org/changeset/base/221462 Log: Add a comment noting that the NFS code assumes that the values of error numbers in sys/errno.h will be the same as the ones specified by the NFS RFCs and that the code needs to be fixed if error numbers are changed in sys/errno.h. Suggested by: Peter Jeremy MFC after: 2 weeks Modified: head/sys/fs/nfs/nfsproto.h Modified: head/sys/fs/nfs/nfsproto.h ============================================================================== --- head/sys/fs/nfs/nfsproto.h Wed May 4 21:49:34 2011 (r221461) +++ head/sys/fs/nfs/nfsproto.h Wed May 4 22:02:33 2011 (r221462) @@ -66,6 +66,14 @@ #define NFSV4_SMALLSTR 50 /* Strings small enough for stack */ /* Stat numbers for rpc returns (version 2, 3 and 4) */ +/* + * These numbers are hard-wired in the RFCs, so they can't be changed. + * The code currently assumes that the ones < 10000 are the same as + * sys/errno.h and that sys/errno.h will never go as high as 10000. + * If the value in sys/errno.h of any entry listed below is changed, + * the NFS code must be modified to do the mapping between them. + * (You can ignore NFSERR_WFLUSH, since it is never actually used.) + */ #define NFSERR_OK 0 #define NFSERR_PERM 1 #define NFSERR_NOENT 2 From owner-svn-src-all@FreeBSD.ORG Wed May 4 22:12:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE6701065676; Wed, 4 May 2011 22:12:22 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BACD88FC12; Wed, 4 May 2011 22:12:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44MCM6D069443; Wed, 4 May 2011 22:12:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44MCMQa069440; Wed, 4 May 2011 22:12:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105042212.p44MCMQa069440@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 4 May 2011 22:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221463 - in head: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 22:12:22 -0000 Author: jilles Date: Wed May 4 22:12:22 2011 New Revision: 221463 URL: http://svn.freebsd.org/changeset/base/221463 Log: sh: Apply set -u to variables in arithmetic. Note that this only applies to variables that are actually used. Things like (0 && unsetvar) do not cause an error. Exp-run done by: pav (with some other sh(1) changes) Added: head/tools/regression/bin/sh/expansion/set-u3.0 (contents, props changed) Modified: head/bin/sh/arith_yacc.c Modified: head/bin/sh/arith_yacc.c ============================================================================== --- head/bin/sh/arith_yacc.c Wed May 4 22:02:33 2011 (r221462) +++ head/bin/sh/arith_yacc.c Wed May 4 22:12:22 2011 (r221463) @@ -97,6 +97,8 @@ static arith_t arith_lookupvarint(char * arith_t result; str = lookupvar(varname); + if (uflag && str == NULL) + yyerror("variable not set"); if (str == NULL || *str == '\0') str = "0"; errno = 0; Added: head/tools/regression/bin/sh/expansion/set-u3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/set-u3.0 Wed May 4 22:12:22 2011 (r221463) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +set -u +unset x +v=$( (eval ': $((x))') 2>&1 >/dev/null) +[ $? -ne 0 ] && [ -n "$v" ] From owner-svn-src-all@FreeBSD.ORG Wed May 4 23:07:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11960106564A; Wed, 4 May 2011 23:07:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F33FC8FC0C; Wed, 4 May 2011 23:07:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44N7USW071067; Wed, 4 May 2011 23:07:30 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44N7UJY071065; Wed, 4 May 2011 23:07:30 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201105042307.p44N7UJY071065@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 4 May 2011 23:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221464 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 23:07:31 -0000 Author: np Date: Wed May 4 23:07:30 2011 New Revision: 221464 URL: http://svn.freebsd.org/changeset/base/221464 Log: Always re-arm an iq's interrupt before leaving the handler. MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed May 4 22:12:22 2011 (r221463) +++ head/sys/dev/cxgbe/t4_sge.c Wed May 4 23:07:30 2011 (r221464) @@ -499,11 +499,8 @@ t4_intr_fwd(void *arg) iq_next(iq); } - if (ndesc_total > 0) { - t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), - V_CIDXINC(ndesc_pending) | V_INGRESSQID((u32)iq->cntxt_id) | - V_SEINTARM(iq->intr_params)); - } + t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(ndesc_pending) | + V_INGRESSQID((u32)iq->cntxt_id) | V_SEINTARM(iq->intr_params)); atomic_cmpset_32(&iq->state, IQS_BUSY, IQS_IDLE); } @@ -601,11 +598,8 @@ t4_evt_rx(void *arg) iq_next(iq); } - if (ndesc_total > 0) { - t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), - V_CIDXINC(ndesc_pending) | V_INGRESSQID(iq->cntxt_id) | - V_SEINTARM(iq->intr_params)); - } + t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(ndesc_pending) | + V_INGRESSQID(iq->cntxt_id) | V_SEINTARM(iq->intr_params)); } void From owner-svn-src-all@FreeBSD.ORG Wed May 4 23:34:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D23B4106566B; Wed, 4 May 2011 23:34:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE7258FC13; Wed, 4 May 2011 23:34:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44NYAXt071900; Wed, 4 May 2011 23:34:10 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44NYA5h071896; Wed, 4 May 2011 23:34:10 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105042334.p44NYA5h071896@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 4 May 2011 23:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221465 - head/release/powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 23:34:10 -0000 Author: nwhitehorn Date: Wed May 4 23:34:10 2011 New Revision: 221465 URL: http://svn.freebsd.org/changeset/base/221465 Log: Change the way powerpc bootable CDs are generated to work around a bug in hybrid image generation in cdrtools. This produces a small HFS partition containing loader, mapped in by an oddly-formed APM table using a new feature in makefs. This does not appear to work yet on early-model G3 systems, which will be fixed later, but produces bootable CDs on everything else. Added: head/release/powerpc/generate-hfs.sh - copied, changed from r219439, head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh head/release/powerpc/hfs-boot.bz2.uu (contents, props changed) Deleted: head/release/powerpc/hfs.map Modified: head/release/powerpc/mkisoimages.sh Copied and modified: head/release/powerpc/generate-hfs.sh (from r219439, head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh) ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/generate-hfs.sh Wed Mar 9 23:11:30 2011 (r219439, copy source) +++ head/release/powerpc/generate-hfs.sh Wed May 4 23:34:10 2011 (r221465) @@ -12,16 +12,14 @@ # $FreeBSD$ -HFS_SIZE=1600 #Size in 512-byte blocks of the produced image - -CHRPBOOT_SIZE=2k -BOOT1_SIZE=30k +HFS_SIZE=400 #Size in 2048-byte blocks of the produced image +LOADER_SIZE=300k # Generate 800K HFS image -OUTPUT_FILE=hfs.tmpl +OUTPUT_FILE=hfs-boot -dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$HFS_SIZE -hformat -l "FreeBSD Bootstrap" $OUTPUT_FILE +dd if=/dev/zero of=$OUTPUT_FILE bs=2048 count=$HFS_SIZE +hformat -l "FreeBSD Install" $OUTPUT_FILE hmount $OUTPUT_FILE # Create and bless a directory for the boot loader @@ -29,33 +27,35 @@ hmkdir ppc hattrib -b ppc hcd ppc -# Make two dummy files for the the CHRP boot script and boot1 -echo 'Bootinfo START' | dd of=bootinfo.txt.tmp cbs=$CHRPBOOT_SIZE count=1 conv=block -echo 'Boot1 START' | dd of=boot1.elf.tmp cbs=$BOOT1_SIZE count=1 conv=block +# Make the CHRP boot script, which gets loader from the ISO9660 partition +cat > bootinfo.txt << EOF + +FreeBSD/powerpc bootloader +FreeBSD + $FreeBSD: head/sys/boot/powerpc/boot1.chrp/bootinfo.txt 184490 2008-10 +-31 00:52:31Z nwhitehorn $ + + +MacRISC MacRISC3 MacRISC4 + + +" screen" output +boot &device;:,\ppc\loader &device;:0 + + +EOF +echo 'Loader START' | dd of=loader.tmp cbs=$LOADER_SIZE count=1 conv=block -hcopy boot1.elf.tmp :boot1.elf -hcopy bootinfo.txt.tmp :bootinfo.txt +hcopy bootinfo.txt :bootinfo.txt +hcopy loader.tmp :loader hattrib -c chrp -t tbxi bootinfo.txt humount -rm bootinfo.txt.tmp -rm boot1.elf.tmp - -# Locate the offsets of the two fake files -BOOTINFO_OFFSET=$(hd $OUTPUT_FILE | grep 'Bootinfo START' | cut -f 1 -d ' ') -BOOT1_OFFSET=$(hd $OUTPUT_FILE | grep 'Boot1 START' | cut -f 1 -d ' ') - -# Convert to numbers of blocks -BOOTINFO_OFFSET=$(echo 0x$BOOTINFO_OFFSET | awk '{printf("%x\n",$1/512);}') -BOOT1_OFFSET=$(echo 0x$BOOT1_OFFSET | awk '{printf("%x\n",$1/512);}') - -echo '# This file autogenerated by generate-hfs.sh - DO NOT EDIT' > Makefile.hfs -echo '# $FreeBSD$' >> Makefile.hfs -echo "BOOTINFO_OFFSET=0x$BOOTINFO_OFFSET" >> Makefile.hfs -echo "BOOT1_OFFSET=0x$BOOT1_OFFSET" >> Makefile.hfs +rm bootinfo.txt +rm loader.tmp bzip2 $OUTPUT_FILE -echo 'HFS template boot filesystem created by generate-hfs.sh' > $OUTPUT_FILE.bz2.uu +echo 'HFS boot filesystem created by generate-hfs.sh' > $OUTPUT_FILE.bz2.uu echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu echo '$FreeBSD$' >> $OUTPUT_FILE.bz2.uu Added: head/release/powerpc/hfs-boot.bz2.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/powerpc/hfs-boot.bz2.uu Wed May 4 23:34:10 2011 (r221465) @@ -0,0 +1,23 @@ +HFS boot filesystem created by generate-hfs.sh +DO NOT EDIT +$FreeBSD$ +begin 644 hfs-boot.bz2 +M0EIH.3%!62936=#$Y.(``"___?_O_G)7!_Y]OW??5#]U_^!`0`,@1`!!``!@ +M(0!`3,`"L"4.2U"2(H9%/:*>TFDVU3RGZID'J&C3U,@T-&@`/1!H>IZC1D#( +M`D24TTRFC1D]*;$@!IZ@Q!IH-````#0&33":?J@<:&AH:`:`Q`T!D``&F@`: +M`9````PDI1J>0Q,H/1J&@```!D-`````T-``#SZHHR(+Y*Y9J*Z:4KK=T]W@ +M4RV\LG/;0XDPC7^`9DO3/3&*].462T,NO#AA9C,O\0!)^Q@@S6";2`!);?8(B6BR1(-7Q*8?>>HPQSBQE>M$A9K6FFW<:#6[D931J%U.F8*`0 +MD(,M80A(0;]K'X'SI]G(C)Y).AK_/0)D(2$$]JB$]]F').M4RF8O%[IHK[0O +MMQ?'>O[U8EM;>U",KY^*%FO9C05_435?.4*F[6AIL%&9C<9W&& +M[ZMP(TG!'*4Z>@6TM)0BS.D._O,WR9OJ728V48I;DD=8QGBE7J-&L^?=0JEF +MV2`B/)/D\)83IS@32(;!P,152U()0VGQH>2F$UC:M!D5`F#1W$\:KKDR[TQB +MN;N5B1;P!7:AG#1BP2%-Q$7I6QE,Y?NHIK_LR+HA]22HW0.8(^G4/X`Z@!Z6 +8#PQ(0))/`A(0.'VUG_\7&1 | grep " is " >/dev/null -if [ $? -ne 0 ]; then - echo The cdrtools port is not installed. Trying to get it now. - if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then - cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean - else - if ! pkg_add -r cdrtools; then - echo "Could not get it via pkg_add - please go install this" - echo "from the ports collection and run this script again." - exit 2 - fi - fi -fi - LABEL=$1; shift NAME=$1; shift -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -mkisofs $bootable -l -r -part -no-desktop -V $LABEL -o $NAME $* +echo "/dev/iso9660/`echo $LABEL | tr '[:lower:]' '[:upper:]'` / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $* rm $1/etc/fstab - +rm /tmp/hfs-boot-block From owner-svn-src-all@FreeBSD.ORG Wed May 4 23:41:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00943106566C; Wed, 4 May 2011 23:41:12 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E02838FC19; Wed, 4 May 2011 23:41:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44NfBma072139; Wed, 4 May 2011 23:41:11 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44NfBMZ072133; Wed, 4 May 2011 23:41:11 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105042341.p44NfBMZ072133@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 4 May 2011 23:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221466 - in head/release: . amd64 i386 pc98 sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 23:41:12 -0000 Author: nwhitehorn Date: Wed May 4 23:41:11 2011 New Revision: 221466 URL: http://svn.freebsd.org/changeset/base/221466 Log: Repair release CD generation on PC98 and sun4v after release building changes, and backport the new logic (ISO images are TARGET dependant, not TARGET_CPUARCH dependant) to Makefile.sysinstall. While modifying ISO image scripts, change several archs to use makefs (from base) instead of mkisofs (from ports) which makes release CD generation both faster and self-hosting. Added: head/release/pc98/mkisoimages.sh - copied, changed from r221440, head/release/i386/mkisoimages.sh head/release/sun4v/mkisoimages.sh - copied unchanged from r221440, head/release/sparc64/mkisoimages.sh Modified: head/release/Makefile.sysinstall head/release/amd64/mkisoimages.sh head/release/i386/mkisoimages.sh Modified: head/release/Makefile.sysinstall ============================================================================== --- head/release/Makefile.sysinstall Wed May 4 23:34:10 2011 (r221465) +++ head/release/Makefile.sysinstall Wed May 4 23:41:11 2011 (r221466) @@ -1136,35 +1136,35 @@ CD_DVD1_PKGS= ${CD_PACKAGE_TREE}/dvd1 .endif iso.1: -.if exists(${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh) +.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) @echo "Creating ISO images..." .if defined(CD_BOOT) - @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh ${BOOTABLE} \ + @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_bootonly \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT} .endif - @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh ${BOOTABLE} \ + @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_Install \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \ ${CD_DISC1_PKGS} - @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh \ + @sh ${.CURDIR}/${TARGET}/mkisoimages.sh \ FreeBSD_Packages \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2} \ ${CD_DISC2_PKGS} .if defined(MAKE_DVD) - @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh ${BOOTABLE} \ + @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_Install \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \ ${CD_DVD1_PKGS} .endif .if !defined(NODOC) - @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh \ + @sh ${.CURDIR}/${TARGET}/mkisoimages.sh \ FreeBSD_Documentation \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc3.iso ${CD_DOCS} \ ${CD_DOCS_PKGS} .endif .if defined(SEPARATE_LIVEFS) - @sh ${.CURDIR}/${TARGET_CPUARCH}/mkisoimages.sh ${BOOTABLE} \ + @sh ${.CURDIR}/${TARGET}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_LiveFS \ ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-livefs.iso ${CD_LIVEFS} .endif @@ -1173,7 +1173,7 @@ iso.1: @(cd ${CD} && sha256 *.iso > FreeBSD-${BUILDNAME}-${TARGET}-iso.CHECKSUM.SHA256) touch ${.TARGET} .else - @echo "Do not know how to create an ISO for ${TARGET_CPUARCH}." + @echo "Do not know how to create an ISO for ${TARGET}." .endif # Modified: head/release/amd64/mkisoimages.sh ============================================================================== --- head/release/amd64/mkisoimages.sh Wed May 4 23:34:10 2011 (r221465) +++ head/release/amd64/mkisoimages.sh Wed May 4 23:41:11 2011 (r221466) @@ -26,7 +26,7 @@ publisher="The FreeBSD Project. http://www.freebsd.org/" if [ "x$1" = "x-b" ]; then # This is highly x86-centric and will be used directly below. - bootable="-b boot/cdboot -no-emul-boot" + bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" shift else bootable="" @@ -37,24 +37,9 @@ if [ $# -lt 3 ]; then exit 1 fi -type mkisofs 2>&1 | grep " is " >/dev/null -if [ $? -ne 0 ]; then - echo The cdrtools port is not installed. Trying to get it now. - if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then - cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean - else - if ! pkg_add -r cdrtools; then - echo "Could not get it via pkg_add - please go install this" - echo "from the ports collection and run this script again." - exit 2 - fi - fi -fi - LABEL=$1; shift NAME=$1; shift -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* +echo "/dev/iso9660/`echo $LABEL | tr '[:lower:]' '[:upper:]'` / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $* rm $1/etc/fstab - Modified: head/release/i386/mkisoimages.sh ============================================================================== --- head/release/i386/mkisoimages.sh Wed May 4 23:34:10 2011 (r221465) +++ head/release/i386/mkisoimages.sh Wed May 4 23:41:11 2011 (r221466) @@ -24,40 +24,22 @@ # into base-bits-dir as part of making the image. publisher="The FreeBSD Project. http://www.freebsd.org/" - if [ "x$1" = "x-b" ]; then - bootable="-b boot/cdboot -no-emul-boot" - shift -elif [ "x$1" = "x-G" ]; then - bootable="-G /R/cdrom/bootonly/boot/cdboot" + # This is highly x86-centric and will be used directly below. + bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" shift else bootable="" fi if [ $# -lt 3 ]; then - echo Usage: $0 '[-bG] image-label image-name base-bits-dir [extra-bits-dir]' + echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' exit 1 fi -type mkisofs 2>&1 | grep " is " >/dev/null -if [ $? -ne 0 ]; then - echo The cdrtools port is not installed. Trying to get it now. - if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then - cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean - else - if ! pkg_add -r cdrtools; then - echo "Could not get it via pkg_add - please go install this" - echo "from the ports collection and run this script again." - exit 2 - fi - fi -fi - LABEL=$1; shift NAME=$1; shift -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* +echo "/dev/iso9660/`echo $LABEL | tr '[:lower:]' '[:upper:]'` / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $* rm $1/etc/fstab - Copied and modified: head/release/pc98/mkisoimages.sh (from r221440, head/release/i386/mkisoimages.sh) ============================================================================== --- head/release/i386/mkisoimages.sh Wed May 4 13:50:37 2011 (r221440, copy source) +++ head/release/pc98/mkisoimages.sh Wed May 4 23:41:11 2011 (r221466) @@ -24,40 +24,22 @@ # into base-bits-dir as part of making the image. publisher="The FreeBSD Project. http://www.freebsd.org/" - if [ "x$1" = "x-b" ]; then - bootable="-b boot/cdboot -no-emul-boot" - shift -elif [ "x$1" = "x-G" ]; then - bootable="-G /R/cdrom/bootonly/boot/cdboot" + # This is highly x86-centric and will be used directly below. + bootable="-o generic-bootimage=$4/boot/cdboot" shift else bootable="" fi if [ $# -lt 3 ]; then - echo Usage: $0 '[-bG] image-label image-name base-bits-dir [extra-bits-dir]' + echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' exit 1 fi -type mkisofs 2>&1 | grep " is " >/dev/null -if [ $? -ne 0 ]; then - echo The cdrtools port is not installed. Trying to get it now. - if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then - cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean - else - if ! pkg_add -r cdrtools; then - echo "Could not get it via pkg_add - please go install this" - echo "from the ports collection and run this script again." - exit 2 - fi - fi -fi - LABEL=$1; shift NAME=$1; shift -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* +echo "/dev/iso9660/`echo $LABEL | tr '[:lower:]' '[:upper:]'` / cd9660 ro 0 0" > $1/etc/fstab +makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $* rm $1/etc/fstab - Copied: head/release/sun4v/mkisoimages.sh (from r221440, head/release/sparc64/mkisoimages.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/sun4v/mkisoimages.sh Wed May 4 23:41:11 2011 (r221466, copy of r221440, head/release/sparc64/mkisoimages.sh) @@ -0,0 +1,72 @@ +#!/bin/sh +# +# Module: mkisoimages.sh +# Author: Jordan K Hubbard +# Date: 22 June 2001 +# +# $FreeBSD$ +# +# This script is used by release/Makefile to build the (optional) ISO images +# for a FreeBSD release. It is considered architecture dependent since each +# platform has a slightly unique way of making bootable CDs. This script +# is also allowed to generate any number of images since that is more of +# publishing decision than anything else. +# +# Usage: +# +# mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir] +# +# Where -b is passed if the ISO image should be made "bootable" by +# whatever standards this architecture supports (may be unsupported), +# image-label is the ISO image label, image-name is the filename of the +# resulting ISO image, base-bits-dir contains the image contents and +# extra-bits-dir, if provided, contains additional files to be merged +# into base-bits-dir as part of making the image. + +publisher="The FreeBSD Project. http://www.freebsd.org/" +IMG=/tmp/bootfs +MNT=/mnt + +if [ "x$1" = "x-b" ]; then + dd if=/dev/zero of=${IMG} bs=512 count=1024 + MD=`mdconfig -a -t vnode -f ${IMG}` + sunlabel -w -B -b $4/boot/boot1 ${MD} auto + newfs -O1 -o space -m 0 /dev/${MD} + mount /dev/${MD} ${MNT} + mkdir ${MNT}/boot + cp $4/boot/loader ${MNT}/boot + umount ${MNT} + mdconfig -d -u ${MD#md} + bootable="-B ,,,,${IMG}" + shift +else + bootable="" +fi + +if [ $# -lt 3 ]; then + echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' + rm -f ${IMG} + exit 1 +fi + +type mkisofs 2>&1 | grep " is " >/dev/null +if [ $? -ne 0 ]; then + echo The cdrtools port is not installed. Trying to get it now. + if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then + cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean + else + if ! pkg_add -r cdrtools; then + echo "Could not get it via pkg_add - please go install this" + echo "from the ports collection and run this script again." + exit 2 + fi + fi +fi + +LABEL=$1; shift +NAME=$1; shift + +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab +mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* +rm $1/etc/fstab +rm -f ${IMG} From owner-svn-src-all@FreeBSD.ORG Thu May 5 00:11:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08C6A106566B; Thu, 5 May 2011 00:11:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF94D8FC17; Thu, 5 May 2011 00:11:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p450B9p5073076; Thu, 5 May 2011 00:11:09 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p450B9fs073074; Thu, 5 May 2011 00:11:09 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105050011.p450B9fs073074@svn.freebsd.org> From: Rick Macklem Date: Thu, 5 May 2011 00:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221467 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 00:11:10 -0000 Author: rmacklem Date: Thu May 5 00:11:09 2011 New Revision: 221467 URL: http://svn.freebsd.org/changeset/base/221467 Log: Fix the new NFS client so that it handles the 64bit fields that are now in "struct statfs" for NFSv3 and NFSv4. Since the ffiles value is uint64_t on the wire, I clip the value to INT64_MAX to avoid setting f_ffree negative. Tested by: kib MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Wed May 4 23:41:11 2011 (r221466) +++ head/sys/fs/nfsclient/nfs_clport.c Thu May 5 00:11:09 2011 (r221467) @@ -838,21 +838,33 @@ void nfscl_loadsbinfo(struct nfsmount *nmp, struct nfsstatfs *sfp, void *statfs) { struct statfs *sbp = (struct statfs *)statfs; - nfsquad_t tquad; if (nmp->nm_flag & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) { sbp->f_bsize = NFS_FABLKSIZE; - tquad.qval = sfp->sf_tbytes; - sbp->f_blocks = (long)(tquad.qval / ((u_quad_t)NFS_FABLKSIZE)); - tquad.qval = sfp->sf_fbytes; - sbp->f_bfree = (long)(tquad.qval / ((u_quad_t)NFS_FABLKSIZE)); - tquad.qval = sfp->sf_abytes; - sbp->f_bavail = (long)(tquad.qval / ((u_quad_t)NFS_FABLKSIZE)); - tquad.qval = sfp->sf_tfiles; - sbp->f_files = (tquad.lval[0] & 0x7fffffff); - tquad.qval = sfp->sf_ffiles; - sbp->f_ffree = (tquad.lval[0] & 0x7fffffff); + sbp->f_blocks = sfp->sf_tbytes / NFS_FABLKSIZE; + sbp->f_bfree = sfp->sf_fbytes / NFS_FABLKSIZE; + /* + * Although sf_abytes is uint64_t and f_bavail is int64_t, + * the value after dividing by NFS_FABLKSIZE is small + * enough that it will fit in 63bits, so it is ok to + * assign it to f_bavail without fear that it will become + * negative. + */ + sbp->f_bavail = sfp->sf_abytes / NFS_FABLKSIZE; + sbp->f_files = sfp->sf_tfiles; + /* Since f_ffree is int64_t, clip it to 63bits. */ + if (sfp->sf_ffiles > INT64_MAX) + sbp->f_ffree = INT64_MAX; + else + sbp->f_ffree = sfp->sf_ffiles; } else if ((nmp->nm_flag & NFSMNT_NFSV4) == 0) { + /* + * The type casts to (int32_t) ensure that this code is + * compatible with the old NFS client, in that it will + * propagate bit31 to the high order bits. This may or may + * not be correct for NFSv2, but since it is a legacy + * environment, I'd rather retain backwards compatibility. + */ sbp->f_bsize = (int32_t)sfp->sf_bsize; sbp->f_blocks = (int32_t)sfp->sf_blocks; sbp->f_bfree = (int32_t)sfp->sf_bfree; From owner-svn-src-all@FreeBSD.ORG Thu May 5 00:43:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1CAF106566C; Thu, 5 May 2011 00:43:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A45FD8FC17; Thu, 5 May 2011 00:43:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p450heIE074076; Thu, 5 May 2011 00:43:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p450heh0074072; Thu, 5 May 2011 00:43:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105050043.p450heh0074072@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 5 May 2011 00:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221468 - in head/sys/dev: bge mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 00:43:40 -0000 Author: yongari Date: Thu May 5 00:43:40 2011 New Revision: 221468 URL: http://svn.freebsd.org/changeset/base/221468 Log: Enable Ethernet@WireSpeed for BCM5718/BCM57765 family. While I'm here inverse meaning of PHY flag as Ethernet@WireSpeed is enabled for most PHYs. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h head/sys/dev/mii/brgphy.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Thu May 5 00:11:09 2011 (r221467) +++ head/sys/dev/bge/if_bge.c Thu May 5 00:43:40 2011 (r221468) @@ -2769,12 +2769,12 @@ bge_attach(device_t dev) * Don't enable Ethernet@WireSpeed for the 5700, 5906, or the * 5705 A0 and A1 chips. */ - if (sc->bge_asicrev != BGE_ASICREV_BCM5700 && - sc->bge_asicrev != BGE_ASICREV_BCM5906 && - sc->bge_chipid != BGE_CHIPID_BCM5705_A0 && - sc->bge_chipid != BGE_CHIPID_BCM5705_A1 && - !BGE_IS_5717_PLUS(sc)) - sc->bge_phy_flags |= BGE_PHY_WIRESPEED; + if (sc->bge_asicrev == BGE_ASICREV_BCM5700 || + (sc->bge_asicrev == BGE_ASICREV_BCM5705 && + (sc->bge_chipid != BGE_CHIPID_BCM5705_A0 && + sc->bge_chipid != BGE_CHIPID_BCM5705_A1)) || + sc->bge_asicrev == BGE_ASICREV_BCM5906) + sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED; if (bge_has_eaddr(sc)) sc->bge_flags |= BGE_FLAG_EADDR; Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Thu May 5 00:11:09 2011 (r221467) +++ head/sys/dev/bge/if_bgereg.h Thu May 5 00:43:40 2011 (r221468) @@ -2783,7 +2783,7 @@ struct bge_softc { #define BGE_FLAG_RX_ALIGNBUG 0x04000000 #define BGE_FLAG_SHORT_DMA_BUG 0x08000000 uint32_t bge_phy_flags; -#define BGE_PHY_WIRESPEED 0x00000001 +#define BGE_PHY_NO_WIRESPEED 0x00000001 #define BGE_PHY_ADC_BUG 0x00000002 #define BGE_PHY_5704_A0_BUG 0x00000004 #define BGE_PHY_JITTER_BUG 0x00000008 Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Thu May 5 00:11:09 2011 (r221467) +++ head/sys/dev/mii/brgphy.c Thu May 5 00:43:40 2011 (r221468) @@ -927,7 +927,7 @@ brgphy_reset(struct mii_softc *sc) brgphy_jumbo_settings(sc, ifp->if_mtu); - if (bge_sc->bge_phy_flags & BGE_PHY_WIRESPEED) + if ((bge_sc->bge_phy_flags & BGE_PHY_NO_WIRESPEED) == 0) brgphy_ethernet_wirespeed(sc); /* Enable Link LED on Dell boxes */ From owner-svn-src-all@FreeBSD.ORG Thu May 5 00:43:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCACB10656F8; Thu, 5 May 2011 00:43:55 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA0EA8FC08; Thu, 5 May 2011 00:43:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p450htJt074119; Thu, 5 May 2011 00:43:55 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p450htBe074117; Thu, 5 May 2011 00:43:55 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105050043.p450htBe074117@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 5 May 2011 00:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221469 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 00:43:56 -0000 Author: obrien Date: Thu May 5 00:43:55 2011 New Revision: 221469 URL: http://svn.freebsd.org/changeset/base/221469 Log: Correct the kernel config name printed out during install. PR: 156579 Submitted by: dhw Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu May 5 00:43:40 2011 (r221468) +++ head/Makefile.inc1 Thu May 5 00:43:55 2011 (r221469) @@ -868,7 +868,7 @@ reinstallkernel reinstallkernel.debug: i false .endif @echo "--------------------------------------------------------------" - @echo ">>> Installing kernel ${KERNCONF}" + @echo ">>> Installing kernel ${INSTALLKERNEL}" @echo "--------------------------------------------------------------" cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ From owner-svn-src-all@FreeBSD.ORG Thu May 5 00:52:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7A8E106566C; Thu, 5 May 2011 00:52:19 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C48578FC08; Thu, 5 May 2011 00:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p450qJKe074410; Thu, 5 May 2011 00:52:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p450qJhO074408; Thu, 5 May 2011 00:52:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105050052.p450qJhO074408@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 5 May 2011 00:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221470 - head/usr.sbin/makefs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 00:52:19 -0000 Author: nwhitehorn Date: Thu May 5 00:52:19 2011 New Revision: 221470 URL: http://svn.freebsd.org/changeset/base/221470 Log: Fix boot on old machines (e.g. blue and white G3s) by synthesizing a 512-byte sector map instead unused space in the first 2048-byte sector. Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Thu May 5 00:43:55 2011 (r221469) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Thu May 5 00:52:19 2011 (r221470) @@ -528,6 +528,25 @@ cd9660_write_apm_partition_entry(FILE *f fseek(fd, 32 - strlen(part_name) - 1, SEEK_CUR); fwrite(part_type, strlen(part_type) + 1, 1, fd); + if (sector_size > 512) { + /* + * Some old broken software looks at 512-byte boundaries for + * partition table entries instead of sector boundaries. We + * can fit 3 entries into the first 2048-byte block, so use + * that to humor old code. + */ + + int n_512_parts = (sector_size / 512) - 1; + if (n_512_parts > total_partitions) + n_512_parts = total_partitions; + + if (index < n_512_parts) + cd9660_write_apm_partition_entry(fd, index, n_512_parts, + sector_start * (sector_size / 512), + nsectors * (sector_size / 512), 512, part_name, + part_type); + } + return 0; } From owner-svn-src-all@FreeBSD.ORG Thu May 5 01:09:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7844D106566C; Thu, 5 May 2011 01:09:42 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64A078FC0C; Thu, 5 May 2011 01:09:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4519gqj074961; Thu, 5 May 2011 01:09:42 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4519geI074956; Thu, 5 May 2011 01:09:42 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105050109.p4519geI074956@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 5 May 2011 01:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221471 - head/lib/libcrypt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 01:09:42 -0000 Author: obrien Date: Thu May 5 01:09:42 2011 New Revision: 221471 URL: http://svn.freebsd.org/changeset/base/221471 Log: s/shaN_crypt/crypt_shaN/g to be a more consistent with the existing naming. Reviewed by: markm Modified: head/lib/libcrypt/crypt-sha256.c head/lib/libcrypt/crypt-sha512.c head/lib/libcrypt/crypt.c head/lib/libcrypt/crypt.h Modified: head/lib/libcrypt/crypt-sha256.c ============================================================================== --- head/lib/libcrypt/crypt-sha256.c Thu May 5 00:52:19 2011 (r221470) +++ head/lib/libcrypt/crypt-sha256.c Thu May 5 01:09:42 2011 (r221471) @@ -60,7 +60,7 @@ static const char sha256_rounds_prefix[] #define ROUNDS_MAX 999999999 static char * -sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) +crypt_sha256_r(const char *key, const char *salt, char *buffer, int buflen) { u_long srounds; int n; @@ -268,12 +268,12 @@ sha256_crypt_r(const char *key, const ch /* This entry point is equivalent to crypt(3). */ char * -sha256_crypt(const char *key, const char *salt) +crypt_sha256(const char *key, const char *salt) { /* We don't want to have an arbitrary limit in the size of the * password. We can compute an upper bound for the size of the * result in advance and so we can prepare the buffer we pass to - * `sha256_crypt_r'. */ + * `crypt_sha256_r'. */ static char *buffer; static int buflen; int needed; @@ -293,7 +293,7 @@ sha256_crypt(const char *key, const char buflen = needed; } - return sha256_crypt_r(key, salt, buffer, buflen); + return crypt_sha256_r(key, salt, buffer, buflen); } #ifdef TEST @@ -459,7 +459,7 @@ main(void) } for (cnt = 0; cnt < ntests2; ++cnt) { - char *cp = sha256_crypt(tests2[cnt].input, tests2[cnt].salt); + char *cp = crypt_sha256(tests2[cnt].input, tests2[cnt].salt); if (strcmp(cp, tests2[cnt].expected) != 0) { printf("test %d: expected \"%s\", got \"%s\"\n", Modified: head/lib/libcrypt/crypt-sha512.c ============================================================================== --- head/lib/libcrypt/crypt-sha512.c Thu May 5 00:52:19 2011 (r221470) +++ head/lib/libcrypt/crypt-sha512.c Thu May 5 01:09:42 2011 (r221471) @@ -60,7 +60,7 @@ static const char sha512_rounds_prefix[] #define ROUNDS_MAX 999999999 static char * -sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) +crypt_sha512_r(const char *key, const char *salt, char *buffer, int buflen) { u_long srounds; int n; @@ -280,12 +280,12 @@ sha512_crypt_r(const char *key, const ch /* This entry point is equivalent to crypt(3). */ char * -sha512_crypt(const char *key, const char *salt) +crypt_sha512(const char *key, const char *salt) { /* We don't want to have an arbitrary limit in the size of the * password. We can compute an upper bound for the size of the * result in advance and so we can prepare the buffer we pass to - * `sha512_crypt_r'. */ + * `crypt_sha512_r'. */ static char *buffer; static int buflen; int needed; @@ -305,7 +305,7 @@ sha512_crypt(const char *key, const char buflen = needed; } - return sha512_crypt_r(key, salt, buffer, buflen); + return crypt_sha512_r(key, salt, buffer, buflen); } #ifdef TEST @@ -482,7 +482,7 @@ main(void) } for (cnt = 0; cnt < ntests2; ++cnt) { - char *cp = sha512_crypt(tests2[cnt].input, tests2[cnt].salt); + char *cp = crypt_sha512(tests2[cnt].input, tests2[cnt].salt); if (strcmp(cp, tests2[cnt].expected) != 0) { printf("test %d: expected \"%s\", got \"%s\"\n", Modified: head/lib/libcrypt/crypt.c ============================================================================== --- head/lib/libcrypt/crypt.c Thu May 5 00:52:19 2011 (r221470) +++ head/lib/libcrypt/crypt.c Thu May 5 01:09:42 2011 (r221471) @@ -64,12 +64,12 @@ static const struct { }, { "sha256", - sha256_crypt, + crypt_sha256, "$5$" }, { "sha512", - sha512_crypt, + crypt_sha512, "$6$" }, { Modified: head/lib/libcrypt/crypt.h ============================================================================== --- head/lib/libcrypt/crypt.h Thu May 5 00:52:19 2011 (r221470) +++ head/lib/libcrypt/crypt.h Thu May 5 01:09:42 2011 (r221471) @@ -36,8 +36,8 @@ char *crypt_des(const char *pw, const ch char *crypt_md5(const char *pw, const char *salt); char *crypt_nthash(const char *pw, const char *salt); char *crypt_blowfish(const char *pw, const char *salt); -char *sha256_crypt (const char *pw, const char *salt); -char *sha512_crypt (const char *pw, const char *salt); +char *crypt_sha256 (const char *pw, const char *salt); +char *crypt_sha512 (const char *pw, const char *salt); extern void _crypt_to64(char *s, u_long v, int n); extern void b64_from_24bit(uint8_t B2, uint8_t B1, uint8_t B0, int n, int *buflen, char **cp); From owner-svn-src-all@FreeBSD.ORG Thu May 5 01:16:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D9201065700; Thu, 5 May 2011 01:16:07 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F314B8FC15; Thu, 5 May 2011 01:16:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p451G69d075209; Thu, 5 May 2011 01:16:06 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p451G6LV075205; Thu, 5 May 2011 01:16:06 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105050116.p451G6LV075205@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 5 May 2011 01:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221472 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 01:16:07 -0000 Author: obrien Date: Thu May 5 01:16:06 2011 New Revision: 221472 URL: http://svn.freebsd.org/changeset/base/221472 Log: libarchive is mixing libmd and libcrypto -- correct to use one or the other. [mixing the two can be quite bad -- they define the same context structures, but with differing structure members (and sizes)] Update the hash function support comments, and update config_freebsd.h to match. Approved by: kientzle Modified: head/lib/libarchive/Makefile head/lib/libarchive/archive_hash.h head/lib/libarchive/config_freebsd.h Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Thu May 5 01:09:42 2011 (r221471) +++ head/lib/libarchive/Makefile Thu May 5 01:16:06 2011 (r221472) @@ -2,8 +2,8 @@ .include LIB= archive -DPADD= ${LIBZ} ${LIBMD} -LDADD= -lz -lmd +DPADD= ${LIBZ} +LDADD= -lz DPADD+= ${LIBBZ2} LDADD+= -lbz2 @@ -24,6 +24,9 @@ CFLAGS+= -I${.OBJDIR} CFLAGS+= -DWITH_OPENSSL DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto +.else +DPADD+= ${LIBMD} +LDADD+= -lmd .endif # Headers to be installed in /usr/include Modified: head/lib/libarchive/archive_hash.h ============================================================================== --- head/lib/libarchive/archive_hash.h Thu May 5 01:09:42 2011 (r221471) +++ head/lib/libarchive/archive_hash.h Thu May 5 01:16:06 2011 (r221472) @@ -41,11 +41,11 @@ * - OpenBSD 4.4 and earlier have SHA2 in libc with _ after algorithm name * * DragonFly and FreeBSD (XXX not used yet): - * - MD5 and SHA1 in libmd: without _ after algorithm name - * - SHA256: with _ after algorithm name + * - MD5 in libmd: without _ after algorithm name + * - SHA{1,256,512} in libmd: with _ after algorithm name (conflicts w/OpenSSL!) * * OpenSSL: - * - MD5, SHA1 and SHA2 in libcrypto: with _ after algorithm name + * - MD5, SHA1, SHA2, SHA{256,384,512} in libcrypto: with _ after algorithm name */ #if defined(HAVE_MD5_H) && defined(HAVE_MD5INIT) Modified: head/lib/libarchive/config_freebsd.h ============================================================================== --- head/lib/libarchive/config_freebsd.h Thu May 5 01:09:42 2011 (r221471) +++ head/lib/libarchive/config_freebsd.h Thu May 5 01:16:06 2011 (r221472) @@ -47,8 +47,24 @@ #define HAVE_OPENSSL_MD5_H 1 #define HAVE_OPENSSL_RIPEMD_H 1 #define HAVE_OPENSSL_SHA_H 1 +#define HAVE_OPENSSL_SHA256_INIT 1 +#define HAVE_OPENSSL_SHA384_INIT 1 +#define HAVE_OPENSSL_SHA512_INIT 1 +#define HAVE_SHA256 1 #define HAVE_SHA384 1 #define HAVE_SHA512 1 +#else +#define HAVE_MD5_H 1 +#define HAVE_MD5INIT 1 +#define HAVE_SHA_H 1 +#define HAVE_SHA1 1 +#define HAVE_SHA1_INIT 1 +#define HAVE_SHA256 1 +#define HAVE_SHA256_H 1 +#define HAVE_SHA256_INIT 1 +#define HAVE_SHA512 1 +#define HAVE_SHA512_H 1 +#define HAVE_SHA512_INIT 1 #endif #define HAVE_BSDXML_H 1 @@ -88,7 +104,6 @@ #define HAVE_LUTIMES 1 #define HAVE_MALLOC 1 #define HAVE_MD5 1 -#define HAVE_MD5_H 1 #define HAVE_MEMMOVE 1 #define HAVE_MKDIR 1 #define HAVE_MKFIFO 1 @@ -101,10 +116,6 @@ #define HAVE_RMD160 1 #define HAVE_SELECT 1 #define HAVE_SETENV 1 -#define HAVE_SHA_H 1 -#define HAVE_SHA1 1 -#define HAVE_SHA256 1 -#define HAVE_SHA256_H 1 #define HAVE_SIGNAL_H 1 #define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 From owner-svn-src-all@FreeBSD.ORG Thu May 5 01:21:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DED4106564A; Thu, 5 May 2011 01:21:59 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 993CB8FC12; Thu, 5 May 2011 01:21:58 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAFj7wU2DaFvO/2dsb2JhbACEUKJGiHKtUpEhgSqDXIEBBI81hw6HSA X-IronPort-AV: E=Sophos;i="4.64,317,1301889600"; d="scan'208";a="119659511" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 04 May 2011 21:21:43 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 519B6B3F2F; Wed, 4 May 2011 21:21:43 -0400 (EDT) Date: Wed, 4 May 2011 21:21:43 -0400 (EDT) From: Rick Macklem To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Message-ID: <1310797810.1031067.1304558503327.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <86mxj7gaa2.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 01:21:59 -0000 > Rick Macklem writes: > > "Dag-Erling Sm=C3=B8rgrav" writes: > > > Are you going to rename the sysctls as well? > > I was not planning on it, but it the "collective" thinks it's a good > > idea, I could do so. >=20 > Yes, please. The change from vfs.nfs to vfs.newnfs breaks scripts. >=20 > Ideally, both the old and the new NFS stack would use the same fstypes > and sysctl names, but I don't know if there's any way we can prevent > someone from compiling both into the kernel at the same time, or > loading > both modules. > If the scripts in /etc/rc.d are fixed to use the correct sysctl naming, do you think it matters which one is "vfs.nfs."? rick From owner-svn-src-all@FreeBSD.ORG Thu May 5 02:00:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DC5B1065670; Thu, 5 May 2011 02:00:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEF4D8FC0A; Thu, 5 May 2011 02:00:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4520rIO076634; Thu, 5 May 2011 02:00:53 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4520rvf076632; Thu, 5 May 2011 02:00:53 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105050200.p4520rvf076632@svn.freebsd.org> From: Rick Macklem Date: Thu, 5 May 2011 02:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221473 - head/sys/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 02:00:54 -0000 Author: rmacklem Date: Thu May 5 02:00:53 2011 New Revision: 221473 URL: http://svn.freebsd.org/changeset/base/221473 Log: Modify the NFS nfssvc(2) syscall so that it allows anyone to get the statistics for the new NFS subsystem. MFC after: 2 weeks Modified: head/sys/nfs/nfs_nfssvc.c Modified: head/sys/nfs/nfs_nfssvc.c ============================================================================== --- head/sys/nfs/nfs_nfssvc.c Thu May 5 01:16:06 2011 (r221472) +++ head/sys/nfs/nfs_nfssvc.c Thu May 5 02:00:53 2011 (r221473) @@ -81,9 +81,12 @@ nfssvc(struct thread *td, struct nfssvc_ AUDIT_ARG_CMD(uap->flag); - error = priv_check(td, PRIV_NFS_DAEMON); - if (error) - return (error); + /* Allow anyone to get the stats. */ + if ((uap->flag & ~NFSSVC_GETSTATS) != 0) { + error = priv_check(td, PRIV_NFS_DAEMON); + if (error != 0) + return (error); + } error = EINVAL; if ((uap->flag & (NFSSVC_ADDSOCK | NFSSVC_OLDNFSD | NFSSVC_NFSD)) && nfsd_call_nfsserver != NULL) From owner-svn-src-all@FreeBSD.ORG Thu May 5 02:04:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF7EB1065670; Thu, 5 May 2011 02:04:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB8FF8FC12; Thu, 5 May 2011 02:04:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4524uxC076784; Thu, 5 May 2011 02:04:56 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4524uAm076779; Thu, 5 May 2011 02:04:56 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201105050204.p4524uAm076779@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 5 May 2011 02:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221474 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 02:04:56 -0000 Author: np Date: Thu May 5 02:04:56 2011 New Revision: 221474 URL: http://svn.freebsd.org/changeset/base/221474 Log: T4 packet filtering/steering. - Enable 5-tuple and every-packet lookup. - Setup the default filter mode to allow filtering/steering based on IP protocol, ingress port, inner VLAN ID, IP frag, FCoE, and MPS match type; all combined together. You can also filter based on MAC index, Ethernet type, IP TOS/IPv6 Traffic Class, and outer VLAN ID but you'll have to modify the default filter mode and exclude some of the match-fields in it. IPv4 and IPv6 SIP/DIP/SPORT/DPORT are always available in all filter rules. - Add driver ioctls to get/set the global filter mode. - Add driver ioctls to program and delete hardware filters. A couple of the "switch" actions that rewrite Ethernet and VLAN information and switch the packet out of another port may not work as the L2 code is not yet in place. Everything else, including all "drop" and "pass" rules with RSS or absolute qid, should work. Obtained from: Chelsio Communications Modified: head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_ioctl.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Thu May 5 02:00:53 2011 (r221473) +++ head/sys/dev/cxgbe/offload.h Thu May 5 02:04:56 2011 (r221474) @@ -61,8 +61,10 @@ struct tid_info { union aopen_entry *atid_tab; unsigned int natids; + struct filter_entry *ftid_tab; unsigned int nftids; unsigned int ftid_base; + unsigned int ftids_in_use; union aopen_entry *afree; unsigned int atids_in_use; Modified: head/sys/dev/cxgbe/t4_ioctl.h ============================================================================== --- head/sys/dev/cxgbe/t4_ioctl.h Thu May 5 02:00:53 2011 (r221473) +++ head/sys/dev/cxgbe/t4_ioctl.h Thu May 5 02:04:56 2011 (r221474) @@ -31,6 +31,9 @@ #ifndef __T4_IOCTL_H__ #define __T4_IOCTL_H__ +#include +#include + /* * Ioctl commands specific to this driver. */ @@ -38,6 +41,11 @@ enum { T4_GETREG = 0x40, /* read register */ T4_SETREG, /* write register */ T4_REGDUMP, /* dump of all registers */ + T4_GET_FILTER_MODE, /* get global filter mode */ + T4_SET_FILTER_MODE, /* set global filter mode */ + T4_GET_FILTER, /* get information about a filter */ + T4_SET_FILTER, /* program a filter */ + T4_DEL_FILTER, /* delete a filter */ }; struct t4_reg { @@ -53,7 +61,133 @@ struct t4_regdump { uint32_t *data; }; +/* + * A hardware filter is some valid combination of these. + */ +#define T4_FILTER_IPv4 0x1 /* IPv4 packet */ +#define T4_FILTER_IPv6 0x2 /* IPv6 packet */ +#define T4_FILTER_IP_SADDR 0x4 /* Source IP address or network */ +#define T4_FILTER_IP_DADDR 0x8 /* Destination IP address or network */ +#define T4_FILTER_IP_SPORT 0x10 /* Source IP port */ +#define T4_FILTER_IP_DPORT 0x20 /* Destination IP port */ +#define T4_FILTER_FCoE 0x40 /* Fibre Channel over Ethernet packet */ +#define T4_FILTER_PORT 0x80 /* Physical ingress port */ +#define T4_FILTER_OVLAN 0x100 /* Outer VLAN ID */ +#define T4_FILTER_IVLAN 0x200 /* Inner VLAN ID */ +#define T4_FILTER_IP_TOS 0x400 /* IPv4 TOS/IPv6 Traffic Class */ +#define T4_FILTER_IP_PROTO 0x800 /* IP protocol */ +#define T4_FILTER_ETH_TYPE 0x1000 /* Ethernet Type */ +#define T4_FILTER_MAC_IDX 0x2000 /* MPS MAC address match index */ +#define T4_FILTER_MPS_HIT_TYPE 0x4000 /* MPS match type */ +#define T4_FILTER_IP_FRAGMENT 0x8000 /* IP fragment */ + +/* Filter action */ +enum { + FILTER_PASS = 0, /* default */ + FILTER_DROP, + FILTER_SWITCH +}; + +/* 802.1q manipulation on FILTER_SWITCH */ +enum { + VLAN_NOCHANGE = 0, /* default */ + VLAN_REMOVE, + VLAN_INSERT, + VLAN_REWRITE +}; + +/* MPS match type */ +enum { + UCAST_EXACT = 0, /* exact unicast match */ + UCAST_HASH = 1, /* inexact (hashed) unicast match */ + MCAST_EXACT = 2, /* exact multicast match */ + MCAST_HASH = 3, /* inexact (hashed) multicast match */ + PROMISC = 4, /* no match but port is promiscuous */ + HYPPROMISC = 5, /* port is hypervisor-promisuous + not bcast */ + BCAST = 6, /* broadcast packet */ +}; + +/* Rx steering */ +enum { + DST_MODE_QUEUE, /* queue is directly specified by filter */ + DST_MODE_RSS_QUEUE, /* filter specifies RSS entry containing queue */ + DST_MODE_RSS, /* queue selected by default RSS hash lookup */ + DST_MODE_FILT_RSS /* queue selected by hashing in filter-specified + RSS subtable */ +}; + +struct t4_filter_tuple { + /* + * These are always available. + */ + uint8_t sip[16]; /* source IP address (IPv4 in [3:0]) */ + uint8_t dip[16]; /* destinatin IP address (IPv4 in [3:0]) */ + uint16_t sport; /* source port */ + uint16_t dport; /* destination port */ + + /* + * A combination of these (upto 36 bits) is available. TP_VLAN_PRI_MAP + * is used to select the global mode and all filters are limited to the + * set of fields allowed by the global mode. + */ + uint16_t ovlan; /* outer VLAN */ + uint16_t ivlan; /* inner VLAN */ + uint16_t ethtype; /* Ethernet type */ + uint8_t tos; /* TOS/Traffic Type */ + uint8_t proto; /* protocol type */ + uint32_t fcoe:1; /* FCoE packet */ + uint32_t iport:3; /* ingress port */ + uint32_t matchtype:3; /* MPS match type */ + uint32_t frag:1; /* fragmentation extension header */ + uint32_t macidx:9; /* exact match MAC index */ + uint32_t ivlan_vld:1; /* inner VLAN valid */ + uint32_t ovlan_vld:1; /* outer VLAN valid */ +}; + +struct t4_filter_specification { + uint32_t hitcnts:1; /* count filter hits in TCB */ + uint32_t prio:1; /* filter has priority over active/server */ + uint32_t type:1; /* 0 => IPv4, 1 => IPv6 */ + uint32_t action:2; /* drop, pass, switch */ + uint32_t rpttid:1; /* report TID in RSS hash field */ + uint32_t dirsteer:1; /* 0 => RSS, 1 => steer to iq */ + uint32_t iq:10; /* ingress queue */ + uint32_t maskhash:1; /* dirsteer=0: store RSS hash in TCB */ + uint32_t dirsteerhash:1;/* dirsteer=1: 0 => TCB contains RSS hash */ + /* 1 => TCB contains IQ ID */ + + /* + * Switch proxy/rewrite fields. An ingress packet which matches a + * filter with "switch" set will be looped back out as an egress + * packet -- potentially with some Ethernet header rewriting. + */ + uint32_t eport:2; /* egress port to switch packet out */ + uint32_t newdmac:1; /* rewrite destination MAC address */ + uint32_t newsmac:1; /* rewrite source MAC address */ + uint32_t newvlan:2; /* rewrite VLAN Tag */ + uint8_t dmac[ETHER_ADDR_LEN]; /* new destination MAC address */ + uint8_t smac[ETHER_ADDR_LEN]; /* new source MAC address */ + uint16_t vlan; /* VLAN Tag to insert */ + + /* + * Filter rule value/mask pairs. + */ + struct t4_filter_tuple val; + struct t4_filter_tuple mask; +}; + +struct t4_filter { + uint32_t idx; + uint64_t hits; + struct t4_filter_specification fs; +}; + #define CHELSIO_T4_GETREG _IOWR('f', T4_GETREG, struct t4_reg) #define CHELSIO_T4_SETREG _IOW('f', T4_SETREG, struct t4_reg) #define CHELSIO_T4_REGDUMP _IOWR('f', T4_REGDUMP, struct t4_regdump) +#define CHELSIO_T4_GET_FILTER_MODE _IOWR('f', T4_GET_FILTER_MODE, uint32_t) +#define CHELSIO_T4_SET_FILTER_MODE _IOW('f', T4_SET_FILTER_MODE, uint32_t) +#define CHELSIO_T4_GET_FILTER _IOWR('f', T4_GET_FILTER, struct t4_filter) +#define CHELSIO_T4_SET_FILTER _IOW('f', T4_SET_FILTER, struct t4_filter) +#define CHELSIO_T4_DEL_FILTER _IOW('f', T4_DEL_FILTER, struct t4_filter) #endif Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu May 5 02:00:53 2011 (r221473) +++ head/sys/dev/cxgbe/t4_main.c Thu May 5 02:04:56 2011 (r221474) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include "common/t4_hw.h" #include "common/common.h" +#include "common/t4_msg.h" #include "common/t4_regs.h" #include "common/t4_regs_values.h" #include "common/t4fw_interface.h" @@ -218,6 +219,11 @@ TUNABLE_INT("hw.cxgbe.interrupt_forwardi SYSCTL_UINT(_hw_cxgbe, OID_AUTO, interrupt_forwarding, CTLFLAG_RDTUN, &intr_fwd, 0, "always use forwarded interrupts"); +static unsigned int filter_mode = HW_TPL_FR_MT_PR_IV_P_FC; +TUNABLE_INT("hw.cxgbe.filter_mode", &filter_mode); +SYSCTL_UINT(_hw_cxgbe, OID_AUTO, filter_mode, CTLFLAG_RDTUN, + &filter_mode, 0, "default global filter mode."); + struct intrs_and_queues { int intr_type; /* INTx, MSI, or MSI-X */ int nirq; /* Number of vectors */ @@ -228,6 +234,15 @@ struct intrs_and_queues { int nrxq1g; /* # of NIC rxq's for each 1G port */ }; +struct filter_entry { + uint32_t valid:1; /* filter allocated and valid */ + uint32_t locked:1; /* filter is administratively locked */ + uint32_t pending:1; /* filter action is pending firmware reply */ + uint32_t smtidx:8; /* Source MAC Table index for smac */ + + struct t4_filter_specification fs; +}; + enum { MEMWIN0_APERTURE = 2048, MEMWIN0_BASE = 0x1b800, @@ -280,6 +295,18 @@ static int sysctl_qsize_rxq(SYSCTL_HANDL static int sysctl_qsize_txq(SYSCTL_HANDLER_ARGS); static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS); static inline void txq_start(struct ifnet *, struct sge_txq *); +static uint32_t fconf_to_mode(uint32_t); +static uint32_t mode_to_fconf(uint32_t); +static uint32_t fspec_to_fconf(struct t4_filter_specification *); +static int get_filter_mode(struct adapter *, uint32_t *); +static int set_filter_mode(struct adapter *, uint32_t); +static int get_filter(struct adapter *, struct t4_filter *); +static int set_filter(struct adapter *, struct t4_filter *); +static int del_filter(struct adapter *, struct t4_filter *); +static void clear_filter(struct adapter *, struct filter_entry *); +static int set_filter_wr(struct adapter *, int); +static int del_filter_wr(struct adapter *, int); +void filter_rpl(struct adapter *, const struct cpl_set_tcb_rpl *); static int t4_mod_event(module_t, int, void *); struct t4_pciids { @@ -421,9 +448,12 @@ t4_attach(device_t dev) t4_sge_init(sc); - /* - * XXX: This is the place to call t4_set_filter_mode() - */ + t4_set_filter_mode(sc, filter_mode); + t4_set_reg_field(sc, A_TP_GLOBAL_CONFIG, + V_FIVETUPLELOOKUP(M_FIVETUPLELOOKUP), + V_FIVETUPLELOOKUP(M_FIVETUPLELOOKUP)); + t4_tp_wr_bits_indirect(sc, A_TP_INGRESS_CONFIG, F_CSUM_HAS_PSEUDO_HDR, + F_LOOKUPEVERYPKT); /* get basic stuff going */ rc = -t4_early_init(sc, sc->mbox); @@ -661,6 +691,7 @@ t4_detach(device_t dev) free(sc->sge.fiq, M_CXGBE); free(sc->sge.iqmap, M_CXGBE); free(sc->sge.eqmap, M_CXGBE); + free(sc->tids.ftid_tab, M_CXGBE); t4_destroy_dma_tag(sc); mtx_destroy(&sc->sc_lock); @@ -2699,6 +2730,481 @@ cxgbe_txq_start(void *arg, int count) TXQ_UNLOCK(txq); } +static uint32_t +fconf_to_mode(uint32_t fconf) +{ + uint32_t mode; + + mode = T4_FILTER_IPv4 | T4_FILTER_IPv6 | T4_FILTER_IP_SADDR | + T4_FILTER_IP_DADDR | T4_FILTER_IP_SPORT | T4_FILTER_IP_DPORT; + + if (fconf & F_FRAGMENTATION) + mode |= T4_FILTER_IP_FRAGMENT; + + if (fconf & F_MPSHITTYPE) + mode |= T4_FILTER_MPS_HIT_TYPE; + + if (fconf & F_MACMATCH) + mode |= T4_FILTER_MAC_IDX; + + if (fconf & F_ETHERTYPE) + mode |= T4_FILTER_ETH_TYPE; + + if (fconf & F_PROTOCOL) + mode |= T4_FILTER_IP_PROTO; + + if (fconf & F_TOS) + mode |= T4_FILTER_IP_TOS; + + if (fconf & F_VLAN) + mode |= T4_FILTER_IVLAN; + + if (fconf & F_VNIC_ID) + mode |= T4_FILTER_OVLAN; + + if (fconf & F_PORT) + mode |= T4_FILTER_PORT; + + if (fconf & F_FCOE) + mode |= T4_FILTER_FCoE; + + return (mode); +} + +static uint32_t +mode_to_fconf(uint32_t mode) +{ + uint32_t fconf = 0; + + if (mode & T4_FILTER_IP_FRAGMENT) + fconf |= F_FRAGMENTATION; + + if (mode & T4_FILTER_MPS_HIT_TYPE) + fconf |= F_MPSHITTYPE; + + if (mode & T4_FILTER_MAC_IDX) + fconf |= F_MACMATCH; + + if (mode & T4_FILTER_ETH_TYPE) + fconf |= F_ETHERTYPE; + + if (mode & T4_FILTER_IP_PROTO) + fconf |= F_PROTOCOL; + + if (mode & T4_FILTER_IP_TOS) + fconf |= F_TOS; + + if (mode & T4_FILTER_IVLAN) + fconf |= F_VLAN; + + if (mode & T4_FILTER_OVLAN) + fconf |= F_VNIC_ID; + + if (mode & T4_FILTER_PORT) + fconf |= F_PORT; + + if (mode & T4_FILTER_FCoE) + fconf |= F_FCOE; + + return (fconf); +} + +static uint32_t +fspec_to_fconf(struct t4_filter_specification *fs) +{ + uint32_t fconf = 0; + + if (fs->val.frag || fs->mask.frag) + fconf |= F_FRAGMENTATION; + + if (fs->val.matchtype || fs->mask.matchtype) + fconf |= F_MPSHITTYPE; + + if (fs->val.macidx || fs->mask.macidx) + fconf |= F_MACMATCH; + + if (fs->val.ethtype || fs->mask.ethtype) + fconf |= F_ETHERTYPE; + + if (fs->val.proto || fs->mask.proto) + fconf |= F_PROTOCOL; + + if (fs->val.tos || fs->mask.tos) + fconf |= F_TOS; + + if (fs->val.ivlan_vld || fs->mask.ivlan_vld) + fconf |= F_VLAN; + + if (fs->val.ovlan_vld || fs->mask.ovlan_vld) + fconf |= F_VNIC_ID; + + if (fs->val.iport || fs->mask.iport) + fconf |= F_PORT; + + if (fs->val.fcoe || fs->mask.fcoe) + fconf |= F_FCOE; + + return (fconf); +} + +static int +get_filter_mode(struct adapter *sc, uint32_t *mode) +{ + uint32_t fconf; + + t4_read_indirect(sc, A_TP_PIO_ADDR, A_TP_PIO_DATA, &fconf, 1, + A_TP_VLAN_PRI_MAP); + + *mode = fconf_to_mode(fconf); + + return (0); +} + +static int +set_filter_mode(struct adapter *sc, uint32_t mode) +{ + uint32_t fconf; + int rc; + + fconf = mode_to_fconf(mode); + + ADAPTER_LOCK(sc); + if (IS_BUSY(sc)) { + rc = EAGAIN; + goto done; + } + + if (sc->tids.ftids_in_use > 0) { + rc = EBUSY; + goto done; + } + + rc = -t4_set_filter_mode(sc, fconf); +done: + ADAPTER_UNLOCK(sc); + return (rc); +} + +static int +get_filter(struct adapter *sc, struct t4_filter *t) +{ + int i, nfilters = sc->tids.nftids; + struct filter_entry *f; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + if (IS_BUSY(sc)) + return (EAGAIN); + + if (sc->tids.ftids_in_use == 0 || sc->tids.ftid_tab == NULL || + t->idx >= nfilters) { + t->idx = 0xffffffff; + return (0); + } + + f = &sc->tids.ftid_tab[t->idx]; + for (i = t->idx; i < nfilters; i++, f++) { + if (f->valid) { + t->idx = i; + t->fs = f->fs; + t->hits = 0; /* XXX implement */ + + return (0); + } + } + + t->idx = 0xffffffff; + return (0); +} + +static int +set_filter(struct adapter *sc, struct t4_filter *t) +{ + uint32_t fconf; + unsigned int nfilters, nports; + struct filter_entry *f; + int i; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + nfilters = sc->tids.nftids; + nports = sc->params.nports; + + if (nfilters == 0) + return (ENOTSUP); + + if (!(sc->flags & FULL_INIT_DONE)) + return (EAGAIN); + + if (t->idx >= nfilters) + return (EINVAL); + + /* Validate against the global filter mode */ + t4_read_indirect(sc, A_TP_PIO_ADDR, A_TP_PIO_DATA, &fconf, 1, + A_TP_VLAN_PRI_MAP); + if ((fconf | fspec_to_fconf(&t->fs)) != fconf) + return (E2BIG); + + if (t->fs.action == FILTER_SWITCH && t->fs.eport >= nports) + return (EINVAL); + + if (t->fs.val.iport >= nports) + return (EINVAL); + + /* Can't specify an iq if not steering to it */ + if (!t->fs.dirsteer && t->fs.iq) + return (EINVAL); + + /* IPv6 filter idx must be 4 aligned */ + if (t->fs.type == 1 && + ((t->idx & 0x3) || t->idx + 4 >= nfilters)) + return (EINVAL); + + if (sc->tids.ftid_tab == NULL) { + KASSERT(sc->tids.ftids_in_use == 0, + ("%s: no memory allocated but filters_in_use > 0", + __func__)); + + sc->tids.ftid_tab = malloc(sizeof (struct filter_entry) * + nfilters, M_CXGBE, M_NOWAIT | M_ZERO); + if (sc->tids.ftid_tab == NULL) + return (ENOMEM); + } + + for (i = 0; i < 4; i++) { + f = &sc->tids.ftid_tab[t->idx + i]; + + if (f->pending || f->valid) + return (EBUSY); + if (f->locked) + return (EPERM); + + if (t->fs.type == 0) + break; + } + + f = &sc->tids.ftid_tab[t->idx]; + f->fs = t->fs; + + return set_filter_wr(sc, t->idx); +} + +static int +del_filter(struct adapter *sc, struct t4_filter *t) +{ + unsigned int nfilters; + struct filter_entry *f; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + if (IS_BUSY(sc)) + return (EAGAIN); + + nfilters = sc->tids.nftids; + + if (nfilters == 0) + return (ENOTSUP); + + if (sc->tids.ftid_tab == NULL || sc->tids.ftids_in_use == 0 || + t->idx >= nfilters) + return (EINVAL); + + if (!(sc->flags & FULL_INIT_DONE)) + return (EAGAIN); + + f = &sc->tids.ftid_tab[t->idx]; + + if (f->pending) + return (EBUSY); + if (f->locked) + return (EPERM); + + if (f->valid) { + t->fs = f->fs; /* extra info for the caller */ + return del_filter_wr(sc, t->idx); + } + + return (0); +} + +/* XXX: L2T */ +static void +clear_filter(struct adapter *sc, struct filter_entry *f) +{ + (void) sc; + bzero(f, sizeof (*f)); +} + +static int +set_filter_wr(struct adapter *sc, int fidx) +{ + int rc; + struct filter_entry *f = &sc->tids.ftid_tab[fidx]; + struct mbuf *m; + struct fw_filter_wr *fwr; + unsigned int ftid; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + if (f->fs.newdmac || f->fs.newvlan) + return (ENOTSUP); /* XXX: fix after L2T code */ + + ftid = sc->tids.ftid_base + fidx; + + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) + return (ENOMEM); + + fwr = mtod(m, struct fw_filter_wr *); + m->m_len = m->m_pkthdr.len = sizeof(*fwr); + bzero(fwr, sizeof (*fwr)); + + fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); + fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); + fwr->tid_to_iq = + htobe32(V_FW_FILTER_WR_TID(ftid) | + V_FW_FILTER_WR_RQTYPE(f->fs.type) | + V_FW_FILTER_WR_NOREPLY(0) | + V_FW_FILTER_WR_IQ(f->fs.iq)); + fwr->del_filter_to_l2tix = + htobe32(V_FW_FILTER_WR_RPTTID(f->fs.rpttid) | + V_FW_FILTER_WR_DROP(f->fs.action == FILTER_DROP) | + V_FW_FILTER_WR_DIRSTEER(f->fs.dirsteer) | + V_FW_FILTER_WR_MASKHASH(f->fs.maskhash) | + V_FW_FILTER_WR_DIRSTEERHASH(f->fs.dirsteerhash) | + V_FW_FILTER_WR_LPBK(f->fs.action == FILTER_SWITCH) | + V_FW_FILTER_WR_DMAC(f->fs.newdmac) | + V_FW_FILTER_WR_SMAC(f->fs.newsmac) | + V_FW_FILTER_WR_INSVLAN(f->fs.newvlan == VLAN_INSERT || + f->fs.newvlan == VLAN_REWRITE) | + V_FW_FILTER_WR_RMVLAN(f->fs.newvlan == VLAN_REMOVE || + f->fs.newvlan == VLAN_REWRITE) | + V_FW_FILTER_WR_HITCNTS(f->fs.hitcnts) | + V_FW_FILTER_WR_TXCHAN(f->fs.eport) | + V_FW_FILTER_WR_PRIO(f->fs.prio) | + V_FW_FILTER_WR_L2TIX(0)); /* XXX: L2T */ + fwr->ethtype = htobe16(f->fs.val.ethtype); + fwr->ethtypem = htobe16(f->fs.mask.ethtype); + fwr->frag_to_ovlan_vldm = + (V_FW_FILTER_WR_FRAG(f->fs.val.frag) | + V_FW_FILTER_WR_FRAGM(f->fs.mask.frag) | + V_FW_FILTER_WR_IVLAN_VLD(f->fs.val.ivlan_vld) | + V_FW_FILTER_WR_OVLAN_VLD(f->fs.val.ovlan_vld) | + V_FW_FILTER_WR_IVLAN_VLDM(f->fs.mask.ivlan_vld) | + V_FW_FILTER_WR_OVLAN_VLDM(f->fs.mask.ovlan_vld)); + fwr->smac_sel = 0; + fwr->rx_chan_rx_rpl_iq = htobe16(V_FW_FILTER_WR_RX_CHAN(0) | + V_FW_FILTER_WR_RX_RPL_IQ(sc->sge.fwq.abs_id)); + fwr->maci_to_matchtypem = + htobe32(V_FW_FILTER_WR_MACI(f->fs.val.macidx) | + V_FW_FILTER_WR_MACIM(f->fs.mask.macidx) | + V_FW_FILTER_WR_FCOE(f->fs.val.fcoe) | + V_FW_FILTER_WR_FCOEM(f->fs.mask.fcoe) | + V_FW_FILTER_WR_PORT(f->fs.val.iport) | + V_FW_FILTER_WR_PORTM(f->fs.mask.iport) | + V_FW_FILTER_WR_MATCHTYPE(f->fs.val.matchtype) | + V_FW_FILTER_WR_MATCHTYPEM(f->fs.mask.matchtype)); + fwr->ptcl = f->fs.val.proto; + fwr->ptclm = f->fs.mask.proto; + fwr->ttyp = f->fs.val.tos; + fwr->ttypm = f->fs.mask.tos; + fwr->ivlan = htobe16(f->fs.val.ivlan); + fwr->ivlanm = htobe16(f->fs.mask.ivlan); + fwr->ovlan = htobe16(f->fs.val.ovlan); + fwr->ovlanm = htobe16(f->fs.mask.ovlan); + bcopy(f->fs.val.dip, fwr->lip, sizeof (fwr->lip)); + bcopy(f->fs.mask.dip, fwr->lipm, sizeof (fwr->lipm)); + bcopy(f->fs.val.sip, fwr->fip, sizeof (fwr->fip)); + bcopy(f->fs.mask.sip, fwr->fipm, sizeof (fwr->fipm)); + fwr->lp = htobe16(f->fs.val.dport); + fwr->lpm = htobe16(f->fs.mask.dport); + fwr->fp = htobe16(f->fs.val.sport); + fwr->fpm = htobe16(f->fs.mask.sport); + if (f->fs.newsmac) + bcopy(f->fs.smac, fwr->sma, sizeof (fwr->sma)); + + f->pending = 1; + sc->tids.ftids_in_use++; + rc = t4_mgmt_tx(sc, m); + if (rc != 0) { + sc->tids.ftids_in_use--; + m_freem(m); + clear_filter(sc, f); + } + return (rc); +} + +static int +del_filter_wr(struct adapter *sc, int fidx) +{ + struct filter_entry *f = &sc->tids.ftid_tab[fidx]; + struct mbuf *m; + struct fw_filter_wr *fwr; + unsigned int rc, ftid; + + ADAPTER_LOCK_ASSERT_OWNED(sc); + + ftid = sc->tids.ftid_base + fidx; + + m = m_gethdr(M_NOWAIT, MT_DATA); + if (m == NULL) + return (ENOMEM); + + fwr = mtod(m, struct fw_filter_wr *); + m->m_len = m->m_pkthdr.len = sizeof(*fwr); + bzero(fwr, sizeof (*fwr)); + + t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); + + f->pending = 1; + rc = t4_mgmt_tx(sc, m); + if (rc != 0) { + f->pending = 0; + m_freem(m); + } + return (rc); +} + +/* XXX move intr handlers to main.c and make this static */ +void +filter_rpl(struct adapter *sc, const struct cpl_set_tcb_rpl *rpl) +{ + unsigned int idx = GET_TID(rpl); + + if (idx >= sc->tids.ftid_base && + (idx -= sc->tids.ftid_base) < sc->tids.nftids) { + unsigned int rc = G_COOKIE(rpl->cookie); + struct filter_entry *f = &sc->tids.ftid_tab[idx]; + + if (rc == FW_FILTER_WR_FLT_DELETED) { + /* + * Clear the filter when we get confirmation from the + * hardware that the filter has been deleted. + */ + clear_filter(sc, f); + sc->tids.ftids_in_use--; + } else if (rc == FW_FILTER_WR_SMT_TBL_FULL) { + device_printf(sc->dev, + "filter %u setup failed due to full SMT\n", idx); + clear_filter(sc, f); + sc->tids.ftids_in_use--; + } else if (rc == FW_FILTER_WR_FLT_ADDED) { + f->smtidx = (be64toh(rpl->oldval) >> 24) & 0xff; + f->pending = 0; /* asynchronous setup completed */ + f->valid = 1; + } else { + /* + * Something went wrong. Issue a warning about the + * problem and clear everything out. + */ + device_printf(sc->dev, + "filter %u setup failed with error %u\n", idx, rc); + clear_filter(sc, f); + sc->tids.ftids_in_use--; + } + } +} + int t4_os_find_pci_capability(struct adapter *sc, int cap) { @@ -2873,6 +3379,27 @@ t4_ioctl(struct cdev *dev, unsigned long free(buf, M_CXGBE); break; } + case CHELSIO_T4_GET_FILTER_MODE: + rc = get_filter_mode(sc, (uint32_t *)data); + break; + case CHELSIO_T4_SET_FILTER_MODE: + rc = set_filter_mode(sc, *(uint32_t *)data); + break; + case CHELSIO_T4_GET_FILTER: + ADAPTER_LOCK(sc); + rc = get_filter(sc, (struct t4_filter *)data); + ADAPTER_UNLOCK(sc); + break; + case CHELSIO_T4_SET_FILTER: + ADAPTER_LOCK(sc); + rc = set_filter(sc, (struct t4_filter *)data); + ADAPTER_UNLOCK(sc); + break; + case CHELSIO_T4_DEL_FILTER: + ADAPTER_LOCK(sc); + rc = del_filter(sc, (struct t4_filter *)data); + ADAPTER_UNLOCK(sc); + break; default: rc = EINVAL; } Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu May 5 02:00:53 2011 (r221473) +++ head/sys/dev/cxgbe/t4_sge.c Thu May 5 02:04:56 2011 (r221474) @@ -142,6 +142,8 @@ static int handle_sge_egr_update(struct static int ctrl_tx(struct adapter *, struct sge_ctrlq *, struct mbuf *); +extern void filter_rpl(struct adapter *, const struct cpl_set_tcb_rpl *); + /* * Called on MOD_LOAD and fills up fl_buf_info[]. */ @@ -580,7 +582,9 @@ t4_evt_rx(void *arg) case CPL_SGE_EGR_UPDATE: handle_sge_egr_update(sc, (const void *)(rss + 1)); break; - + case CPL_SET_TCB_RPL: + filter_rpl(sc, (const void *) (rss + 1)); + break; default: device_printf(sc->dev, "can't handle CPL opcode %d.", rss->opcode); From owner-svn-src-all@FreeBSD.ORG Thu May 5 02:35:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AAE2106566B; Thu, 5 May 2011 02:35:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47BE88FC0C; Thu, 5 May 2011 02:35:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p452ZC4n077773; Thu, 5 May 2011 02:35:12 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p452ZCZ0077771; Thu, 5 May 2011 02:35:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201105050235.p452ZCZ0077771@svn.freebsd.org> From: Doug Barton Date: Thu, 5 May 2011 02:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221475 - head/etc/periodic/daily X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 02:35:12 -0000 Author: dougb Date: Thu May 5 02:35:11 2011 New Revision: 221475 URL: http://svn.freebsd.org/changeset/base/221475 Log: 1. If PKG_DBDIR cannot be determined from make, set the default 2. Add the -H flag to tar in case /var/db/pkg itself is a symlink 3. Direct stderr to /dev/null to suppress the leading slash warning [1] PR: ports/156810 [1] Submitted by: Jeremy Chadwick [1] Modified: head/etc/periodic/daily/220.backup-pkgdb Modified: head/etc/periodic/daily/220.backup-pkgdb ============================================================================== --- head/etc/periodic/daily/220.backup-pkgdb Thu May 5 02:04:56 2011 (r221474) +++ head/etc/periodic/daily/220.backup-pkgdb Thu May 5 02:35:11 2011 (r221475) @@ -18,7 +18,8 @@ case "$daily_backup_pkgdb_enable" in bak="${daily_backup_pkgdb_dir:-/var/backups}" bak_file="${bak}/pkgdb.bak.tbz" - pkg_dbdir=`make -f/usr/share/mk/bsd.port.mk -V PKG_DBDIR 2>/dev/null` + pkg_dbdir=`make -f/usr/share/mk/bsd.port.mk -V PKG_DBDIR 2>/dev/null` || + pkg_dbdir=/var/db/pkg if [ ! -d "$bak" ] then @@ -33,7 +34,7 @@ case "$daily_backup_pkgdb_enable" in new_bak_file=`mktemp ${bak_file}-XXXXX` - if tar -cjf "${new_bak_file}" "$pkg_dbdir"; then + if tar -cjHf "${new_bak_file}" "$pkg_dbdir" 2>/dev/null; then chmod 644 "${new_bak_file}" if [ -e "${bak_file}.2" -a -e "${bak_file}" ]; then From owner-svn-src-all@FreeBSD.ORG Thu May 5 02:35:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070FC1065674; Thu, 5 May 2011 02:35:26 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E86D88FC15; Thu, 5 May 2011 02:35:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p452ZPhr077816; Thu, 5 May 2011 02:35:25 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p452ZP4n077814; Thu, 5 May 2011 02:35:25 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105050235.p452ZP4n077814@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 5 May 2011 02:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221476 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 02:35:26 -0000 Author: obrien Date: Thu May 5 02:35:25 2011 New Revision: 221476 URL: http://svn.freebsd.org/changeset/base/221476 Log: Guard ptrdiff_t. Modified: head/sys/sys/stddef.h Modified: head/sys/sys/stddef.h ============================================================================== --- head/sys/sys/stddef.h Thu May 5 02:35:11 2011 (r221475) +++ head/sys/sys/stddef.h Thu May 5 02:35:25 2011 (r221476) @@ -33,7 +33,10 @@ #include #include +#ifndef _PTRDIFF_T_DECLARED typedef __ptrdiff_t ptrdiff_t; +#define _PTRDIFF_T_DECLARED +#endif #define offsetof(type, field) __offsetof(type, field) From owner-svn-src-all@FreeBSD.ORG Thu May 5 02:38:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 606E0106564A; Thu, 5 May 2011 02:38:09 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 330AE8FC12; Thu, 5 May 2011 02:38:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p452c99Z077933; Thu, 5 May 2011 02:38:09 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p452c9CB077930; Thu, 5 May 2011 02:38:09 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201105050238.p452c9CB077930@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 5 May 2011 02:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221477 - in head/sys: dev/cxgbe modules/cxgbe/if_cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 02:38:09 -0000 Author: np Date: Thu May 5 02:38:08 2011 New Revision: 221477 URL: http://svn.freebsd.org/changeset/base/221477 Log: T4 packet timestamps. Reference code that shows how to get a packet's timestamp out of cxgbe(4). Disabled by default because we don't have a standard way today to pass this information up the stack. The timestamp is 60 bits wide and each increment represents 1 tick of the T4's core clock. As an example, the timestamp granularity is ~4.4ns for this card: # sysctl dev.t4nex.0.core_clock dev.t4nex.0.core_clock: 228125 MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_sge.c head/sys/modules/cxgbe/if_cxgbe/Makefile Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu May 5 02:35:25 2011 (r221476) +++ head/sys/dev/cxgbe/t4_sge.c Thu May 5 02:38:08 2011 (r221477) @@ -606,6 +606,12 @@ t4_evt_rx(void *arg) V_INGRESSQID(iq->cntxt_id) | V_SEINTARM(iq->intr_params)); } +#ifdef T4_PKT_TIMESTAMP +#define RX_COPY_THRESHOLD (MINCLSIZE - 8) +#else +#define RX_COPY_THRESHOLD MINCLSIZE +#endif + void t4_eth_rx(void *arg) { @@ -669,7 +675,22 @@ t4_eth_rx(void *arg) BUS_DMASYNC_POSTREAD); m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR); - if (len < MINCLSIZE) { + +#ifdef T4_PKT_TIMESTAMP + *mtod(m0, uint64_t *) = + be64toh(ctrl->u.last_flit & 0xfffffffffffffff); + m0->m_data += 8; + + /* + * 60 bit timestamp value is *(uint64_t *)m0->m_pktdat. Note + * that it is in the leading free-space (see M_LEADINGSPACE) in + * the mbuf. The kernel can clobber it during a pullup, + * m_copymdata, etc. You need to make sure that the mbuf + * reaches you unmolested if you care about the timestamp. + */ +#endif + + if (len < RX_COPY_THRESHOLD) { /* copy data to mbuf, buffer will be recycled */ bcopy(sd->cl, mtod(m0, caddr_t), len); m0->m_len = len; Modified: head/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- head/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 5 02:35:25 2011 (r221476) +++ head/sys/modules/cxgbe/if_cxgbe/Makefile Thu May 5 02:38:08 2011 (r221477) @@ -13,4 +13,7 @@ SRCS+= opt_inet.h CFLAGS+= -I${CXGBE} +# Provide the timestamp of a packet in its header mbuf. +#CFLAGS+= -DT4_PKT_TIMESTAMP + .include From owner-svn-src-all@FreeBSD.ORG Thu May 5 02:52:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56DFB1065672; Thu, 5 May 2011 02:52:11 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39B7C8FC0A; Thu, 5 May 2011 02:52:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p452qBJE078382; Thu, 5 May 2011 02:52:11 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p452qBG8078380; Thu, 5 May 2011 02:52:11 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201105050252.p452qBG8078380@svn.freebsd.org> From: Doug Barton Date: Thu, 5 May 2011 02:52:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org X-SVN-Group: defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221478 - X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 02:52:11 -0000 Author: dougb Date: Thu May 5 02:52:10 2011 New Revision: 221478 URL: http://svn.freebsd.org/changeset/base/221478 Log: Remove version-specific stuff. If anyone wants to keep it up to date the information can be restored. Loosely inspired by the PR. PR: misc/153995 Submitted by: eadler Modified: ROADMAP.txt Modified: ROADMAP.txt ============================================================================== --- ROADMAP.txt Thu May 5 02:38:08 2011 (r221477) +++ ROADMAP.txt Thu May 5 02:52:10 2011 (r221478) @@ -19,8 +19,6 @@ Key locations: cvs2svn/ - unclassified stuff / leftovers for deleting. -^^^ Only head is currently enabled for commits. - Basic branch strategy: head/ is the mainline, or current. head/ is branched/copied into stable/X. This is what will @@ -38,90 +36,6 @@ Basic branch strategy: vendor/${acme}/dist is 'tagged' via copies to vendor/{$acme}/${release} -Stable: - stable/2.0.5/ - stable/2.1/ - stable/2.2/ - stable/3/ - stable/4/ - stable/5/ - stable/6/ - stable/7/ - -Releases: - release/2.0/ (branched from head/) - release/2.0.5/ (branched from releng/2.0.5/) - release/2.1.0/ (branched from stable/2.1/) - release/2.1.5/ (branched from stable/2.1/) - release/2.1.6.1/ (branched from stable/2.1/) - release/2.1.7/ (branched from stable/2.1/) - release/2.1.8/ (branched from stable/2.1/) - release/2.2.0/ (branched from stable/2.2/) - release/2.2.1/ (branched from stable/2.2/) - release/2.2.2/ (branched from stable/2.2/) - release/2.2.5/ (branched from stable/2.2/) - release/2.2.6/ (branched from stable/2.2/) - release/2.2.7/ (branched from stable/2.2/) - release/2.2.8/ (branched from stable/2.2/) - release/3.0.0/ (branched from stable/3/) - release/3.1.0/ (branched from stable/3/) - release/3.2.0/ (branched from stable/3/) - release/3.3.0/ (branched from stable/3/) - release/3.4.0/ (branched from stable/3/) - release/3.5.0/ (branched from stable/3/) - release/4.0.0/ (branched from stable/4/) - release/4.1.0/ (branched from stable/4/) - release/4.1.1/ (branched from stable/4/) - release/4.2.0/ (branched from stable/4/) - release/4.3.0/ (branched from stable/4/) - release/4.4.0/ (branched from releng/4.4/) - release/4.5.0/ (branched from releng/4.5/) - release/4.6.0/ (all below are from their releng/*) - release/4.6.1/ - release/4.6.2/ - release/4.7.0/ - release/4.8.0/ - release/4.9.0/ - release/4.10.0/ - release/4.11.0/ - release/5.0.0/ - release/5.1.0/ - release/5.2.0/ - release/5.2.1/ - release/5.3.0/ - release/5.4.0/ - release/5.5.0/ - release/6.0.0/ - release/6.1.0/ - release/6.2.0/ - release/6.3.0/ - release/7.0.0/ - -Release Engineering / Errata branches: - releng/ALPHA_2_0 (branched from head/) - releng/BETA_2_0 (branched from head/) - releng/2.0.5 (branched from head/) - releng/4.3 (branched from stable/4/) - releng/4.4 (branched from stable/4/) - releng/4.5 (branched from stable/4/) - releng/4.6 (branched from stable/4/) - releng/4.7 (branched from stable/4/) - releng/4.8 (branched from stable/4/) - releng/4.9 (branched from stable/4/) - releng/4.10 (branched from stable/4/) - releng/4.11 (branched from stable/4/) - releng/5.0 (branched from head/) - releng/5.1 (branched from head/) - releng/5.2 (branched from head/) - releng/5.3 (branched from stable/5/) - releng/5.4 (branched from stable/5/) - releng/5.5 (branched from stable/5/) - releng/6.0 (branched from stable/6/) - releng/6.1 (branched from stable/6/) - releng/6.2 (branched from stable/6/) - releng/6.3 (branched from stable/6/) - releng/7.0 (branched from stable/7/) - Vendor layout: vendor/$vendor - roots for a given vendor import vendor/$vendor/dist - staging area for importes to head/ and branches @@ -129,4 +43,3 @@ Vendor layout: vendor/$vendor/$tag2 - .. .. vendor/$vendor/$tagN - .. for each import - From owner-svn-src-all@FreeBSD.ORG Thu May 5 02:59:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 203551065670; Thu, 5 May 2011 02:59:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01E228FC18; Thu, 5 May 2011 02:59:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p452xVrj078620; Thu, 5 May 2011 02:59:31 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p452xVBv078617; Thu, 5 May 2011 02:59:31 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105050259.p452xVBv078617@svn.freebsd.org> From: Adrian Chadd Date: Thu, 5 May 2011 02:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221479 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 02:59:32 -0000 Author: adrian Date: Thu May 5 02:59:31 2011 New Revision: 221479 URL: http://svn.freebsd.org/changeset/base/221479 Log: Import some HOWL (AR9130) related fixes from Atheros. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu May 5 02:52:10 2011 (r221478) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Thu May 5 02:59:31 2011 (r221479) @@ -251,7 +251,12 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO OS_REG_WRITE(ah, AR_BSSMSKU, LE_READ_2(ahp->ah_bssidmask + 4)); /* Restore previous led state */ - OS_REG_WRITE(ah, AR_MAC_LED, OS_REG_READ(ah, AR_MAC_LED) | saveLedState); + if (AR_SREV_HOWL(ah)) + OS_REG_WRITE(ah, AR_MAC_LED, + AR_MAC_LED_ASSOC_ACTIVE | AR_CFG_SCLK_32KHZ); + else + OS_REG_WRITE(ah, AR_MAC_LED, OS_REG_READ(ah, AR_MAC_LED) | + saveLedState); /* Restore previous antenna */ OS_REG_WRITE(ah, AR_DEF_ANTENNA, saveDefAntenna); @@ -332,6 +337,19 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO if (bChannelChange && !IEEE80211_IS_CHAN_DFS(chan)) chan->ic_state &= ~IEEE80211_CHANSTATE_CWINT; + if (AR_SREV_HOWL(ah)) { + /* + * Enable the MBSSID block-ack fix for HOWL. + * This feature is only supported on Howl 1.4, but it is safe to + * set bit 22 of STA_ID1 on other Howl revisions (1.1, 1.2, 1.3), + * since bit 22 is unused in those Howl revisions. + */ + unsigned int reg; + reg = (OS_REG_READ(ah, AR_STA_ID1) | (1<<22)); + OS_REG_WRITE(ah,AR_STA_ID1, reg); + ath_hal_printf(ah, "MBSSID Set bit 22 of AR_STA_ID 0x%x\n", reg); + } + HALDEBUG(ah, HAL_DEBUG_RESET, "%s: done\n", __func__); OS_MARK(ah, AH_MARK_RESET_DONE, 0); @@ -1205,7 +1223,11 @@ ar5416SetReset(struct ath_hal *ah, int t #endif /* AH_SUPPORT_AR9130 */ OS_REG_WRITE(ah, AR_RTC_RC, rst_flags); - OS_DELAY(50); + + if (AR_SREV_HOWL(ah)) + OS_DELAY(10000); + else + OS_DELAY(100); /* * Clear resets and force wakeup Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu May 5 02:52:10 2011 (r221478) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu May 5 02:59:31 2011 (r221479) @@ -199,6 +199,12 @@ #define AR_RXCFG_DMASZ_512B 7 /* MAC Led registers */ +#define AR_CFG_SCLK_RATE_IND 0x00000003 /* sleep clock indication */ +#define AR_CFG_SCLK_RATE_IND_S 0 +#define AR_CFG_SCLK_32MHZ 0x00000000 /* Sleep clock rate */ +#define AR_CFG_SCLK_4MHZ 0x00000001 /* Sleep clock rate */ +#define AR_CFG_SCLK_1MHZ 0x00000002 /* Sleep clock rate */ +#define AR_CFG_SCLK_32KHZ 0x00000003 /* Sleep clock rate */ #define AR_MAC_LED_BLINK_SLOW 0x00000008 /* LED slowest blink rate mode */ #define AR_MAC_LED_BLINK_THRESH_SEL 0x00000070 /* LED blink threshold select */ #define AR_MAC_LED_MODE 0x00000380 /* LED mode select */ From owner-svn-src-all@FreeBSD.ORG Thu May 5 03:42:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBAD4106566B; Thu, 5 May 2011 03:42:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C96CE8FC08; Thu, 5 May 2011 03:42:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p453g4le080190; Thu, 5 May 2011 03:42:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p453g4E7080188; Thu, 5 May 2011 03:42:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105050342.p453g4E7080188@svn.freebsd.org> From: Adrian Chadd Date: Thu, 5 May 2011 03:42:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221480 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 03:42:05 -0000 Author: adrian Date: Thu May 5 03:42:04 2011 New Revision: 221480 URL: http://svn.freebsd.org/changeset/base/221480 Log: Fix up the chipset checks for the AR5416 and later silicon. The checks should function as follows: * AR_SREV_ : check macVersion matches that version id * AR_SREV__ : check macVersion and macRevision match the version / revision respectively * AR_SREV___OR_LATER: check that + if the chip silicon version == macVersion, enforce revision >= macRevision + if the chip silicon version > macVersion, allow it. For example, AR_SREV_MERLIN() only matches AR9280 (any revision), AR_SREV_MERLIN_10() would only match AR9280 version 1.0, but AR_SREV_MERLIN_20_OR_LATER() matches AR9280 version >= 2.0 _AND_ any subsequent MAC (So AR9285, AR9287, etc.) The specific fixes which may impact users: * if there is Merlin hardware > revision 2.0, it'll now be correctly matched by AR_SREV_MERLIN_20_OR_LATER() - the older code simply would match on either Merlin 2.0 or a subsequent MAC (AR9285, AR9287, etc.) * Kite version 1.1/1.2 should now correctly match. As these macros are used in the AR9285 reset/attach path, and it's assumed that the hardware is kite anyway, the behaviour shouldn't change. It'll only change if these macros are used in other codepaths shared with older silicon. Obtained from: Linux ath9k, Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu May 5 02:59:31 2011 (r221479) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Thu May 5 03:42:04 2011 (r221480) @@ -625,56 +625,83 @@ #define AR_XSREV_REVISION_KITE_11 1 /* Kite 1.1 */ #define AR_XSREV_REVISION_KITE_12 2 /* Kite 1.2 */ +/* Owl (AR5416) */ #define AR_SREV_OWL(_ah) \ ((AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_OWL_PCI) || \ (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_OWL_PCIE)) #define AR_SREV_OWL_20_OR_LATER(_ah) \ - ((AR_SREV_OWL(_ah) && AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_20) || \ - AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_HOWL) + ((AR_SREV_OWL(_ah) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_20) || \ + AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_HOWL) + #define AR_SREV_OWL_22_OR_LATER(_ah) \ - ((AR_SREV_OWL(_ah) && AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_22) || \ - AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_HOWL) + ((AR_SREV_OWL(_ah) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_22) || \ + AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_HOWL) + +/* Howl (AR9130) */ #define AR_SREV_HOWL(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_HOWL) + #define AR_SREV_9100(_ah) AR_SREV_HOWL(_ah) +/* Sowl (AR9160) */ + #define AR_SREV_SOWL(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_SOWL) + #define AR_SREV_SOWL_10_OR_LATER(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_SOWL) + #define AR_SREV_SOWL_11(_ah) \ (AR_SREV_SOWL(_ah) && \ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_SOWL_11) +/* Merlin (AR9280) */ + #define AR_SREV_MERLIN(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_MERLIN) + #define AR_SREV_MERLIN_10_OR_LATER(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN) + #define AR_SREV_MERLIN_20(_ah) \ (AR_SREV_MERLIN(_ah) && \ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_MERLIN_20) + #define AR_SREV_MERLIN_20_OR_LATER(_ah) \ - (AR_SREV_MERLIN_20(_ah) || \ - AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN) + ((AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_MERLIN) || \ + (AR_SREV_MERLIN((_ah)) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_MERLIN_20)) + +/* Kite (AR9285) */ #define AR_SREV_KITE(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_KITE) + #define AR_SREV_KITE_10_OR_LATER(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_KITE) + #define AR_SREV_KITE_11(_ah) \ (AR_SREV_KITE(ah) && \ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KITE_11) + #define AR_SREV_KITE_11_OR_LATER(_ah) \ - (AR_SREV_KITE_11(_ah) || \ - AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_11) + ((AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_KITE) || \ + (AR_SREV_KITE((_ah)) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_11)) + #define AR_SREV_KITE_12(_ah) \ (AR_SREV_KITE(ah) && \ AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_KITE_12) + #define AR_SREV_KITE_12_OR_LATER(_ah) \ - (AR_SREV_KITE_12(_ah) || \ - AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12) + ((AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_KITE) || \ + (AR_SREV_KITE((_ah)) && \ + AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_KITE_12)) + #define AR_SREV_9285E_20(_ah) \ (AR_SREV_KITE_12_OR_LATER(_ah) && \ ((OS_REG_READ(_ah, AR_AN_SYNTH9) & 0x7) == 0x1)) From owner-svn-src-all@FreeBSD.ORG Thu May 5 04:43:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 778621065673; Thu, 5 May 2011 04:43:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 662088FC0C; Thu, 5 May 2011 04:43:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p454h5Pv082085; Thu, 5 May 2011 04:43:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p454h5Lg082083; Thu, 5 May 2011 04:43:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105050443.p454h5Lg082083@svn.freebsd.org> From: Adrian Chadd Date: Thu, 5 May 2011 04:43:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221483 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 04:43:05 -0000 Author: adrian Date: Thu May 5 04:43:05 2011 New Revision: 221483 URL: http://svn.freebsd.org/changeset/base/221483 Log: Another Howl (AR9130) fix. I haven't seen a 5ghz AR9130 based board yet though! Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar2133.c Thu May 5 03:58:23 2011 (r221482) +++ head/sys/dev/ath/ath_hal/ar5416/ar2133.c Thu May 5 04:43:05 2011 (r221483) @@ -165,7 +165,7 @@ ar2133SetChannel(struct ath_hal *ah, con } } else if ((freq % 20) == 0 && freq >= 5120) { channelSel = ath_hal_reverseBits(((freq - 4800) / 20 << 2), 8); - if (AR_SREV_SOWL_10_OR_LATER(ah)) + if (AR_SREV_HOWL(ah) || AR_SREV_SOWL_10_OR_LATER(ah)) aModeRefSel = ath_hal_reverseBits(3, 2); else aModeRefSel = ath_hal_reverseBits(1, 2); From owner-svn-src-all@FreeBSD.ORG Thu May 5 07:50:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E325F106564A; Thu, 5 May 2011 07:50:36 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 9E4508FC16; Thu, 5 May 2011 07:50:36 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 810011FFC58; Thu, 5 May 2011 07:50:34 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 2F7618456D; Thu, 5 May 2011 09:50:34 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Rick Macklem References: <1310797810.1031067.1304558503327.JavaMail.root@erie.cs.uoguelph.ca> Date: Thu, 05 May 2011 09:50:33 +0200 In-Reply-To: <1310797810.1031067.1304558503327.JavaMail.root@erie.cs.uoguelph.ca> (Rick Macklem's message of "Wed, 4 May 2011 21:21:43 -0400 (EDT)") Message-ID: <86r58dsi0m.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 07:50:37 -0000 Rick Macklem writes: > "Dag-Erling Sm=C3=B8rgrav" writes: > > Ideally, both the old and the new NFS stack would use the same > > fstypes and sysctl names, but I don't know if there's any way we can > > prevent someone from compiling both into the kernel at the same > > time, or loading both modules. > If the scripts in /etc/rc.d are fixed to use the correct sysctl naming, > do you think it matters which one is "vfs.nfs."? Yes. There is a whole world outside the base system: munin, webmin, nagios etc. Are you going to change all of them as well? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu May 5 07:59:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03CE61065670; Thu, 5 May 2011 07:59:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6ADD8FC1B; Thu, 5 May 2011 07:59:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p457xCB1089108; Thu, 5 May 2011 07:59:12 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p457xCeS089105; Thu, 5 May 2011 07:59:12 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201105050759.p457xCeS089105@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 5 May 2011 07:59:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221484 - vendor-crypto/openssh/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 07:59:13 -0000 Author: des Date: Thu May 5 07:59:12 2011 New Revision: 221484 URL: http://svn.freebsd.org/changeset/base/221484 Log: djm released a new 5.8p2 tarball with the correct version number. Modified: vendor-crypto/openssh/dist/ChangeLog vendor-crypto/openssh/dist/version.h Modified: vendor-crypto/openssh/dist/ChangeLog ============================================================================== --- vendor-crypto/openssh/dist/ChangeLog Thu May 5 04:43:05 2011 (r221483) +++ vendor-crypto/openssh/dist/ChangeLog Thu May 5 07:59:12 2011 (r221484) @@ -1,6 +1,7 @@ 20110403 - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] [contrib/suse/openssh.spec] Prepare for 5.8p2 release. + - (djm) [version.h] crank version - Release 5.8p2 20110329 Modified: vendor-crypto/openssh/dist/version.h ============================================================================== --- vendor-crypto/openssh/dist/version.h Thu May 5 04:43:05 2011 (r221483) +++ vendor-crypto/openssh/dist/version.h Thu May 5 07:59:12 2011 (r221484) @@ -2,5 +2,5 @@ #define SSH_VERSION "OpenSSH_5.8" -#define SSH_PORTABLE "p1" +#define SSH_PORTABLE "p2" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE From owner-svn-src-all@FreeBSD.ORG Thu May 5 08:01:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 270791065673; Thu, 5 May 2011 08:01:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1596A8FC08; Thu, 5 May 2011 08:01:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4581Ms3089246; Thu, 5 May 2011 08:01:22 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4581Mmr089243; Thu, 5 May 2011 08:01:22 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201105050801.p4581Mmr089243@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 5 May 2011 08:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221485 - vendor-crypto/openssh/5.8p2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 08:01:23 -0000 Author: des Date: Thu May 5 08:01:22 2011 New Revision: 221485 URL: http://svn.freebsd.org/changeset/base/221485 Log: updated 5.8p2 tarball Modified: vendor-crypto/openssh/5.8p2/ChangeLog vendor-crypto/openssh/5.8p2/version.h Modified: vendor-crypto/openssh/5.8p2/ChangeLog ============================================================================== --- vendor-crypto/openssh/5.8p2/ChangeLog Thu May 5 07:59:12 2011 (r221484) +++ vendor-crypto/openssh/5.8p2/ChangeLog Thu May 5 08:01:22 2011 (r221485) @@ -1,6 +1,7 @@ 20110403 - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] [contrib/suse/openssh.spec] Prepare for 5.8p2 release. + - (djm) [version.h] crank version - Release 5.8p2 20110329 Modified: vendor-crypto/openssh/5.8p2/version.h ============================================================================== --- vendor-crypto/openssh/5.8p2/version.h Thu May 5 07:59:12 2011 (r221484) +++ vendor-crypto/openssh/5.8p2/version.h Thu May 5 08:01:22 2011 (r221485) @@ -2,5 +2,5 @@ #define SSH_VERSION "OpenSSH_5.8" -#define SSH_PORTABLE "p1" +#define SSH_PORTABLE "p2" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE From owner-svn-src-all@FreeBSD.ORG Thu May 5 08:04:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4754A106564A; Thu, 5 May 2011 08:04:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35DFB8FC19; Thu, 5 May 2011 08:04:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4584WbK089367; Thu, 5 May 2011 08:04:32 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4584Wn9089365; Thu, 5 May 2011 08:04:32 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201105050804.p4584Wn9089365@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 5 May 2011 08:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221486 - vendor-crypto/openssh/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 08:04:32 -0000 Author: des Date: Thu May 5 08:04:31 2011 New Revision: 221486 URL: http://svn.freebsd.org/changeset/base/221486 Log: Merge from upstream: #include before checking for macros that it defines. Modified: vendor-crypto/openssh/dist/defines.h Modified: vendor-crypto/openssh/dist/defines.h ============================================================================== --- vendor-crypto/openssh/dist/defines.h Thu May 5 08:01:22 2011 (r221485) +++ vendor-crypto/openssh/dist/defines.h Thu May 5 08:04:31 2011 (r221486) @@ -25,7 +25,7 @@ #ifndef _DEFINES_H #define _DEFINES_H -/* $Id: defines.h,v 1.164 2011/01/17 10:15:31 dtucker Exp $ */ +/* $Id: defines.h,v 1.165 2011/05/05 01:19:15 djm Exp $ */ /* Constants */ @@ -45,6 +45,8 @@ enum /* * Definitions for IP type of service (ip_tos) */ +#include +#include #ifndef IPTOS_LOWDELAY # define IPTOS_LOWDELAY 0x10 # define IPTOS_THROUGHPUT 0x08 @@ -56,8 +58,6 @@ enum /* * Definitions for DiffServ Codepoints as per RFC2474 */ -#include -#include #ifndef IPTOS_DSCP_AF11 # define IPTOS_DSCP_AF11 0x28 # define IPTOS_DSCP_AF12 0x30 From owner-svn-src-all@FreeBSD.ORG Thu May 5 08:08:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94DC2106564A; Thu, 5 May 2011 08:08:18 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8398C8FC0A; Thu, 5 May 2011 08:08:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4588InD089554; Thu, 5 May 2011 08:08:18 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4588I6S089551; Thu, 5 May 2011 08:08:18 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201105050808.p4588I6S089551@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 5 May 2011 08:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221487 - head/crypto/openssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 08:08:18 -0000 Author: des Date: Thu May 5 08:08:18 2011 New Revision: 221487 URL: http://svn.freebsd.org/changeset/base/221487 Log: Merge two upstream patches from vendor branch. No functional changes. Modified: head/crypto/openssh/ChangeLog head/crypto/openssh/defines.h Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/ChangeLog ============================================================================== --- head/crypto/openssh/ChangeLog Thu May 5 08:04:31 2011 (r221486) +++ head/crypto/openssh/ChangeLog Thu May 5 08:08:18 2011 (r221487) @@ -1,6 +1,7 @@ 20110403 - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] [contrib/suse/openssh.spec] Prepare for 5.8p2 release. + - (djm) [version.h] crank version - Release 5.8p2 20110329 Modified: head/crypto/openssh/defines.h ============================================================================== --- head/crypto/openssh/defines.h Thu May 5 08:04:31 2011 (r221486) +++ head/crypto/openssh/defines.h Thu May 5 08:08:18 2011 (r221487) @@ -25,7 +25,7 @@ #ifndef _DEFINES_H #define _DEFINES_H -/* $Id: defines.h,v 1.164 2011/01/17 10:15:31 dtucker Exp $ */ +/* $Id: defines.h,v 1.165 2011/05/05 01:19:15 djm Exp $ */ /* Constants */ @@ -45,6 +45,7 @@ enum /* * Definitions for IP type of service (ip_tos) */ +#include #include #ifndef IPTOS_LOWDELAY # define IPTOS_LOWDELAY 0x10 @@ -57,7 +58,6 @@ enum /* * Definitions for DiffServ Codepoints as per RFC2474 */ -#include #ifndef IPTOS_DSCP_AF11 # define IPTOS_DSCP_AF11 0x28 # define IPTOS_DSCP_AF12 0x30 From owner-svn-src-all@FreeBSD.ORG Thu May 5 08:11:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BDC61065670; Thu, 5 May 2011 08:11:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 106978FC12; Thu, 5 May 2011 08:11:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p458BM2l089690; Thu, 5 May 2011 08:11:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p458BMBW089688; Thu, 5 May 2011 08:11:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105050811.p458BMBW089688@svn.freebsd.org> From: Adrian Chadd Date: Thu, 5 May 2011 08:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221488 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 08:11:23 -0000 Author: adrian Date: Thu May 5 08:11:22 2011 New Revision: 221488 URL: http://svn.freebsd.org/changeset/base/221488 Log: Don't perform NF calibration for radio chains which aren't in use: Quoting the ath9k commit message: At present the noise floor calibration is processed in supported control and extension chains rather than required chains. Unnccesarily doing nfcal in all supported chains leads to invalid nf readings on extn chains and these invalid values got updated into history buffer. While loading those values from history buffer is moving the chip to deaf state. This issue was observed in AR9002/AR9003 chips while doing associate/dissociate in HT40 mode and interface up/down in iterative manner. After some iterations, the chip was moved to deaf state. Somehow the pci devices are recovered by poll work after chip reset. Raading the nf values in all supported extension chains when the hw is not yet configured in HT40 mode results invalid values. Reference: https://patchwork.kernel.org/patch/753862/ Obtained from: Linux ath9k Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Thu May 5 08:08:18 2011 (r221487) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Thu May 5 08:11:22 2011 (r221488) @@ -620,9 +620,9 @@ ar5416LoadNF(struct ath_hal *ah, const s HALDEBUG(ah, HAL_DEBUG_NFCAL, "CCA: "); for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) { - /* Don't write to EXT radio CCA registers */ + /* Don't write to EXT radio CCA registers unless in HT/40 mode */ /* XXX this check should really be cleaner! */ - if (i >= 3 && !IEEE80211_IS_CHAN_HT40(chan)) + if (i > 2 && !IEEE80211_IS_CHAN_HT40(chan)) continue; if (chainmask & (1 << i)) { @@ -670,6 +670,12 @@ ar5416LoadNF(struct ath_hal *ah, const s * of next noise floor calibration the baseband does. */ for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) + + /* Don't write to EXT radio CCA registers unless in HT/40 mode */ + /* XXX this check should really be cleaner! */ + if (i > 2 && !IEEE80211_IS_CHAN_HT40(chan)) + continue; + if (chainmask & (1 << i)) { val = OS_REG_READ(ah, ar5416_cca_regs[i]); val &= 0xFFFFFE00; @@ -701,10 +707,12 @@ ar5416InitNfHistBuff(struct ar5212NfCalH * Update the noise floor buffer as a ring buffer */ static void -ar5416UpdateNFHistBuff(struct ar5212NfCalHist *h, int16_t *nfarray) +ar5416UpdateNFHistBuff(struct ath_hal *ah, struct ar5212NfCalHist *h, + int16_t *nfarray) { int i; + /* XXX TODO: don't record nfarray[] entries for inactive chains */ for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) { h[i].nfCalBuffer[h[i].currIndex] = nfarray[i]; @@ -814,7 +822,7 @@ ar5416GetNf(struct ath_hal *ah, struct i } ichan->privFlags |= CHANNEL_MIMO_NF_VALID; - ar5416UpdateNFHistBuff(AH5416(ah)->ah_cal.nfCalHist, nfarray); + ar5416UpdateNFHistBuff(ah, AH5416(ah)->ah_cal.nfCalHist, nfarray); ichan->rawNoiseFloor = nf; } return nf; From owner-svn-src-all@FreeBSD.ORG Thu May 5 09:04:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD4D81065672; Thu, 5 May 2011 09:04:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0F5E8FC15; Thu, 5 May 2011 09:04:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4594nAR091261; Thu, 5 May 2011 09:04:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4594ngZ091258; Thu, 5 May 2011 09:04:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105050904.p4594ngZ091258@svn.freebsd.org> From: Adrian Chadd Date: Thu, 5 May 2011 09:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221489 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 09:04:50 -0000 Author: adrian Date: Thu May 5 09:04:49 2011 New Revision: 221489 URL: http://svn.freebsd.org/changeset/base/221489 Log: Add nvram2env (untested) and geom_map (tested) to PB92. Modified: head/sys/mips/conf/PB92 head/sys/mips/conf/PB92.hints Modified: head/sys/mips/conf/PB92 ============================================================================== --- head/sys/mips/conf/PB92 Thu May 5 08:11:22 2011 (r221488) +++ head/sys/mips/conf/PB92 Thu May 5 09:04:49 2011 (r221489) @@ -6,9 +6,13 @@ # ident PB92 +# XXX The default load address in the Uboot environment is 0x80010000 makeoptions KERNLOADADDR=0x80050000 options HZ=1000 +# The PB92 has 32mb of RAM; hard-code that +options AR71XX_REALMEM=32*1024*1024 + hints "PB92.hints" include "../atheros/std.ar71xx" @@ -21,20 +25,17 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 -options NFSCLIENT #Network Filesystem Client +# options NFSCLIENT #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options ALQ -# options NFS_LEGACYRPC -#options NFS_DEBUG - # Debugging for use in -current -options DEADLKRES -options INVARIANTS -options INVARIANT_SUPPORT -options WITNESS -options WITNESS_SKIPSPIN +#options DEADLKRES +#options INVARIANTS +#options INVARIANT_SUPPORT +#options WITNESS +#options WITNESS_SKIPSPIN options FFS #Berkeley Fast Filesystem #options SOFTUPDATES #Enable FFS soft updates support #options UFS_ACL #Support for access control lists @@ -46,9 +47,13 @@ device geom_uzip options GEOM_UZIP options ROOTDEVNAME=\"ufs:/dev/md0.uzip\" +# PCI bus device pci device ar724x_pci +# NVRAM U-Boot Environment -> Kernel environment +device nvram2env + # Wireless NIC cards options IEEE80211_DEBUG options IEEE80211_SUPPORT_MESH @@ -75,23 +80,42 @@ device ath_rate_sample device mii device arge +# USB devices - PB92 has EHCI only + device usb options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order options USB_DEBUG options USB_HOST_ALIGN=32 device ehci +# Mass storage +device scbus +device umass +device da + +# Read MSDOS formatted disks +options GEOM_PART_BSD +options GEOM_PART_MBR +options MSDOSFS + +# GPIO Bus device gpio device gpioled +# SPI and flash device spibus device ar71xx_spi device mx25l +# The flash is statically partitioned; add in that +device geom_map + device ar71xx_wdog +# Serial device uart +# Network twiddling device loop device ether device md Modified: head/sys/mips/conf/PB92.hints ============================================================================== --- head/sys/mips/conf/PB92.hints Thu May 5 08:11:22 2011 (r221488) +++ head/sys/mips/conf/PB92.hints Thu May 5 09:04:49 2011 (r221489) @@ -9,12 +9,6 @@ hint.uart.0.maddr=0x18020003 hint.uart.0.msize=0x18 hint.uart.0.irq=3 -# ohci -#hint.ohci.0.at="apb0" -#hint.ohci.0.maddr=0x1b000000 -#hint.ohci.0.msize=0x01000000 -#hint.ohci.0.irq=1 - #ehci - note the 0x100 offset for the AR913x/AR724x hint.ehci.0.at="nexus0" hint.ehci.0.maddr=0x1b000100 @@ -67,3 +61,53 @@ hint.mx25l.0.cs=0 # Watchdog hint.ar71xx_wdog.0.at="nexus0" + +# nvram mapping - XXX ? +hint.nvram.0.base=0x1f030000 +hint.nvram.0.maxsize=0x2000 +hint.nvram.0.flags=3 # 1 = No check, 2 = Format Generic +hint.nvram.1.base=0x1f032000 +hint.nvram.1.maxsize=0x4000 +hint.nvram.1.flags=3 # 1 = No check, 2 = Format Generic + +# GEOM_MAP +# +# From my PB92 environment: +# +# mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART) + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00040000 # 256k u-boot +hint.map.0.name="u-boot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00040000 +hint.map.1.end=0x00050000 # 64k u-boot-env +hint.map.1.name="u-boot-env" +hint.map.1.readonly=0 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00050000 +hint.map.2.end=0x00300000 # 2752k rootfs +hint.map.2.name="rootfs" +hint.map.2.readonly=1 + +hint.map.3.at="flash/spi0" +hint.map.3.start=0x00300000 +hint.map.3.end=0x003e0000 # 896k uImage +hint.map.3.name="uImage" +hint.map.3.readonly=0 + +hint.map.4.at="flash/spi0" +hint.map.4.start=0x003e0000 +hint.map.4.end=0x003f0000 # 64k NVRAM +hint.map.4.name="NVRAM" +hint.map.4.readonly=0 + +hint.map.5.at="flash/spi0" +hint.map.5.start=0x003f0000 +hint.map.5.end=0x00400000 # 64k ART +hint.map.5.name="ART" +hint.map.5.readonly=1 From owner-svn-src-all@FreeBSD.ORG Thu May 5 09:55:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F43F106566C; Thu, 5 May 2011 09:55:56 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D84FB8FC0C; Thu, 5 May 2011 09:55:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p459ttWA092760; Thu, 5 May 2011 09:55:55 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p459tt9x092758; Thu, 5 May 2011 09:55:55 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105050955.p459tt9x092758@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 5 May 2011 09:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221490 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 09:55:56 -0000 Author: ae Date: Thu May 5 09:55:55 2011 New Revision: 221490 URL: http://svn.freebsd.org/changeset/base/221490 Log: Formatting fixes: o Fix date o Break sentences o Remove trailing whitespaces o Sort xrefs by section number Requested by: ru MFC after: 2 weeks Modified: head/share/man/man9/make_dev.9 Modified: head/share/man/man9/make_dev.9 ============================================================================== --- head/share/man/man9/make_dev.9 Thu May 5 09:04:49 2011 (r221489) +++ head/share/man/man9/make_dev.9 Thu May 5 09:55:55 2011 (r221490) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 03, 2011 +.Dd May 3, 2011 .Dt MAKE_DEV 9 .Os .Sh NAME @@ -84,15 +84,15 @@ The device will be owned by .Va uid , with the group ownership as .Va gid . -The name is the expansion of -.Va fmt +The name is the expansion of +.Va fmt and following arguments as .Xr printf 9 would print it. The name determines its path under .Pa /dev -or other -.Xr devfs 5 +or other +.Xr devfs 5 mount point and may contain slash .Ql / characters to denote subdirectories. @@ -152,9 +152,9 @@ created device will be never destroyed return an error if the device name is invalid or already exists .El .Pp -Only +Only .Dv MAKEDEV_NOWAIT , -.Dv MAKEDEV_WAITOK +.Dv MAKEDEV_WAITOK and .Dv MAKEDEV_CHECKNAME values are accepted for the @@ -307,7 +307,8 @@ The .Fn d_close driver method cannot call .Fn destroy_dev -directly. Doing so causes deadlock when +directly. +Doing so causes deadlock when .Fn destroy_dev waits for all threads to leave the driver methods. Also, because @@ -321,7 +322,8 @@ The device driver may call the .Fn destroy_dev_drain function to wait until all devices that have supplied .Fa csw -as cdevsw, are destroyed. This is useful when driver knows that +as cdevsw, are destroyed. +This is useful when driver knows that .Fn destroy_dev_sched is called for all instantiated devices, but need to postpone module unload until @@ -370,9 +372,9 @@ flag was specified and the provided devi .Pp .Sh SEE ALSO .Xr devctl 4 , +.Xr devfs 5 , .Xr destroy_dev_drain 9 , -.Xr dev_clone 9 , -.Xr devfs 5 +.Xr dev_clone 9 .Sh HISTORY The .Fn make_dev From owner-svn-src-all@FreeBSD.ORG Thu May 5 09:59:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB2D1065670; Thu, 5 May 2011 09:59:10 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id E77B58FC0A; Thu, 5 May 2011 09:59:09 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id p459fU6O087015; Thu, 5 May 2011 11:41:30 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id p459fUnL087014; Thu, 5 May 2011 11:41:30 +0200 (CEST) (envelope-from marius) Date: Thu, 5 May 2011 11:41:30 +0200 From: Marius Strobl To: Nathan Whitehorn Message-ID: <20110505094130.GG63055@alchemy.franken.de> References: <201105042341.p44NfBMZ072133@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105042341.p44NfBMZ072133@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221466 - in head/release: . amd64 i386 pc98 sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 09:59:10 -0000 On Wed, May 04, 2011 at 11:41:11PM +0000, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Wed May 4 23:41:11 2011 > New Revision: 221466 > URL: http://svn.freebsd.org/changeset/base/221466 > > Log: > Repair release CD generation on PC98 and sun4v after release building > changes, and backport the new logic (ISO images are TARGET dependant, not > TARGET_CPUARCH dependant) to Makefile.sysinstall. While modifying ISO > image scripts, change several archs to use makefs (from base) instead of > mkisofs (from ports) which makes release CD generation both faster and > self-hosting. > Is there any reason not to MFC the makefs part? This would allow to remove some nasty and problematic hacks from the cdrtools ports needed to allow cross-building of i386 releases on amd64 (TARGET and TARGET_ARCH set to i386 are passed to the port, although an amd64 mkisofs binary is required in this case). Btw., it looks like you may remove $publisher now. Marius From owner-svn-src-all@FreeBSD.ORG Thu May 5 10:17:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61475106564A; Thu, 5 May 2011 10:17:08 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50BBD8FC18; Thu, 5 May 2011 10:17:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45AH82W095496; Thu, 5 May 2011 10:17:08 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45AH8q0095494; Thu, 5 May 2011 10:17:08 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105051017.p45AH8q0095494@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 5 May 2011 10:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221491 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 10:17:08 -0000 Author: ru Date: Thu May 5 10:17:08 2011 New Revision: 221491 URL: http://svn.freebsd.org/changeset/base/221491 Log: [mdoc] remove a hard sentence break. Modified: head/usr.bin/nfsstat/nfsstat.1 Modified: head/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- head/usr.bin/nfsstat/nfsstat.1 Thu May 5 09:55:55 2011 (r221490) +++ head/usr.bin/nfsstat/nfsstat.1 Thu May 5 10:17:08 2011 (r221491) @@ -66,7 +66,8 @@ instead of the default Extract the name list from the specified system instead of the default .Pa /boot/kernel/kernel . .It Fl o -Report statistics for the old NFS client and/or server. Without this +Report statistics for the old NFS client and/or server. +Without this option statistics for the new NFS client and/or server will be reported. .It Fl s Only display server side statistics. From owner-svn-src-all@FreeBSD.ORG Thu May 5 10:17:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 294D81065675; Thu, 5 May 2011 10:17:50 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18E1D8FC22; Thu, 5 May 2011 10:17:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45AHnkY095554; Thu, 5 May 2011 10:17:50 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45AHnQo095552; Thu, 5 May 2011 10:17:49 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105051017.p45AHnQo095552@svn.freebsd.org> From: Ruslan Ermilov Date: Thu, 5 May 2011 10:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221492 - head/usr.bin/nfsstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 10:17:50 -0000 Author: ru Date: Thu May 5 10:17:49 2011 New Revision: 221492 URL: http://svn.freebsd.org/changeset/base/221492 Log: - Add a forgotten -o to usage(). - Sync usage() with manpage's SYNOPSIS. Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Thu May 5 10:17:08 2011 (r221491) +++ head/usr.bin/nfsstat/nfsstat.c Thu May 5 10:17:49 2011 (r221492) @@ -646,7 +646,7 @@ void usage(void) { (void)fprintf(stderr, - "usage: nfsstat [-ceszW] [-M core] [-N system] [-w interval]\n"); + "usage: nfsstat [-ceoszW] [-M core] [-N system] [-w wait]\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Thu May 5 10:47:25 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0F821065673; Thu, 5 May 2011 10:47:25 +0000 (UTC) (envelope-from vadim@nuclight.avtf.net) Received: from nuclight.avtf.net (nuclight.avtf.net [82.117.70.99]) by mx1.freebsd.org (Postfix) with ESMTP id E85EC8FC0A; Thu, 5 May 2011 10:47:22 +0000 (UTC) Received: from kernblitz.nuclight.avtf.net (vadim@localhost [127.0.0.1]) by nuclight.avtf.net (8.14.4/8.14.4) with ESMTP id p45AlIjL002138; Thu, 5 May 2011 17:47:18 +0700 (NOVST) (envelope-from vadim@kernblitz.nuclight.avtf.net) Received: (from vadim@localhost) by kernblitz.nuclight.avtf.net (8.14.4/8.14.4/Submit) id p45AlG4N002135; Thu, 5 May 2011 17:47:16 +0700 (NOVST) (envelope-from vadim) Message-Id: <201105051047.p45AlG4N002135@kernblitz.nuclight.avtf.net> To: "David E. O'Brien" From: Vadim Goncharov In-Reply-To: =?UTF-8?Q?=3C201105050043=2Ep450htBe074117=5F=5F7307=2E9683?= =?UTF-8?Q?5055134=241304556289=24gmane=24org=40svn=2Efreebsd=2Eorg=3E?= References: <201105050043.p450htBe074117__7307.96835055134$1304556289$gmane$org@svn.freebsd.org> X-Comment-To: David E. O'Brien Date: Thu, 5 May 2011 17:47:16 +0700 User-Agent: slrn/0.9.9p1 (FreeBSD) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-all@FreeBSD.org Subject: Re: svn commit: r221469 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 10:47:26 -0000 Hi David E. O'Brien! On Thu, 5 May 2011 00:43:55 +0000 (UTC); David E. O'Brien wrote: > Author: obrien > Date: Thu May 5 00:43:55 2011 > New Revision: 221469 > URL: http://svn.freebsd.org/changeset/base/221469 > Log: > Correct the kernel config name printed out during install. > > PR: 156579 > Submitted by: dhw > Modified: > head/Makefile.inc1 > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Thu May 5 00:43:40 2011 (r221468) > +++ head/Makefile.inc1 Thu May 5 00:43:55 2011 (r221469) > @@ -868,7 +868,7 @@ reinstallkernel reinstallkernel.debug: i > false > .endif > @echo "--------------------------------------------------------------" > - @echo ">>> Installing kernel ${KERNCONF}" > + @echo ">>> Installing kernel ${INSTALLKERNEL}" Thanks! -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-svn-src-all@FreeBSD.ORG Thu May 5 10:57:55 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AB101065670 for ; Thu, 5 May 2011 10:57:55 +0000 (UTC) (envelope-from vadim@nuclight.avtf.net) Received: from nuclight.avtf.net (nuclight.avtf.net [82.117.70.99]) by mx1.freebsd.org (Postfix) with ESMTP id 702AC8FC18 for ; Thu, 5 May 2011 10:57:53 +0000 (UTC) Received: from kernblitz.nuclight.avtf.net (vadim@localhost [127.0.0.1]) by nuclight.avtf.net (8.14.4/8.14.4) with ESMTP id p45AvRlc002179; Thu, 5 May 2011 17:57:27 +0700 (NOVST) (envelope-from vadim@kernblitz.nuclight.avtf.net) Received: (from vadim@localhost) by kernblitz.nuclight.avtf.net (8.14.4/8.14.4/Submit) id p45AvPKn002176; Thu, 5 May 2011 17:57:25 +0700 (NOVST) (envelope-from vadim) Message-Id: <201105051057.p45AvPKn002176@kernblitz.nuclight.avtf.net> To: David Wolfskill From: Vadim Goncharov In-Reply-To: =?UTF-8?Q?=3C20110504183505=2EGD2037=5F=5F2728=2E7316196181?= =?UTF-8?Q?5=241304535948=24gmane=24org=40albert=2Ecatwhisker=2Eorg=3E?= References: <201104221710.p3MHApbu051050__38279.4176498011$1303492287$gmane$org@svn.freebsd.org> <201105030741.p437fBOa030879@kernblitz.nuclight.avtf.net> <20110504170442.GC57373@dragon.NUXI.org> <20110504183505.GD2037__2728.73161961815$1304535948$gmane$org@albert.catwhisker.org> X-Comment-To: David Wolfskill Date: Thu, 5 May 2011 17:57:25 +0700 User-Agent: slrn/0.9.9p1 (FreeBSD) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-all@FreeBSD.org Subject: Re: svn commit: r220954 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: svn-src-all@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 10:57:55 -0000 Hi David Wolfskill! On Wed, 4 May 2011 11:35:05 -0700; David Wolfskill wrote: >>>> PR: 156579 >>>> Submitted by: dhw >> [..]=20 >>> I have lines like the following in /etc/make.conf on some hosts: >>>=20 >>> # build specified kernels by default and install first of them >>> KERNCONF?=3DROUTER GENERIC >>> and do just cd /usr/src && make buildkernel >>> Will this patch print the correct first kernel, or this will be entire = > list? >>=20 >> Hi Vadim, >> There seems to be a bug in r220954. dhw is taking a look at it. > Yeah, it was the whole list; sorry. It should have been > ${INSTALLKERNEL} -- as in: > At least, that seems to work for me. I would hardly object to a reality > check. :-} I just don't know makefiles internals deeply (some voodoo there) - KERNCONF may have been replaced by only element at this point, preferred to ask. -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-svn-src-all@FreeBSD.ORG Thu May 5 12:52:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FD431065673; Thu, 5 May 2011 12:52:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C0988FC12; Thu, 5 May 2011 12:52:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45Cq6et000118; Thu, 5 May 2011 12:52:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45Cq6EE000116; Thu, 5 May 2011 12:52:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105051252.p45Cq6EE000116@svn.freebsd.org> From: Xin LI Date: Thu, 5 May 2011 12:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221493 - stable/8/sys/dev/coretemp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 12:52:06 -0000 Author: delphij Date: Thu May 5 12:52:05 2011 New Revision: 221493 URL: http://svn.freebsd.org/changeset/base/221493 Log: MFC r221335: Correct a typo. According to Intel document 318914, the Tj(max) for Core 2 Duo Mobile CPUs should be 105. Noticed by: Mark Johnston Modified: stable/8/sys/dev/coretemp/coretemp.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/coretemp/coretemp.c ============================================================================== --- stable/8/sys/dev/coretemp/coretemp.c Thu May 5 10:17:49 2011 (r221492) +++ stable/8/sys/dev/coretemp/coretemp.c Thu May 5 12:52:05 2011 (r221493) @@ -192,7 +192,7 @@ coretemp_attach(device_t dev) } else if (cpu_model == 0x17) { switch (cpu_stepping) { case 0x6: /* Mobile Core 2 Duo */ - sc->sc_tjmax = 104; + sc->sc_tjmax = 105; break; default: /* Unknown stepping */ break; From owner-svn-src-all@FreeBSD.ORG Thu May 5 13:02:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD250106564A; Thu, 5 May 2011 13:02:49 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 68F7C8FC16; Thu, 5 May 2011 13:02:48 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 1184F45E5C; Thu, 5 May 2011 15:02:47 +0200 (CEST) Received: from localhost (public-gprs14895.centertel.pl [87.96.58.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 33F1C45684; Thu, 5 May 2011 15:02:38 +0200 (CEST) Date: Thu, 5 May 2011 15:02:11 +0200 From: Pawel Jakub Dawidek To: "Andrey V. Elsukov" Message-ID: <20110505130211.GB14661@garage.freebsd.pl> References: <201105031855.p43ItGoP006893@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b5gNqxB1S1yM7hjW" Content-Disposition: inline In-Reply-To: <201105031855.p43ItGoP006893@svn.freebsd.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.5 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221398 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 13:02:49 -0000 --b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 03, 2011 at 06:55:16PM +0000, Andrey V. Elsukov wrote: > Author: ae > Date: Tue May 3 18:55:16 2011 > New Revision: 221398 > URL: http://svn.freebsd.org/changeset/base/221398 >=20 > Log: > Document make_dev_alias_p(). You should also add it to MLINKS in share/man/man9/Makefile. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --b5gNqxB1S1yM7hjW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk3Cn9IACgkQForvXbEpPzRctwCfRESNOV4rTTNjK1msOUuzULZ8 uoQAn1vUtrbUcL/F/z3dM4fG36Gg6nMF =AHx2 -----END PGP SIGNATURE----- --b5gNqxB1S1yM7hjW-- From owner-svn-src-all@FreeBSD.ORG Thu May 5 13:13:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23936106566B; Thu, 5 May 2011 13:13:22 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id B98768FC13; Thu, 5 May 2011 13:13:21 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 70E9145EA7; Thu, 5 May 2011 15:13:17 +0200 (CEST) Received: from localhost (public-gprs14895.centertel.pl [87.96.58.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 77AF545684; Thu, 5 May 2011 15:13:09 +0200 (CEST) Date: Thu, 5 May 2011 15:12:43 +0200 From: Pawel Jakub Dawidek To: "Andrey V. Elsukov" Message-ID: <20110505131242.GC14661@garage.freebsd.pl> References: <201105041806.p44I6edT061463@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TYecfFk8j8mZq+dy" Content-Disposition: inline In-Reply-To: <201105041806.p44I6edT061463@svn.freebsd.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.5 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221449 - head/sys/geom/journal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 13:13:22 -0000 --TYecfFk8j8mZq+dy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 04, 2011 at 06:06:40PM +0000, Andrey V. Elsukov wrote: > Author: ae > Date: Wed May 4 18:06:40 2011 > New Revision: 221449 > URL: http://svn.freebsd.org/changeset/base/221449 >=20 > Log: > Removed KASSERT, g_new_providerf() can not fail. Well, the assertion was there to prepare us for times when g_new_providerf() will be able to fail. I was suspecting we might want to make g_new_providerf() to fail when the given name is already in use. In such case we use to create two identical entries in /dev/, not sure what we do now (panic?). > Modified: > head/sys/geom/journal/g_journal.c >=20 > Modified: head/sys/geom/journal/g_journal.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/geom/journal/g_journal.c Wed May 4 17:58:15 2011 (r221448) > +++ head/sys/geom/journal/g_journal.c Wed May 4 18:06:40 2011 (r221449) > @@ -2097,7 +2097,6 @@ g_journal_worker(void *arg) > gp =3D sc->sc_geom; > g_topology_lock(); > pp =3D g_new_providerf(gp, "%s.journal", sc->sc_name); > - KASSERT(pp !=3D NULL, ("Cannot create %s.journal.", sc->sc_name)); > pp->mediasize =3D sc->sc_mediasize; > /* > * There could be a problem when data provider and journal providers --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --TYecfFk8j8mZq+dy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk3CokoACgkQForvXbEpPzT5ogCfWqb2IW6BXrsddEg9DjDZzapA bGkAnjZiOhJL4t2TWFyS39p0NGOZfW/h =B+bh -----END PGP SIGNATURE----- --TYecfFk8j8mZq+dy-- From owner-svn-src-all@FreeBSD.ORG Thu May 5 13:53:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 217CF106566B; Thu, 5 May 2011 13:53:05 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id E2BAA8FC0C; Thu, 5 May 2011 13:53:04 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0LKQ00G0C6KFF600@smtpauth1.wiscmail.wisc.edu>; Thu, 05 May 2011 08:53:03 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.65.155]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0LKQ00FHY6K92J00@smtpauth1.wiscmail.wisc.edu>; Thu, 05 May 2011 08:52:58 -0500 (CDT) Date: Thu, 05 May 2011 08:52:56 -0500 From: Nathan Whitehorn In-reply-to: <20110505094130.GG63055@alchemy.franken.de> To: Marius Strobl Message-id: <4DC2ABB8.3090601@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.65.155 X-Spam-PmxInfo: Server=avs-11, Version=5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.5.5.133920, SenderIP=76.210.65.155 References: <201105042341.p44NfBMZ072133@svn.freebsd.org> <20110505094130.GG63055@alchemy.franken.de> User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221466 - in head/release: . amd64 i386 pc98 sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 13:53:05 -0000 On 05/05/11 04:41, Marius Strobl wrote: > On Wed, May 04, 2011 at 11:41:11PM +0000, Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Wed May 4 23:41:11 2011 >> New Revision: 221466 >> URL: http://svn.freebsd.org/changeset/base/221466 >> >> Log: >> Repair release CD generation on PC98 and sun4v after release building >> changes, and backport the new logic (ISO images are TARGET dependant, not >> TARGET_CPUARCH dependant) to Makefile.sysinstall. While modifying ISO >> image scripts, change several archs to use makefs (from base) instead of >> mkisofs (from ports) which makes release CD generation both faster and >> self-hosting. >> > Is there any reason not to MFC the makefs part? This would allow > to remove some nasty and problematic hacks from the cdrtools ports > needed to allow cross-building of i386 releases on amd64 (TARGET > and TARGET_ARCH set to i386 are passed to the port, although an > amd64 mkisofs binary is required in this case). > Btw., it looks like you may remove $publisher now. No, none. The whole commit can be MFC'ed back to 7.x, actually, and I'd like to do that. I was hoping to convert sparc64 and ia64 as well and make a clean sweep of it, but at least sparc64 will require some work analogous to what I did for PPC. Thanks for reminding me about the $publisher -- there's also some stray debugging code in the PPC one that crept in. -Nathan From owner-svn-src-all@FreeBSD.ORG Thu May 5 13:55:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 174671065672; Thu, 5 May 2011 13:55:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC1258FC16; Thu, 5 May 2011 13:55:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45Dthp8002176; Thu, 5 May 2011 13:55:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45Dtheu002171; Thu, 5 May 2011 13:55:43 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105051355.p45Dtheu002171@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 5 May 2011 13:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221494 - in head/release: amd64 i386 pc98 powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 13:55:44 -0000 Author: nwhitehorn Date: Thu May 5 13:55:43 2011 New Revision: 221494 URL: http://svn.freebsd.org/changeset/base/221494 Log: Garbage collect some unused variables and stray debug code. Submitted by: marius Modified: head/release/amd64/mkisoimages.sh head/release/i386/mkisoimages.sh head/release/pc98/mkisoimages.sh head/release/powerpc/mkisoimages.sh Modified: head/release/amd64/mkisoimages.sh ============================================================================== --- head/release/amd64/mkisoimages.sh Thu May 5 12:52:05 2011 (r221493) +++ head/release/amd64/mkisoimages.sh Thu May 5 13:55:43 2011 (r221494) @@ -23,7 +23,6 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. -publisher="The FreeBSD Project. http://www.freebsd.org/" if [ "x$1" = "x-b" ]; then # This is highly x86-centric and will be used directly below. bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" Modified: head/release/i386/mkisoimages.sh ============================================================================== --- head/release/i386/mkisoimages.sh Thu May 5 12:52:05 2011 (r221493) +++ head/release/i386/mkisoimages.sh Thu May 5 13:55:43 2011 (r221494) @@ -23,7 +23,6 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. -publisher="The FreeBSD Project. http://www.freebsd.org/" if [ "x$1" = "x-b" ]; then # This is highly x86-centric and will be used directly below. bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot" Modified: head/release/pc98/mkisoimages.sh ============================================================================== --- head/release/pc98/mkisoimages.sh Thu May 5 12:52:05 2011 (r221493) +++ head/release/pc98/mkisoimages.sh Thu May 5 13:55:43 2011 (r221494) @@ -23,7 +23,6 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. -publisher="The FreeBSD Project. http://www.freebsd.org/" if [ "x$1" = "x-b" ]; then # This is highly x86-centric and will be used directly below. bootable="-o generic-bootimage=$4/boot/cdboot" Modified: head/release/powerpc/mkisoimages.sh ============================================================================== --- head/release/powerpc/mkisoimages.sh Thu May 5 12:52:05 2011 (r221493) +++ head/release/powerpc/mkisoimages.sh Thu May 5 13:55:43 2011 (r221494) @@ -23,13 +23,11 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. -publisher="The FreeBSD Project. http://www.freebsd.org/" if [ "x$1" = "x-b" ]; then uudecode -o /tmp/hfs-boot-block.bz2 `dirname $0`/hfs-boot.bz2.uu bzip2 -d /tmp/hfs-boot-block.bz2 OFFSET=$(hd /tmp/hfs-boot-block | grep 'Loader START' | cut -f 1 -d ' ') OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') - echo dd if=$4/boot/loader of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc dd if=$4/boot/loader of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc bootable="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot" From owner-svn-src-all@FreeBSD.ORG Thu May 5 14:05:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F3DB106564A; Thu, 5 May 2011 14:05:23 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6DD538FC18; Thu, 5 May 2011 14:05:21 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAH2twk2DaFvO/2dsb2JhbACEUKJdtCqRL4EqhF0Ej0qHGodR X-IronPort-AV: E=Sophos;i="4.64,319,1301889600"; d="scan'208";a="121337347" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 05 May 2011 09:54:13 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 47929B3F2B; Thu, 5 May 2011 09:54:13 -0400 (EDT) Date: Thu, 5 May 2011 09:54:13 -0400 (EDT) From: Rick Macklem To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Message-ID: <942285768.1045464.1304603653229.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <86r58dsi0m.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 14:05:23 -0000 > Rick Macklem writes: > > "Dag-Erling Sm=C3=B8rgrav" writes: > > > Ideally, both the old and the new NFS stack would use the same > > > fstypes and sysctl names, but I don't know if there's any way we > > > can > > > prevent someone from compiling both into the kernel at the same > > > time, or loading both modules. > > If the scripts in /etc/rc.d are fixed to use the correct sysctl > > naming, > > do you think it matters which one is "vfs.nfs."? >=20 > Yes. There is a whole world outside the base system: munin, webmin, > nagios etc. Are you going to change all of them as well? >=20 Well, another way it could be handled would be to put the sysctls and the global variables they manipulate in a module shared by both clients, like sys/nfs/nfs_lock.c (module "nfslock"). Then the same sysctl would affect both clients. (I hesitate to create "yet another" module just to share the sysctls, but since "nfslock" is used by both clients, it should work ok, I think.) What do you think of that? If anyone else reading this has an idea/opinion, please let us know. rick From owner-svn-src-all@FreeBSD.ORG Thu May 5 14:13:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 254FC106566C; Thu, 5 May 2011 14:13:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1112E8FC16; Thu, 5 May 2011 14:13:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45ED8j1002901; Thu, 5 May 2011 14:13:08 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45ED8lO002899; Thu, 5 May 2011 14:13:08 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105051413.p45ED8lO002899@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 5 May 2011 14:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221496 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 14:13:09 -0000 Author: ae Date: Thu May 5 14:13:08 2011 New Revision: 221496 URL: http://svn.freebsd.org/changeset/base/221496 Log: Add make_dev_alias_p to MLINKS. Pointed out by: pjd MFC after: 2 weeks Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu May 5 14:05:29 2011 (r221495) +++ head/share/man/man9/Makefile Thu May 5 14:13:08 2011 (r221496) @@ -781,6 +781,7 @@ MLINKS+=make_dev.9 destroy_dev.9 \ make_dev.9 destroy_dev_sched_cb.9 \ make_dev.9 dev_depends.9 \ make_dev.9 make_dev_alias.9 \ + make_dev.9 make_dev_alias_p.9 \ make_dev.9 make_dev_cred.9 \ make_dev.9 make_dev_credf.9 \ make_dev.9 make_dev_p.9 From owner-svn-src-all@FreeBSD.ORG Thu May 5 14:13:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B940106576A; Thu, 5 May 2011 14:13:16 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward3.mail.yandex.net (forward3.mail.yandex.net [77.88.46.8]) by mx1.freebsd.org (Postfix) with ESMTP id D0E808FC1E; Thu, 5 May 2011 14:13:14 +0000 (UTC) Received: from smtp3.mail.yandex.net (smtp3.mail.yandex.net [77.88.46.103]) by forward3.mail.yandex.net (Yandex) with ESMTP id F0177B42EF7; Thu, 5 May 2011 18:02:11 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1304604132; bh=z+KZiG7g9ZOaP/oSBepFHT1ck8+woazHvvwEBWQX3rg=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=KNST2gkAp+cTKk4z7fnQqyoiBHHmo4+iBb6cekiKR0sJUYYk3Hf2RjUeTaP39K9OP YBPnbeLJRSmcf6k061MW5R0xmSR/d7dzfhYe1zdwEuH3vIlLcLwaqFo7WiYhCqQ4jd SKefz7i7au4myAzcYZ9/TvVaZhskBxx1nvJo3fiQ= Received: from [178.141.5.18] (dynamic-178-141-5-18.kirov.comstar-r.ru [178.141.5.18]) by smtp3.mail.yandex.net (Yandex) with ESMTPSA id 92AB96980076; Thu, 5 May 2011 18:02:11 +0400 (MSD) Message-ID: <4DC2ADDD.6040409@yandex.ru> Date: Thu, 05 May 2011 18:02:05 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201105041806.p44I6edT061463@svn.freebsd.org> <20110505131242.GC14661@garage.freebsd.pl> In-Reply-To: <20110505131242.GC14661@garage.freebsd.pl> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFD4604761B4CDB2D5D3E7B29" X-Yandex-Spam: 1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221449 - head/sys/geom/journal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 14:13:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFD4604761B4CDB2D5D3E7B29 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 05.05.2011 17:12, Pawel Jakub Dawidek wrote: >> New Revision: 221449 >> URL: http://svn.freebsd.org/changeset/base/221449 >> >> Log: >> Removed KASSERT, g_new_providerf() can not fail. >=20 > Well, the assertion was there to prepare us for times when > g_new_providerf() will be able to fail. I was suspecting we might want > to make g_new_providerf() to fail when the given name is already in use= =2E I think such change will break all code we have now :) But now when it can not fail, KASSERT could slightly confuse those who read code as example. > In such case we use to create two identical entries in /dev/, not sure > what we do now (panic?). geom_dev prints out an error message. --=20 WBR, Andrey V. Elsukov --------------enigFD4604761B4CDB2D5D3E7B29 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBAgAGBQJNwq3dAAoJEAHF6gQQyKF6nF4H/RtUjvQz+7UzpR1s2u+uKq1w D9K/jxbJUY4WWErMPnbVOWH5jp1MsKQcuww1Vjj1SsI8SLQ+3sL7ErBSzvUwcMnq wiJnW3fwKgCokpBNaEmHs4Iu+jo67JS/R3cYwvYsXHG/e9fCSJxZKLh3ENl4peSX taUoxKdGWCjhPAKqabf6oydPWCVUXj39nLNdeleLd44jM5eWpFPhKvRrYWlcJ/7V 5lm2edEppzX5DOL1ZUuBJZVhk9oXcNfqtffwiLu70xMWt2QtNntcoq1kcn41yvNq YJvCrnxYcDv5/yUIXgYyL1t/7ypSY5u2w90E1/L2ZBX6ORLD8RWIIKtXSgkX43Q= =7ydh -----END PGP SIGNATURE----- --------------enigFD4604761B4CDB2D5D3E7B29-- From owner-svn-src-all@FreeBSD.ORG Thu May 5 14:16:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68A2E106566C; Thu, 5 May 2011 14:16:41 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53CB48FC0C; Thu, 5 May 2011 14:16:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45EGfuu003039; Thu, 5 May 2011 14:16:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45EGfcd003037; Thu, 5 May 2011 14:16:41 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105051416.p45EGfcd003037@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 5 May 2011 14:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221497 - head/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 14:16:41 -0000 Author: nwhitehorn Date: Thu May 5 14:16:40 2011 New Revision: 221497 URL: http://svn.freebsd.org/changeset/base/221497 Log: Convert IA64 ISO script to use makefs instead of mkisofs. Modified: head/release/ia64/mkisoimages.sh Modified: head/release/ia64/mkisoimages.sh ============================================================================== --- head/release/ia64/mkisoimages.sh Thu May 5 14:13:08 2011 (r221496) +++ head/release/ia64/mkisoimages.sh Thu May 5 14:16:40 2011 (r221497) @@ -41,27 +41,6 @@ LABEL=$1; shift NAME=$1; shift BASE=$1; shift -MKISOFS=mkisofs -MKISOFS_PKG=cdrtools -MKISOFS_PORT=/usr/ports/sysutils/${MKISOFS_PKG} - -if ! which ${MKISOFS} > /dev/null; then - echo -n "${MKISOFS}(8) does not exist: " - if [ -f ${MKISOFS_PORT}/Makefile ]; then - echo building the port... - if ! (cd ${MKISOFS_PORT} && make install BATCH=yes && make clean); then - echo "error: cannot build ${MKISOFS}(8). Bailing out..." - exit 2 - fi - else - echo fetching the package... - if ! pkg_add -r ${MKISOFS_PKG}; then - echo "error: cannot fetch ${MKISOFS}(8). Bailing out..." - exit 2 - fi - fi -fi - EFIPART=efipart.sys # To create a bootable CD under EFI, the boot image should be an EFI @@ -84,15 +63,13 @@ if [ $bootable = yes ]; then mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi umount $MNT mdconfig -d -u $md - BOOTOPTS="-b $EFIPART -no-emul-boot" + BOOTOPTS="-b bootimage=i386;$EFIPART -o no-emul-boot" else BOOTOPTS="" fi -publisher="The FreeBSD Project. http://www.freebsd.org/" - echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -$MKISOFS $BOOTOPTS -r -J -V $LABEL -publisher "$publisher" -o $NAME $BASE $* +makefs -t cd9660 $BOOTOPTS -o rockridge -o label=$LABEL $NAME $BASE $* rm -f $BASE/$EFIPART rm $1/etc/fstab exit 0 From owner-svn-src-all@FreeBSD.ORG Thu May 5 14:19:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18CEA106566C; Thu, 5 May 2011 14:19:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 032A08FC14; Thu, 5 May 2011 14:19:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45EJbiC003182; Thu, 5 May 2011 14:19:37 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45EJbFR003180; Thu, 5 May 2011 14:19:37 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105051419.p45EJbFR003180@svn.freebsd.org> From: Rick Macklem Date: Thu, 5 May 2011 14:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221498 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 14:19:38 -0000 Author: rmacklem Date: Thu May 5 14:19:37 2011 New Revision: 221498 URL: http://svn.freebsd.org/changeset/base/221498 Log: MFC: r220928 Remove the nm_mtx mutex locking from the test for nm_maxfilesize. This value rarely, if ever, changes and the nm_mtx mutex is locked/unlocked earlier in the function, which should be sufficient to avoid getting a stale cached value for it. There is a discussion w.r.t. what these tests should be, but I've left them basically the same as the regular NFS client for now. Modified: stable/8/sys/fs/nfsclient/nfs_clbio.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/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clbio.c Thu May 5 14:16:40 2011 (r221497) +++ stable/8/sys/fs/nfsclient/nfs_clbio.c Thu May 5 14:19:37 2011 (r221498) @@ -943,12 +943,8 @@ flush_and_restart: if (uio->uio_offset < 0) return (EINVAL); tmp_off = uio->uio_offset + uio->uio_resid; - mtx_lock(&nmp->nm_mtx); - if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) { - mtx_unlock(&nmp->nm_mtx); + if (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset) return (EFBIG); - } - mtx_unlock(&nmp->nm_mtx); if (uio->uio_resid == 0) return (0); From owner-svn-src-all@FreeBSD.ORG Thu May 5 14:43:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A198106564A; Thu, 5 May 2011 14:43:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 835348FC1C; Thu, 5 May 2011 14:43:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45Eh96Z003928; Thu, 5 May 2011 14:43:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45Eh9Kh003926; Thu, 5 May 2011 14:43:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105051443.p45Eh9Kh003926@svn.freebsd.org> From: Adrian Chadd Date: Thu, 5 May 2011 14:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221500 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 14:43:09 -0000 Author: adrian Date: Thu May 5 14:43:09 2011 New Revision: 221500 URL: http://svn.freebsd.org/changeset/base/221500 Log: Updates to geom_map from the author. The major update here is to support 64 bit size/offsets. There's also style related changes. Submitted by: ray@dlink.ua Modified: head/sys/geom/geom_map.c Modified: head/sys/geom/geom_map.c ============================================================================== --- head/sys/geom/geom_map.c Thu May 5 14:39:14 2011 (r221499) +++ head/sys/geom/geom_map.c Thu May 5 14:43:09 2011 (r221500) @@ -43,81 +43,73 @@ __FBSDID("$FreeBSD$"); #include #include #include - #include + #include #include -#define MAP_CLASS_NAME "MAP" - -struct map_desc { - uint8_t name [16]; /* null-terminated name */ - uint32_t offset; /* offset in flash */ - uint32_t addr; /* address in memory */ - uint32_t size; /* image size in bytes */ - uint32_t entry; /* offset in image for entry point */ - uint32_t dsize; /* data size in bytes */ -}; - +#define MAP_CLASS_NAME "MAP" #define MAP_MAXSLICE 64 +#define MAP_MAX_MARKER_LEN 64 struct g_map_softc { - uint32_t entry [MAP_MAXSLICE]; - uint32_t dsize [MAP_MAXSLICE]; - uint8_t readonly[MAP_MAXSLICE]; - g_access_t *parent_access; + off_t offset[MAP_MAXSLICE]; /* offset in flash */ + off_t size[MAP_MAXSLICE]; /* image size in bytes */ + off_t entry[MAP_MAXSLICE]; + off_t dsize[MAP_MAXSLICE]; + uint8_t readonly[MAP_MAXSLICE]; + g_access_t *parent_access; }; static int -g_map_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) -{ - return (ENOIOCTL); -} - -static int g_map_access(struct g_provider *pp, int dread, int dwrite, int dexcl) { - struct g_geom *gp = pp->geom; - struct g_slicer *gsp = gp->softc; - struct g_map_softc *sc = gsp->softc; + struct g_geom *gp; + struct g_slicer *gsp; + struct g_map_softc *sc; + + gp = pp->geom; + gsp = gp->softc; + sc = gsp->softc; if (dwrite > 0 && sc->readonly[pp->index]) return (EPERM); + return (sc->parent_access(pp, dread, dwrite, dexcl)); - /* - * no (sc->parent_access(pp, dread, dwrite, dexcl));, - * We need to have way for update flash - */ } static int g_map_start(struct bio *bp) { struct g_provider *pp; - struct g_geom *gp; + struct g_geom *gp; struct g_map_softc *sc; struct g_slicer *gsp; - int idx; + int idx; pp = bp->bio_to; idx = pp->index; gp = pp->geom; gsp = gp->softc; sc = gsp->softc; + if (bp->bio_cmd == BIO_GETATTR) { if (g_handleattr_int(bp, MAP_CLASS_NAME "::entry", - sc->entry[idx])) + sc->entry[idx])) { return (1); + } if (g_handleattr_int(bp, MAP_CLASS_NAME "::dsize", - sc->dsize[idx])) + sc->dsize[idx])) { return (1); + } } + return (0); } static void g_map_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp) + struct g_consumer *cp __unused, struct g_provider *pp) { struct g_map_softc *sc; struct g_slicer *gsp; @@ -127,45 +119,237 @@ g_map_dumpconf(struct sbuf *sb, const ch g_slice_dumpconf(sb, indent, gp, cp, pp); if (pp != NULL) { if (indent == NULL) { - sbuf_printf(sb, " entry %d", sc->entry[pp->index]); - sbuf_printf(sb, " dsize %d", sc->dsize[pp->index]); + sbuf_printf(sb, " entry %lld", sc->entry[pp->index]); + sbuf_printf(sb, " dsize %lld", sc->dsize[pp->index]); } else { - sbuf_printf(sb, "%s%d\n", indent, - sc->entry[pp->index]); - sbuf_printf(sb, "%s%d\n", indent, - sc->dsize[pp->index]); + sbuf_printf(sb, "%s%lld\n", indent, + sc->entry[pp->index]); + sbuf_printf(sb, "%s%lld\n", indent, + sc->dsize[pp->index]); } } } -#include +static int +find_marker(struct g_consumer *cp, const char *line, off_t *offset) +{ + off_t search_start, search_offset, search_step; + size_t sectorsize; + uint8_t *buf; + char *op, key[MAP_MAX_MARKER_LEN], search_key[MAP_MAX_MARKER_LEN]; + int ret, c; + + /* Try convert to numeric first */ + *offset = strtouq(line, &op, 0); + if (*op == '\0') + return (0); + + bzero(search_key, MAP_MAX_MARKER_LEN); + sectorsize = cp->provider->sectorsize; + + ret = sscanf(line, "search:%qi:%qi:%63c", + &search_start, &search_step, search_key); + if (ret < 3) + return (1); + + if (bootverbose) { + printf("MAP: search key \"%s\" from 0x%llx, step 0x%llx\n", + search_key, search_start, search_step); + } + + /* error if search_key is empty */ + if (strlen(search_key) < 1) + return (1); + + /* sscanf successful, and we start marker search */ + for (search_offset = search_start; + search_offset < cp->provider->mediasize; + search_offset += search_step) { + + g_topology_unlock(); + buf = g_read_data(cp, rounddown(search_offset, sectorsize), + roundup(strlen(search_key), sectorsize), NULL); + g_topology_lock(); + + /* Wildcard, replace '.' with byte from data */ + /* TODO: add support wildcard escape '\.' */ + + strncpy(key, search_key, MAP_MAX_MARKER_LEN); + + for (c = 0; c < MAP_MAX_MARKER_LEN && key[c]; c++) { + if (key[c] == '.') { + key[c] = ((char *)(buf + + (search_offset % sectorsize)))[c]; + } + } + + if (buf != NULL && strncmp(buf + search_offset % sectorsize, + key, strlen(search_key)) == 0) { + g_free(buf); + /* Marker found, so return their offset */ + *offset = search_offset; + return (0); + } + g_free(buf); + } + /* Marker not found */ + return (1); +} + +static int +g_map_parse_part(struct g_class *mp, struct g_provider *pp, + struct g_consumer *cp, struct g_geom *gp, struct g_map_softc *sc, int i) +{ + const char *value, *name; + char *op; + off_t start, end, offset, size, dsize; + int readonly, ret; + + /* hint.map.0.at="cfid0" - bind to cfid0 media */ + if (resource_string_value("map", i, "at", &value) != 0) + return (1); + + /* Check if this correct provider */ + if (strcmp(pp->name, value) != 0) + return (1); + + /* + * hint.map.0.name="uboot" - name of partition, will be available + * as "/dev/map/uboot" + */ + if (resource_string_value("map", i, "name", &name) != 0) { + if (bootverbose) + printf("MAP: hint.map.%d has no name\n", i); + return (1); + } + + /* + * hint.map.0.start="0x00010000" - partition start at 0x00010000 + * or hint.map.0.start="search:0x00010000:0x200:marker text" - + * search for text "marker text", begin at 0x10000, step 0x200 + * until we found marker or end of media reached + */ + if (resource_string_value("map", i, "start", &value) != 0) { + if (bootverbose) + printf("MAP: \"%s\" has no start value\n", name); + return (1); + } + if (find_marker(cp, value, &start) != 0) { + if (bootverbose) { + printf("MAP: \"%s\" can't parse/use start value\n", + name); + } + return (1); + } + + /* like "start" */ + if (resource_string_value("map", i, "end", &value) != 0) { + if (bootverbose) + printf("MAP: \"%s\" has no end value\n", name); + return (1); + } + if (find_marker(cp, value, &end) != 0) { + if (bootverbose) { + printf("MAP: \"%s\" can't parse/use start value\n", + name); + } + return (1); + } + + /* variable readonly optional, disable write access */ + if (resource_int_value("map", i, "readonly", &readonly) != 0) + readonly = 0; + + /* offset of partition data, from partition begin */ + if (resource_string_value("map", i, "offset", &value) == 0) { + offset = strtouq(value, &op, 0); + if (*op != '\0') { + if (bootverbose) { + printf("MAP: \"%s\" can't parse offset\n", + name); + } + return (1); + } + } else { + offset = 0; + } + + /* partition data size */ + if (resource_string_value("map", i, "dsize", &value) == 0) { + dsize = strtouq(value, &op, 0); + if (*op != '\0') { + if (bootverbose) { + printf("MAP: \"%s\" can't parse dsize\n", + name); + } + return (1); + } + } else { + dsize = 0; + } + + size = end - start; + if (dsize == 0) + dsize = size - offset; + + /* end is 0 or size is 0, No MAP - so next */ + if (end < start) { + if (bootverbose) { + printf("MAP: \"%s\", \"end\" less than " + "\"start\"\n", name); + } + return (1); + } + + if (offset + dsize > size) { + if (bootverbose) { + printf("MAP: \"%s\", \"dsize\" bigger than " + "partition - offset\n", name); + } + return (1); + } + + ret = g_slice_config(gp, i, G_SLICE_CONFIG_SET, start + offset, + dsize, cp->provider->sectorsize, "map/%s", name); + if (ret != 0) { + if (bootverbose) { + printf("MAP: g_slice_config returns %d for \"%s\"\n", + ret, name); + } + return (1); + } + + if (bootverbose) { + printf("MAP: %llxx%llx, data=%llxx%llx " + "\"/dev/map/%s\"\n", + start, size, offset, dsize, name); + } + + sc->offset[i] = start; + sc->size[i] = size; + sc->entry[i] = offset; + sc->dsize[i] = dsize; + sc->readonly[i] = readonly ? 1 : 0; + + return (0); +} static struct g_geom * -g_map_taste(struct g_class *mp, struct g_provider *pp, int insist) +g_map_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) { - struct g_geom *gp; - struct g_consumer *cp; struct g_map_softc *sc; - int error , sectorsize, i, ret; - struct map_desc *head; - u_int32_t start = 0, end = 0, size = 0, off, readonly; - const char *name; - const char *at; - const char *search; - int search_start = 0, search_end = 0; - u_char *buf; - uint32_t offmask; - u_int blksize;/* NB: flash block size stored as stripesize */ - off_t offset; + struct g_consumer *cp; + struct g_geom *gp; + int i; g_trace(G_T_TOPOLOGY, "map_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); - if (!strcmp(pp->geom->class->name, MAP_CLASS_NAME)) + if (strcmp(pp->geom->class->name, MAP_CLASS_NAME) == 0) return (NULL); gp = g_slice_new(mp, MAP_MAXSLICE, pp, &cp, &sc, sizeof(*sc), - g_map_start); + g_map_start); if (gp == NULL) return (NULL); @@ -173,160 +357,14 @@ g_map_taste(struct g_class *mp, struct g sc->parent_access = gp->access; gp->access = g_map_access; - sectorsize = cp->provider->sectorsize; - blksize = cp->provider->stripesize; - if (powerof2(cp->provider->mediasize)) - offmask = cp->provider->mediasize - 1; - else - offmask = 0xffffffff; /* XXX */ - - g_topology_unlock(); - head = NULL; - offset = cp->provider->mediasize - blksize; - g_topology_lock(); - - for (i = 0; i < MAP_MAXSLICE; i++) { - search_start = search_end = start = end = off = readonly = 0; - - ret = resource_string_value("map", i, "at", &at); - if (ret) - continue; - - /* Check if my provider */ - if (strncmp(pp->name, at, strlen(at))) - continue; - - ret = resource_string_value("map", i, "start", &search); - - if (!ret && strncmp(search, "search", 6) == 0) { - uint32_t search_offset, search_start = 0; - uint32_t search_step = 0; - const char *search_key; - char key[255]; - int c; - - ret = resource_int_value("map", i, "searchstart", - &search_start); - ret = resource_int_value("map", i, "searchstep", - &search_step); - if (ret) - search_step = 0x10000U; - ret = resource_string_value("map", i, "searchkey", &search_key); - if (ret) - continue; - - printf("GEOM_MAP: searchkey=\"%s\"\n", search_key); - for (search_offset = search_start; - search_offset < cp->provider->mediasize && start == 0; - search_offset += search_step) { - buf = g_read_data(cp, - rounddown(search_offset, sectorsize), - roundup(strlen(search_key), sectorsize), - NULL); - - /* Wildcard, replace '.' with byte from data */ - strncpy(key, search_key, 255); - for (c = 0; c < 255 && key[c]; c++) - if (key[c] == '.') - key[c] = ((char *)(buf + search_offset % sectorsize))[c]; - - if (buf != NULL && strncmp( - buf + search_offset % sectorsize, - key, strlen(search_key)) == 0) - start = search_offset; - g_free(buf); - } - if (!start) - continue; - } else { - ret = resource_int_value("map", i, "start", &start); - if (ret) - continue; - } - - ret = resource_string_value("map", i, "end", &search); - - if (!ret && strncmp(search, "search", 6) == 0) { - uint32_t search_offset, search_start = 0, search_step = 0; - const char *search_key; - char key[255]; - int c; - - ret = resource_int_value("map", i, "searchstart", &search_start); - ret = resource_int_value("map", i, "searchstep", &search_step); - if (ret) - search_step = 0x10000U; - ret = resource_string_value("map", i, "searchkey", &search_key); - if (ret) - continue; - - for (search_offset = search_start; - search_offset < cp->provider->mediasize && end == 0; - search_offset += search_step) { - buf = g_read_data(cp, - rounddown(search_offset, sectorsize), - roundup(strlen(search_key), sectorsize), - NULL); - - /* Wildcard, replace '.' with byte from data */ - strncpy(key, search_key, 255); - for (c = 0; c < 255 && key[c]; c++) - if (key[c] == '.') - key[c] = ((char *)(buf + search_offset % sectorsize))[c]; - - if (buf != NULL && strncmp( - buf + search_offset % sectorsize, - key, strlen(search_key)) == 0) - end = search_offset; - g_free(buf); - } - if (!end) - continue; - } else { - ret = resource_int_value("map", i, "end", &end); - if (ret) - continue; - } - size = end - start; - - /* end is 0 or size is 0, No MAP - so next */ - if (end == 0 || size == 0) - continue; - ret = resource_int_value("map", i, "offset", &off); - ret = resource_int_value("map", i, "readonly", &readonly); - ret = resource_string_value("map", i, "name", &name); - /* No name or error read name */ - if (ret) - continue; - - if (off > size) - printf("%s: off(%d) > size(%d) for \"%s\"\n", - __func__, off, size, name); - - error = g_slice_config(gp, i, G_SLICE_CONFIG_SET, start + off, - size - off, sectorsize, "map/%s", name); - printf("MAP: %08x-%08x, offset=%08x \"map/%s\"\n", - (uint32_t) start, - (uint32_t) size, - (uint32_t) off, - name - ); - - if (error) - printf("%s g_slice_config returns %d for \"%s\"\n", - __func__, error, name); - - sc->entry[i] = off; - sc->dsize[i] = size - off; - sc->readonly[i] = readonly ? 1 : 0; - } - + for (i = 0; i < MAP_MAXSLICE; i++) + g_map_parse_part(mp, pp, cp, gp, sc, i); - if (i == 0) - return (NULL); g_access(cp, -1, 0, 0); if (LIST_EMPTY(&gp->provider)) { + if (bootverbose) + printf("MAP: No valid partition found at %s\n", pp->name); g_slice_spoiled(cp); return (NULL); } @@ -336,7 +374,7 @@ g_map_taste(struct g_class *mp, struct g static void g_map_config(struct gctl_req *req, struct g_class *mp, const char *verb) { - struct g_geom *gp; + struct g_geom *gp; g_topology_assert(); gp = gctl_get_geom(req, mp, "geom"); @@ -351,6 +389,5 @@ static struct g_class g_map_class = { .taste = g_map_taste, .dumpconf = g_map_dumpconf, .ctlreq = g_map_config, - .ioctl = g_map_ioctl, }; DECLARE_GEOM_CLASS(g_map_class, g_map); From owner-svn-src-all@FreeBSD.ORG Thu May 5 14:43:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F41031065675; Thu, 5 May 2011 14:43:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD29E8FC17; Thu, 5 May 2011 14:43:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45EhZ2a003975; Thu, 5 May 2011 14:43:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45EhZnu003972; Thu, 5 May 2011 14:43:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105051443.p45EhZnu003972@svn.freebsd.org> From: Adrian Chadd Date: Thu, 5 May 2011 14:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221501 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 14:43:36 -0000 Author: adrian Date: Thu May 5 14:43:35 2011 New Revision: 221501 URL: http://svn.freebsd.org/changeset/base/221501 Log: Add a manpage for geom_map(4). Submitted by: ray@dlink.ua Added: head/share/man/man4/geom_map.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu May 5 14:43:09 2011 (r221500) +++ head/share/man/man4/Makefile Thu May 5 14:43:35 2011 (r221501) @@ -134,6 +134,7 @@ MAN= aac.4 \ geom.4 \ geom_fox.4 \ geom_linux_lvm.4 \ + geom_map.4 \ geom_uzip.4 \ gif.4 \ gpib.4 \ Added: head/share/man/man4/geom_map.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/geom_map.4 Thu May 5 14:43:35 2011 (r221501) @@ -0,0 +1,179 @@ +.\" +.\" Copyright (c) 2011 Aleksandr Rybalko +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 5, 2011 +.Dt GEOM_MAP 4 +.Os +.Sh NAME +.Nm geom_map +.Nd "GEOM module that map difined items as separate partitions" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device geom_map" +.Ed +.Sh DESCRIPTION +The +.Nm +framework provides support for mapping defined parts of the media. Basicaly it +is helpful in the embedded devices where in the one continous flash are loader, +kernel and rootfs parts. The +.Nm +allows making them available as separate parts and protect loader from +overwriting. +.Pp +At boot time +.Nm +partitions listed (only with bootverbose) as: +.Bd -literal -offset indent +MAP: 0x30000, data=0x30000 "/dev/map/bootloader" +MAP: 30000x10000, data=0x10000 "/dev/map/factory" +MAP: 40000x7a0000, data=0x7a0000 "/dev/map/upgrade" +MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 +MAP: 40000x110000, data=0x110000 "/dev/map/kernel" +MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 +MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" +MAP: 7e0000x20000, data=0x20000 "/dev/map/config" +.Ed +.Pp +Also +.Nm +current configuration can be accessible with sysctl's kern.geom.conftxt, +kern.geom.confxml, kern.geom.confdot or geom map list. +.Bd -literal -offset indent +# sysctl kern.geom.conftxt +kern.geom.conftxt: 0 MD md0 10485760 512 u 0 s 512 f 0 fs 0 l 10485760 t malloc +0 DISK cfid0 8388608 4 hd 0 sc 0 +1 MAP map/config 131072 4 i 5 o 8257536 entry 0 dsize 131072 +1 MAP map/rootfs 6881280 4 i 4 o 1376256 entry 0 dsize 6881280 +2 UNCOMPRESS map/rootfs.uncompress 18677760 512 +1 MAP map/kernel 1114112 4 i 3 o 262144 entry 0 dsize 1114112 +1 MAP map/upgrade 7995392 4 i 2 o 262144 entry 0 dsize 7995392 +1 MAP map/factory 65536 4 i 1 o 196608 entry 0 dsize 65536 +1 MAP map/bootloader 196608 4 i 0 o 0 entry 0 dsize 196608 +.Ed +.Pp +Driver configuration can be done in device hints file. List of used parameters: +.Bl -tag -width indent +.It Fa at +select media to attach +.It Fa name +name of partiton (will create device /dev/map/that_name) +.It Fa start +offset from the beginning of the parent media to start of the mapped partition. +This field can also have special value +"search:searchstart:searchstep:searchkey", where: +.Bl -tag -width indent +.It Fa searchstart +offset from the beginning of the parent media where search will be started +.It Fa searchstep +value of the increment used while searching for the partition boundary markers +.It Fa searchkey +key which will be used to find partition boundary markers. Wildcard "." char +can be used to match any char on that position +.El +.It Fa end +offset from the beginning of the parent media to end of the mapped partition. +This field can also have special value +"search:searchstart:searchstep:searchkey", look "start" for details. +.It Fa offset +offset where the data of mapped partition begins +.El +.Pp +Each record contains start address(bytes) from the media begin, size(bytes), +offset where the data of mapped partition begins, and the name of new device. +.Bd -literal -offset indent +MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" +.Ed +.Bd -literal +00150000 - begin address +00690000 - size +00000000 - data begin from zero offset +00690000 - data size +"map/rootfs" - new media will be accessible via /dev/map/rootfs dev. +.Ed +.Sh EXAMPLES +.Pp +.Bl -bullet -compact +If we need to implement layout shown above, we need to define the folowing +hints: +.Bd -literal -offset indent +hint.map.0.at="cfid0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00030000 +hint.map.0.name="bootloader" +hint.map.0.readonly=1 + +.Ed +define "/dev/map/bootloader" at disk "cfid0" starting at 0x00000000 and end +0x00030000, also marked as readonly. +.Bd -literal -offset indent +hint.map.1.at="cfid0" +hint.map.1.start=0x00030000 +hint.map.1.end=0x00040000 +hint.map.1.name="factory" + +hint.map.2.at="cfid0" +hint.map.2.start=0x00040000 +hint.map.2.end=0x007e0000 +hint.map.2.name="upgrade" + +hint.map.3.at="cfid0" +hint.map.3.name="kernel" +hint.map.3.start=0x00040000 +hint.map.3.end="search:0x00100000:0x10000:.!/bin/sh" + +.Ed +define "/dev/map/kernel" at disk "cfid0" starting at 0x00040000, but end +position must be searched by the key ".!/bin/sh", from offset 0x00100000 to end +of media with step 0x10000. Real marker in that case is "#!/bin/sh", but "#" +terminates the line when hints file is parsed, so we need to use wildcard "." +instead of "#". +.Bd -literal -offset indent +hint.map.4.at="cfid0" +hint.map.4.name="rootfs" +hint.map.4.start="search:0x00100000:0x10000:.!/bin/sh" +hint.map.4.end=0x007e0000 + +hint.map.5.at="cfid0" +hint.map.5.start=0x007e0000 +hint.map.5.end=0x00800000 +hint.map.5.name="config" +.Ed +.El +.Sh SEE ALSO +.Xr GEOM 4 , +.Xr geom 8 , +.Xr sysctl 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An "Aleksandr Rybalko" Aq ray@ddteam.net . From owner-svn-src-all@FreeBSD.ORG Thu May 5 14:45:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F84F106564A; Thu, 5 May 2011 14:45:25 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FFFB8FC1B; Thu, 5 May 2011 14:45:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45EjPMo004085; Thu, 5 May 2011 14:45:25 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45EjPL2004080; Thu, 5 May 2011 14:45:25 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105051445.p45EjPL2004080@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 5 May 2011 14:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221502 - in head: lib/libutil sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 14:45:25 -0000 Author: obrien Date: Thu May 5 14:45:24 2011 New Revision: 221502 URL: http://svn.freebsd.org/changeset/base/221502 Log: Don't duplicate define the stdint types. Added: head/sys/sys/_stdint.h - copied, changed from r221139, head/sys/sys/stdint.h Modified: head/lib/libutil/libutil.h head/sys/sys/stdint.h head/sys/sys/types.h Modified: head/lib/libutil/libutil.h ============================================================================== --- head/lib/libutil/libutil.h Thu May 5 14:43:35 2011 (r221501) +++ head/lib/libutil/libutil.h Thu May 5 14:45:24 2011 (r221502) @@ -41,22 +41,13 @@ #include #include +#include #ifndef _GID_T_DECLARED typedef __gid_t gid_t; #define _GID_T_DECLARED #endif -#ifndef _INT64_T_DECLARED -typedef __int64_t int64_t; -#define _INT64_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef __uint64_t uint64_t; -#define _UINT64_T_DECLARED -#endif - #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED Copied and modified: head/sys/sys/_stdint.h (from r221139, head/sys/sys/stdint.h) ============================================================================== --- head/sys/sys/stdint.h Wed Apr 27 20:42:30 2011 (r221139, copy source) +++ head/sys/sys/_stdint.h Thu May 5 14:45:24 2011 (r221502) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2011 David E. O'Brien * Copyright (c) 2001 Mike Barcroft * All rights reserved. * @@ -26,13 +27,8 @@ * $FreeBSD$ */ -#ifndef _SYS_STDINT_H_ -#define _SYS_STDINT_H_ - -#include -#include - -#include +#ifndef _SYS__STDINT_H_ +#define _SYS__STDINT_H_ #ifndef _INT8_T_DECLARED typedef __int8_t int8_t; @@ -74,33 +70,13 @@ typedef __uint64_t uint64_t; #define _UINT64_T_DECLARED #endif -typedef __int_least8_t int_least8_t; -typedef __int_least16_t int_least16_t; -typedef __int_least32_t int_least32_t; -typedef __int_least64_t int_least64_t; - -typedef __uint_least8_t uint_least8_t; -typedef __uint_least16_t uint_least16_t; -typedef __uint_least32_t uint_least32_t; -typedef __uint_least64_t uint_least64_t; - -typedef __int_fast8_t int_fast8_t; -typedef __int_fast16_t int_fast16_t; -typedef __int_fast32_t int_fast32_t; -typedef __int_fast64_t int_fast64_t; - -typedef __uint_fast8_t uint_fast8_t; -typedef __uint_fast16_t uint_fast16_t; -typedef __uint_fast32_t uint_fast32_t; -typedef __uint_fast64_t uint_fast64_t; - -typedef __intmax_t intmax_t; -typedef __uintmax_t uintmax_t; - #ifndef _INTPTR_T_DECLARED typedef __intptr_t intptr_t; -typedef __uintptr_t uintptr_t; #define _INTPTR_T_DECLARED #endif +#ifndef _UINTPTR_T_DECLARED +typedef __uintptr_t uintptr_t; +#define _UINTPTR_T_DECLARED +#endif -#endif /* !_SYS_STDINT_H_ */ +#endif /* !_SYS__STDINT_H_ */ Modified: head/sys/sys/stdint.h ============================================================================== --- head/sys/sys/stdint.h Thu May 5 14:43:35 2011 (r221501) +++ head/sys/sys/stdint.h Thu May 5 14:45:24 2011 (r221502) @@ -33,46 +33,7 @@ #include #include - -#ifndef _INT8_T_DECLARED -typedef __int8_t int8_t; -#define _INT8_T_DECLARED -#endif - -#ifndef _INT16_T_DECLARED -typedef __int16_t int16_t; -#define _INT16_T_DECLARED -#endif - -#ifndef _INT32_T_DECLARED -typedef __int32_t int32_t; -#define _INT32_T_DECLARED -#endif - -#ifndef _INT64_T_DECLARED -typedef __int64_t int64_t; -#define _INT64_T_DECLARED -#endif - -#ifndef _UINT8_T_DECLARED -typedef __uint8_t uint8_t; -#define _UINT8_T_DECLARED -#endif - -#ifndef _UINT16_T_DECLARED -typedef __uint16_t uint16_t; -#define _UINT16_T_DECLARED -#endif - -#ifndef _UINT32_T_DECLARED -typedef __uint32_t uint32_t; -#define _UINT32_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef __uint64_t uint64_t; -#define _UINT64_T_DECLARED -#endif +#include typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; @@ -94,13 +55,13 @@ typedef __uint_fast16_t uint_fast16_t; typedef __uint_fast32_t uint_fast32_t; typedef __uint_fast64_t uint_fast64_t; +#ifndef _INTMAX_T_DECLARED typedef __intmax_t intmax_t; +#define _INTMAX_T_DECLARED +#endif +#ifndef _UINTMAX_T_DECLARED typedef __uintmax_t uintmax_t; - -#ifndef _INTPTR_T_DECLARED -typedef __intptr_t intptr_t; -typedef __uintptr_t uintptr_t; -#define _INTPTR_T_DECLARED +#define _UINTMAX_T_DECLARED #endif #endif /* !_SYS_STDINT_H_ */ Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Thu May 5 14:43:35 2011 (r221501) +++ head/sys/sys/types.h Thu May 5 14:45:24 2011 (r221502) @@ -60,51 +60,7 @@ typedef unsigned int uint; /* Sys V com /* * XXX POSIX sized integrals that should appear only in . */ -#ifndef _INT8_T_DECLARED -typedef __int8_t int8_t; -#define _INT8_T_DECLARED -#endif - -#ifndef _INT16_T_DECLARED -typedef __int16_t int16_t; -#define _INT16_T_DECLARED -#endif - -#ifndef _INT32_T_DECLARED -typedef __int32_t int32_t; -#define _INT32_T_DECLARED -#endif - -#ifndef _INT64_T_DECLARED -typedef __int64_t int64_t; -#define _INT64_T_DECLARED -#endif - -#ifndef _UINT8_T_DECLARED -typedef __uint8_t uint8_t; -#define _UINT8_T_DECLARED -#endif - -#ifndef _UINT16_T_DECLARED -typedef __uint16_t uint16_t; -#define _UINT16_T_DECLARED -#endif - -#ifndef _UINT32_T_DECLARED -typedef __uint32_t uint32_t; -#define _UINT32_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef __uint64_t uint64_t; -#define _UINT64_T_DECLARED -#endif - -#ifndef _INTPTR_T_DECLARED -typedef __intptr_t intptr_t; -typedef __uintptr_t uintptr_t; -#define _INTPTR_T_DECLARED -#endif +#include typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ typedef __uint16_t u_int16_t; From owner-svn-src-all@FreeBSD.ORG Thu May 5 16:14:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03515106566B; Thu, 5 May 2011 16:14:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E25238FC0A; Thu, 5 May 2011 16:14:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45GEDvG006826; Thu, 5 May 2011 16:14:13 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45GEDEg006824; Thu, 5 May 2011 16:14:13 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105051614.p45GEDEg006824@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 May 2011 16:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221503 - head/contrib/llvm/lib/Support/Unix X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 16:14:14 -0000 Author: dim Date: Thu May 5 16:14:13 2011 New Revision: 221503 URL: http://svn.freebsd.org/changeset/base/221503 Log: Make cross-compiling using clang work better, by respecting the LLVM_HOSTTRIPLE that is defined during the cross-tools stage. Using clang, you can now build amd64 world and kernel on i386, and vice versa. Other arches still need work. Modified: head/contrib/llvm/lib/Support/Unix/Host.inc Modified: head/contrib/llvm/lib/Support/Unix/Host.inc ============================================================================== --- head/contrib/llvm/lib/Support/Unix/Host.inc Thu May 5 14:45:24 2011 (r221502) +++ head/contrib/llvm/lib/Support/Unix/Host.inc Thu May 5 16:14:13 2011 (r221503) @@ -35,6 +35,9 @@ static std::string getOSVersion() { } std::string sys::getHostTriple() { +#ifdef __FreeBSD__ + return LLVM_HOSTTRIPLE; +#else // FIXME: Derive directly instead of relying on the autoconf generated // variable. @@ -91,4 +94,5 @@ std::string sys::getHostTriple() { } return Triple; +#endif } From owner-svn-src-all@FreeBSD.ORG Thu May 5 16:42:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C996106566C; Thu, 5 May 2011 16:42:25 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 143378FC12; Thu, 5 May 2011 16:42:24 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 407C51FFC35; Thu, 5 May 2011 16:42:23 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 10013845CA; Thu, 5 May 2011 18:42:23 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Rick Macklem References: <942285768.1045464.1304603653229.JavaMail.root@erie.cs.uoguelph.ca> Date: Thu, 05 May 2011 18:42:22 +0200 In-Reply-To: <942285768.1045464.1304603653229.JavaMail.root@erie.cs.uoguelph.ca> (Rick Macklem's message of "Thu, 5 May 2011 09:54:13 -0400 (EDT)") Message-ID: <86r58dqett.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 16:42:25 -0000 Rick Macklem writes: > Well, another way it could be handled would be to put the sysctls and > the global variables they manipulate in a module shared by both clients, > like sys/nfs/nfs_lock.c (module "nfslock"). Then the same sysctl would > affect both clients. (I hesitate to create "yet another" module just > to share the sysctls, but since "nfslock" is used by both clients, it > should work ok, I think.) I don't understand why you would want to do that. Can't you just change "oldnfs" back to "nfs" in the old stack? Hmm, it occurred to me that there is currently no way to tell the kernel that two drivers conflict with eachother. Perhaps I should take a shot at implementing a DRIVER_CONFLICT macro to mirror DRIVER_DEPEND. BTW, don't take this personally, I'm very grateful for (and impressed with) your NFS work, other than this little nit :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu May 5 17:11:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65EF1106566C; Thu, 5 May 2011 17:11:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 525258FC08; Thu, 5 May 2011 17:11:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45HBQWL008576; Thu, 5 May 2011 17:11:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45HBQIk008574; Thu, 5 May 2011 17:11:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105051711.p45HBQIk008574@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 May 2011 17:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221504 - head/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 17:11:26 -0000 Author: mav Date: Thu May 5 17:11:26 2011 New Revision: 221504 URL: http://svn.freebsd.org/changeset/base/221504 Log: Add PCI ID for Marvell 88SE9182 -- PCIe 2.x x2 relative of the 88SE912x. Submitted by: dchagin MFC after: 1 week Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Thu May 5 16:14:13 2011 (r221503) +++ head/sys/dev/ahci/ahci.c Thu May 5 17:11:26 2011 (r221504) @@ -184,6 +184,7 @@ static struct { {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, + {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, From owner-svn-src-all@FreeBSD.ORG Thu May 5 17:28:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16FB9106564A; Thu, 5 May 2011 17:28:46 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03DCD8FC0C; Thu, 5 May 2011 17:28:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45HSjWP009115; Thu, 5 May 2011 17:28:45 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45HSjRN009113; Thu, 5 May 2011 17:28:45 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201105051728.p45HSjRN009113@svn.freebsd.org> From: Jack F Vogel Date: Thu, 5 May 2011 17:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221505 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 17:28:46 -0000 Author: jfv Date: Thu May 5 17:28:45 2011 New Revision: 221505 URL: http://svn.freebsd.org/changeset/base/221505 Log: Add an initialization to the error variable, without this there is a rare return path that bogusly appears to fail when it should not. Also white space correction. Thanks to Arnaud Lacombe for noticing the problem. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu May 5 17:11:26 2011 (r221504) +++ head/sys/dev/e1000/if_em.c Thu May 5 17:28:45 2011 (r221505) @@ -3901,7 +3901,7 @@ em_setup_receive_ring(struct rx_ring *rx struct adapter *adapter = rxr->adapter; struct em_buffer *rxbuf; bus_dma_segment_t seg[1]; - int i, j, nsegs, error; + int i, j, nsegs, error = 0; /* Clear the ring contents */ @@ -3919,7 +3919,7 @@ em_setup_receive_ring(struct rx_ring *rx if (++j == adapter->num_rx_desc) j = 0; - while(j != rxr->next_to_check) { + while (j != rxr->next_to_check) { rxbuf = &rxr->rx_buffers[i]; rxbuf->m_head = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); From owner-svn-src-all@FreeBSD.ORG Thu May 5 18:47:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79004106564A; Thu, 5 May 2011 18:47:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66EA38FC13; Thu, 5 May 2011 18:47:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45IlO2M011476; Thu, 5 May 2011 18:47:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45IlOHF011474; Thu, 5 May 2011 18:47:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201105051847.p45IlOHF011474@svn.freebsd.org> From: Dimitry Andric Date: Thu, 5 May 2011 18:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221506 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 18:47:24 -0000 Author: dim Date: Thu May 5 18:47:24 2011 New Revision: 221506 URL: http://svn.freebsd.org/changeset/base/221506 Log: Fine-tune llvm optimization for sys/boot/i386/boot2, which shaves off some more bytes from the final boot2 image. Submitted by: rdivacky Modified: head/sys/boot/i386/boot2/Makefile Modified: head/sys/boot/i386/boot2/Makefile ============================================================================== --- head/sys/boot/i386/boot2/Makefile Thu May 5 17:28:45 2011 (r221505) +++ head/sys/boot/i386/boot2/Makefile Thu May 5 18:47:24 2011 (r221506) @@ -43,7 +43,8 @@ CFLAGS= -Os \ -Winline --param max-inline-insns-single=100 .if ${CC:T:Mclang} == "clang" -CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 +CFLAGS+= -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 \ + -mllvm -enable-load-pre=false # XXX: clang integrated-as doesn't grok .codeNN directives yet CFLAGS+= ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/} .endif From owner-svn-src-all@FreeBSD.ORG Thu May 5 18:50:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC493106566C; Thu, 5 May 2011 18:50:52 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8A218FC0C; Thu, 5 May 2011 18:50:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45IoqQ7011610; Thu, 5 May 2011 18:50:52 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45Ioq2P011604; Thu, 5 May 2011 18:50:52 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201105051850.p45Ioq2P011604@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 5 May 2011 18:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221507 - in stable/8/sbin: hastctl hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 18:50:53 -0000 Author: trociny Date: Thu May 5 18:50:52 2011 New Revision: 221507 URL: http://svn.freebsd.org/changeset/base/221507 Log: MFC r221074, r221075, r221076, r221078: r221074: Fix assert messages. r221075: For conversation between hastctl and hastd we should use HASTCTL_CMD defines. r221076: Rename HASTCTL_ defines, which are used for conversation between main hastd process and workers, remove unused one and set different range of numbers. This is done in order not to confuse them with HASTCTL_CMD defines, used for conversation between hastctl and hastd, and to avoid bugs like the one fixed in r221075. r221078: Add missing ifdef. This fixes build with NO_OPENSSL. Reported by: Pawel Tyll Approved by: pjd (mentor) Modified: stable/8/sbin/hastctl/hastctl.c stable/8/sbin/hastd/control.c stable/8/sbin/hastd/control.h stable/8/sbin/hastd/hast_proto.c stable/8/sbin/hastd/hastd.c Directory Properties: stable/8/sbin/hastctl/ (props changed) stable/8/sbin/hastd/ (props changed) Modified: stable/8/sbin/hastctl/hastctl.c ============================================================================== --- stable/8/sbin/hastctl/hastctl.c Thu May 5 18:47:24 2011 (r221506) +++ stable/8/sbin/hastctl/hastctl.c Thu May 5 18:50:52 2011 (r221507) @@ -465,7 +465,7 @@ main(int argc, char *argv[]) } break; default: - assert(!"Impossible role!"); + assert(!"Impossible command!"); } /* Setup control connection... */ @@ -513,7 +513,7 @@ main(int argc, char *argv[]) error = control_status(nv); break; default: - assert(!"Impossible role!"); + assert(!"Impossible command!"); } exit(error); Modified: stable/8/sbin/hastd/control.c ============================================================================== --- stable/8/sbin/hastd/control.c Thu May 5 18:47:24 2011 (r221506) +++ stable/8/sbin/hastd/control.c Thu May 5 18:50:52 2011 (r221507) @@ -162,7 +162,7 @@ control_status_worker(struct hast_resour * Prepare and send command to worker process. */ cnvout = nv_alloc(); - nv_add_uint8(cnvout, HASTCTL_STATUS, "cmd"); + nv_add_uint8(cnvout, CONTROL_STATUS, "cmd"); error = nv_error(cnvout); if (error != 0) { pjdlog_common(LOG_ERR, 0, error, @@ -324,7 +324,7 @@ control_handle(struct hastd_config *cfg) error = EHAST_INVALID; goto fail; } - if (cmd == HASTCTL_SET_ROLE) { + if (cmd == HASTCTL_CMD_SETROLE) { role = nv_get_uint8(nvin, "role"); switch (role) { case HAST_ROLE_INIT: @@ -345,11 +345,11 @@ control_handle(struct hastd_config *cfg) ii = 0; TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { switch (cmd) { - case HASTCTL_SET_ROLE: + case HASTCTL_CMD_SETROLE: control_set_role_common(cfg, nvout, role, res, res->hr_name, ii++); break; - case HASTCTL_STATUS: + case HASTCTL_CMD_STATUS: control_status(cfg, nvout, res, res->hr_name, ii++); break; @@ -368,11 +368,11 @@ control_handle(struct hastd_config *cfg) if (str == NULL) break; switch (cmd) { - case HASTCTL_SET_ROLE: + case HASTCTL_CMD_SETROLE: control_set_role_common(cfg, nvout, role, NULL, str, ii); break; - case HASTCTL_STATUS: + case HASTCTL_CMD_STATUS: control_status(cfg, nvout, NULL, str, ii); break; default: @@ -427,7 +427,7 @@ ctrl_thread(void *arg) } nvout = nv_alloc(); switch (cmd) { - case HASTCTL_STATUS: + case CONTROL_STATUS: if (res->hr_remotein != NULL && res->hr_remoteout != NULL) { nv_add_string(nvout, "complete", "status"); @@ -448,7 +448,7 @@ ctrl_thread(void *arg) } nv_add_int16(nvout, 0, "error"); break; - case HASTCTL_RELOAD: + case CONTROL_RELOAD: /* * When parent receives SIGHUP and discovers that * something related to us has changes, it sends reload Modified: stable/8/sbin/hastd/control.h ============================================================================== --- stable/8/sbin/hastd/control.h Thu May 5 18:47:24 2011 (r221506) +++ stable/8/sbin/hastd/control.h Thu May 5 18:50:52 2011 (r221507) @@ -32,9 +32,8 @@ #ifndef _CONTROL_H_ #define _CONTROL_H_ -#define HASTCTL_SET_ROLE 1 -#define HASTCTL_STATUS 2 -#define HASTCTL_RELOAD 3 +#define CONTROL_STATUS 10 +#define CONTROL_RELOAD 11 struct hastd_config; struct hast_resource; Modified: stable/8/sbin/hastd/hast_proto.c ============================================================================== --- stable/8/sbin/hastd/hast_proto.c Thu May 5 18:47:24 2011 (r221506) +++ stable/8/sbin/hastd/hast_proto.c Thu May 5 18:50:52 2011 (r221507) @@ -69,7 +69,9 @@ struct hast_pipe_stage { static struct hast_pipe_stage pipeline[] = { { "compression", compression_send, compression_recv }, +#ifdef HAVE_CRYPTO { "checksum", checksum_send, checksum_recv } +#endif }; /* Modified: stable/8/sbin/hastd/hastd.c ============================================================================== --- stable/8/sbin/hastd/hastd.c Thu May 5 18:47:24 2011 (r221506) +++ stable/8/sbin/hastd/hastd.c Thu May 5 18:50:52 2011 (r221507) @@ -424,7 +424,7 @@ resource_reload(const struct hast_resour PJDLOG_ASSERT(res->hr_role == HAST_ROLE_PRIMARY); nvout = nv_alloc(); - nv_add_uint8(nvout, HASTCTL_RELOAD, "cmd"); + nv_add_uint8(nvout, CONTROL_RELOAD, "cmd"); nv_add_string(nvout, res->hr_remoteaddr, "remoteaddr"); nv_add_string(nvout, res->hr_sourceaddr, "sourceaddr"); nv_add_int32(nvout, (int32_t)res->hr_replication, "replication"); From owner-svn-src-all@FreeBSD.ORG Thu May 5 18:56:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60AC5106564A; Thu, 5 May 2011 18:56:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EA418FC20; Thu, 5 May 2011 18:56:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45IumiX011826; Thu, 5 May 2011 18:56:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45IumkV011824; Thu, 5 May 2011 18:56:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105051856.p45IumkV011824@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 May 2011 18:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221508 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 18:56:48 -0000 Author: mav Date: Thu May 5 18:56:48 2011 New Revision: 221508 URL: http://svn.freebsd.org/changeset/base/221508 Log: Some changes around LAPIC timer programming. This fixes heavy interrupt storm and resulting system freeze when using LAPIC timer in one-shot mode under Xen HVM. There, unlike real hardware, programming timer with zero period almost immediately causes interrupt. Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Thu May 5 18:50:52 2011 (r221507) +++ head/sys/x86/x86/local_apic.c Thu May 5 18:56:48 2011 (r221508) @@ -159,9 +159,8 @@ static struct eventtimer lapic_et; static void lapic_enable(void); static void lapic_resume(struct pic *pic); -static void lapic_timer_enable_intr(void); -static void lapic_timer_oneshot(u_int count); -static void lapic_timer_periodic(u_int count); +static void lapic_timer_oneshot(u_int count, int enable_int); +static void lapic_timer_periodic(u_int count, int enable_int); static void lapic_timer_stop(void); static void lapic_timer_set_divisor(u_int divisor); static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value); @@ -379,13 +378,11 @@ lapic_setup(int boot) if (la->la_timer_mode != 0) { KASSERT(la->la_timer_period != 0, ("lapic%u: zero divisor", lapic_id())); - lapic_timer_stop(); lapic_timer_set_divisor(lapic_timer_divisor); - lapic_timer_enable_intr(); if (la->la_timer_mode == 1) - lapic_timer_periodic(la->la_timer_period); + lapic_timer_periodic(la->la_timer_period, 1); else - lapic_timer_oneshot(la->la_timer_period); + lapic_timer_oneshot(la->la_timer_period, 1); } /* Program error LVT and clear any existing errors. */ @@ -496,7 +493,7 @@ lapic_et_start(struct eventtimer *et, /* Try to calibrate the local APIC timer. */ do { lapic_timer_set_divisor(lapic_timer_divisor); - lapic_timer_oneshot(APIC_TIMER_MAX_COUNT); + lapic_timer_oneshot(APIC_TIMER_MAX_COUNT, 0); DELAY(1000000); value = APIC_TIMER_MAX_COUNT - lapic->ccr_timer; if (value != APIC_TIMER_MAX_COUNT) @@ -516,9 +513,7 @@ lapic_et_start(struct eventtimer *et, et->et_max_period.frac = ((0xfffffffeLLU << 32) / et->et_frequency) << 32; } - lapic_timer_stop(); lapic_timer_set_divisor(lapic_timer_divisor); - lapic_timer_enable_intr(); la = &lapics[lapic_id()]; if (period != NULL) { la->la_timer_mode = 1; @@ -526,14 +521,14 @@ lapic_et_start(struct eventtimer *et, (et->et_frequency * (period->frac >> 32)) >> 32; if (period->sec != 0) la->la_timer_period += et->et_frequency * period->sec; - lapic_timer_periodic(la->la_timer_period); + lapic_timer_periodic(la->la_timer_period, 1); } else { la->la_timer_mode = 2; la->la_timer_period = (et->et_frequency * (first->frac >> 32)) >> 32; if (first->sec != 0) la->la_timer_period += et->et_frequency * first->sec; - lapic_timer_oneshot(la->la_timer_period); + lapic_timer_oneshot(la->la_timer_period, 1); } return (0); } @@ -838,25 +833,29 @@ lapic_timer_set_divisor(u_int divisor) } static void -lapic_timer_oneshot(u_int count) +lapic_timer_oneshot(u_int count, int enable_int) { u_int32_t value; value = lapic->lvt_timer; value &= ~APIC_LVTT_TM; value |= APIC_LVTT_TM_ONE_SHOT; + if (enable_int) + value &= ~APIC_LVT_M; lapic->lvt_timer = value; lapic->icr_timer = count; } static void -lapic_timer_periodic(u_int count) +lapic_timer_periodic(u_int count, int enable_int) { u_int32_t value; value = lapic->lvt_timer; value &= ~APIC_LVTT_TM; value |= APIC_LVTT_TM_PERIODIC; + if (enable_int) + value &= ~APIC_LVT_M; lapic->lvt_timer = value; lapic->icr_timer = count; } @@ -870,17 +869,6 @@ lapic_timer_stop(void) value &= ~APIC_LVTT_TM; value |= APIC_LVT_M; lapic->lvt_timer = value; - lapic->icr_timer = 0; -} - -static void -lapic_timer_enable_intr(void) -{ - u_int32_t value; - - value = lapic->lvt_timer; - value &= ~APIC_LVT_M; - lapic->lvt_timer = value; } void From owner-svn-src-all@FreeBSD.ORG Thu May 5 19:15:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5C96106566C; Thu, 5 May 2011 19:15:15 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3FC18FC19; Thu, 5 May 2011 19:15:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45JFFNB012404; Thu, 5 May 2011 19:15:15 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45JFF12012402; Thu, 5 May 2011 19:15:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105051915.p45JFF12012402@svn.freebsd.org> From: Xin LI Date: Thu, 5 May 2011 19:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221509 - head/sys/dev/coretemp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 19:15:15 -0000 Author: delphij Date: Thu May 5 19:15:15 2011 New Revision: 221509 URL: http://svn.freebsd.org/changeset/base/221509 Log: Detect and set Atom's Tj(max) to 90 if it's not the 45nm D400/D500/N400 series. MFC after: 2 weeks Modified: head/sys/dev/coretemp/coretemp.c Modified: head/sys/dev/coretemp/coretemp.c ============================================================================== --- head/sys/dev/coretemp/coretemp.c Thu May 5 18:56:48 2011 (r221508) +++ head/sys/dev/coretemp/coretemp.c Thu May 5 19:15:15 2011 (r221509) @@ -197,6 +197,15 @@ coretemp_attach(device_t dev) default: /* Unknown stepping */ break; } + } else if (cpu_model == 0x1c) { + switch (cpu_stepping) { + case 0xa: /* 45nm Atom D400, N400 and D500 series */ + sc->sc_tjmax = 100; + break; + default: + sc->sc_tjmax = 90; + break; + } } else { /* * Attempt to get Tj(max) from MSR IA32_TEMPERATURE_TARGET. From owner-svn-src-all@FreeBSD.ORG Thu May 5 19:17:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF21D1065672; Thu, 5 May 2011 19:17:55 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2E498FC14; Thu, 5 May 2011 19:17:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45JHtxd012517; Thu, 5 May 2011 19:17:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45JHtar012515; Thu, 5 May 2011 19:17:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105051917.p45JHtar012515@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 5 May 2011 19:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221510 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 19:17:56 -0000 Author: nwhitehorn Date: Thu May 5 19:17:55 2011 New Revision: 221510 URL: http://svn.freebsd.org/changeset/base/221510 Log: Simplify this script somewhat, following excellent suggestions from Ed Schouten. Modified: head/release/generate-release.sh Modified: head/release/generate-release.sh ============================================================================== --- head/release/generate-release.sh Thu May 5 19:15:15 2011 (r221509) +++ head/release/generate-release.sh Thu May 5 19:17:55 2011 (r221510) @@ -21,7 +21,9 @@ # mkdir -p $2/usr/src -svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src || exit 1 +set -e # Everything must succeed + +svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src if [ ! -z $CVSUP_HOST ]; then cat > $2/docports-supfile << EOF *default host=$CVSUP_HOST @@ -35,32 +37,33 @@ if [ ! -z $CVSUP_HOST ]; then EOF elif [ ! -z $CVSROOT ]; then cd $2/usr - cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports || exit 1 - cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc || exit 1 + cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports + cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc fi cd $2/usr/src -make $MAKE_FLAGS buildworld || exit 1 -make installworld distribution DESTDIR=$2 || exit 1 +make $MAKE_FLAGS buildworld +make installworld distribution DESTDIR=$2 mount -t devfs devfs $2/dev +trap "umount $2/dev" EXIT # Clean up devfs mount on exit if [ ! -z $CVSUP_HOST ]; then cp /etc/resolv.conf $2/etc/resolv.conf # Checkout ports and doc trees - chroot $2 /usr/bin/csup /docports-supfile || exit 1 + chroot $2 /usr/bin/csup /docports-supfile fi if [ -d $2/usr/doc ]; then cp /etc/resolv.conf $2/etc/resolv.conf # Build ports to build the docs, then build the docs - chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' || exit 1 - chroot $2 /bin/sh -c "cd /usr/doc && make $MAKE_FLAGS 'FORMATS=html html-split txt' URLS_ABSOLUTE=YES" || exit 1 + chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' + chroot $2 make -C /usr/doc $MAKE_FLAGS 'FORMATS=html html-split txt' URLS_ABSOLUTE=YES fi -chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1 -chroot $2 /bin/sh -c "cd /usr/src/release && make obj" || exit 1 -chroot $2 /bin/sh -c "cd /usr/src/release && make release" || exit 1 -chroot $2 /bin/sh -c "cd /usr/src/release && make install DESTDIR=/R" || exit 1 +chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel +chroot $2 make -C /usr/src/release obj +chroot $2 make -C /usr/src/release release +chroot $2 make -C /usr/src/release install DESTDIR=/R From owner-svn-src-all@FreeBSD.ORG Thu May 5 19:49:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5F1F106566B; Thu, 5 May 2011 19:49:27 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C32ED8FC16; Thu, 5 May 2011 19:49:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45JnREh013513; Thu, 5 May 2011 19:49:27 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45JnRBb013511; Thu, 5 May 2011 19:49:27 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201105051949.p45JnRBb013511@svn.freebsd.org> From: Michael Tuexen Date: Thu, 5 May 2011 19:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221512 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 19:49:27 -0000 Author: tuexen Date: Thu May 5 19:49:27 2011 New Revision: 221512 URL: http://svn.freebsd.org/changeset/base/221512 Log: * Update copyright notice. * Cleanup usage of iov's. * Add support for SCTP_TIMEOUTS socketoption. * Fix a bug in sctp_recvmsg(): return the msg_flags in case of an error. * Fix a bug in the error handling of sctp_peeloff(): return the -1. Modified: head/lib/libc/net/sctp_sys_calls.c Modified: head/lib/libc/net/sctp_sys_calls.c ============================================================================== --- head/lib/libc/net/sctp_sys_calls.c Thu May 5 19:35:12 2011 (r221511) +++ head/lib/libc/net/sctp_sys_calls.c Thu May 5 19:49:27 2011 (r221512) @@ -1,33 +1,35 @@ -/* $KAME: sctp_sys_calls.c,v 1.9 2004/08/17 06:08:53 itojun Exp $ */ - -/* - * Copyright (C) 2002-2007 Cisco Systems Inc, - * All rights reserved. +/*- + * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * modification, are permitted provided that the following conditions are met: + * + * a) Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * b) 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. + * + * c) Neither the name of Cisco Systems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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 @@ -58,7 +60,6 @@ __FBSDID("$FreeBSD$"); #define SCTP_CONTROL_VEC_SIZE_SND 8192 #define SCTP_CONTROL_VEC_SIZE_RCV 16384 #define SCTP_STACK_BUF_SIZE 2048 -#define SCTP_SMALL_IOVEC_SIZE 2 #ifdef SCTP_DEBUG_PRINT_ADDRESS @@ -398,6 +399,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_LOCAL_AUTH_CHUNKS: ((struct sctp_authchunks *)arg)->gauth_assoc_id = id; break; + case SCTP_TIMEOUTS: + ((struct sctp_timeouts *)arg)->stimo_assoc_id = id; + break; default: break; } @@ -551,11 +555,10 @@ sctp_sendmsg(int s, return (syscall(SYS_sctp_generic_sendmsg, s, data, len, to, tolen, &sinfo, 0)); #else - ssize_t sz; struct msghdr msg; struct sctp_sndrcvinfo *s_info; - struct iovec iov[SCTP_SMALL_IOVEC_SIZE]; + struct iovec iov; char controlVector[SCTP_CONTROL_VEC_SIZE_RCV]; struct cmsghdr *cmsg; struct sockaddr *who = NULL; @@ -564,20 +567,8 @@ sctp_sendmsg(int s, struct sockaddr_in6 in6; } addr; -/* - fprintf(io, "sctp_sendmsg(sd:%d, data:%x, len:%d, to:%x, tolen:%d, ppid:%x, flags:%x str:%d ttl:%d ctx:%x\n", - s, - (u_int)data, - (int)len, - (u_int)to, - (int)tolen, - ppid, flags, - (int)stream_no, - (int)timetolive, - (u_int)context); - fflush(io); -*/ - if ((tolen > 0) && ((to == NULL) || (tolen < sizeof(struct sockaddr)))) { + if ((tolen > 0) && + ((to == NULL) || (tolen < sizeof(struct sockaddr)))) { errno = EINVAL; return -1; } @@ -587,7 +578,8 @@ sctp_sendmsg(int s, errno = EINVAL; return -1; } - if ((to->sa_len > 0) && (to->sa_len != sizeof(struct sockaddr_in))) { + if ((to->sa_len > 0) && + (to->sa_len != sizeof(struct sockaddr_in))) { errno = EINVAL; return -1; } @@ -598,7 +590,8 @@ sctp_sendmsg(int s, errno = EINVAL; return -1; } - if ((to->sa_len > 0) && (to->sa_len != sizeof(struct sockaddr_in6))) { + if ((to->sa_len > 0) && + (to->sa_len != sizeof(struct sockaddr_in6))) { errno = EINVAL; return -1; } @@ -610,10 +603,8 @@ sctp_sendmsg(int s, } who = (struct sockaddr *)&addr; } - iov[0].iov_base = (char *)data; - iov[0].iov_len = len; - iov[1].iov_base = NULL; - iov[1].iov_len = 0; + iov.iov_base = (char *)data; + iov.iov_len = len; if (who) { msg.msg_name = (caddr_t)who; @@ -622,7 +613,7 @@ sctp_sendmsg(int s, msg.msg_name = (caddr_t)NULL; msg.msg_namelen = 0; } - msg.msg_iov = iov; + msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = (caddr_t)controlVector; @@ -681,7 +672,7 @@ sctp_send(int sd, const void *data, size #else ssize_t sz; struct msghdr msg; - struct iovec iov[SCTP_SMALL_IOVEC_SIZE]; + struct iovec iov; struct sctp_sndrcvinfo *s_info; char controlVector[SCTP_CONTROL_VEC_SIZE_SND]; struct cmsghdr *cmsg; @@ -690,14 +681,12 @@ sctp_send(int sd, const void *data, size errno = EINVAL; return (-1); } - iov[0].iov_base = (char *)data; - iov[0].iov_len = len; - iov[1].iov_base = NULL; - iov[1].iov_len = 0; + iov.iov_base = (char *)data; + iov.iov_len = len; msg.msg_name = 0; msg.msg_namelen = 0; - msg.msg_iov = iov; + msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = (caddr_t)controlVector; @@ -736,7 +725,7 @@ sctp_sendx(int sd, const void *msg, size return (-1); } #ifdef SYS_sctp_generic_sendmsg - if (addrcnt < SCTP_SMALL_IOVEC_SIZE) { + if (addrcnt == 1) { socklen_t l; /* @@ -846,18 +835,18 @@ sctp_recvmsg(int s, int *msg_flags) { #ifdef SYS_sctp_generic_recvmsg - struct iovec iov[SCTP_SMALL_IOVEC_SIZE]; + struct iovec iov; - iov[0].iov_base = dbuf; - iov[0].iov_len = len; + iov.iov_base = dbuf; + iov.iov_len = len; return (syscall(SYS_sctp_generic_recvmsg, s, - iov, 1, from, fromlen, sinfo, msg_flags)); + &iov, 1, from, fromlen, sinfo, msg_flags)); #else struct sctp_sndrcvinfo *s_info; ssize_t sz; int sinfo_found = 0; struct msghdr msg; - struct iovec iov[SCTP_SMALL_IOVEC_SIZE]; + struct iovec iov; char controlVector[SCTP_CONTROL_VEC_SIZE_RCV]; struct cmsghdr *cmsg; @@ -866,30 +855,28 @@ sctp_recvmsg(int s, return (-1); } msg.msg_flags = 0; - iov[0].iov_base = dbuf; - iov[0].iov_len = len; - iov[1].iov_base = NULL; - iov[1].iov_len = 0; + iov.iov_base = dbuf; + iov.iov_len = len; msg.msg_name = (caddr_t)from; if (fromlen == NULL) msg.msg_namelen = 0; else msg.msg_namelen = *fromlen; - msg.msg_iov = iov; + msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = (caddr_t)controlVector; msg.msg_controllen = sizeof(controlVector); errno = 0; sz = recvmsg(s, &msg, *msg_flags); - if (sz <= 0) + *msg_flags = msg.msg_flags; + if (sz <= 0) { return (sz); - + } s_info = NULL; len = sz; - *msg_flags = msg.msg_flags; - if (sinfo) + if (sinfo) { sinfo->sinfo_assoc_id = 0; - + } if ((msg.msg_controllen) && sinfo) { /* * parse through and see if we find the sctp_sndrcvinfo (if @@ -940,7 +927,7 @@ int sctp_peeloff(int sd, sctp_assoc_t assoc_id) { struct sctp_peeloff_opt peeloff; - int error; + int result; socklen_t optlen; /* set in the socket option params */ @@ -948,10 +935,9 @@ sctp_peeloff(int sd, sctp_assoc_t assoc_ peeloff.s = sd; peeloff.assoc_id = assoc_id; optlen = sizeof(peeloff); - error = getsockopt(sd, IPPROTO_SCTP, SCTP_PEELOFF, (void *)&peeloff, - &optlen); - if (error) { - errno = error; + result = getsockopt(sd, IPPROTO_SCTP, SCTP_PEELOFF, (void *)&peeloff, &optlen); + + if (result < 0) { return (-1); } else { return (peeloff.new_sd); @@ -984,4 +970,3 @@ sctp_peeloff(int sd, sctp_assoc_t assoc_ #undef SCTP_CONTROL_VEC_SIZE_SND #undef SCTP_CONTROL_VEC_SIZE_RCV #undef SCTP_STACK_BUF_SIZE -#undef SCTP_SMALL_IOVEC_SIZE From owner-svn-src-all@FreeBSD.ORG Thu May 5 20:55:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21D0B1065673; Thu, 5 May 2011 20:55:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F2928FC0C; Thu, 5 May 2011 20:55:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45KtuBS015474; Thu, 5 May 2011 20:55:56 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45Ktt88015461; Thu, 5 May 2011 20:55:55 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105052055.p45Ktt88015461@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 5 May 2011 20:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221513 - in head: bin/sh tools/regression/bin/sh/parser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 20:55:56 -0000 Author: jilles Date: Thu May 5 20:55:55 2011 New Revision: 221513 URL: http://svn.freebsd.org/changeset/base/221513 Log: sh: Add $'quoting' (C-style escape sequences). A string between $' and ' may contain backslash escape sequences similar to the ones in a C string constant (except that a single-quote must be escaped and a double-quote need not be). Details are in the sh(1) man page. This construct is useful to include unprintable characters, tabs and newlines in strings; while this can be done with a command substitution containing a printf command, that needs ugly workarounds if the result is to end with a newline as command substitution removes all trailing newlines. The construct may also be useful in future to describe unprintable characters without needing to write those characters themselves in 'set -x', 'export -p' and the like. The implementation attempts to comply to the proposal for the next issue of the POSIX specification. Because this construct is not in POSIX.1-2008, using it in scripts intended to be portable is unwise. Matching the minimal locale support in the rest of sh, the \u and \U sequences are currently not useful. Exp-run done by: pav (with some other sh(1) changes) Added: head/tools/regression/bin/sh/parser/dollar-quote1.0 (contents, props changed) head/tools/regression/bin/sh/parser/dollar-quote2.0 (contents, props changed) head/tools/regression/bin/sh/parser/dollar-quote3.0 (contents, props changed) head/tools/regression/bin/sh/parser/dollar-quote4.0 (contents, props changed) head/tools/regression/bin/sh/parser/dollar-quote5.0 (contents, props changed) head/tools/regression/bin/sh/parser/dollar-quote6.0 (contents, props changed) head/tools/regression/bin/sh/parser/dollar-quote7.0 (contents, props changed) head/tools/regression/bin/sh/parser/dollar-quote8.0 (contents, props changed) head/tools/regression/bin/sh/parser/dollar-quote9.0 (contents, props changed) Modified: head/bin/sh/mksyntax.c head/bin/sh/parser.c head/bin/sh/sh.1 Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Thu May 5 19:49:27 2011 (r221512) +++ head/bin/sh/mksyntax.c Thu May 5 20:55:55 2011 (r221513) @@ -64,6 +64,7 @@ struct synclass synclass[] = { { "CWORD", "character is nothing special" }, { "CNL", "newline character" }, { "CBACK", "a backslash character" }, + { "CSBACK", "a backslash character in single quotes" }, { "CSQUOTE", "single quote" }, { "CDQUOTE", "double quote" }, { "CENDQUOTE", "a terminating quote" }, @@ -224,6 +225,7 @@ main(int argc __unused, char **argv __un init(); fputs("\n/* syntax table used when in single quotes */\n", cfile); add("\n", "CNL"); + add("\\", "CSBACK"); add("'", "CENDQUOTE"); /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */ add("!*?[=~:/-", "CCTL"); Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Thu May 5 19:49:27 2011 (r221512) +++ head/bin/sh/parser.c Thu May 5 20:55:55 2011 (r221513) @@ -1127,6 +1127,127 @@ done: /* + * Called to parse a backslash escape sequence inside $'...'. + * The backslash has already been read. + */ +static char * +readcstyleesc(char *out) +{ + int c, v, i, n; + + c = pgetc(); + switch (c) { + case '\0': + synerror("Unterminated quoted string"); + case '\n': + plinno++; + if (doprompt) + setprompt(2); + else + setprompt(0); + return out; + case '\\': + case '\'': + case '"': + v = c; + break; + case 'a': v = '\a'; break; + case 'b': v = '\b'; break; + case 'e': v = '\033'; break; + case 'f': v = '\f'; break; + case 'n': v = '\n'; break; + case 'r': v = '\r'; break; + case 't': v = '\t'; break; + case 'v': v = '\v'; break; + case 'x': + v = 0; + for (;;) { + c = pgetc(); + if (c >= '0' && c <= '9') + v = (v << 4) + c - '0'; + else if (c >= 'A' && c <= 'F') + v = (v << 4) + c - 'A' + 10; + else if (c >= 'a' && c <= 'f') + v = (v << 4) + c - 'a' + 10; + else + break; + } + pungetc(); + break; + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + v = c - '0'; + c = pgetc(); + if (c >= '0' && c <= '7') { + v <<= 3; + v += c - '0'; + c = pgetc(); + if (c >= '0' && c <= '7') { + v <<= 3; + v += c - '0'; + } else + pungetc(); + } else + pungetc(); + break; + case 'c': + c = pgetc(); + if (c < 0x3f || c > 0x7a || c == 0x60) + synerror("Bad escape sequence"); + if (c == '\\' && pgetc() != '\\') + synerror("Bad escape sequence"); + if (c == '?') + v = 127; + else + v = c & 0x1f; + break; + case 'u': + case 'U': + n = c == 'U' ? 8 : 4; + v = 0; + for (i = 0; i < n; i++) { + c = pgetc(); + if (c >= '0' && c <= '9') + v = (v << 4) + c - '0'; + else if (c >= 'A' && c <= 'F') + v = (v << 4) + c - 'A' + 10; + else if (c >= 'a' && c <= 'f') + v = (v << 4) + c - 'a' + 10; + else + synerror("Bad escape sequence"); + } + if (v == 0 || (v >= 0xd800 && v <= 0xdfff)) + synerror("Bad escape sequence"); + /* We really need iconv here. */ + if (v > 127) + v = '?'; + break; + default: + synerror("Bad escape sequence"); + } + v = (char)v; + /* + * We can't handle NUL bytes. + * POSIX says we should skip till the closing quote. + */ + if (v == '\0') { + while ((c = pgetc()) != '\'') { + if (c == '\\') + c = pgetc(); + if (c == PEOF) + synerror("Unterminated quoted string"); + } + pungetc(); + return out; + } + if (SQSYNTAX[v] == CCTL) + USTPUTC(CTLESC, out); + USTPUTC(v, out); + return out; +} + + +/* * If eofmark is NULL, read a word or a redirection symbol. If eofmark * is not NULL, read a here document. In the latter case, eofmark is the * word which marks the end of the document and striptabs is true if @@ -1158,6 +1279,7 @@ readtoken1(int firstc, char const *initi struct tokenstate state_static[MAXNEST_static]; int maxnest = MAXNEST_static; struct tokenstate *state = state_static; + int sqiscstyle = 0; startlinno = plinno; quotef = 0; @@ -1188,6 +1310,12 @@ readtoken1(int firstc, char const *initi setprompt(0); c = pgetc(); goto loop; /* continue outer loop */ + case CSBACK: + if (sqiscstyle) { + out = readcstyleesc(out); + break; + } + /* FALLTHROUGH */ case CWORD: USTPUTC(c, out); break; @@ -1232,6 +1360,7 @@ readtoken1(int firstc, char const *initi case CSQUOTE: USTPUTC(CTLQUOTEMARK, out); state[level].syntax = SQSYNTAX; + sqiscstyle = 0; break; case CDQUOTE: USTPUTC(CTLQUOTEMARK, out); @@ -1450,11 +1579,7 @@ parsesub: { int c1; c = pgetc(); - if (c != '(' && c != '{' && (is_eof(c) || !is_name(c)) && - !is_special(c)) { - USTPUTC('$', out); - pungetc(); - } else if (c == '(') { /* $(command) or $((arith)) */ + if (c == '(') { /* $(command) or $((arith)) */ if (pgetc() == '(') { PARSEARITH(); } else { @@ -1465,7 +1590,7 @@ parsesub: { state[level].syntax == DQSYNTAX || state[level].syntax == ARISYNTAX); } - } else { + } else if (c == '{' || is_name(c) || is_special(c)) { USTPUTC(CTLVAR, out); typeloc = out - stackblock(); USTPUTC(VSNORMAL, out); @@ -1612,6 +1737,14 @@ varname: newvarnest++; } } + } else if (c == '\'' && state[level].syntax == BASESYNTAX) { + /* $'cstylequotes' */ + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = SQSYNTAX; + sqiscstyle = 1; + } else { + USTPUTC('$', out); + pungetc(); } goto parsesub_return; } Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Thu May 5 19:49:27 2011 (r221512) +++ head/bin/sh/sh.1 Thu May 5 20:55:55 2011 (r221513) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd March 20, 2011 +.Dd May 5, 2011 .Dt SH 1 .Os .Sh NAME @@ -396,13 +396,82 @@ Quoting is used to remove the special me or words to the shell, such as operators, whitespace, keywords, or alias names. .Pp -There are three types of quoting: matched single quotes, +There are four types of quoting: matched single quotes, +dollar-single quotes, matched double quotes, and backslash. .Bl -tag -width indent .It Single Quotes Enclosing characters in single quotes preserves the literal meaning of all the characters (except single quotes, making it impossible to put single-quotes in a single-quoted string). +.It Dollar-Single Quotes +Enclosing characters between +.Li $' +and +.Li ' +preserves the literal meaning of all characters +except backslashes and single quotes. +A backslash introduces a C-style escape sequence: +.Bl -tag -width xUnnnnnnnn +.It \ea +Alert (ring the terminal bell) +.It \eb +Backspace +.It \ec Ns Ar c +The control character denoted by +.Li ^ Ns Ar c +in +.Xr stty 1 . +If +.Ar c +is a backslash, it must be doubled. +.It \ee +The ESC character +.Tn ( ASCII +0x1b) +.It \ef +Formfeed +.It \en +Newline +.It \er +Carriage return +.It \et +Horizontal tab +.It \ev +Vertical tab +.It \e\e +Literal backslash +.It \e\&' +Literal single-quote +.It \e\&" +Literal double-quote +.It \e Ns Ar nnn +The byte whose octal value is +.Ar nnn +(one to three digits) +.It \ex Ns Ar nn +The byte whose hexadecimal value is +.Ar nn +(one or more digits only the last two of which are used) +.It \eu Ns Ar nnnn +The Unicode code point +.Ar nnnn +(four hexadecimal digits) +.It \eU Ns Ar nnnnnnnn +The Unicode code point +.Ar nnnnnnnn +(eight hexadecimal digits) +.El +.Pp +The sequences for Unicode code points currently only provide useful results +for values below 128. +They reject code point 0 and UTF-16 surrogates. +.Pp +If an escape sequence would produce a byte with value 0, +that byte and the rest of the string until the matching single-quote +are ignored. +.Pp +Any other string starting with a backslash is an error. .It Double Quotes Enclosing characters within double quotes preserves the literal meaning of all characters except dollar sign Added: head/tools/regression/bin/sh/parser/dollar-quote1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote1.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +set -e + +[ $'hi' = hi ] +[ $'hi +there' = 'hi +there' ] +[ $'\"\'\\\a\b\f\t\v' = "\"'\\$(printf "\a\b\f\t\v")" ] +[ $'hi\nthere' = 'hi +there' ] +[ $'a\rb' = "$(printf "a\rb")" ] Added: head/tools/regression/bin/sh/parser/dollar-quote2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote2.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +# This depends on the ASCII character set. + +[ $'\e' = "$(printf "\033")" ] Added: head/tools/regression/bin/sh/parser/dollar-quote3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote3.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +unset LC_ALL +LC_CTYPE=en_US.ISO8859-1 +export LC_CTYPE + +e= +for i in 0 1 2 3; do + for j in 0 1 2 3 4 5 6 7; do + for k in 0 1 2 3 4 5 6 7; do + case $i$j$k in + 000) continue ;; + esac + e="$e\\$i$j$k" + done + done +done +ee=`printf "$e"` +[ "${#ee}" = 255 ] || echo length bad + +# Start a new shell so the locale change is picked up. +[ "$(${SH} -c "printf %s \$'$e'")" = "$ee" ] Added: head/tools/regression/bin/sh/parser/dollar-quote4.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote4.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +unset LC_ALL +LC_CTYPE=en_US.ISO8859-1 +export LC_CTYPE + +e= +for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do + for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do + case $i$j in + 00) continue ;; + esac + e="$e\x$i$j" + done +done + +# Start a new shell so the locale change is picked up. +ee="$(${SH} -c "printf %s \$'$e'")" +[ "${#ee}" = 255 ] || echo length bad Added: head/tools/regression/bin/sh/parser/dollar-quote5.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote5.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +# This depends on the ASCII character set. + +set -e + +[ $'\ca\cb\cc\cd\ce\cf\cg\ch\ci\cj\ck\cl\cm\cn\co\cp\cq\cr\cs\ct\cu\cv\cw\cx\cy\cz' = $'\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032' ] +[ $'\cA\cB\cC\cD\cE\cF\cG\cH\cI\cJ\cK\cL\cM\cN\cO\cP\cQ\cR\cS\cT\cU\cV\cW\cX\cY\cZ' = $'\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032' ] +[ $'\c[' = $'\033' ] +[ $'\c]' = $'\035' ] +[ $'\c^' = $'\036' ] +[ $'\c_' = $'\037' ] Added: head/tools/regression/bin/sh/parser/dollar-quote6.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote6.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +# This depends on the ASCII character set. + +[ $'\c\\' = $'\034' ] Added: head/tools/regression/bin/sh/parser/dollar-quote7.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote7.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +set -e + +[ $'\u0024\u0040\u0060' = '$@`' ] +[ $'\U00000024\U00000040\U00000060' = '$@`' ] Added: head/tools/regression/bin/sh/parser/dollar-quote8.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote8.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +[ $'hello\0' = hello ] +[ $'hello\0world' = hello ] +[ $'hello\0'$'world' = helloworld ] +[ $'hello\000' = hello ] +[ $'hello\000world' = hello ] +[ $'hello\000'$'world' = helloworld ] +[ $'hello\x00' = hello ] +[ $'hello\x00world' = hello ] +[ $'hello\x00'$'world' = helloworld ] Added: head/tools/regression/bin/sh/parser/dollar-quote9.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/dollar-quote9.0 Thu May 5 20:55:55 2011 (r221513) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +# POSIX and C99 say D800-DFFF are undefined in a universal character name. +# We reject this but many other shells expand to something that looks like +# CESU-8. + +v=$( (eval ": \$'\uD800'") 2>&1 >/dev/null) +[ $? -ne 0 ] && [ -n "$v" ] From owner-svn-src-all@FreeBSD.ORG Thu May 5 22:04:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7E96106566B; Thu, 5 May 2011 22:04:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A675B8FC18; Thu, 5 May 2011 22:04:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45M4xpu018623; Thu, 5 May 2011 22:04:59 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45M4xX0018621; Thu, 5 May 2011 22:04:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105052204.p45M4xX0018621@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 5 May 2011 22:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221514 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 22:04:59 -0000 Author: jilles Date: Thu May 5 22:04:59 2011 New Revision: 221514 URL: http://svn.freebsd.org/changeset/base/221514 Log: MFC r221011: sh: Remove duplicate code resetting uid/gid for set +p/ +o privileged. Modified: stable/8/bin/sh/options.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/options.c ============================================================================== --- stable/8/bin/sh/options.c Thu May 5 20:55:55 2011 (r221513) +++ stable/8/bin/sh/options.c Thu May 5 22:04:59 2011 (r221514) @@ -195,13 +195,8 @@ options(int cmdline) minus_o(*argptr, val); if (*argptr) argptr++; - } else { - if (c == 'p' && !val && privileged) { - (void) setuid(getuid()); - (void) setgid(getgid()); - } + } else setoption(c, val); - } } } return; @@ -269,10 +264,6 @@ minus_o(char *name, int val) } else { for (i = 0; i < NOPTS; i++) if (equal(name, optlist[i].name)) { - if (!val && privileged && equal(name, "privileged")) { - (void) setuid(getuid()); - (void) setgid(getgid()); - } setoption(optlist[i].letter, val); return; } @@ -286,6 +277,10 @@ setoption(int flag, int val) { int i; + if (flag == 'p' && !val && privileged) { + (void) setuid(getuid()); + (void) setgid(getgid()); + } for (i = 0; i < NOPTS; i++) if (optlist[i].letter == flag) { optlist[i].val = val; From owner-svn-src-all@FreeBSD.ORG Thu May 5 22:07:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BB59106564A; Thu, 5 May 2011 22:07:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A7EB8FC08; Thu, 5 May 2011 22:07:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45M728k018876; Thu, 5 May 2011 22:07:02 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45M72Lu018874; Thu, 5 May 2011 22:07:02 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105052207.p45M72Lu018874@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 5 May 2011 22:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221515 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 22:07:02 -0000 Author: jilles Date: Thu May 5 22:07:02 2011 New Revision: 221515 URL: http://svn.freebsd.org/changeset/base/221515 Log: MFC r221012: sh: Check setuid()/setgid() return values. If the -p option is turned off, privileges from a setuid or setgid binary are dropped. Make sure to check if this succeeds. If it fails, this is an error which will cause the shell to abort except in interactive mode or if 'command' was used to make 'set' or an outer 'eval' or '.' non-special. Note that taking advantage of this feature and writing setuid shell scripts seems unwise. Modified: stable/8/bin/sh/options.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/options.c ============================================================================== --- stable/8/bin/sh/options.c Thu May 5 22:04:59 2011 (r221514) +++ stable/8/bin/sh/options.c Thu May 5 22:07:02 2011 (r221515) @@ -278,8 +278,10 @@ setoption(int flag, int val) int i; if (flag == 'p' && !val && privileged) { - (void) setuid(getuid()); - (void) setgid(getgid()); + if (setgid(getgid()) == -1) + error("setgid"); + if (setuid(getuid()) == -1) + error("setuid"); } for (i = 0; i < NOPTS; i++) if (optlist[i].letter == flag) { From owner-svn-src-all@FreeBSD.ORG Thu May 5 23:00:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBE63106566B; Thu, 5 May 2011 23:00:50 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 25E6A8FC16; Thu, 5 May 2011 23:00:49 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEANoqw02DaFvO/2dsb2JhbACEUKJliHKrXpEngSqDXIEBBI9KhxqHUQ X-IronPort-AV: E=Sophos;i="4.64,323,1301889600"; d="scan'208";a="119782146" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 05 May 2011 19:00:49 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 1B95EB3F5A; Thu, 5 May 2011 19:00:49 -0400 (EDT) Date: Thu, 5 May 2011 19:00:49 -0400 (EDT) From: Rick Macklem To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Message-ID: <134917667.1082867.1304636449048.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <86r58dqett.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 23:00:50 -0000 > Rick Macklem writes: > > Well, another way it could be handled would be to put the sysctls > > and > > the global variables they manipulate in a module shared by both > > clients, > > like sys/nfs/nfs_lock.c (module "nfslock"). Then the same sysctl > > would > > affect both clients. (I hesitate to create "yet another" module just > > to share the sysctls, but since "nfslock" is used by both clients, > > it > > should work ok, I think.) > > I don't understand why you would want to do that. Can't you just > change > "oldnfs" back to "nfs" in the old stack? > I'm not sure what you are saying. W.r.t. the SYSCTL() naming, the old NFS client is currently using vfs.nfs.xxx and the new NFS client is using vfs.newnfs.xxx. If you are referring to the fstype names, then switching "oldnfs" back to "nfs" means the new one has to change to something other than "nfs", like "newnfs". The whole idea of changing "newnfs"->"nfs" was to make it the default and get it more widely tested/used. (Presumably, if the new NFS works well, it would eventually become the only one, but I don't see that happening until FreeBSD10 at the earliest.) The problem is w.r.t. the SYSCTL() naming. I could make vfs.newnfs.xxx use vfs.nfs.xxx and vfs.nfs.xxx->vfs.oldnfs.xxx quite easily. The problem would be that people couldn't as easily use "oldnfs" instead of "nfs". (At least for cases where setting sysctls matter.) What I was proposing is have the two clients share the vfs.nfs.xxx name space, since most of the SYSCTL()s use the same name and do the same thing. For example, now there is: vfs.nfs.bufpackets: 4 vfs.newnfs.bufpackets: 4 and /etc/rc.d/nfsclient wants to fiddle with vfs.nfs.bufpackets. I was proposing that the two clients share vfs.nfs.bufpackets Make sense now? (I understood that you felt having both vfs.nfs.xxx and vfs.newnfs.xxx made maintaining the scripts awkward.) rick From owner-svn-src-all@FreeBSD.ORG Thu May 5 23:09:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12099106566C; Thu, 5 May 2011 23:09:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 019B58FC14; Thu, 5 May 2011 23:09:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45N9Hmm022485; Thu, 5 May 2011 23:09:17 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45N9HI6022483; Thu, 5 May 2011 23:09:17 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201105052309.p45N9HI6022483@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 5 May 2011 23:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221516 - head/sys/dev/cxgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 23:09:18 -0000 Author: np Date: Thu May 5 23:09:17 2011 New Revision: 221516 URL: http://svn.freebsd.org/changeset/base/221516 Log: Bump up the number of egress queues that the driver is allowed to use. MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu May 5 22:07:02 2011 (r221515) +++ head/sys/dev/cxgbe/t4_main.c Thu May 5 23:09:17 2011 (r221516) @@ -415,7 +415,7 @@ t4_attach(device_t dev) /* These are total (sum of all ports) limits for a bus driver */ rc = -t4_cfg_pfvf(sc, sc->mbox, sc->pf, 0, - 64, /* max # of egress queues */ + 128, /* max # of egress queues */ 64, /* max # of egress Ethernet or control queues */ 64, /* max # of ingress queues with fl/interrupt */ 0, /* max # of ingress queues without interrupt */ From owner-svn-src-all@FreeBSD.ORG Thu May 5 23:20:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 633C9106564A; Thu, 5 May 2011 23:20:17 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 81C7D8FC08; Thu, 5 May 2011 23:20:16 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAJYvw02DaFvO/2dsb2JhbACEUKJltE6RJYEqhF0Ej0qHGodR X-IronPort-AV: E=Sophos;i="4.64,323,1301889600"; d="scan'208";a="121653977" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 05 May 2011 19:06:46 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id B9E26793A8; Thu, 5 May 2011 19:06:46 -0400 (EDT) Date: Thu, 5 May 2011 19:06:46 -0400 (EDT) From: Rick Macklem To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Message-ID: <1076836182.1082988.1304636806753.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <86r58dqett.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 23:20:17 -0000 > Rick Macklem writes: > > Well, another way it could be handled would be to put the sysctls > > and > > the global variables they manipulate in a module shared by both > > clients, > > like sys/nfs/nfs_lock.c (module "nfslock"). Then the same sysctl > > would > > affect both clients. (I hesitate to create "yet another" module just > > to share the sysctls, but since "nfslock" is used by both clients, > > it > > should work ok, I think.) > > I don't understand why you would want to do that. Can't you just > change > "oldnfs" back to "nfs" in the old stack? > > Hmm, it occurred to me that there is currently no way to tell the > kernel > that two drivers conflict with eachother. Perhaps I should take a shot > at implementing a DRIVER_CONFLICT macro to mirror DRIVER_DEPEND. > Also, except for the SYSCTL() naming issue they don't comflict. At the moment it is perfectly ok to use both for mounts concurrently. For example, you could have the following 2 lines in your /etc/fstab: nfs-server:/sub1 /mnt nfs rw 0 0 nfs-server:/sub2 /mnt2 oldnfs rw 0 0 I don't know why you would actually choose to do this, unless you found that the old NFS client did something that worked better for "/sub2" for your purposes, but it will work fine. rick ps: The issue you pointed out in the first post is just a line in /etc/rc.d/mountcritremote that needs to be fixed. It uses a module name of "nfs" and "nfsclient" when the new NFS is "nfs" and "nfscl" (the old one is "oldnfs" and "nfsclient"). That's easy to fix. I'm just waiting for a review. From owner-svn-src-all@FreeBSD.ORG Fri May 6 01:06:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F4AD1065674; Fri, 6 May 2011 01:06:22 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id D40E98FC0C; Fri, 6 May 2011 01:06:21 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAHNIw02DaFvO/2dsb2JhbACEUaJltGWRHoEqhF0Ej0qHGodR X-IronPort-AV: E=Sophos;i="4.64,323,1301889600"; d="scan'208";a="121714173" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 05 May 2011 20:51:49 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id DAA85793A9; Thu, 5 May 2011 20:51:49 -0400 (EDT) Date: Thu, 5 May 2011 20:51:49 -0400 (EDT) From: Rick Macklem To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Message-ID: <1714751436.1086037.1304643109772.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <86r58dsi0m.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 01:06:22 -0000 > Rick Macklem writes: > > "Dag-Erling Sm=C3=B8rgrav" writes: > > > Ideally, both the old and the new NFS stack would use the same > > > fstypes and sysctl names, but I don't know if there's any way we > > > can > > > prevent someone from compiling both into the kernel at the same > > > time, or loading both modules. > > If the scripts in /etc/rc.d are fixed to use the correct sysctl > > naming, > > do you think it matters which one is "vfs.nfs."? >=20 > Yes. There is a whole world outside the base system: munin, webmin, > nagios etc. Are you going to change all of them as well? >=20 Btw, the simpler patch is to just change the SYSCTL() naming conventions, but there is no easy way (at least with recompiling the kernel + modules) to switch it back so the old client uses "vfs.nfs.xxx". In other words: vfs.nfs.xxx - would be the variables on the new client vfs.oldnfs.xxx - would be the same variables for the old client Then the default/new client would work, but switching back to the old would be involved. With the SYSCTL() name space shared, the switch back and forth would be simply which fstype was used for the mounts and they would both see the same sysctl changes. rick ps: I have the shared patch running here now. It is straightforward, but fairly big. From owner-svn-src-all@FreeBSD.ORG Fri May 6 01:29:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E40106566B; Fri, 6 May 2011 01:29:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D591C8FC12; Fri, 6 May 2011 01:29:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p461TEf9026713; Fri, 6 May 2011 01:29:14 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p461TEZD026711; Fri, 6 May 2011 01:29:14 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105060129.p461TEZD026711@svn.freebsd.org> From: Rick Macklem Date: Fri, 6 May 2011 01:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221517 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 01:29:16 -0000 Author: rmacklem Date: Fri May 6 01:29:14 2011 New Revision: 221517 URL: http://svn.freebsd.org/changeset/base/221517 Log: Change the new NFS server so that it returns 0 when the f_bavail or f_ffree fields of "struct statfs" are negative, since the values that go on the wire are unsigned and will appear to be very large positive values otherwise. This makes the handling of a negative f_bavail compatible with the old/regular NFS server. MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Thu May 5 23:09:17 2011 (r221516) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri May 6 01:29:14 2011 (r221517) @@ -1280,8 +1280,23 @@ nfsvno_fsync(struct vnode *vp, u_int64_t int nfsvno_statfs(struct vnode *vp, struct statfs *sf) { + int error; - return (VFS_STATFS(vp->v_mount, sf)); + error = VFS_STATFS(vp->v_mount, sf); + if (error == 0) { + /* + * Since NFS handles these values as unsigned on the + * wire, there is no way to represent negative values, + * so set them to 0. Without this, they will appear + * to be very large positive values for clients like + * Solaris10. + */ + if (sf->f_bavail < 0) + sf->f_bavail = 0; + if (sf->f_ffree < 0) + sf->f_ffree = 0; + } + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Fri May 6 01:31:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82C621065674; Fri, 6 May 2011 01:31:02 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 364A88FC14; Fri, 6 May 2011 01:31:02 +0000 (UTC) Received: from sa-nc-mfg-210.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.4/8.14.4) with ESMTP id p45LJUnv053982 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 5 May 2011 14:19:35 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <201105051416.p45EGfcd003037@svn.freebsd.org> Date: Thu, 5 May 2011 14:18:26 -0700 Content-Transfer-Encoding: 7bit Message-Id: <8FF5539E-F91D-46C6-9019-B40CB8010A85@xcllnt.net> References: <201105051416.p45EGfcd003037@svn.freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221497 - head/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 01:31:02 -0000 On May 5, 2011, at 7:16 AM, Nathan Whitehorn wrote: > @@ -84,15 +63,13 @@ if [ $bootable = yes ]; then > mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi > umount $MNT > mdconfig -d -u $md > - BOOTOPTS="-b $EFIPART -no-emul-boot" > + BOOTOPTS="-b bootimage=i386;$EFIPART -o no-emul-boot" > else > BOOTOPTS="" > fi Thanks! Can you explain what this particular change does or why it's done? -- Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Fri May 6 02:45:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D239106564A; Fri, 6 May 2011 02:45:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F096E8FC08; Fri, 6 May 2011 02:45:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p462j2BX028998; Fri, 6 May 2011 02:45:02 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p462j2mv028994; Fri, 6 May 2011 02:45:02 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105060245.p462j2mv028994@svn.freebsd.org> From: Adrian Chadd Date: Fri, 6 May 2011 02:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221518 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 02:45:03 -0000 Author: adrian Date: Fri May 6 02:45:02 2011 New Revision: 221518 URL: http://svn.freebsd.org/changeset/base/221518 Log: Fix GPIO_MAXPINS calculation for the AR71xx, AR724x, AR913x SoC. Submitted by: Luiz Otavio O Souza Modified: head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/atheros/ar71xx_gpiovar.h head/sys/mips/atheros/ar724xreg.h head/sys/mips/atheros/ar91xxreg.h Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Fri May 6 01:29:14 2011 (r221517) +++ head/sys/mips/atheros/ar71xx_gpio.c Fri May 6 02:45:02 2011 (r221518) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "gpio_if.h" @@ -144,7 +145,19 @@ static int ar71xx_gpio_pin_max(device_t dev, int *maxpin) { - *maxpin = AR71XX_GPIO_PINS - 1; + switch (ar71xx_soc) { + case AR71XX_SOC_AR9130: + case AR71XX_SOC_AR9132: + *maxpin = AR91XX_GPIO_PINS - 1; + break; + case AR71XX_SOC_AR7240: + case AR71XX_SOC_AR7241: + case AR71XX_SOC_AR7242: + *maxpin = AR724X_GPIO_PINS - 1; + break; + default: + *maxpin = AR71XX_GPIO_PINS - 1; + } return (0); } Modified: head/sys/mips/atheros/ar71xx_gpiovar.h ============================================================================== --- head/sys/mips/atheros/ar71xx_gpiovar.h Fri May 6 01:29:14 2011 (r221517) +++ head/sys/mips/atheros/ar71xx_gpiovar.h Fri May 6 02:45:02 2011 (r221518) @@ -52,6 +52,8 @@ GPIO_WRITE(sc, reg, GPIO_READ(sc, (reg)) & ~(bits)) #define AR71XX_GPIO_PINS 12 +#define AR724X_GPIO_PINS 18 +#define AR91XX_GPIO_PINS 22 struct ar71xx_gpio_softc { device_t dev; Modified: head/sys/mips/atheros/ar724xreg.h ============================================================================== --- head/sys/mips/atheros/ar724xreg.h Fri May 6 01:29:14 2011 (r221517) +++ head/sys/mips/atheros/ar724xreg.h Fri May 6 02:45:02 2011 (r221518) @@ -105,6 +105,4 @@ #define AR724X_GPIO_FUNC_UART_EN (1 >> 1) #define AR724X_GPIO_FUNC_JTAG_DISABLE (1 >> 0) -#define AR724X_GPIO_COUNT 18 - #endif Modified: head/sys/mips/atheros/ar91xxreg.h ============================================================================== --- head/sys/mips/atheros/ar91xxreg.h Fri May 6 01:29:14 2011 (r221517) +++ head/sys/mips/atheros/ar91xxreg.h Fri May 6 02:45:02 2011 (r221518) @@ -81,6 +81,4 @@ #define AR91XX_GPIO_FUNC_UART_EN (1 << 8) #define AR91XX_GPIO_FUNC_USB_CLK_EN (1 << 4) -#define AR91XX_GPIO_COUNT 22 - #endif From owner-svn-src-all@FreeBSD.ORG Fri May 6 03:26:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C039106566B; Fri, 6 May 2011 03:26:25 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5BA8FC13; Fri, 6 May 2011 03:26:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p463QO4P030489; Fri, 6 May 2011 03:26:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p463QOqI030485; Fri, 6 May 2011 03:26:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105060326.p463QOqI030485@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 6 May 2011 03:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221519 - in head/sys: dev/bm powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 03:26:25 -0000 Author: nwhitehorn Date: Fri May 6 03:26:24 2011 New Revision: 221519 URL: http://svn.freebsd.org/changeset/base/221519 Log: Do not use Open Firmware to open the device and instead program its start on our own. This prevents hangs at boot when using a bm(4) NIC where the cable is not plugged in at boot time. Obtained from: NetBSD MFC after: 1 week Modified: head/sys/dev/bm/if_bm.c head/sys/powerpc/powermac/macio.c head/sys/powerpc/powermac/maciovar.h Modified: head/sys/dev/bm/if_bm.c ============================================================================== --- head/sys/dev/bm/if_bm.c Fri May 6 02:45:02 2011 (r221518) +++ head/sys/dev/bm/if_bm.c Fri May 6 03:26:24 2011 (r221519) @@ -558,6 +558,7 @@ bm_attach(device_t dev) } /* alloc interrupt */ + bm_disable_interrupts(sc); sc->sc_txdmairqid = BM_TXDMA_INTERRUPT; sc->sc_txdmairq = bus_alloc_resource_any(dev, SYS_RES_IRQ, @@ -591,9 +592,6 @@ bm_attach(device_t dev) eaddr = sc->sc_enaddr; OF_getprop(node, "local-mac-address", eaddr, ETHER_ADDR_LEN); - /* reset the adapter */ - bm_chip_setup(sc); - /* * Setup MII * On Apple BMAC controllers, we end up in a weird state of @@ -608,6 +606,9 @@ bm_attach(device_t dev) return (error); } + /* reset the adapter */ + bm_chip_setup(sc); + sc->sc_mii = device_get_softc(sc->sc_miibus); if_initname(ifp, device_get_name(sc->sc_dev), @@ -1129,31 +1130,26 @@ bm_chip_setup(struct bm_softc *sc) { uint16_t reg; uint16_t *eaddr_sect; - char path[128]; - ihandle_t bmac_ih; + struct mii_data *mii; + struct mii_softc *miisc; eaddr_sect = (uint16_t *)(sc->sc_enaddr); + dbdma_stop(sc->sc_txdma); + dbdma_stop(sc->sc_rxdma); - /* - * Enable BMAC cell by opening and closing its OF node. This enables - * the cell in macio as a side effect. We should probably directly - * twiddle the FCR bits, but we lack a good interface for this at the - * present time. - */ - - OF_package_to_path(ofw_bus_get_node(sc->sc_dev), path, sizeof(path)); - bmac_ih = OF_open(path); - if (bmac_ih == -1) { - device_printf(sc->sc_dev, - "Enabling BMAC cell failed! Hoping it's already active.\n"); - } else { - OF_close(bmac_ih); + /* Reset MII */ + mii = device_get_softc(sc->sc_miibus); + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) { + PHY_RESET(miisc); + PHY_WRITE(miisc, MII_BMCR, PHY_READ(miisc, MII_BMCR) & + ~BMCR_ISO); } /* Reset chip */ CSR_WRITE_2(sc, BM_RX_RESET, 0x0000); CSR_WRITE_2(sc, BM_TX_RESET, 0x0001); do { + DELAY(10); reg = CSR_READ_2(sc, BM_TX_RESET); } while (reg & 0x0001); Modified: head/sys/powerpc/powermac/macio.c ============================================================================== --- head/sys/powerpc/powermac/macio.c Fri May 6 02:45:02 2011 (r221518) +++ head/sys/powerpc/powermac/macio.c Fri May 6 03:26:24 2011 (r221519) @@ -65,6 +65,10 @@ struct macio_softc { vm_offset_t sc_base; vm_offset_t sc_size; struct rman sc_mem_rman; + + /* FCR registers */ + int sc_memrid; + struct resource *sc_memr; }; static MALLOC_DEFINE(M_MACIO, "macio", "macio device information"); @@ -296,6 +300,10 @@ macio_attach(device_t dev) sc->sc_base = reg[2]; sc->sc_size = MACIO_REG_SIZE; + sc->sc_memrid = PCIR_BAR(0); + sc->sc_memr = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->sc_memrid, RF_ACTIVE); + sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "MacIO Device Memory"; error = rman_init(&sc->sc_mem_rman); @@ -347,6 +355,29 @@ macio_attach(device_t dev) continue; } device_set_ivars(cdev, dinfo); + + /* Set FCRs to enable some devices */ + if (sc->sc_memr == NULL) + continue; + + if (strcmp(ofw_bus_get_name(cdev), "bmac") == 0 || + strcmp(ofw_bus_get_compat(cdev), "bmac+") == 0) { + uint32_t fcr; + + fcr = bus_read_4(sc->sc_memr, HEATHROW_FCR); + + fcr |= FCR_ENET_ENABLE & ~FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + fcr |= FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + fcr &= ~FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + } } return (bus_generic_attach(dev)); Modified: head/sys/powerpc/powermac/maciovar.h ============================================================================== --- head/sys/powerpc/powermac/maciovar.h Fri May 6 02:45:02 2011 (r221518) +++ head/sys/powerpc/powermac/maciovar.h Fri May 6 03:26:24 2011 (r221519) @@ -38,6 +38,16 @@ #define MACIO_REG_SIZE 0x7ffff /* + * Feature Control Registers (FCR) + */ +#define HEATHROW_FCR 0x38 +#define KEYLARGO_FCR0 0x38 +#define KEYLARGO_FCR1 0x3c + +#define FCR_ENET_ENABLE 0x60000000 +#define FCR_ENET_RESET 0x80000000 + +/* * Format of a macio reg property entry. */ struct macio_reg { From owner-svn-src-all@FreeBSD.ORG Fri May 6 03:29:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C108106566C; Fri, 6 May 2011 03:29:54 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id F16EE8FC13; Fri, 6 May 2011 03:29:53 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0LKR00G048DTRX00@smtpauth1.wiscmail.wisc.edu>; Thu, 05 May 2011 22:29:53 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.65.155]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0LKR009328DOMI10@smtpauth1.wiscmail.wisc.edu>; Thu, 05 May 2011 22:29:49 -0500 (CDT) Date: Thu, 05 May 2011 22:29:47 -0500 From: Nathan Whitehorn In-reply-to: <8FF5539E-F91D-46C6-9019-B40CB8010A85@xcllnt.net> To: Marcel Moolenaar Message-id: <4DC36B2B.4010509@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.65.155 X-Spam-PmxInfo: Server=avs-13, Version=5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.5.6.32122, SenderIP=76.210.65.155 References: <201105051416.p45EGfcd003037@svn.freebsd.org> <8FF5539E-F91D-46C6-9019-B40CB8010A85@xcllnt.net> User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221497 - head/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 03:29:54 -0000 On 05/05/11 16:18, Marcel Moolenaar wrote: > On May 5, 2011, at 7:16 AM, Nathan Whitehorn wrote: > >> @@ -84,15 +63,13 @@ if [ $bootable = yes ]; then >> mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi >> umount $MNT >> mdconfig -d -u $md >> - BOOTOPTS="-b $EFIPART -no-emul-boot" >> + BOOTOPTS="-b bootimage=i386;$EFIPART -o no-emul-boot" >> else >> BOOTOPTS="" >> fi > Thanks! > > Can you explain what this particular change does or why it's done? > I'm cleaning up the release-building code, and am switching them from mkisofs to makefs, which provides the same functionality. This started with some irritation with the cdrtools port and a bug in the HFS hybrid generation that was breaking PPC release CD generation. Switching these to depend on makefs in general speeds the release-building process and removes the number of dependencies involved, since makefs is built as part of base. -Nathan From owner-svn-src-all@FreeBSD.ORG Fri May 6 05:21:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88A71106564A; Fri, 6 May 2011 05:21:59 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 397658FC0C; Fri, 6 May 2011 05:21:59 +0000 (UTC) Received: from dhcp-192-168-2-13.wifi.xcllnt.net (atm.xcllnt.net [70.36.220.6]) (authenticated bits=0) by mail.xcllnt.net (8.14.4/8.14.4) with ESMTP id p465Lrk2074537 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 5 May 2011 22:21:58 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <4DC36B2B.4010509@freebsd.org> Date: Thu, 5 May 2011 22:21:53 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105051416.p45EGfcd003037@svn.freebsd.org> <8FF5539E-F91D-46C6-9019-B40CB8010A85@xcllnt.net> <4DC36B2B.4010509@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221497 - head/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 05:21:59 -0000 On May 5, 2011, at 8:29 PM, Nathan Whitehorn wrote: > On 05/05/11 16:18, Marcel Moolenaar wrote: >> On May 5, 2011, at 7:16 AM, Nathan Whitehorn wrote: >>=20 >>> @@ -84,15 +63,13 @@ if [ $bootable =3D yes ]; then >>> mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi >>> umount $MNT >>> mdconfig -d -u $md >>> - BOOTOPTS=3D"-b $EFIPART -no-emul-boot" >>> + BOOTOPTS=3D"-b bootimage=3Di386;$EFIPART -o no-emul-boot" >>> else >>> BOOTOPTS=3D"" >>> fi >> Thanks! >>=20 >> Can you explain what this particular change does or why it's done? >>=20 >=20 > I'm cleaning up the release-building code, and am switching them from = mkisofs to makefs, which provides the same functionality. This started = with some irritation with the cdrtools port and a bug in the HFS hybrid = generation that was breaking PPC release CD generation. Switching these = to depend on makefs in general speeds the release-building process and = removes the number of dependencies involved, since makefs is built as = part of base. Actually, I was just interested in the 'bootimage=3Di386' part of your change. I totally get why you're doing it :-) Sorry for not being clear... --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Fri May 6 07:13:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FB33106566B; Fri, 6 May 2011 07:13:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80AFA8FC0A; Fri, 6 May 2011 07:13:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p467DYjk037299; Fri, 6 May 2011 07:13:34 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p467DYmh037296; Fri, 6 May 2011 07:13:34 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201105060713.p467DYmh037296@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 6 May 2011 07:13:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221521 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 07:13:34 -0000 Author: ae Date: Fri May 6 07:13:34 2011 New Revision: 221521 URL: http://svn.freebsd.org/changeset/base/221521 Log: Convert delay parameter back to ms when reporting to user. PR: 156838 MFC after: 1 week Modified: head/sys/netinet/ipfw/ip_dn_glue.c head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dn_glue.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_glue.c Fri May 6 03:44:49 2011 (r221520) +++ head/sys/netinet/ipfw/ip_dn_glue.c Fri May 6 07:13:34 2011 (r221521) @@ -624,7 +624,7 @@ dn_c_copy_pipe(struct dn_schk *s, struct /* These 4 field are the same in pipe7 and pipe8 */ pipe7->next.sle_next = (struct dn_pipe7 *)DN_IS_PIPE; pipe7->bandwidth = l->bandwidth; - pipe7->delay = l->delay; + pipe7->delay = l->delay * 1000 / hz; pipe7->pipe_nr = l->link_nr - DN_MAX_ID; if (!is7) { Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Fri May 6 03:44:49 2011 (r221520) +++ head/sys/netinet/ipfw/ip_dummynet.c Fri May 6 07:13:34 2011 (r221521) @@ -808,6 +808,7 @@ copy_obj(char **start, char *end, void * /* Adjust burst parameter for link */ struct dn_link *l = (struct dn_link *)*start; l->burst = div64(l->burst, 8 * hz); + l->delay = l->delay * 1000 / hz; } else if (o->type == DN_SCH) { /* Set id->id to the number of instances */ struct dn_schk *s = _o; From owner-svn-src-all@FreeBSD.ORG Fri May 6 07:14:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09ABD106566B; Fri, 6 May 2011 07:14:29 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id A24B18FC0A; Fri, 6 May 2011 07:14:28 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 82C5D45EA7; Fri, 6 May 2011 09:14:27 +0200 (CEST) Received: from localhost (public-gprs263555.centertel.pl [31.60.176.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 222DC4569A; Fri, 6 May 2011 09:14:18 +0200 (CEST) Date: Fri, 6 May 2011 09:13:51 +0200 From: Pawel Jakub Dawidek To: Rick Macklem Message-ID: <20110506071351.GI14661@garage.freebsd.pl> References: <86r58dqett.fsf@ds4.des.no> <1076836182.1082988.1304636806753.JavaMail.root@erie.cs.uoguelph.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SdaPbLtAangIkrMZ" Content-Disposition: inline In-Reply-To: <1076836182.1082988.1304636806753.JavaMail.root@erie.cs.uoguelph.ca> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.5 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org, Rick Macklem Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 07:14:29 -0000 --SdaPbLtAangIkrMZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 05, 2011 at 07:06:46PM -0400, Rick Macklem wrote: > Also, except for the SYSCTL() naming issue they don't comflict. At the > moment it is perfectly ok to use both for mounts concurrently. > For example, you could have the following 2 lines in your /etc/fstab: >=20 > nfs-server:/sub1 /mnt nfs rw 0 0 > nfs-server:/sub2 /mnt2 oldnfs rw 0 0 >=20 > I don't know why you would actually choose to do this, unless you found > that the old NFS client did something that worked better for "/sub2" for > your purposes, but it will work fine. My personal opinion is that supporting such configuration is not worth the efforts and actually I'd prefer to use the same sysctl tree (vfs.nfs.*) and the same fstype (nfs) in both clients. User would decide which to use by loading one kernel module or the other. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --SdaPbLtAangIkrMZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk3Dn64ACgkQForvXbEpPzQW8gCgzRaDGicX0X32upRCtNQuhYVQ kukAn29IEv/lQRdiRUuBz7F8RhMygg/F =hgqD -----END PGP SIGNATURE----- --SdaPbLtAangIkrMZ-- From owner-svn-src-all@FreeBSD.ORG Fri May 6 08:38:03 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43295106564A; Fri, 6 May 2011 08:38:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id BF7C08FC0A; Fri, 6 May 2011 08:38:02 +0000 (UTC) Received: from c122-106-155-58.carlnfd1.nsw.optusnet.com.au (c122-106-155-58.carlnfd1.nsw.optusnet.com.au [122.106.155.58]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p468bwK5023533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 May 2011 18:38:00 +1000 Date: Fri, 6 May 2011 18:37:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "David E. O'Brien" In-Reply-To: <201105051445.p45EjPL2004080@svn.freebsd.org> Message-ID: <20110506180643.C1014@besplex.bde.org> References: <201105051445.p45EjPL2004080@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r221502 - in head: lib/libutil sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 08:38:03 -0000 On Thu, 5 May 2011, David E. O'Brien wrote: > Log: > Don't duplicate define the stdint types. This is a regression. The [_]stdint.h files were correctly structured before. The stdint types weren't duplicate-defined (modulo bugs), but their definitions were repeated as necessary inside ifdfs. Using an omnibus header like sys/_stdint.h gives uncontrollable namespace pollution. > head/sys/sys/_stdint.h > - copied, changed from r221139, head/sys/sys/stdint.h sys/_stdint.h was intentionally left out, since it can only be used to increase namespace pollution (unlike machine/_stdint.h, which exists to avoid namespace pollution). > Modified: head/lib/libutil/libutil.h > ============================================================================== > --- head/lib/libutil/libutil.h Thu May 5 14:43:35 2011 (r221501) > +++ head/lib/libutil/libutil.h Thu May 5 14:45:24 2011 (r221502) > @@ -41,22 +41,13 @@ > > #include > #include > +#include This also unsorts the includes. > #ifndef _GID_T_DECLARED > typedef __gid_t gid_t; > #define _GID_T_DECLARED > #endif > > -#ifndef _INT64_T_DECLARED > -typedef __int64_t int64_t; > -#define _INT64_T_DECLARED > -#endif > - > -#ifndef _UINT64_T_DECLARED > -typedef __uint64_t uint64_t; > -#define _UINT64_T_DECLARED > -#endif > - It used to define only 2 application types from . Hopefully precisely the ones that it used. Now it defines all the application types defined in , and it can't control pollution bloat if the latter is expanded. > #ifndef _PID_T_DECLARED > typedef __pid_t pid_t; > #define _PID_T_DECLARED > > Copied and modified: head/sys/sys/_stdint.h (from r221139, head/sys/sys/stdint.h) > ============================================================================== > --- head/sys/sys/stdint.h Wed Apr 27 20:42:30 2011 (r221139, copy source) > +++ head/sys/sys/_stdint.h Thu May 5 14:45:24 2011 (r221502) > @@ -1,4 +1,5 @@ > /*- > + * Copyright (c) 2011 David E. O'Brien > * Copyright (c) 2001 Mike Barcroft > * All rights reserved. > * > @@ -26,13 +27,8 @@ > * $FreeBSD$ > */ > > -#ifndef _SYS_STDINT_H_ > -#define _SYS_STDINT_H_ > - > -#include > -#include > - > -#include > +#ifndef _SYS__STDINT_H_ > +#define _SYS__STDINT_H_ > > #ifndef _INT8_T_DECLARED > typedef __int8_t int8_t; > @@ -74,33 +70,13 @@ typedef __uint64_t uint64_t; > #define _UINT64_T_DECLARED > #endif > > -typedef __int_least8_t int_least8_t; > -typedef __int_least16_t int_least16_t; > -typedef __int_least32_t int_least32_t; > -typedef __int_least64_t int_least64_t; > - > -typedef __uint_least8_t uint_least8_t; > -typedef __uint_least16_t uint_least16_t; > -typedef __uint_least32_t uint_least32_t; > -typedef __uint_least64_t uint_least64_t; > - > -typedef __int_fast8_t int_fast8_t; > -typedef __int_fast16_t int_fast16_t; > -typedef __int_fast32_t int_fast32_t; > -typedef __int_fast64_t int_fast64_t; > - > -typedef __uint_fast8_t uint_fast8_t; > -typedef __uint_fast16_t uint_fast16_t; > -typedef __uint_fast32_t uint_fast32_t; > -typedef __uint_fast64_t uint_fast64_t; > - > -typedef __intmax_t intmax_t; > -typedef __uintmax_t uintmax_t; > - > #ifndef _INTPTR_T_DECLARED > typedef __intptr_t intptr_t; > -typedef __uintptr_t uintptr_t; > #define _INTPTR_T_DECLARED > #endif > +#ifndef _UINTPTR_T_DECLARED > +typedef __uintptr_t uintptr_t; > +#define _UINTPTR_T_DECLARED > +#endif > > -#endif /* !_SYS_STDINT_H_ */ > +#endif /* !_SYS__STDINT_H_ */ > > Modified: head/sys/sys/stdint.h > ============================================================================== > --- head/sys/sys/stdint.h Thu May 5 14:43:35 2011 (r221501) > +++ head/sys/sys/stdint.h Thu May 5 14:45:24 2011 (r221502) > @@ -33,46 +33,7 @@ > #include > > #include > - > -#ifndef _INT8_T_DECLARED > -typedef __int8_t int8_t; > -#define _INT8_T_DECLARED > -#endif > - > -#ifndef _INT16_T_DECLARED > -typedef __int16_t int16_t; > -#define _INT16_T_DECLARED > -#endif > - > -#ifndef _INT32_T_DECLARED > -typedef __int32_t int32_t; > -#define _INT32_T_DECLARED > -#endif > - > -#ifndef _INT64_T_DECLARED > -typedef __int64_t int64_t; > -#define _INT64_T_DECLARED > -#endif > - > -#ifndef _UINT8_T_DECLARED > -typedef __uint8_t uint8_t; > -#define _UINT8_T_DECLARED > -#endif > - > -#ifndef _UINT16_T_DECLARED > -typedef __uint16_t uint16_t; > -#define _UINT16_T_DECLARED > -#endif > - > -#ifndef _UINT32_T_DECLARED > -typedef __uint32_t uint32_t; > -#define _UINT32_T_DECLARED > -#endif > - > -#ifndef _UINT64_T_DECLARED > -typedef __uint64_t uint64_t; > -#define _UINT64_T_DECLARED > -#endif > +#include > > typedef __int_least8_t int_least8_t; > typedef __int_least16_t int_least16_t; > @@ -94,13 +55,13 @@ typedef __uint_fast16_t uint_fast16_t; > typedef __uint_fast32_t uint_fast32_t; > typedef __uint_fast64_t uint_fast64_t; > > +#ifndef _INTMAX_T_DECLARED > typedef __intmax_t intmax_t; > +#define _INTMAX_T_DECLARED > +#endif > +#ifndef _UINTMAX_T_DECLARED > typedef __uintmax_t uintmax_t; > - > -#ifndef _INTPTR_T_DECLARED > -typedef __intptr_t intptr_t; > -typedef __uintptr_t uintptr_t; > -#define _INTPTR_T_DECLARED > +#define _UINTMAX_T_DECLARED > #endif > > #endif /* !_SYS_STDINT_H_ */ sys/stdint.h (= ) is obfuscated by putting its main definitions in sys/_types.h and sys/_stdint.h. Its bad enough that its basic definitions are not visible. Hmm, why does it use sys/_types.h? That only declares POSIX-related typedefs, but cannot declare any POSIX-related types. > Modified: head/sys/sys/types.h > ============================================================================== > --- head/sys/sys/types.h Thu May 5 14:43:35 2011 (r221501) > +++ head/sys/sys/types.h Thu May 5 14:45:24 2011 (r221502) > @@ -60,51 +60,7 @@ typedef unsigned int uint; /* Sys V com > /* > * XXX POSIX sized integrals that should appear only in . > */ As the XXX comment says, it is a bug for these to be declared here at all. Applications must include if they want to use the types in it. Some of the types that should be declared only in are declared here for historical reasons. The pollution has been here so long (together with other pollution), that it is now very hard to clean up. Probably the kernel was the main abuser of the pollution here. here. But now the kernel is even more polluted by default, so the pollution here has almost no effect on the kernel, since was polluted to include mainly for the convenience of casting things to intmax_t, etc., in printfs. > -#ifndef _INT8_T_DECLARED > -typedef __int8_t int8_t; > -#define _INT8_T_DECLARED > -#endif > - > -#ifndef _INT16_T_DECLARED > -typedef __int16_t int16_t; > -#define _INT16_T_DECLARED > -#endif > - > -#ifndef _INT32_T_DECLARED > -typedef __int32_t int32_t; > -#define _INT32_T_DECLARED > -#endif > - > -#ifndef _INT64_T_DECLARED > -typedef __int64_t int64_t; > -#define _INT64_T_DECLARED > -#endif > - > -#ifndef _UINT8_T_DECLARED > -typedef __uint8_t uint8_t; > -#define _UINT8_T_DECLARED > -#endif > - > -#ifndef _UINT16_T_DECLARED > -typedef __uint16_t uint16_t; > -#define _UINT16_T_DECLARED > -#endif > - > -#ifndef _UINT32_T_DECLARED > -typedef __uint32_t uint32_t; > -#define _UINT32_T_DECLARED > -#endif > - > -#ifndef _UINT64_T_DECLARED > -typedef __uint64_t uint64_t; > -#define _UINT64_T_DECLARED > -#endif > - > -#ifndef _INTPTR_T_DECLARED > -typedef __intptr_t intptr_t; > -typedef __uintptr_t uintptr_t; > -#define _INTPTR_T_DECLARED > -#endif > +#include Declaring the pollution in another header expands the bug and makes it harder to see how large it is. > > typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ > typedef __uint16_t u_int16_t; > Bruce From owner-svn-src-all@FreeBSD.ORG Fri May 6 11:54:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31E40106566B; Fri, 6 May 2011 11:54:27 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 1AAF68FC13; Fri, 6 May 2011 11:54:26 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgEAH7gw02DaFvO/2dsb2JhbACEU5wPB4ZQiHGrBZERgSqDXoEBBI9YhxuHVQ X-IronPort-AV: E=Sophos;i="4.64,325,1301889600"; d="scan'208";a="119829241" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 06 May 2011 07:54:25 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 21C8EB3F28; Fri, 6 May 2011 07:54:25 -0400 (EDT) Date: Fri, 6 May 2011 07:54:25 -0400 (EDT) From: Rick Macklem To: Pawel Jakub Dawidek Message-ID: <1136495405.1095168.1304682865076.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110506071351.GI14661@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org, Rick Macklem Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 11:54:27 -0000 > On Thu, May 05, 2011 at 07:06:46PM -0400, Rick Macklem wrote: > > Also, except for the SYSCTL() naming issue they don't comflict. At > > the > > moment it is perfectly ok to use both for mounts concurrently. > > For example, you could have the following 2 lines in your > > /etc/fstab: > > > > nfs-server:/sub1 /mnt nfs rw 0 0 > > nfs-server:/sub2 /mnt2 oldnfs rw 0 0 > > > > I don't know why you would actually choose to do this, unless you > > found > > that the old NFS client did something that worked better for "/sub2" > > for > > your purposes, but it will work fine. > > My personal opinion is that supporting such configuration is not worth > the efforts and actually I'd prefer to use the same sysctl tree > (vfs.nfs.*) and the same fstype (nfs) in both clients. User would > decide > which to use by loading one kernel module or the other. > Well, first off, I think there are problems if you have two modules using the same "fstype" name. For example, the old mount syscall which is still used by amd, does an unconditional kern_kldload(.., "fstype",...); I'm not sure what happens when there are two modules both with the same "fstype"? Also, there could be a script in /etc/rc.d that runs before any mount is attempted (I don't know how to do this, but I assume rc@ will) and it could load one or the other based on an rc.conf variable, but what about doing a mount from single user? And I also don't know how to tell the system to allow kernels to be built with one of NFSCLIENT, NFSCL, but not both of them? (It would fail for both of them, since there would be 2 VFS_SET()s with the same "fstype", I think?) I also think there might be situations where running both concurrently could still be useful (that's the way things have been for 8.n). Here's a not too hypothetical example: - an 8.n system mounts 3 file servers server1 - a FreeBSD server with NFSv4 enabled server2 - Solaris8 server3 - some Linux distro and the /etc/fstab entries look like: server1:/vol1 /vol1 nfs rw,nfsv4 0 0 server2:/vol2 /vol2 nfs rw 0 0 server3:/vol3 /vol3 nfs rw 0 0 (The part w.r.t. server1 using NFSv4 isn't too hypothetical, since I recently got email from a guy who is using NFSv4 on 8.2 because it fixed a file locking problem for him. Related to openoffice, if I recall correctly.) The above is using both NFS clients concurrently, although whoever set it up might not realize that, since server1 using "newnfs" because that's needed for NFSv4. Ok, now this system is upgraded to 9.0 and then /vol3 goes wonky. If both clients can still run concurrently, /etc/fstab could be changed to: server1:/vol1 /vol1 nfs rw,nfsv4 0 0 server2:/vol2 /vol2 nfs rw 0 0 server3:/vol3 /vol3 oldnfs rw 0 0 to seee if the problem is caused by the switchover to the new NFS client. If the wonkyness goes away, I have some work to do. If not, I'm off the hook because something else is causing the wonkyness. If the two stacks can't run concurrently, the above change couldn't be done, because "nfsv4" isn't supported by the old NFS client. In summary, at this point, changing the vfs.nfs.xxx to be shared by the two clients is, to me, easier than trying to change things so the two clients use the same "fstype" and can't run concurrently and I also think there may be cases where running them concurrently in 9.0 would be useful. rick From owner-svn-src-all@FreeBSD.ORG Fri May 6 12:49:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6EE21065670; Fri, 6 May 2011 12:49:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC32C8FC1C; Fri, 6 May 2011 12:49:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46CnWOe048675; Fri, 6 May 2011 12:49:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46CnWWW048672; Fri, 6 May 2011 12:49:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105061249.p46CnWWW048672@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 May 2011 12:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221522 - in stable/8: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 12:49:33 -0000 Author: jilles Date: Fri May 6 12:49:32 2011 New Revision: 221522 URL: http://svn.freebsd.org/changeset/base/221522 Log: MFC r220903: sh: Do not word split "${#parameter}". This is only a problem if IFS contains digits, which is unusual but valid. Because of an incorrect fix for PR bin/12137, "${#parameter}" was treated as ${#parameter}. The underlying problem was that "${#parameter}" erroneously added CTLESC bytes before determining the length. This was properly fixed for PR bin/56147 but the incorrect fix was not backed out. Reported by: Seeker on forums.freebsd.org Added: stable/8/tools/regression/bin/sh/expansion/length6.0 - copied unchanged from r220903, head/tools/regression/bin/sh/expansion/length6.0 Modified: stable/8/bin/sh/parser.c Directory Properties: stable/8/bin/sh/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) Modified: stable/8/bin/sh/parser.c ============================================================================== --- stable/8/bin/sh/parser.c Fri May 6 07:13:34 2011 (r221521) +++ stable/8/bin/sh/parser.c Fri May 6 12:49:32 2011 (r221522) @@ -1289,7 +1289,7 @@ parsesub: { pungetc(); } STPUTC('=', out); - if (subtype != VSLENGTH && (dblquote || arinest)) + if (dblquote || arinest) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; if (subtype != VSNORMAL) Copied: stable/8/tools/regression/bin/sh/expansion/length6.0 (from r220903, head/tools/regression/bin/sh/expansion/length6.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/length6.0 Fri May 6 12:49:32 2011 (r221522, copy of r220903, head/tools/regression/bin/sh/expansion/length6.0) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +x='!@#$%^&*()[]' +[ ${#x} = 12 ] || echo bad 1 +[ "${#x}" = 12 ] || echo bad 2 +IFS=2 +[ ${#x} = 1 ] || echo bad 3 +[ "${#x}" = 12 ] || echo bad 4 From owner-svn-src-all@FreeBSD.ORG Fri May 6 13:11:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AB7D106564A; Fri, 6 May 2011 13:11:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AF108FC0A; Fri, 6 May 2011 13:11:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46DBo9I049379; Fri, 6 May 2011 13:11:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46DBoTw049377; Fri, 6 May 2011 13:11:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105061311.p46DBoTw049377@svn.freebsd.org> From: Alexander Motin Date: Fri, 6 May 2011 13:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221523 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 13:11:50 -0000 Author: mav Date: Fri May 6 13:11:50 2011 New Revision: 221523 URL: http://svn.freebsd.org/changeset/base/221523 Log: Increase NFS_TICKINTVL value from 10 to 500. Now that callout does useful things only once per second, so other 99 calls per second were useless and just don't allow idle system to sleep properly. Reviewed by: rmacklem Modified: head/sys/fs/nfs/nfs.h Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Fri May 6 12:49:32 2011 (r221522) +++ head/sys/fs/nfs/nfs.h Fri May 6 13:11:50 2011 (r221523) @@ -39,7 +39,7 @@ */ #define NFS_MAXIOVEC 34 -#define NFS_TICKINTVL 10 /* Desired time for a tick (msec) */ +#define NFS_TICKINTVL 500 /* Desired time for a tick (msec) */ #define NFS_HZ (hz / nfscl_ticks) /* Ticks/sec */ #define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */ #define NFS_MINTIMEO (1 * NFS_HZ) /* Min timeout to use */ From owner-svn-src-all@FreeBSD.ORG Fri May 6 13:12:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A381A106564A; Fri, 6 May 2011 13:12:45 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92AF58FC16; Fri, 6 May 2011 13:12:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46DCj25049444; Fri, 6 May 2011 13:12:45 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46DCj1e049441; Fri, 6 May 2011 13:12:45 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201105061312.p46DCj1e049441@svn.freebsd.org> From: Fabien Thomas Date: Fri, 6 May 2011 13:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221524 - stable/8/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 13:12:45 -0000 Author: fabient Date: Fri May 6 13:12:45 2011 New Revision: 221524 URL: http://svn.freebsd.org/changeset/base/221524 Log: MFC r220194: Fix two SA refcount: - AH does not release the SA like in ESP/IPCOMP when handling EAGAIN - ipsec_process_done incorrectly release the SA. Modified: stable/8/sys/netipsec/ipsec_output.c stable/8/sys/netipsec/xform_ah.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/netipsec/ipsec_output.c ============================================================================== --- stable/8/sys/netipsec/ipsec_output.c Fri May 6 13:11:50 2011 (r221523) +++ stable/8/sys/netipsec/ipsec_output.c Fri May 6 13:12:45 2011 (r221524) @@ -247,7 +247,6 @@ ipsec_process_done(struct mbuf *m, struc panic("ipsec_process_done"); bad: m_freem(m); - KEY_FREESAV(&sav); return (error); } Modified: stable/8/sys/netipsec/xform_ah.c ============================================================================== --- stable/8/sys/netipsec/xform_ah.c Fri May 6 13:11:50 2011 (r221523) +++ stable/8/sys/netipsec/xform_ah.c Fri May 6 13:12:45 2011 (r221524) @@ -785,6 +785,7 @@ ah_input_cb(struct cryptop *crp) sav->tdb_cryptoid = crp->crp_sid; if (crp->crp_etype == EAGAIN) { + KEY_FREESAV(&sav); error = crypto_dispatch(crp); return error; } From owner-svn-src-all@FreeBSD.ORG Fri May 6 13:24:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0B44106564A; Fri, 6 May 2011 13:24:10 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6C628FC0A; Fri, 6 May 2011 13:24:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46DOA7S049833; Fri, 6 May 2011 13:24:10 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46DOAOK049825; Fri, 6 May 2011 13:24:10 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201105061324.p46DOAOK049825@svn.freebsd.org> From: Fabien Thomas Date: Fri, 6 May 2011 13:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221525 - stable/8/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 13:24:10 -0000 Author: fabient Date: Fri May 6 13:24:10 2011 New Revision: 221525 URL: http://svn.freebsd.org/changeset/base/221525 Log: MFC r220206: Optimisation in IPSEC(4): - Remove contention on ISR during the crypto operation by using rwlock(9). - Remove a second lookup of the SA in the callback. Modified: stable/8/sys/netipsec/ipsec.h stable/8/sys/netipsec/key.c stable/8/sys/netipsec/key.h stable/8/sys/netipsec/xform.h stable/8/sys/netipsec/xform_ah.c stable/8/sys/netipsec/xform_esp.c stable/8/sys/netipsec/xform_ipcomp.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/netipsec/ipsec.h ============================================================================== --- stable/8/sys/netipsec/ipsec.h Fri May 6 13:12:45 2011 (r221524) +++ stable/8/sys/netipsec/ipsec.h Fri May 6 13:24:10 2011 (r221525) @@ -123,7 +123,7 @@ struct ipsecrequest { struct secasvar *sav; /* place holder of SA for use */ struct secpolicy *sp; /* back pointer to SP */ - struct mtx lock; /* to interlock updates */ + struct rwlock lock; /* to interlock updates */ }; /* @@ -132,11 +132,15 @@ struct ipsecrequest { * hard it is to remove this... */ #define IPSECREQUEST_LOCK_INIT(_isr) \ - mtx_init(&(_isr)->lock, "ipsec request", NULL, MTX_DEF | MTX_RECURSE) -#define IPSECREQUEST_LOCK(_isr) mtx_lock(&(_isr)->lock) -#define IPSECREQUEST_UNLOCK(_isr) mtx_unlock(&(_isr)->lock) -#define IPSECREQUEST_LOCK_DESTROY(_isr) mtx_destroy(&(_isr)->lock) -#define IPSECREQUEST_LOCK_ASSERT(_isr) mtx_assert(&(_isr)->lock, MA_OWNED) + rw_init_flags(&(_isr)->lock, "ipsec request", RW_RECURSE) +#define IPSECREQUEST_LOCK(_isr) rw_rlock(&(_isr)->lock) +#define IPSECREQUEST_UNLOCK(_isr) rw_runlock(&(_isr)->lock) +#define IPSECREQUEST_WLOCK(_isr) rw_wlock(&(_isr)->lock) +#define IPSECREQUEST_WUNLOCK(_isr) rw_wunlock(&(_isr)->lock) +#define IPSECREQUEST_UPGRADE(_isr) rw_try_upgrade(&(_isr)->lock) +#define IPSECREQUEST_DOWNGRADE(_isr) rw_downgrade(&(_isr)->lock) +#define IPSECREQUEST_LOCK_DESTROY(_isr) rw_destroy(&(_isr)->lock) +#define IPSECREQUEST_LOCK_ASSERT(_isr) rw_assert(&(_isr)->lock, RA_LOCKED) /* security policy in PCB */ struct inpcbpolicy { Modified: stable/8/sys/netipsec/key.c ============================================================================== --- stable/8/sys/netipsec/key.c Fri May 6 13:12:45 2011 (r221524) +++ stable/8/sys/netipsec/key.c Fri May 6 13:24:10 2011 (r221525) @@ -809,6 +809,7 @@ key_checkrequest(struct ipsecrequest *is { u_int level; int error; + struct secasvar *sav; IPSEC_ASSERT(isr != NULL, ("null isr")); IPSEC_ASSERT(saidx != NULL, ("null saidx")); @@ -826,45 +827,31 @@ key_checkrequest(struct ipsecrequest *is /* get current level */ level = ipsec_get_reqlevel(isr); -#if 0 - /* - * We do allocate new SA only if the state of SA in the holder is - * SADB_SASTATE_DEAD. The SA for outbound must be the oldest. - */ - if (isr->sav != NULL) { - if (isr->sav->sah == NULL) - panic("%s: sah is null.\n", __func__); - if (isr->sav == (struct secasvar *)LIST_FIRST( - &isr->sav->sah->savtree[SADB_SASTATE_DEAD])) { - KEY_FREESAV(&isr->sav); - isr->sav = NULL; - } - } -#else + /* - * we free any SA stashed in the IPsec request because a different + * We check new SA in the IPsec request because a different * SA may be involved each time this request is checked, either * because new SAs are being configured, or this request is * associated with an unconnected datagram socket, or this request * is associated with a system default policy. * - * The operation may have negative impact to performance. We may - * want to check cached SA carefully, rather than picking new SA - * every time. - */ - if (isr->sav != NULL) { - KEY_FREESAV(&isr->sav); - isr->sav = NULL; - } -#endif - - /* - * new SA allocation if no SA found. * key_allocsa_policy should allocate the oldest SA available. * See key_do_allocsa_policy(), and draft-jenkins-ipsec-rekeying-03.txt. */ - if (isr->sav == NULL) - isr->sav = key_allocsa_policy(saidx); + sav = key_allocsa_policy(saidx); + if (sav != isr->sav) { + /* SA need to be updated. */ + if (!IPSECREQUEST_UPGRADE(isr)) { + /* Kick everyone off. */ + IPSECREQUEST_UNLOCK(isr); + IPSECREQUEST_WLOCK(isr); + } + if (isr->sav != NULL) + KEY_FREESAV(&isr->sav); + isr->sav = sav; + IPSECREQUEST_DOWNGRADE(isr); + } else if (sav != NULL) + KEY_FREESAV(&sav); /* When there is SA. */ if (isr->sav != NULL) { @@ -1239,6 +1226,16 @@ key_freesp_so(struct secpolicy **sp) KEY_FREESP(sp); } +void +key_addrefsa(struct secasvar *sav, const char* where, int tag) +{ + + IPSEC_ASSERT(sav != NULL, ("null sav")); + IPSEC_ASSERT(sav->refcnt > 0, ("refcount must exist")); + + sa_addref(sav); +} + /* * Must be called after calling key_allocsa(). * This function is called by key_freesp() to free some SA allocated Modified: stable/8/sys/netipsec/key.h ============================================================================== --- stable/8/sys/netipsec/key.h Fri May 6 13:12:45 2011 (r221524) +++ stable/8/sys/netipsec/key.h Fri May 6 13:24:10 2011 (r221525) @@ -76,10 +76,13 @@ extern void _key_freesp(struct secpolicy extern struct secasvar *key_allocsa(union sockaddr_union *, u_int, u_int32_t, const char*, int); +extern void key_addrefsa(struct secasvar *, const char*, int); extern void key_freesav(struct secasvar **, const char*, int); #define KEY_ALLOCSA(dst, proto, spi) \ key_allocsa(dst, proto, spi, __FILE__, __LINE__) +#define KEY_ADDREFSA(sav) \ + key_addrefsa(sav, __FILE__, __LINE__) #define KEY_FREESAV(psav) \ key_freesav(psav, __FILE__, __LINE__) Modified: stable/8/sys/netipsec/xform.h ============================================================================== --- stable/8/sys/netipsec/xform.h Fri May 6 13:12:45 2011 (r221524) +++ stable/8/sys/netipsec/xform.h Fri May 6 13:24:10 2011 (r221525) @@ -75,6 +75,7 @@ struct tdb_crypto { int tc_protoff; /* current protocol offset */ int tc_skip; /* data offset */ caddr_t tc_ptr; /* associated crypto data */ + struct secasvar *tc_sav; /* related SA */ }; struct secasvar; Modified: stable/8/sys/netipsec/xform_ah.c ============================================================================== --- stable/8/sys/netipsec/xform_ah.c Fri May 6 13:12:45 2011 (r221524) +++ stable/8/sys/netipsec/xform_ah.c Fri May 6 13:24:10 2011 (r221525) @@ -715,6 +715,8 @@ ah_input(struct mbuf *m, struct secasvar tc->tc_protoff = protoff; tc->tc_skip = skip; tc->tc_ptr = (caddr_t) mtag; /* Save the mtag we've identified. */ + KEY_ADDREFSA(sav); + tc->tc_sav = sav; if (mtag == NULL) return crypto_dispatch(crp); @@ -764,13 +766,8 @@ ah_input_cb(struct cryptop *crp) mtag = (struct m_tag *) tc->tc_ptr; m = (struct mbuf *) crp->crp_buf; - sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); - if (sav == NULL) { - V_ahstat.ahs_notdb++; - DPRINTF(("%s: SA expired while in crypto\n", __func__)); - error = ENOBUFS; /*XXX*/ - goto bad; - } + sav = tc->tc_sav; + IPSEC_ASSERT(sav != NULL, ("null SA!")); saidx = &sav->sah->saidx; IPSEC_ASSERT(saidx->dst.sa.sa_family == AF_INET || @@ -785,7 +782,6 @@ ah_input_cb(struct cryptop *crp) sav->tdb_cryptoid = crp->crp_sid; if (crp->crp_etype == EAGAIN) { - KEY_FREESAV(&sav); error = crypto_dispatch(crp); return error; } @@ -1111,6 +1107,8 @@ ah_output( /* These are passed as-is to the callback. */ tc->tc_isr = isr; + KEY_ADDREFSA(sav); + tc->tc_sav = sav; tc->tc_spi = sav->spi; tc->tc_dst = sav->sah->saidx.dst; tc->tc_proto = sav->sah->saidx.proto; @@ -1147,14 +1145,14 @@ ah_output_cb(struct cryptop *crp) isr = tc->tc_isr; IPSECREQUEST_LOCK(isr); - sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); - if (sav == NULL) { + sav = tc->tc_sav; + /* With the isr lock released SA pointer can be updated. */ + if (sav != isr->sav) { V_ahstat.ahs_notdb++; DPRINTF(("%s: SA expired while in crypto\n", __func__)); error = ENOBUFS; /*XXX*/ goto bad; } - IPSEC_ASSERT(isr->sav == sav, ("SA changed\n")); /* Check for crypto errors. */ if (crp->crp_etype) { @@ -1162,7 +1160,6 @@ ah_output_cb(struct cryptop *crp) sav->tdb_cryptoid = crp->crp_sid; if (crp->crp_etype == EAGAIN) { - KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); error = crypto_dispatch(crp); return error; Modified: stable/8/sys/netipsec/xform_esp.c ============================================================================== --- stable/8/sys/netipsec/xform_esp.c Fri May 6 13:12:45 2011 (r221524) +++ stable/8/sys/netipsec/xform_esp.c Fri May 6 13:24:10 2011 (r221525) @@ -423,6 +423,8 @@ esp_input(struct mbuf *m, struct secasva tc->tc_proto = sav->sah->saidx.proto; tc->tc_protoff = protoff; tc->tc_skip = skip; + KEY_ADDREFSA(sav); + tc->tc_sav = sav; /* Decryption descriptor */ if (espx) { @@ -484,15 +486,8 @@ esp_input_cb(struct cryptop *crp) mtag = (struct m_tag *) tc->tc_ptr; m = (struct mbuf *) crp->crp_buf; - sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); - if (sav == NULL) { - V_espstat.esps_notdb++; - DPRINTF(("%s: SA gone during crypto (SA %s/%08lx proto %u)\n", - __func__, ipsec_address(&tc->tc_dst), - (u_long) ntohl(tc->tc_spi), tc->tc_proto)); - error = ENOBUFS; /*XXX*/ - goto bad; - } + sav = tc->tc_sav; + IPSEC_ASSERT(sav != NULL, ("null SA!")); saidx = &sav->sah->saidx; IPSEC_ASSERT(saidx->dst.sa.sa_family == AF_INET || @@ -509,7 +504,6 @@ esp_input_cb(struct cryptop *crp) sav->tdb_cryptoid = crp->crp_sid; if (crp->crp_etype == EAGAIN) { - KEY_FREESAV(&sav); error = crypto_dispatch(crp); return error; } @@ -877,6 +871,8 @@ esp_output( /* Callback parameters */ tc->tc_isr = isr; + KEY_ADDREFSA(sav); + tc->tc_sav = sav; tc->tc_spi = sav->spi; tc->tc_dst = saidx->dst; tc->tc_proto = saidx->proto; @@ -926,8 +922,9 @@ esp_output_cb(struct cryptop *crp) isr = tc->tc_isr; IPSECREQUEST_LOCK(isr); - sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); - if (sav == NULL) { + sav = tc->tc_sav; + /* With the isr lock released SA pointer can be updated. */ + if (sav != isr->sav) { V_espstat.esps_notdb++; DPRINTF(("%s: SA gone during crypto (SA %s/%08lx proto %u)\n", __func__, ipsec_address(&tc->tc_dst), @@ -935,8 +932,6 @@ esp_output_cb(struct cryptop *crp) error = ENOBUFS; /*XXX*/ goto bad; } - IPSEC_ASSERT(isr->sav == sav, - ("SA changed was %p now %p\n", isr->sav, sav)); /* Check for crypto errors. */ if (crp->crp_etype) { @@ -945,7 +940,6 @@ esp_output_cb(struct cryptop *crp) sav->tdb_cryptoid = crp->crp_sid; if (crp->crp_etype == EAGAIN) { - KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); error = crypto_dispatch(crp); return error; Modified: stable/8/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/8/sys/netipsec/xform_ipcomp.c Fri May 6 13:12:45 2011 (r221524) +++ stable/8/sys/netipsec/xform_ipcomp.c Fri May 6 13:24:10 2011 (r221525) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -206,6 +207,8 @@ ipcomp_input(struct mbuf *m, struct seca tc->tc_proto = sav->sah->saidx.proto; tc->tc_protoff = protoff; tc->tc_skip = skip; + KEY_ADDREFSA(sav); + tc->tc_sav = sav; return crypto_dispatch(crp); } @@ -249,13 +252,8 @@ ipcomp_input_cb(struct cryptop *crp) mtag = (struct mtag *) tc->tc_ptr; m = (struct mbuf *) crp->crp_buf; - sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); - if (sav == NULL) { - V_ipcompstat.ipcomps_notdb++; - DPRINTF(("%s: SA expired while in crypto\n", __func__)); - error = ENOBUFS; /*XXX*/ - goto bad; - } + sav = tc->tc_sav; + IPSEC_ASSERT(sav != NULL, ("null SA!")); saidx = &sav->sah->saidx; IPSEC_ASSERT(saidx->dst.sa.sa_family == AF_INET || @@ -269,7 +267,6 @@ ipcomp_input_cb(struct cryptop *crp) sav->tdb_cryptoid = crp->crp_sid; if (crp->crp_etype == EAGAIN) { - KEY_FREESAV(&sav); return crypto_dispatch(crp); } V_ipcompstat.ipcomps_noxform++; @@ -452,6 +449,8 @@ ipcomp_output( } tc->tc_isr = isr; + KEY_ADDREFSA(sav); + tc->tc_sav = sav; tc->tc_spi = sav->spi; tc->tc_dst = sav->sah->saidx.dst; tc->tc_proto = sav->sah->saidx.proto; @@ -492,14 +491,14 @@ ipcomp_output_cb(struct cryptop *crp) isr = tc->tc_isr; IPSECREQUEST_LOCK(isr); - sav = KEY_ALLOCSA(&tc->tc_dst, tc->tc_proto, tc->tc_spi); - if (sav == NULL) { + sav = tc->tc_sav; + /* With the isr lock released SA pointer can be updated. */ + if (sav != isr->sav) { V_ipcompstat.ipcomps_notdb++; DPRINTF(("%s: SA expired while in crypto\n", __func__)); error = ENOBUFS; /*XXX*/ goto bad; } - IPSEC_ASSERT(isr->sav == sav, ("SA changed\n")); /* Check for crypto errors */ if (crp->crp_etype) { @@ -508,7 +507,6 @@ ipcomp_output_cb(struct cryptop *crp) sav->tdb_cryptoid = crp->crp_sid; if (crp->crp_etype == EAGAIN) { - KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); return crypto_dispatch(crp); } From owner-svn-src-all@FreeBSD.ORG Fri May 6 13:48:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53CAA1065677; Fri, 6 May 2011 13:48:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 429468FC18; Fri, 6 May 2011 13:48:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46DmsrU050620; Fri, 6 May 2011 13:48:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46DmsM7050613; Fri, 6 May 2011 13:48:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201105061348.p46DmsM7050613@svn.freebsd.org> From: John Baldwin Date: Fri, 6 May 2011 13:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221526 - in head/sys: ia64/isa isa powerpc/mpc85xx sparc64/isa x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 13:48:54 -0000 Author: jhb Date: Fri May 6 13:48:53 2011 New Revision: 221526 URL: http://svn.freebsd.org/changeset/base/221526 Log: Retire isa_setup_intr() and isa_teardown_intr() and use the generic bus versions instead. They were never needed as bus_generic_intr() and bus_teardown_intr() had been changed to pass the original child device up in 42734, but the ISA bus was not converted to new-bus until 45720. Modified: head/sys/ia64/isa/isa.c head/sys/isa/isa_common.c head/sys/isa/isa_common.h head/sys/powerpc/mpc85xx/isa.c head/sys/sparc64/isa/isa.c head/sys/x86/isa/isa.c Modified: head/sys/ia64/isa/isa.c ============================================================================== --- head/sys/ia64/isa/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/ia64/isa/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -135,25 +135,3 @@ isa_release_resource(device_t bus, devic struct resource_list *rl = &idev->id_resources; return resource_list_release(rl, bus, child, type, rid, r); } - -/* - * We can't use the bus_generic_* versions of these methods because those - * methods always pass the bus param as the requesting device, and we need - * to pass the child (the i386 nexus knows about this and is prepared to - * deal). - */ -int -isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - driver_filter_t filter, void (*ihand)(void *), void *arg, - void **cookiep) -{ - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - filter, ihand, arg, cookiep)); -} - -int -isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie) -{ - return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); -} Modified: head/sys/isa/isa_common.c ============================================================================== --- head/sys/isa/isa_common.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/isa/isa_common.c Fri May 6 13:48:53 2011 (r221526) @@ -1071,8 +1071,8 @@ static device_method_t isa_methods[] = { DEVMETHOD(bus_write_ivar, isa_write_ivar), DEVMETHOD(bus_child_detached, isa_child_detached), DEVMETHOD(bus_driver_added, isa_driver_added), - DEVMETHOD(bus_setup_intr, isa_setup_intr), - DEVMETHOD(bus_teardown_intr, isa_teardown_intr), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_resource_list,isa_get_resource_list), DEVMETHOD(bus_alloc_resource, isa_alloc_resource), Modified: head/sys/isa/isa_common.h ============================================================================== --- head/sys/isa/isa_common.h Fri May 6 13:24:10 2011 (r221525) +++ head/sys/isa/isa_common.h Fri May 6 13:48:53 2011 (r221526) @@ -73,11 +73,5 @@ extern struct resource *isa_alloc_resour extern int isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); -extern int isa_setup_intr(device_t bus, device_t child, struct resource *r, - int flags, driver_filter_t *filter, void (*ihand)(void *), void *arg, - void **cookiep); -extern int isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie); - extern driver_t isa_driver; extern devclass_t isa_devclass; Modified: head/sys/powerpc/mpc85xx/isa.c ============================================================================== --- head/sys/powerpc/mpc85xx/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/powerpc/mpc85xx/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -82,20 +82,3 @@ isa_release_resource(device_t bus, devic return (resource_list_release(rl, bus, child, type, rid, r)); } - -int -isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - driver_filter_t filter, void (*ihand)(void *), void *arg, void **cookiep) -{ - - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - filter, ihand, arg, cookiep)); -} - -int -isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie) -{ - - return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); -} Modified: head/sys/sparc64/isa/isa.c ============================================================================== --- head/sys/sparc64/isa/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/sparc64/isa/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -359,26 +359,3 @@ isa_release_resource(device_t bus, devic return (bus_generic_rl_release_resource(bus, child, type, rid, res)); } - -int -isa_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, - driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) -{ - - /* - * Just pass through. This is going to be handled by either - * one of the parent PCI buses or the nexus device. - * The interrupt had been routed before it was added to the - * resource list of the child. - */ - return (bus_generic_setup_intr(dev, child, irq, flags, filter, intr, - arg, cookiep)); -} - -int -isa_teardown_intr(device_t dev, device_t child, struct resource *irq, - void *cookie) -{ - - return (bus_generic_teardown_intr(dev, child, irq, cookie)); -} Modified: head/sys/x86/isa/isa.c ============================================================================== --- head/sys/x86/isa/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/x86/isa/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -238,28 +238,6 @@ isa_release_resource(device_t bus, devic } /* - * We can't use the bus_generic_* versions of these methods because those - * methods always pass the bus param as the requesting device, and we need - * to pass the child (the i386 nexus knows about this and is prepared to - * deal). - */ -int -isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - driver_filter_t *filter, void (*ihand)(void *), void *arg, - void **cookiep) -{ - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - filter, ihand, arg, cookiep)); -} - -int -isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie) -{ - return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); -} - -/* * On this platform, isa can also attach to the legacy bus. */ DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Fri May 6 13:50:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 305A3106566C; Fri, 6 May 2011 13:50:11 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id 0012E8FC0C; Fri, 6 May 2011 13:50:10 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0LKS0050413MFE00@smtpauth3.wiscmail.wisc.edu>; Fri, 06 May 2011 08:50:10 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.65.155]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0LKS00IZU13KDQ40@smtpauth3.wiscmail.wisc.edu>; Fri, 06 May 2011 08:50:09 -0500 (CDT) Date: Fri, 06 May 2011 08:50:07 -0500 From: Nathan Whitehorn In-reply-to: To: Marcel Moolenaar Message-id: <4DC3FC8F.2070200@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.65.155 X-Spam-PmxInfo: Server=avs-11, Version=5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.5.6.133619, SenderIP=76.210.65.155 References: <201105051416.p45EGfcd003037@svn.freebsd.org> <8FF5539E-F91D-46C6-9019-B40CB8010A85@xcllnt.net> <4DC36B2B.4010509@freebsd.org> User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221497 - head/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 13:50:11 -0000 On 05/06/11 00:21, Marcel Moolenaar wrote: > On May 5, 2011, at 8:29 PM, Nathan Whitehorn wrote: > >> On 05/05/11 16:18, Marcel Moolenaar wrote: >>> On May 5, 2011, at 7:16 AM, Nathan Whitehorn wrote: >>> >>>> @@ -84,15 +63,13 @@ if [ $bootable = yes ]; then >>>> mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi >>>> umount $MNT >>>> mdconfig -d -u $md >>>> - BOOTOPTS="-b $EFIPART -no-emul-boot" >>>> + BOOTOPTS="-b bootimage=i386;$EFIPART -o no-emul-boot" >>>> else >>>> BOOTOPTS="" >>>> fi >>> Thanks! >>> >>> Can you explain what this particular change does or why it's done? >>> >> I'm cleaning up the release-building code, and am switching them from mkisofs to makefs, which provides the same functionality. This started with some irritation with the cdrtools port and a bug in the HFS hybrid generation that was breaking PPC release CD generation. Switching these to depend on makefs in general speeds the release-building process and removes the number of dependencies involved, since makefs is built as part of base. > Actually, I was just interested in the 'bootimage=i386' part > of your change. I totally get why you're doing it :-) Ah, OK :) That just sets the El Torito system type to 0 (x86), which is what IA64 uses, as far as I can tell, and doesn't turn on any special magic like is done for the mac. I suppose while we're monkeying about with makefs, we could add an 'ia64' alias. -Nathan From owner-svn-src-all@FreeBSD.ORG Fri May 6 13:51:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84777106568A; Fri, 6 May 2011 13:51:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A3538FC1C; Fri, 6 May 2011 13:51:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46DpsPh050750; Fri, 6 May 2011 13:51:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46DpsR7050745; Fri, 6 May 2011 13:51:54 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201105061351.p46DpsR7050745@svn.freebsd.org> From: Andriy Gapon Date: Fri, 6 May 2011 13:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221527 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 13:51:54 -0000 Author: avg Date: Fri May 6 13:51:54 2011 New Revision: 221527 URL: http://svn.freebsd.org/changeset/base/221527 Log: prepare code that does topology detection for amd cpus for bulldozer This also introduces a new detection path for family 10h and newer pre-bulldozer cpus, pre-10h hardware should not be affected. Tested by: Gary Jennejohn (with pre-10h hardware) MFC after: 2 weeks Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/specialreg.h head/sys/i386/i386/mp_machdep.c head/sys/i386/include/specialreg.h Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri May 6 13:48:53 2011 (r221526) +++ head/sys/amd64/amd64/mp_machdep.c Fri May 6 13:51:54 2011 (r221527) @@ -176,11 +176,34 @@ mem_range_AP_init(void) static void topo_probe_amd(void) { + int core_id_bits; + int id; /* AMD processors do not support HTT. */ - cpu_cores = (amd_feature2 & AMDID2_CMP) != 0 ? - (cpu_procinfo2 & AMDID_CMP_CORES) + 1 : 1; cpu_logical = 1; + + if ((amd_feature2 & AMDID2_CMP) == 0) { + cpu_cores = 1; + return; + } + + core_id_bits = (cpu_procinfo2 & AMDID_COREID_SIZE) >> + AMDID_COREID_SIZE_SHIFT; + if (core_id_bits == 0) { + cpu_cores = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; + return; + } + + /* Fam 10h and newer should get here. */ + for (id = 0; id <= MAX_APIC_ID; id++) { + /* Check logical CPU availability. */ + if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) + continue; + /* Check if logical CPU has the same package ID. */ + if ((id >> core_id_bits) != (boot_cpu_id >> core_id_bits)) + continue; + cpu_cores++; + } } /* Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Fri May 6 13:48:53 2011 (r221526) +++ head/sys/amd64/include/specialreg.h Fri May 6 13:51:54 2011 (r221527) @@ -228,6 +228,8 @@ * AMD extended function 8000_0008h ecx info */ #define AMDID_CMP_CORES 0x000000ff +#define AMDID_COREID_SIZE 0x0000f000 +#define AMDID_COREID_SIZE_SHIFT 12 /* * CPUID manufacturers identifiers Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Fri May 6 13:48:53 2011 (r221526) +++ head/sys/i386/i386/mp_machdep.c Fri May 6 13:51:54 2011 (r221527) @@ -224,11 +224,34 @@ mem_range_AP_init(void) static void topo_probe_amd(void) { + int core_id_bits; + int id; /* AMD processors do not support HTT. */ - cpu_cores = (amd_feature2 & AMDID2_CMP) != 0 ? - (cpu_procinfo2 & AMDID_CMP_CORES) + 1 : 1; cpu_logical = 1; + + if ((amd_feature2 & AMDID2_CMP) == 0) { + cpu_cores = 1; + return; + } + + core_id_bits = (cpu_procinfo2 & AMDID_COREID_SIZE) >> + AMDID_COREID_SIZE_SHIFT; + if (core_id_bits == 0) { + cpu_cores = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; + return; + } + + /* Fam 10h and newer should get here. */ + for (id = 0; id <= MAX_APIC_ID; id++) { + /* Check logical CPU availability. */ + if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) + continue; + /* Check if logical CPU has the same package ID. */ + if ((id >> core_id_bits) != (boot_cpu_id >> core_id_bits)) + continue; + cpu_cores++; + } } /* Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Fri May 6 13:48:53 2011 (r221526) +++ head/sys/i386/include/specialreg.h Fri May 6 13:51:54 2011 (r221527) @@ -227,6 +227,8 @@ * AMD extended function 8000_0008h ecx info */ #define AMDID_CMP_CORES 0x000000ff +#define AMDID_COREID_SIZE 0x0000f000 +#define AMDID_COREID_SIZE_SHIFT 12 /* * CPUID manufacturers identifiers From owner-svn-src-all@FreeBSD.ORG Fri May 6 14:05:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6068A106564A; Fri, 6 May 2011 14:05:33 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 356E58FC0A; Fri, 6 May 2011 14:05:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46E5Xxt051240; Fri, 6 May 2011 14:05:33 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46E5XXW051237; Fri, 6 May 2011 14:05:33 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201105061405.p46E5XXW051237@svn.freebsd.org> From: Fabien Thomas Date: Fri, 6 May 2011 14:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221528 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 14:05:33 -0000 Author: fabient Date: Fri May 6 14:05:32 2011 New Revision: 221528 URL: http://svn.freebsd.org/changeset/base/221528 Log: MFC r220198: Clearing the flag when preempting will let the preempted thread run too much time. This can finish in a scheduler deadlock with ping-pong between two threads. One sample of this is: - device lapic (to have a preemption point on critical_exit()) - options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq) - running a cpu intensive task (that does not enter the kernel) - only one CPU on SMP or no SMP. As requested by jhb@ 4BSD have received the same type of fix instead of propagating the flag to the new thread. Modified: stable/8/sys/kern/sched_4bsd.c stable/8/sys/kern/sched_ule.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/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Fri May 6 13:51:54 2011 (r221527) +++ stable/8/sys/kern/sched_4bsd.c Fri May 6 14:05:32 2011 (r221528) @@ -944,13 +944,9 @@ sched_switch(struct thread *td, struct t if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_rem(); - if (newtd) { - MPASS(newtd->td_lock == &sched_lock); - newtd->td_flags |= (td->td_flags & TDF_NEEDRESCHED); - } - td->td_lastcpu = td->td_oncpu; - td->td_flags &= ~TDF_NEEDRESCHED; + if (!(flags & SW_PREEMPT)) + td->td_flags &= ~TDF_NEEDRESCHED; td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Fri May 6 13:51:54 2011 (r221527) +++ stable/8/sys/kern/sched_ule.c Fri May 6 14:05:32 2011 (r221528) @@ -1795,7 +1795,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - td->td_flags &= ~TDF_NEEDRESCHED; + if (!(flags & SW_PREEMPT)) + td->td_flags &= ~TDF_NEEDRESCHED; td->td_owepreempt = 0; tdq->tdq_switchcnt++; /* From owner-svn-src-all@FreeBSD.ORG Fri May 6 14:07:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD5121065675; Fri, 6 May 2011 14:07:34 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3ACE8FC24; Fri, 6 May 2011 14:07:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46E7Yfw051339; Fri, 6 May 2011 14:07:34 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46E7YRe051338; Fri, 6 May 2011 14:07:34 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105061407.p46E7YRe051338@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 6 May 2011 14:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221529 - vendor/one-true-awk/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 14:07:34 -0000 Author: ru Date: Fri May 6 14:07:34 2011 New Revision: 221529 URL: http://svn.freebsd.org/changeset/base/221529 Log: Don't track the generated file. Deleted: vendor/one-true-awk/dist/proctab.c From owner-svn-src-all@FreeBSD.ORG Fri May 6 14:08:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07EF1106564A; Fri, 6 May 2011 14:08:25 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D22E18FC0C; Fri, 6 May 2011 14:08:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46E8OYP051412; Fri, 6 May 2011 14:08:24 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46E8OBj051408; Fri, 6 May 2011 14:08:24 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105061408.p46E8OBj051408@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 6 May 2011 14:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221530 - vendor/one-true-awk/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 14:08:25 -0000 Author: ru Date: Fri May 6 14:08:24 2011 New Revision: 221530 URL: http://svn.freebsd.org/changeset/base/221530 Log: Vendor import of bwk's 6-May-2011 release. Modified: vendor/one-true-awk/dist/FIXES vendor/one-true-awk/dist/b.c vendor/one-true-awk/dist/main.c Modified: vendor/one-true-awk/dist/FIXES ============================================================================== --- vendor/one-true-awk/dist/FIXES Fri May 6 14:07:34 2011 (r221529) +++ vendor/one-true-awk/dist/FIXES Fri May 6 14:08:24 2011 (r221530) @@ -25,6 +25,11 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +May 6, 2011: + added #ifdef for isblank. + now allows -ffoo as well as -f foo arguments. + (thanks, ruslan) + May 1, 2011: after advice from todd miller, kevin lo, ruslan ermilov, and arnold robbins, changed srand() to return the previous Modified: vendor/one-true-awk/dist/b.c ============================================================================== --- vendor/one-true-awk/dist/b.c Fri May 6 14:07:34 2011 (r221529) +++ vendor/one-true-awk/dist/b.c Fri May 6 14:08:24 2011 (r221530) @@ -748,7 +748,11 @@ struct charclass { } charclasses[] = { { "alnum", 5, isalnum }, { "alpha", 5, isalpha }, +#ifndef HAS_ISBLANK { "blank", 5, isspace }, /* was isblank */ +#else + { "blank", 5, isblank }, +#endif { "cntrl", 5, iscntrl }, { "digit", 5, isdigit }, { "graph", 5, isgraph }, Modified: vendor/one-true-awk/dist/main.c ============================================================================== --- vendor/one-true-awk/dist/main.c Fri May 6 14:07:34 2011 (r221529) +++ vendor/one-true-awk/dist/main.c Fri May 6 14:08:24 2011 (r221530) @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20110501"; +const char *version = "version 20110506"; #define DEBUG #include @@ -91,13 +91,18 @@ int main(int argc, char *argv[]) safe = 1; break; case 'f': /* next argument is program filename */ - argc--; - argv++; - if (argc <= 1) - FATAL("no program filename"); - if (npfile >= MAX_PFILE - 1) - FATAL("too many -f options"); - pfile[npfile++] = argv[1]; + if (argv[1][2] != 0) { /* arg is -fsomething */ + if (npfile >= MAX_PFILE - 1) + FATAL("too many -f options"); + pfile[npfile++] = &argv[1][2]; + } else { /* arg is -f something */ + argc--; argv++; + if (argc <= 1) + FATAL("no program filename"); + if (npfile >= MAX_PFILE - 1) + FATAL("too many -f options"); + pfile[npfile++] = argv[1]; + } break; case 'F': /* set field separator */ if (argv[1][2] != 0) { /* arg is -Fsomething */ From owner-svn-src-all@FreeBSD.ORG Fri May 6 14:11:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 584B7106564A; Fri, 6 May 2011 14:11:02 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DEEB8FC17; Fri, 6 May 2011 14:11:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46EB2h4051547; Fri, 6 May 2011 14:11:02 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46EB26X051546; Fri, 6 May 2011 14:11:02 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105061411.p46EB26X051546@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 6 May 2011 14:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221531 - vendor/one-true-awk/20110506 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 14:11:02 -0000 Author: ru Date: Fri May 6 14:11:01 2011 New Revision: 221531 URL: http://svn.freebsd.org/changeset/base/221531 Log: Tag a 20110506 release. Added: vendor/one-true-awk/20110506/ - copied from r221530, vendor/one-true-awk/dist/ From owner-svn-src-all@FreeBSD.ORG Fri May 6 14:11:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C94E106564A; Fri, 6 May 2011 14:11:20 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61E468FC13; Fri, 6 May 2011 14:11:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46EBKEK051604; Fri, 6 May 2011 14:11:20 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46EBKiA051601; Fri, 6 May 2011 14:11:20 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201105061411.p46EBKiA051601@svn.freebsd.org> From: Fabien Thomas Date: Fri, 6 May 2011 14:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221532 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 14:11:20 -0000 Author: fabient Date: Fri May 6 14:11:20 2011 New Revision: 221532 URL: http://svn.freebsd.org/changeset/base/221532 Log: MFC r220198: Clearing the flag when preempting will let the preempted thread run too much time. This can finish in a scheduler deadlock with ping-pong between two threads. One sample of this is: - device lapic (to have a preemption point on critical_exit()) - options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq) - running a cpu intensive task (that does not enter the kernel) - only one CPU on SMP or no SMP. As requested by jhb@ 4BSD have received the same type of fix instead of propagating the flag to the new thread. Modified: stable/7/sys/kern/sched_4bsd.c stable/7/sys/kern/sched_ule.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/sched_4bsd.c ============================================================================== --- stable/7/sys/kern/sched_4bsd.c Fri May 6 14:11:01 2011 (r221531) +++ stable/7/sys/kern/sched_4bsd.c Fri May 6 14:11:20 2011 (r221532) @@ -848,13 +848,9 @@ sched_switch(struct thread *td, struct t if ((p->p_flag & P_NOLOAD) == 0) sched_load_rem(); - if (newtd) { - MPASS(newtd->td_lock == &sched_lock); - newtd->td_flags |= (td->td_flags & TDF_NEEDRESCHED); - } - td->td_lastcpu = td->td_oncpu; - td->td_flags &= ~TDF_NEEDRESCHED; + if (!(flags & SW_PREEMPT)) + td->td_flags &= ~TDF_NEEDRESCHED; td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: stable/7/sys/kern/sched_ule.c ============================================================================== --- stable/7/sys/kern/sched_ule.c Fri May 6 14:11:01 2011 (r221531) +++ stable/7/sys/kern/sched_ule.c Fri May 6 14:11:20 2011 (r221532) @@ -1879,7 +1879,8 @@ sched_switch(struct thread *td, struct t #endif td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - td->td_flags &= ~TDF_NEEDRESCHED; + if (!(flags & SW_PREEMPT)) + td->td_flags &= ~TDF_NEEDRESCHED; td->td_owepreempt = 0; /* * The lock pointer in an idle thread should never change. Reset it From owner-svn-src-all@FreeBSD.ORG Fri May 6 14:21:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83CDD1065670; Fri, 6 May 2011 14:21:46 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 741268FC17; Fri, 6 May 2011 14:21:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46ELkqg051957; Fri, 6 May 2011 14:21:46 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46ELk7F051954; Fri, 6 May 2011 14:21:46 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105061421.p46ELk7F051954@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 6 May 2011 14:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221533 - head/contrib/one-true-awk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 14:21:47 -0000 Author: ru Date: Fri May 6 14:21:46 2011 New Revision: 221533 URL: http://svn.freebsd.org/changeset/base/221533 Log: Update to a 6-May-2011 release (upstreamed some of our changes). Deleted: head/contrib/one-true-awk/proctab.c Modified: head/contrib/one-true-awk/FIXES head/contrib/one-true-awk/main.c Directory Properties: head/contrib/one-true-awk/ (props changed) Modified: head/contrib/one-true-awk/FIXES ============================================================================== --- head/contrib/one-true-awk/FIXES Fri May 6 14:11:20 2011 (r221532) +++ head/contrib/one-true-awk/FIXES Fri May 6 14:21:46 2011 (r221533) @@ -25,6 +25,11 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +May 6, 2011: + added #ifdef for isblank. + now allows -ffoo as well as -f foo arguments. + (thanks, ruslan) + May 1, 2011: after advice from todd miller, kevin lo, ruslan ermilov, and arnold robbins, changed srand() to return the previous Modified: head/contrib/one-true-awk/main.c ============================================================================== --- head/contrib/one-true-awk/main.c Fri May 6 14:11:20 2011 (r221532) +++ head/contrib/one-true-awk/main.c Fri May 6 14:21:46 2011 (r221533) @@ -25,7 +25,7 @@ THIS SOFTWARE. #include __FBSDID("$FreeBSD$"); -const char *version = "version 20110501 (FreeBSD)"; +const char *version = "version 20110506 (FreeBSD)"; #define DEBUG #include @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) safe = 1; break; case 'f': /* next argument is program filename */ - if (argv[1][2] != 0) { /* arg is -fsomething */ + if (argv[1][2] != 0) { /* arg is -fsomething */ if (npfile >= MAX_PFILE - 1) FATAL("too many -f options"); pfile[npfile++] = &argv[1][2]; From owner-svn-src-all@FreeBSD.ORG Fri May 6 15:33:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A573106564A; Fri, 6 May 2011 15:33:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E49A68FC13; Fri, 6 May 2011 15:33:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46FXuQJ054155; Fri, 6 May 2011 15:33:56 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46FXuXa054151; Fri, 6 May 2011 15:33:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105061533.p46FXuXa054151@svn.freebsd.org> From: Adrian Chadd Date: Fri, 6 May 2011 15:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221535 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 15:33:57 -0000 Author: adrian Date: Fri May 6 15:33:56 2011 New Revision: 221535 URL: http://svn.freebsd.org/changeset/base/221535 Log: Add a function which enables or disables RX RIFS searching, and migrate the code which does this into it. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri May 6 15:31:27 2011 (r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri May 6 15:33:56 2011 (r221535) @@ -199,6 +199,7 @@ extern HAL_STATUS ar5416GetCapability(st extern HAL_BOOL ar5416GetDiagState(struct ath_hal *ah, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize); +extern HAL_BOOL ar5416SetRifsDelay(struct ath_hal *ah, HAL_BOOL enable); extern HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri May 6 15:31:27 2011 (r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri May 6 15:33:56 2011 (r221535) @@ -368,6 +368,25 @@ typedef struct { uint8_t qcu_complete_state; } hal_mac_hang_check_t; +HAL_BOOL +ar5416SetRifsDelay(struct ath_hal *ah, HAL_BOOL enable) +{ + uint32_t val; + + /* Only support disabling RIFS delay for now */ + HALASSERT(enable == AH_FALSE); + + if (enable == AH_TRUE) + return AH_FALSE; + + /* Change RIFS init delay to 0 */ + val = OS_REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS); + val &= ~AR_PHY_RIFS_INIT_DELAY; + OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val); + + return AH_TRUE; +} + static HAL_BOOL ar5416CompareDbgHang(struct ath_hal *ah, const mac_dbg_regs_t *regs, const hal_mac_hang_check_t *check) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri May 6 15:31:27 2011 (r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri May 6 15:33:56 2011 (r221535) @@ -2520,11 +2520,8 @@ ar5416OverrideIni(struct ath_hal *ah, co * Disable RIFS search on some chips to avoid baseband * hang issues. */ - if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) { - val = OS_REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS); - val &= ~AR_PHY_RIFS_INIT_DELAY; - OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val); - } + if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) + (void) ar5416SetRifsDelay(ah, AH_FALSE); } struct ini { From owner-svn-src-all@FreeBSD.ORG Fri May 6 15:40:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C574106564A; Fri, 6 May 2011 15:40:59 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 318778FC0A; Fri, 6 May 2011 15:40:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46FexbF054387; Fri, 6 May 2011 15:40:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46Fex1D054385; Fri, 6 May 2011 15:40:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105061540.p46Fex1D054385@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 6 May 2011 15:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221536 - head/usr.sbin/makefs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 15:40:59 -0000 Author: nwhitehorn Date: Fri May 6 15:40:58 2011 New Revision: 221536 URL: http://svn.freebsd.org/changeset/base/221536 Log: Simplify this code somewhat by only writing a 512-byte-sector APM map. All firmwares can read it, we need to write one anyway for old OF versions, and if a 512-byte one is present, OS X ignores the 2048-byte one in favor of it. Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri May 6 15:33:56 2011 (r221535) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri May 6 15:40:58 2011 (r221536) @@ -528,25 +528,6 @@ cd9660_write_apm_partition_entry(FILE *f fseek(fd, 32 - strlen(part_name) - 1, SEEK_CUR); fwrite(part_type, strlen(part_type) + 1, 1, fd); - if (sector_size > 512) { - /* - * Some old broken software looks at 512-byte boundaries for - * partition table entries instead of sector boundaries. We - * can fit 3 entries into the first 2048-byte block, so use - * that to humor old code. - */ - - int n_512_parts = (sector_size / 512) - 1; - if (n_512_parts > total_partitions) - n_512_parts = total_partitions; - - if (index < n_512_parts) - cd9660_write_apm_partition_entry(fd, index, n_512_parts, - sector_start * (sector_size / 512), - nsectors * (sector_size / 512), 512, part_name, - part_type); - } - return 0; } @@ -601,23 +582,30 @@ cd9660_write_boot(FILE *fd) fseek(fd, 0, SEEK_SET); apm16 = htons(0x4552); fwrite(&apm16, sizeof(apm16), 1, fd); - apm16 = htons(diskStructure.sectorSize); + /* Device block size */ + apm16 = htons(512); fwrite(&apm16, sizeof(apm16), 1, fd); - apm32 = htonl(diskStructure.totalSectors); + /* Device block count */ + apm32 = htonl(diskStructure.totalSectors * + (diskStructure.sectorSize / 512)); fwrite(&apm32, sizeof(apm32), 1, fd); + /* Device type/id */ + apm16 = htons(1); + fwrite(&apm16, sizeof(apm16), 1, fd); + fwrite(&apm16, sizeof(apm16), 1, fd); /* Count total needed entries */ total_parts = 2 + apm_partitions; /* Self + ISO9660 */ /* Write self-descriptor */ - cd9660_write_apm_partition_entry(fd, 0, - total_parts, 1, total_parts, diskStructure.sectorSize, - "Apple", "Apple_partition_map"); + cd9660_write_apm_partition_entry(fd, 0, total_parts, 1, + total_parts, 512, "Apple", "Apple_partition_map"); /* Write ISO9660 descriptor, enclosing the whole disk */ - cd9660_write_apm_partition_entry(fd, 1, - total_parts, 0, diskStructure.totalSectors, - diskStructure.sectorSize, "", "CD_ROM_Mode_1"); + cd9660_write_apm_partition_entry(fd, 1, total_parts, 0, + diskStructure.totalSectors * + (diskStructure.sectorSize / 512), 512, "ISO9660", + "CD_ROM_Mode_1"); /* Write all partition entries */ apm_partitions = 0; @@ -627,8 +615,9 @@ cd9660_write_boot(FILE *fd) cd9660_write_apm_partition_entry(fd, 2 + apm_partitions++, total_parts, - t->sector, t->num_sectors, diskStructure.sectorSize, - "CD Boot", "Apple_Bootstrap"); + t->sector * (diskStructure.sectorSize / 512), + t->num_sectors * (diskStructure.sectorSize / 512), + 512, "CD Boot", "Apple_Bootstrap"); } } From owner-svn-src-all@FreeBSD.ORG Fri May 6 16:11:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 796841065675; Fri, 6 May 2011 16:11:23 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id F08AF8FC13; Fri, 6 May 2011 16:11:22 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B95EA1FFC35; Fri, 6 May 2011 16:11:21 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 819AF8460A; Fri, 6 May 2011 18:11:21 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Pawel Jakub Dawidek References: <86r58dqett.fsf@ds4.des.no> <1076836182.1082988.1304636806753.JavaMail.root@erie.cs.uoguelph.ca> <20110506071351.GI14661@garage.freebsd.pl> Date: Fri, 06 May 2011 18:11:21 +0200 In-Reply-To: <20110506071351.GI14661@garage.freebsd.pl> (Pawel Jakub Dawidek's message of "Fri, 6 May 2011 09:13:51 +0200") Message-ID: <86aaezzu52.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, Rick Macklem , src-committers@freebsd.org Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 16:11:23 -0000 Pawel Jakub Dawidek writes: > My personal opinion is that supporting such configuration is not worth > the efforts and actually I'd prefer to use the same sysctl tree > (vfs.nfs.*) and the same fstype (nfs) in both clients. User would decide > which to use by loading one kernel module or the other. Precisely what I was trying to say. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Fri May 6 16:53:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4992A1065672; Fri, 6 May 2011 16:53:57 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id C4E5B8FC17; Fri, 6 May 2011 16:53:56 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C1FF445EE5; Fri, 6 May 2011 18:53:53 +0200 (CEST) Received: from localhost (public-gprs164564.centertel.pl [178.56.110.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 3A6B945685; Fri, 6 May 2011 18:53:42 +0200 (CEST) Date: Fri, 6 May 2011 18:53:22 +0200 From: Pawel Jakub Dawidek To: Rick Macklem Message-ID: <20110506165322.GA1939@garage.freebsd.pl> References: <20110506071351.GI14661@garage.freebsd.pl> <1136495405.1095168.1304682865076.JavaMail.root@erie.cs.uoguelph.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline In-Reply-To: <1136495405.1095168.1304682865076.JavaMail.root@erie.cs.uoguelph.ca> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.5 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org, Rick Macklem Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 16:53:57 -0000 --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 06, 2011 at 07:54:25AM -0400, Rick Macklem wrote: > > On Thu, May 05, 2011 at 07:06:46PM -0400, Rick Macklem wrote: > > > Also, except for the SYSCTL() naming issue they don't comflict. At > > > the > > > moment it is perfectly ok to use both for mounts concurrently. > > > For example, you could have the following 2 lines in your > > > /etc/fstab: > > > > > > nfs-server:/sub1 /mnt nfs rw 0 0 > > > nfs-server:/sub2 /mnt2 oldnfs rw 0 0 > > > > > > I don't know why you would actually choose to do this, unless you > > > found > > > that the old NFS client did something that worked better for "/sub2" > > > for > > > your purposes, but it will work fine. > >=20 > > My personal opinion is that supporting such configuration is not worth > > the efforts and actually I'd prefer to use the same sysctl tree > > (vfs.nfs.*) and the same fstype (nfs) in both clients. User would > > decide > > which to use by loading one kernel module or the other. > >=20 > Well, first off, I think there are problems if you have two modules > using the same "fstype" name. For example, the old mount syscall > which is still used by amd, does an unconditional > kern_kldload(.., "fstype",...); >=20 > I'm not sure what happens when there are two modules both with the > same "fstype"? >=20 > Also, there could be a script in /etc/rc.d that runs before any mount is > attempted (I don't know how to do this, but I assume rc@ will) and it > could load one or the other based on an rc.conf variable, but what > about doing a mount from single user? >=20 > And I also don't know how to tell the system to allow kernels to be > built with one of NFSCLIENT, NFSCL, but not both of them? (It would > fail for both of them, since there would be 2 VFS_SET()s with the > same "fstype", I think?) >=20 > I also think there might be situations where running both concurrently > could still be useful (that's the way things have been for 8.n). > Here's a not too hypothetical example: > - an 8.n system mounts 3 file servers > server1 - a FreeBSD server with NFSv4 enabled > server2 - Solaris8 > server3 - some Linux distro > and the /etc/fstab entries look like: >=20 > server1:/vol1 /vol1 nfs rw,nfsv4 0 0 > server2:/vol2 /vol2 nfs rw 0 0 > server3:/vol3 /vol3 nfs rw 0 0 >=20 > (The part w.r.t. server1 using NFSv4 isn't too hypothetical, since I > recently got email from a guy who is using NFSv4 on 8.2 because it > fixed a file locking problem for him. Related to openoffice, if I > recall correctly.) >=20 > The above is using both NFS clients concurrently, although whoever > set it up might not realize that, since server1 using "newnfs" because > that's needed for NFSv4. >=20 > Ok, now this system is upgraded to 9.0 and then /vol3 goes wonky. > If both clients can still run concurrently, /etc/fstab could be changed > to: >=20 > server1:/vol1 /vol1 nfs rw,nfsv4 0 0 > server2:/vol2 /vol2 nfs rw 0 0 > server3:/vol3 /vol3 oldnfs rw 0 0 >=20 > to seee if the problem is caused by the switchover to the new NFS > client. If the wonkyness goes away, I have some work to do. If not, > I'm off the hook because something else is causing the wonkyness. >=20 > If the two stacks can't run concurrently, the above change couldn't > be done, because "nfsv4" isn't supported by the old NFS client. >=20 > In summary, at this point, changing the vfs.nfs.xxx to be shared > by the two clients is, to me, easier than trying to change things > so the two clients use the same "fstype" and can't run concurrently > and I also think there may be cases where running them concurrently > in 9.0 would be useful. If you don't share my preference then it would be good to make new NFS just 'nfs' everywhere (sysctls, fstype, etc.), so that we won't end up with 'newnfs' in random places in five years from now. What you do with old NFS is less important to me:) --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --J2SCkAp4GZ/dPZZf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk3EJ4IACgkQForvXbEpPzQF8ACfc3JfPKLLFjMAngEBud/n0IXF ISoAn1ROIXY+eNpNVAhI8bfnGKHwgZ1/ =g74i -----END PGP SIGNATURE----- --J2SCkAp4GZ/dPZZf-- From owner-svn-src-all@FreeBSD.ORG Fri May 6 17:02:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E32A106566B; Fri, 6 May 2011 17:02:16 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 3989B8FC12; Fri, 6 May 2011 17:02:15 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAEUpxE2DaFvO/2dsb2JhbACEU6JwiHGqIZEIgSqDXoEBBI9YhxuHVQ X-IronPort-AV: E=Sophos;i="4.64,327,1301889600"; d="scan'208";a="119873497" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 06 May 2011 13:02:04 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 95AC4793A7; Fri, 6 May 2011 13:02:04 -0400 (EDT) Date: Fri, 6 May 2011 13:02:04 -0400 (EDT) From: Rick Macklem To: Pawel Jakub Dawidek Message-ID: <1966116316.1117177.1304701324549.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20110506165322.GA1939@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org, Rick Macklem Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 17:02:16 -0000 > > If you don't share my preference then it would be good to make new > NFS just 'nfs' everywhere (sysctls, fstype, etc.), so that we won't > end > up with 'newnfs' in random places in five years from now. What you do > with old NFS is less important to me:) > As you'll see from the post I just sent (about 5sec before this showed up in my box), I don't mind the idea of the two clients not being concurrently usable. (I did have that semi-hypothetical example, but I, personally, don't think it's likely. I had assumed that others would think this is "required", but if not, that's fine with me.) My problem is that I don't know how to deal with two modules with the same name. (Getting rid of the old one as a module and making people have to compile it into their kernel solves that.) If both still need to be loadable modules, I think I'm going to need some help w.r.t. how to make that work. (The mount syscall tries to load it. The /etc/rc.d/nfsclient script forces it to be loaded and who knows what else. If there are two of them, then???) rick From owner-svn-src-all@FreeBSD.ORG Fri May 6 17:18:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 710721065673; Fri, 6 May 2011 17:18:29 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 609B08FC0A; Fri, 6 May 2011 17:18:28 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAK0sxE2DaFvO/2dsb2JhbACEU6JwswqRB4EqhF8Ej1iHG4dV X-IronPort-AV: E=Sophos;i="4.64,327,1301889600"; d="scan'208";a="122266345" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 06 May 2011 12:54:14 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 12CB8B4037; Fri, 6 May 2011 12:54:14 -0400 (EDT) Date: Fri, 6 May 2011 12:54:14 -0400 (EDT) From: Rick Macklem To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Message-ID: <297798401.1116789.1304700854017.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <86aaezzu52.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 17:18:29 -0000 > Pawel Jakub Dawidek writes: > > My personal opinion is that supporting such configuration is not > > worth > > the efforts and actually I'd prefer to use the same sysctl tree > > (vfs.nfs.*) and the same fstype (nfs) in both clients. User would > > decide > > which to use by loading one kernel module or the other. > > Precisely what I was trying to say. > Well, if running the two clients concurrently isn't a requirement, how does this sound? - Get rid of the module building for the old client. (ie. delete sys/modules/nfsclient) That way there is only one client NFS module to load and there isn't any confusion over which one to load and when. --> then, if anyone wants/needs the old client, they would have to build a kernel with "options NFSCLIENT" specified. (This wouldn't really affect the diskless NFS root folks, since they have to compile a client into the kernel anyhow. If no client is compiled into the kernel, the new one would be loaded as a module. I kinda like this variation because: 1 - It's simple and I know how to do it. (I don't know how to handle things like kern_modload() calls inside the mount(2) syscall when there are 2 client modules both having fstype "nfs", etc and so forth.) 2 - It deprecates the old client, so anyone using it will know that they are and most won't switch to the old unless they really need to. The downside is that anyone wanting/needing to switch to the old client will have to recompile a kernel to do so. So, does this sound ok? rick From owner-svn-src-all@FreeBSD.ORG Fri May 6 17:51:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AC491065732; Fri, 6 May 2011 17:51:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C05A8FC1C; Fri, 6 May 2011 17:51:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46Hp08b059424; Fri, 6 May 2011 17:51:00 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46Hp0YS059422; Fri, 6 May 2011 17:51:00 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105061751.p46Hp0YS059422@svn.freebsd.org> From: Rick Macklem Date: Fri, 6 May 2011 17:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221537 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 17:51:00 -0000 Author: rmacklem Date: Fri May 6 17:51:00 2011 New Revision: 221537 URL: http://svn.freebsd.org/changeset/base/221537 Log: Set the initial value of maxfilesize to OFF_MAX in the new NFS client. It will then be reduced to whatever the server says it can support. There might be an argument that this could be one block larger, but since NFS is a byte granular system, I chose not to do that. Suggested by: Matt Dillon Tested by: Daniel Braniss (earlier version) MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Fri May 6 15:40:58 2011 (r221536) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Fri May 6 17:51:00 2011 (r221537) @@ -1224,7 +1224,7 @@ mountnfs(struct nfs_args *argp, struct m if ((argp->flags & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 0) nmp->nm_maxfilesize = 0xffffffffLL; else - nmp->nm_maxfilesize = (u_int64_t)0x80000000 * DEV_BSIZE - 1; + nmp->nm_maxfilesize = OFF_MAX; nmp->nm_timeo = NFS_TIMEO; nmp->nm_retry = NFS_RETRANS; From owner-svn-src-all@FreeBSD.ORG Fri May 6 18:40:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D85C1065674; Fri, 6 May 2011 18:40:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA098FC08; Fri, 6 May 2011 18:40:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46IeqBo061232; Fri, 6 May 2011 18:40:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46IepxR061230; Fri, 6 May 2011 18:40:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105061840.p46IepxR061230@svn.freebsd.org> From: Xin LI Date: Fri, 6 May 2011 18:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221538 - in stable: 7/lib/libc/string 8/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 18:40:52 -0000 Author: delphij Date: Fri May 6 18:40:51 2011 New Revision: 221538 URL: http://svn.freebsd.org/changeset/base/221538 Log: MFC r221401: Fix prototype for ffsll(3) and fls(3). PR: docs/156796 Submitted by: Jean-Yves Migeon Modified: stable/8/lib/libc/string/ffs.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Changes in other areas also in this revision: Modified: stable/7/lib/libc/string/ffs.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/string/ffs.3 ============================================================================== --- stable/8/lib/libc/string/ffs.3 Fri May 6 17:51:00 2011 (r221537) +++ stable/8/lib/libc/string/ffs.3 Fri May 6 18:40:51 2011 (r221538) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd October 26, 2008 +.Dd May 3, 2011 .Dt FFS 3 .Os .Sh NAME @@ -50,8 +50,8 @@ .Ft int .Fn ffsl "long value" .Ft int -.Ft int .Fn ffsll "long long value" +.Ft int .Fn fls "int value" .Ft int .Fn flsl "long value" From owner-svn-src-all@FreeBSD.ORG Fri May 6 18:40:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E7611065675; Fri, 6 May 2011 18:40:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4D18FC0C; Fri, 6 May 2011 18:40:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46Ieq42061238; Fri, 6 May 2011 18:40:52 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46Ieqkc061236; Fri, 6 May 2011 18:40:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105061840.p46Ieqkc061236@svn.freebsd.org> From: Xin LI Date: Fri, 6 May 2011 18:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221538 - in stable: 7/lib/libc/string 8/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 18:40:52 -0000 Author: delphij Date: Fri May 6 18:40:51 2011 New Revision: 221538 URL: http://svn.freebsd.org/changeset/base/221538 Log: MFC r221401: Fix prototype for ffsll(3) and fls(3). PR: docs/156796 Submitted by: Jean-Yves Migeon Modified: stable/7/lib/libc/string/ffs.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Changes in other areas also in this revision: Modified: stable/8/lib/libc/string/ffs.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/string/ffs.3 ============================================================================== --- stable/7/lib/libc/string/ffs.3 Fri May 6 17:51:00 2011 (r221537) +++ stable/7/lib/libc/string/ffs.3 Fri May 6 18:40:51 2011 (r221538) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd October 26, 2008 +.Dd May 3, 2011 .Dt FFS 3 .Os .Sh NAME @@ -50,8 +50,8 @@ .Ft int .Fn ffsl "long value" .Ft int -.Ft int .Fn ffsll "long long value" +.Ft int .Fn fls "int value" .Ft int .Fn flsl "long value" From owner-svn-src-all@FreeBSD.ORG Fri May 6 19:10:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DFF1106566B; Fri, 6 May 2011 19:10:28 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0D88FC19; Fri, 6 May 2011 19:10:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46JAS9C062125; Fri, 6 May 2011 19:10:28 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46JASfY062123; Fri, 6 May 2011 19:10:28 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105061910.p46JASfY062123@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 6 May 2011 19:10:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221539 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 19:10:28 -0000 Author: ru Date: Fri May 6 19:10:27 2011 New Revision: 221539 URL: http://svn.freebsd.org/changeset/base/221539 Log: Tidy up formatting. Modified: head/tools/build/options/WITHOUT_FDT Modified: head/tools/build/options/WITHOUT_FDT ============================================================================== --- head/tools/build/options/WITHOUT_FDT Fri May 6 18:40:51 2011 (r221538) +++ head/tools/build/options/WITHOUT_FDT Fri May 6 19:10:27 2011 (r221539) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Set to not build Flattened Device Tree support as part of the base system. This -includes the device tree compiler (dtc) and libfdt support library. +Set to not build Flattened Device Tree support as part of the base system. +This includes the device tree compiler (dtc) and libfdt support library. From owner-svn-src-all@FreeBSD.ORG Fri May 6 19:13:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20CFA106566B; Fri, 6 May 2011 19:13:04 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11CEC8FC16; Fri, 6 May 2011 19:13:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46JD3NJ062252; Fri, 6 May 2011 19:13:03 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46JD3vJ062249; Fri, 6 May 2011 19:13:03 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105061913.p46JD3vJ062249@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 6 May 2011 19:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221540 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 19:13:04 -0000 Author: ru Date: Fri May 6 19:13:03 2011 New Revision: 221540 URL: http://svn.freebsd.org/changeset/base/221540 Log: Removed trailing whitespace. Modified: head/tools/build/options/WITHOUT_ACCT head/tools/build/options/WITHOUT_FLOPPY Modified: head/tools/build/options/WITHOUT_ACCT ============================================================================== --- head/tools/build/options/WITHOUT_ACCT Fri May 6 19:10:27 2011 (r221539) +++ head/tools/build/options/WITHOUT_ACCT Fri May 6 19:13:03 2011 (r221540) @@ -1,5 +1,5 @@ .\" $FreeBSD$ Set to not build process accounting tools such as -.Xr ac 8 +.Xr ac 8 and .Xr accton 8 . Modified: head/tools/build/options/WITHOUT_FLOPPY ============================================================================== --- head/tools/build/options/WITHOUT_FLOPPY Fri May 6 19:10:27 2011 (r221539) +++ head/tools/build/options/WITHOUT_FLOPPY Fri May 6 19:13:03 2011 (r221540) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Set to not build or install programs +Set to not build or install programs for operating floppy disk driver. From owner-svn-src-all@FreeBSD.ORG Fri May 6 19:14:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 462371065672; Fri, 6 May 2011 19:14:07 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3750D8FC0A; Fri, 6 May 2011 19:14:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46JE7tw062318; Fri, 6 May 2011 19:14:07 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46JE7mO062316; Fri, 6 May 2011 19:14:07 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105061914.p46JE7mO062316@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 6 May 2011 19:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221541 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 19:14:07 -0000 Author: ru Date: Fri May 6 19:14:06 2011 New Revision: 221541 URL: http://svn.freebsd.org/changeset/base/221541 Log: MK_GPIO changed its default; reflect. Added: head/tools/build/options/WITHOUT_GPIO - copied, changed from r221204, head/tools/build/options/WITH_GPIO Deleted: head/tools/build/options/WITH_GPIO Copied and modified: head/tools/build/options/WITHOUT_GPIO (from r221204, head/tools/build/options/WITH_GPIO) ============================================================================== --- head/tools/build/options/WITH_GPIO Fri Apr 29 10:33:54 2011 (r221204, copy source) +++ head/tools/build/options/WITHOUT_GPIO Fri May 6 19:14:06 2011 (r221541) @@ -1,2 +1,4 @@ .\" $FreeBSD$ -Set to build gpioctl(8) as part of the base system. +Set to not build +.Xr gpioctl 8 +as part of the base system. From owner-svn-src-all@FreeBSD.ORG Fri May 6 19:39:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 952B5106566B; Fri, 6 May 2011 19:39:56 +0000 (UTC) Date: Fri, 6 May 2011 19:39:56 +0000 From: Alexander Best To: Ruslan Ermilov Message-ID: <20110506193956.GA39560@freebsd.org> References: <201105061914.p46JE7mO062316@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105061914.p46JE7mO062316@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221541 - head/tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 19:39:56 -0000 On Fri May 6 11, Ruslan Ermilov wrote: > Author: ru > Date: Fri May 6 19:14:06 2011 > New Revision: 221541 > URL: http://svn.freebsd.org/changeset/base/221541 > > Log: > MK_GPIO changed its default; reflect. could you also have a look at WITHOUT_SSP? the description says that it only affects world, but looking at sys/conf/kern.mk, it also triggers the -fstack-protector flag for the kernel. so it has an effect both on world AND kernel, if i understood things correctly. cheers. alex > > Added: > head/tools/build/options/WITHOUT_GPIO > - copied, changed from r221204, head/tools/build/options/WITH_GPIO > Deleted: > head/tools/build/options/WITH_GPIO > > Copied and modified: head/tools/build/options/WITHOUT_GPIO (from r221204, head/tools/build/options/WITH_GPIO) > ============================================================================== > --- head/tools/build/options/WITH_GPIO Fri Apr 29 10:33:54 2011 (r221204, copy source) > +++ head/tools/build/options/WITHOUT_GPIO Fri May 6 19:14:06 2011 (r221541) > @@ -1,2 +1,4 @@ > .\" $FreeBSD$ > -Set to build gpioctl(8) as part of the base system. > +Set to not build > +.Xr gpioctl 8 > +as part of the base system. -- a13x From owner-svn-src-all@FreeBSD.ORG Fri May 6 19:55:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EE02106566B; Fri, 6 May 2011 19:55:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EA048FC0A; Fri, 6 May 2011 19:55:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46JtF3o063630; Fri, 6 May 2011 19:55:15 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46JtFdx063628; Fri, 6 May 2011 19:55:15 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105061955.p46JtFdx063628@svn.freebsd.org> From: Rick Macklem Date: Fri, 6 May 2011 19:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221542 - head/sys/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 19:55:15 -0000 Author: rmacklem Date: Fri May 6 19:55:15 2011 New Revision: 221542 URL: http://svn.freebsd.org/changeset/base/221542 Log: Fix the module dependency in nfs_kdtrace.c for the old NFS client. This should fix a problem reported by Marcus Reid. Modified: head/sys/nfsclient/nfs_kdtrace.c Modified: head/sys/nfsclient/nfs_kdtrace.c ============================================================================== --- head/sys/nfsclient/nfs_kdtrace.c Fri May 6 19:14:06 2011 (r221541) +++ head/sys/nfsclient/nfs_kdtrace.c Fri May 6 19:55:15 2011 (r221542) @@ -539,4 +539,4 @@ DEV_MODULE(dtnfsclient, dtnfsclient_mode MODULE_VERSION(dtnfsclient, 1); MODULE_DEPEND(dtnfsclient, dtrace, 1, 1, 1); MODULE_DEPEND(dtnfsclient, opensolaris, 1, 1, 1); -MODULE_DEPEND(dtnfsclient, nfs, 1, 1, 1); +MODULE_DEPEND(dtnfsclient, oldnfs, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:02:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0E65106564A; Fri, 6 May 2011 20:02:19 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFB768FC16; Fri, 6 May 2011 20:02:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46K2Jvx063885; Fri, 6 May 2011 20:02:19 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46K2Jr6063880; Fri, 6 May 2011 20:02:19 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105062002.p46K2Jr6063880@svn.freebsd.org> From: Rick Macklem Date: Fri, 6 May 2011 20:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221543 - in head/sys: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:02:20 -0000 Author: rmacklem Date: Fri May 6 20:02:19 2011 New Revision: 221543 URL: http://svn.freebsd.org/changeset/base/221543 Log: Move sys/nfsclient/nfs_kdtrace.h to sys/nfs/nfs_kdtrace.h so it can be used by the new NFS client as well as the old one. Added: head/sys/nfs/nfs_kdtrace.h - copied unchanged from r221541, head/sys/nfsclient/nfs_kdtrace.h Deleted: head/sys/nfsclient/nfs_kdtrace.h Modified: head/sys/nfsclient/nfs_bio.c head/sys/nfsclient/nfs_subs.c head/sys/nfsclient/nfs_vnops.c Copied: head/sys/nfs/nfs_kdtrace.h (from r221541, head/sys/nfsclient/nfs_kdtrace.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/nfs/nfs_kdtrace.h Fri May 6 20:02:19 2011 (r221543, copy of r221541, head/sys/nfsclient/nfs_kdtrace.h) @@ -0,0 +1,120 @@ +/*- + * Copyright (c) 2009 Robert N. M. Watson + * All rights reserved. + * + * This software was developed at the University of Cambridge Computer + * Laboratory with support from a grant from Google, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _NFSCLIENT_NFS_KDTRACE_H_ +#define _NFSCLIENT_NFS_KDTRACE_H_ + +#ifdef KDTRACE_HOOKS +#include + +/* + * Definitions for NFS access cache probes. + */ +extern uint32_t nfsclient_accesscache_flush_done_id; +extern uint32_t nfsclient_accesscache_get_hit_id; +extern uint32_t nfsclient_accesscache_get_miss_id; +extern uint32_t nfsclient_accesscache_load_done_id; + +#define KDTRACE_NFS_ACCESSCACHE_FLUSH_DONE(vp) do { \ + if (dtrace_nfsclient_accesscache_flush_done_probe != NULL) \ + (dtrace_nfsclient_accesscache_flush_done_probe)( \ + nfsclient_accesscache_flush_done_id, (vp)); \ +} while (0) + +#define KDTRACE_NFS_ACCESSCACHE_GET_HIT(vp, uid, mode) do { \ + if (dtrace_nfsclient_accesscache_get_hit_probe != NULL) \ + (dtrace_nfsclient_accesscache_get_hit_probe)( \ + nfsclient_accesscache_get_hit_id, (vp), (uid), \ + (mode)); \ +} while (0) + +#define KDTRACE_NFS_ACCESSCACHE_GET_MISS(vp, uid, mode) do { \ + if (dtrace_nfsclient_accesscache_get_miss_probe != NULL) \ + (dtrace_nfsclient_accesscache_get_miss_probe)( \ + nfsclient_accesscache_get_miss_id, (vp), (uid), \ + (mode)); \ +} while (0) + +#define KDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, uid, rmode, error) do { \ + if (dtrace_nfsclient_accesscache_load_done_probe != NULL) \ + (dtrace_nfsclient_accesscache_load_done_probe)( \ + nfsclient_accesscache_load_done_id, (vp), (uid), \ + (rmode), (error)); \ +} while (0) + +/* + * Definitions for NFS attribute cache probes. + */ +extern uint32_t nfsclient_attrcache_flush_done_id; +extern uint32_t nfsclient_attrcache_get_hit_id; +extern uint32_t nfsclient_attrcache_get_miss_id; +extern uint32_t nfsclient_attrcache_load_done_id; + +#define KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp) do { \ + if (dtrace_nfsclient_attrcache_flush_done_probe != NULL) \ + (dtrace_nfsclient_attrcache_flush_done_probe)( \ + nfsclient_attrcache_flush_done_id, (vp)); \ +} while (0) + +#define KDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap) do { \ + if (dtrace_nfsclient_attrcache_get_hit_probe != NULL) \ + (dtrace_nfsclient_attrcache_get_hit_probe)( \ + nfsclient_attrcache_get_hit_id, (vp), (vap)); \ +} while (0) + +#define KDTRACE_NFS_ATTRCACHE_GET_MISS(vp) do { \ + if (dtrace_nfsclient_attrcache_get_miss_probe != NULL) \ + (dtrace_nfsclient_attrcache_get_miss_probe)( \ + nfsclient_attrcache_get_miss_id, (vp)); \ +} while (0) + +#define KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, vap, error) do { \ + if (dtrace_nfsclient_attrcache_load_done_probe != NULL) \ + (dtrace_nfsclient_attrcache_load_done_probe)( \ + nfsclient_attrcache_load_done_id, (vp), (vap), \ + (error)); \ +} while (0) + +#else /* !KDTRACE_HOOKS */ + +#define KDTRACE_NFS_ACCESSCACHE_FLUSH_DONE(vp) +#define KDTRACE_NFS_ACCESSCACHE_GET_HIT(vp, uid, mode) +#define KDTRACE_NFS_ACCESSCACHE_GET_MISS(vp, uid, mode) +#define KDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, uid, rmode, error) + +#define KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp) +#define KDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap) +#define KDTRACE_NFS_ATTRCACHE_GET_MISS(vp) +#define KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, vap, error) + +#endif /* KDTRACE_HOOKS */ + +#endif /* !_NFSCLIENT_NFS_KDTRACE_H_ */ Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Fri May 6 19:55:15 2011 (r221542) +++ head/sys/nfsclient/nfs_bio.c Fri May 6 20:02:19 2011 (r221543) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include static struct buf *nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td); Modified: head/sys/nfsclient/nfs_subs.c ============================================================================== --- head/sys/nfsclient/nfs_subs.c Fri May 6 19:55:15 2011 (r221542) +++ head/sys/nfsclient/nfs_subs.c Fri May 6 20:02:19 2011 (r221543) @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Fri May 6 19:55:15 2011 (r221542) +++ head/sys/nfsclient/nfs_vnops.c Fri May 6 20:02:19 2011 (r221543) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:02:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E66C1065674; Fri, 6 May 2011 20:02:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DD3B8FC08; Fri, 6 May 2011 20:02:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46K2OMx063922; Fri, 6 May 2011 20:02:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46K2OP3063920; Fri, 6 May 2011 20:02:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105062002.p46K2OP3063920@svn.freebsd.org> From: Marius Strobl Date: Fri, 6 May 2011 20:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221544 - stable/8/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:02:24 -0000 Author: marius Date: Fri May 6 20:02:23 2011 New Revision: 221544 URL: http://svn.freebsd.org/changeset/base/221544 Log: MFC: r221343 Fix an logic bug which caused jumbo buffers to not be synced and unloaded. Reported and tested by: Michael Moll Modified: stable/8/sys/dev/bge/if_bge.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/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Fri May 6 20:02:19 2011 (r221543) +++ stable/8/sys/dev/bge/if_bge.c Fri May 6 20:02:23 2011 (r221544) @@ -1022,7 +1022,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, i return (error); } - if (sc->bge_cdata.bge_rx_jumbo_chain[i] == NULL) { + if (sc->bge_cdata.bge_rx_jumbo_chain[i] != NULL) { bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->bge_cdata.bge_mtag_jumbo, From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:02:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 736DF1065768; Fri, 6 May 2011 20:02:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 496B88FC0A; Fri, 6 May 2011 20:02:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46K2R1F063959; Fri, 6 May 2011 20:02:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46K2R2P063957; Fri, 6 May 2011 20:02:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105062002.p46K2R2P063957@svn.freebsd.org> From: Marius Strobl Date: Fri, 6 May 2011 20:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221545 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:02:28 -0000 Author: marius Date: Fri May 6 20:02:26 2011 New Revision: 221545 URL: http://svn.freebsd.org/changeset/base/221545 Log: MFC: r221343 Fix an logic bug which caused jumbo buffers to not be synced and unloaded. Reported and tested by: Michael Moll Modified: stable/7/sys/dev/bge/if_bge.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/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Fri May 6 20:02:23 2011 (r221544) +++ stable/7/sys/dev/bge/if_bge.c Fri May 6 20:02:26 2011 (r221545) @@ -1022,7 +1022,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, i return (error); } - if (sc->bge_cdata.bge_rx_jumbo_chain[i] == NULL) { + if (sc->bge_cdata.bge_rx_jumbo_chain[i] != NULL) { bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->bge_cdata.bge_mtag_jumbo, From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:04:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A657106566B; Fri, 6 May 2011 20:04:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FED18FC0A; Fri, 6 May 2011 20:04:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46K4lSx064115; Fri, 6 May 2011 20:04:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46K4lgR064112; Fri, 6 May 2011 20:04:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105062004.p46K4lgR064112@svn.freebsd.org> From: Marius Strobl Date: Fri, 6 May 2011 20:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221546 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:04:47 -0000 Author: marius Date: Fri May 6 20:04:47 2011 New Revision: 221546 URL: http://svn.freebsd.org/changeset/base/221546 Log: MFC: r216962 Inherit the APB and the generic OFW PCI-PCI bridge driver from the generic PCI-PCI bridge driver in order to safe some code. Modified: stable/7/sys/sparc64/pci/apb.c stable/7/sys/sparc64/pci/ofw_pcib.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/sparc64/pci/apb.c ============================================================================== --- stable/7/sys/sparc64/pci/apb.c Fri May 6 20:02:26 2011 (r221545) +++ stable/7/sys/sparc64/pci/apb.c Fri May 6 20:04:47 2011 (r221546) @@ -82,25 +82,11 @@ static device_method_t apb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, apb_probe), DEVMETHOD(device_attach, apb_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, apb_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots, pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ @@ -111,7 +97,8 @@ static device_method_t apb_methods[] = { static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); +DEFINE_CLASS_1(pcib, apb_driver, apb_methods, sizeof(struct apb_softc), + pcib_driver); DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0); MODULE_DEPEND(apb, pci, 1, 1, 1); Modified: stable/7/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/7/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:02:26 2011 (r221545) +++ stable/7/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:04:47 2011 (r221546) @@ -65,31 +65,11 @@ static device_method_t ofw_pcib_methods[ /* Device interface */ DEVMETHOD(device_probe, ofw_pcib_probe), DEVMETHOD(device_attach, ofw_pcib_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), - DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots, pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config, pcib_write_config), - DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), - DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), - DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_release_msix, pcib_release_msix), - DEVMETHOD(pcib_map_msi, pcib_map_msi), + DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), @@ -99,8 +79,8 @@ static device_method_t ofw_pcib_methods[ static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, - sizeof(struct ofw_pcib_gen_softc)); +DEFINE_CLASS_1(pcib, ofw_pcib_driver, ofw_pcib_methods, + sizeof(struct ofw_pcib_gen_softc), pcib_driver); DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0); MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:04:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00ADA1065672; Fri, 6 May 2011 20:04:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA72F8FC0C; Fri, 6 May 2011 20:04:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46K4l83064132; Fri, 6 May 2011 20:04:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46K4lEG064129; Fri, 6 May 2011 20:04:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105062004.p46K4lEG064129@svn.freebsd.org> From: Marius Strobl Date: Fri, 6 May 2011 20:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221547 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:04:48 -0000 Author: marius Date: Fri May 6 20:04:47 2011 New Revision: 221547 URL: http://svn.freebsd.org/changeset/base/221547 Log: MFC: r216962 Inherit the APB and the generic OFW PCI-PCI bridge driver from the generic PCI-PCI bridge driver in order to safe some code. Modified: stable/8/sys/sparc64/pci/apb.c stable/8/sys/sparc64/pci/ofw_pcib.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/sparc64/pci/apb.c ============================================================================== --- stable/8/sys/sparc64/pci/apb.c Fri May 6 20:04:47 2011 (r221546) +++ stable/8/sys/sparc64/pci/apb.c Fri May 6 20:04:47 2011 (r221547) @@ -81,25 +81,11 @@ static device_method_t apb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, apb_probe), DEVMETHOD(device_attach, apb_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, apb_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots, pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ @@ -110,7 +96,8 @@ static device_method_t apb_methods[] = { static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); +DEFINE_CLASS_1(pcib, apb_driver, apb_methods, sizeof(struct apb_softc), + pcib_driver); EARLY_DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0, BUS_PASS_BUS); MODULE_DEPEND(apb, pci, 1, 1, 1); Modified: stable/8/sys/sparc64/pci/ofw_pcib.c ============================================================================== --- stable/8/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:04:47 2011 (r221546) +++ stable/8/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:04:47 2011 (r221547) @@ -64,31 +64,11 @@ static device_method_t ofw_pcib_methods[ /* Device interface */ DEVMETHOD(device_probe, ofw_pcib_probe), DEVMETHOD(device_attach, ofw_pcib_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), - DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots, pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config, pcib_write_config), - DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), - DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), - DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_release_msix, pcib_release_msix), - DEVMETHOD(pcib_map_msi, pcib_map_msi), + DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), @@ -98,8 +78,8 @@ static device_method_t ofw_pcib_methods[ static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, - sizeof(struct ofw_pcib_gen_softc)); +DEFINE_CLASS_1(pcib, ofw_pcib_driver, ofw_pcib_methods, + sizeof(struct ofw_pcib_gen_softc), pcib_driver); EARLY_DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0, BUS_PASS_BUS); MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:26:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE991106566B; Fri, 6 May 2011 20:26:05 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF688FC0A; Fri, 6 May 2011 20:26:05 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 897AF1FFC35; Fri, 6 May 2011 20:26:04 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 58EE0845CA; Fri, 6 May 2011 22:26:04 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Rick Macklem References: <1966116316.1117177.1304701324549.JavaMail.root@erie.cs.uoguelph.ca> Date: Fri, 06 May 2011 22:26:04 +0200 In-Reply-To: <1966116316.1117177.1304701324549.JavaMail.root@erie.cs.uoguelph.ca> (Rick Macklem's message of "Fri, 6 May 2011 13:02:04 -0400 (EDT)") Message-ID: <8662pnzicj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:26:05 -0000 Rick Macklem writes: > My problem is that I don't know how to deal with two modules with > the same name. Why do they have to have the same name? All that matters is the fstype and the sysctls. Just make sure that the auto-load logic loads the new stack and not the old one if neither is loaded already. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:37:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 035731065672; Fri, 6 May 2011 20:37:08 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6BEA8FC13; Fri, 6 May 2011 20:37:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46Kb75e065080; Fri, 6 May 2011 20:37:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46Kb7AT065078; Fri, 6 May 2011 20:37:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062037.p46Kb7AT065078@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 20:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221548 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:37:08 -0000 Author: yongari Date: Fri May 6 20:37:07 2011 New Revision: 221548 URL: http://svn.freebsd.org/changeset/base/221548 Log: Do not increment collision counter if transmit have failed. Transmission error in tun(4) is queueing error(i.e. ENOBUFS) and it has nothing to do with collision. Reported by: Zeus V Panchenko (zeus <> ibs dot dn dot ua) Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Fri May 6 20:04:47 2011 (r221547) +++ head/sys/net/if_tun.c Fri May 6 20:37:07 2011 (r221548) @@ -661,10 +661,8 @@ tunoutput( } error = (ifp->if_transmit)(ifp, m0); - if (error) { - ifp->if_collisions++; + if (error) return (ENOBUFS); - } ifp->if_opackets++; return (0); } From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:40:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA180106566B; Fri, 6 May 2011 20:40:33 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D97478FC14; Fri, 6 May 2011 20:40:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46KeX2V065220; Fri, 6 May 2011 20:40:33 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46KeX9D065218; Fri, 6 May 2011 20:40:33 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201105062040.p46KeX9D065218@svn.freebsd.org> From: Michael Tuexen Date: Fri, 6 May 2011 20:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221549 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:40:34 -0000 Author: tuexen Date: Fri May 6 20:40:33 2011 New Revision: 221549 URL: http://svn.freebsd.org/changeset/base/221549 Log: Change the name of an internal structure, since the name is used by a structure of the (new) SCTP API. MFC after: 1 week. Modified: head/sys/netinet/sctp_auth.h Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Fri May 6 20:37:07 2011 (r221548) +++ head/sys/netinet/sctp_auth.h Fri May 6 20:40:33 2011 (r221549) @@ -89,7 +89,7 @@ typedef struct sctp_hmaclist { } sctp_hmaclist_t; /* authentication info */ -typedef struct sctp_authinfo { +typedef struct sctp_authinformation { sctp_key_t *random; /* local random key (concatenated) */ uint32_t random_len; /* local random number length for param */ sctp_key_t *peer_random;/* peer's random key (concatenated) */ @@ -98,7 +98,7 @@ typedef struct sctp_authinfo { uint16_t active_keyid; /* active send keyid */ uint16_t assoc_keyid; /* current send keyid (cached) */ uint16_t recv_keyid; /* last recv keyid (cached) */ -} sctp_authinfo_t; +} sctp_authinfo_t; From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:43:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C185106564A; Fri, 6 May 2011 20:43:02 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B0AD8FC08; Fri, 6 May 2011 20:43:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46Kh2df065322; Fri, 6 May 2011 20:43:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46Kh2Vs065320; Fri, 6 May 2011 20:43:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105062043.p46Kh2Vs065320@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 6 May 2011 20:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221550 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:43:02 -0000 Author: nwhitehorn Date: Fri May 6 20:43:02 2011 New Revision: 221550 URL: http://svn.freebsd.org/changeset/base/221550 Log: SMP has worked perfectly for a very long time on 32-bit PowerPC on both UP and SMP hardware. Enable it in GENERIC. MFC after: 2 weeks Modified: head/sys/powerpc/conf/GENERIC Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Fri May 6 20:40:33 2011 (r221549) +++ head/sys/powerpc/conf/GENERIC Fri May 6 20:43:02 2011 (r221550) @@ -77,7 +77,7 @@ options WITNESS_SKIPSPIN #Don't run wit options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # To make an SMP kernel, the next line is needed -#options SMP # Symmetric MultiProcessor Kernel +options SMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:45:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FD7E1065679; Fri, 6 May 2011 20:45:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EE668FC0A; Fri, 6 May 2011 20:45:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46KjoMi065465; Fri, 6 May 2011 20:45:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46KjoUV065463; Fri, 6 May 2011 20:45:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105062045.p46KjoUV065463@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 May 2011 20:45:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221551 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:45:50 -0000 Author: jilles Date: Fri May 6 20:45:50 2011 New Revision: 221551 URL: http://svn.freebsd.org/changeset/base/221551 Log: sh: Change the CTL* bytes to ones invalid in UTF-8. This ensures that mbrtowc(3) can be used directly once it has been verified that there is no CTL* byte. Dealing with a CTLESC byte within a multibyte character would be complicated. The new values do occur in iso-8859-* encodings. This decreases efficiency slightly but should not affect correctness. Caveat: Updating across this change and rebuilding without cleaning may yield a subtly broken sh binary. By default, make buildworld will clean and avoid problems. Modified: head/bin/sh/parser.h Modified: head/bin/sh/parser.h ============================================================================== --- head/bin/sh/parser.h Fri May 6 20:43:02 2011 (r221550) +++ head/bin/sh/parser.h Fri May 6 20:45:50 2011 (r221551) @@ -34,16 +34,16 @@ */ /* control characters in argument strings */ -#define CTLESC '\201' -#define CTLVAR '\202' -#define CTLENDVAR '\203' -#define CTLBACKQ '\204' +#define CTLESC '\300' +#define CTLVAR '\301' +#define CTLENDVAR '\371' +#define CTLBACKQ '\372' #define CTLQUOTE 01 /* ored with CTLBACKQ code if in quotes */ /* CTLBACKQ | CTLQUOTE == '\205' */ -#define CTLARI '\206' -#define CTLENDARI '\207' -#define CTLQUOTEMARK '\210' -#define CTLQUOTEEND '\211' /* only for ${v+-...} */ +#define CTLARI '\374' +#define CTLENDARI '\375' +#define CTLQUOTEMARK '\376' +#define CTLQUOTEEND '\377' /* only for ${v+-...} */ /* variable substitution byte (follows CTLVAR) */ #define VSTYPE 0x0f /* type of variable substitution */ From owner-svn-src-all@FreeBSD.ORG Fri May 6 20:46:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE0851065670; Fri, 6 May 2011 20:46:29 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCF3F8FC15; Fri, 6 May 2011 20:46:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46KkTD3065525; Fri, 6 May 2011 20:46:29 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46KkTEH065523; Fri, 6 May 2011 20:46:29 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062046.p46KkTEH065523@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 20:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221552 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 20:46:30 -0000 Author: yongari Date: Fri May 6 20:46:29 2011 New Revision: 221552 URL: http://svn.freebsd.org/changeset/base/221552 Log: Fix white space nits and style Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Fri May 6 20:45:50 2011 (r221551) +++ head/sys/net/if_tun.c Fri May 6 20:46:29 2011 (r221552) @@ -228,8 +228,8 @@ tunclone(void *arg, struct ucred *cred, i = clone_create(&tunclones, &tun_cdevsw, &u, dev, 0); if (i) { if (append_unit) { - namelen = snprintf(devname, sizeof(devname), "%s%d", name, - u); + namelen = snprintf(devname, sizeof(devname), "%s%d", + name, u); name = devname; } /* No preexisting struct cdev *, create one */ @@ -577,11 +577,8 @@ tunifioctl(struct ifnet *ifp, u_long cmd * tunoutput - queue packets from higher level ready to put out. */ static int -tunoutput( - struct ifnet *ifp, - struct mbuf *m0, - struct sockaddr *dst, - struct route *ro) +tunoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst, + struct route *ro) { struct tun_softc *tp = ifp->if_softc; u_short cached_tun_flags; @@ -671,7 +668,8 @@ tunoutput( * the cdevsw interface is now pretty minimal. */ static int -tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) +tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, + struct thread *td) { int error; struct tun_softc *tp = dev->si_drv1; @@ -993,7 +991,7 @@ tunkqfilter(struct cdev *dev, struct kno ifp->if_xname, dev2unit(dev)); kn->kn_fop = &tun_write_filterops; break; - + default: TUNDEBUG(ifp, "%s kqfilter: invalid filter, minor = %#x\n", ifp->if_xname, dev2unit(dev)); From owner-svn-src-all@FreeBSD.ORG Fri May 6 21:06:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3889106564A; Fri, 6 May 2011 21:06:08 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 3868F8FC16; Fri, 6 May 2011 21:06:08 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAIVhxE2DaFvO/2dsb2JhbACEU6JCiHGrGpB5gSqDXoEBBI9YhxuHVQ X-IronPort-AV: E=Sophos;i="4.64,328,1301889600"; d="scan'208";a="119901669" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 06 May 2011 17:06:07 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 31947793A7; Fri, 6 May 2011 17:06:07 -0400 (EDT) Date: Fri, 6 May 2011 17:06:07 -0400 (EDT) From: Rick Macklem To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Message-ID: <1202195776.1136829.1304715967146.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <8662pnzicj.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 21:06:09 -0000 > Rick Macklem writes: > > My problem is that I don't know how to deal with two modules with > > the same name. > > Why do they have to have the same name? All that matters is the fstype > and the sysctls. Just make sure that the auto-load logic loads the new > stack and not the old one if neither is loaded already. > Well, the main auto-load logic is the (n)mount(2) syscall and it does a vfs_byname_kld(fstype, td, errp), which calls kern_kldload(td, fstype, &fileid) to load the module. The argument is the "fstype", so that is what is used to find/load the module. The way sys/nfsclient is set up (and I think this is the norm for file systems), the module name is the fstype name, because VFS_SET(nfs_vfsops, oldnfs, VFCF_NETWORK); (There is a DECLARE_MODULE() in this macro and it uses the 2nd arg. to set the module name, same as the fstype name. Just take a look at the VFS_SET() macro in sys/mount.h.) defines the module name as the 2nd argument, which is also the fstype. (You can give it another "name" via DECLARE_MODULE(), although I'm not sure if that it considered correct to do, but it will be the "fstype" that the mount(2) syscall will use to try and load it.) rick From owner-svn-src-all@FreeBSD.ORG Fri May 6 21:09:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D7F11065672; Fri, 6 May 2011 21:09:34 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00B088FC17; Fri, 6 May 2011 21:09:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46L9Xmx066334; Fri, 6 May 2011 21:09:33 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46L9XAq066331; Fri, 6 May 2011 21:09:33 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201105062109.p46L9XAq066331@svn.freebsd.org> From: Nick Hibma Date: Fri, 6 May 2011 21:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221553 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 21:09:34 -0000 Author: n_hibma Date: Fri May 6 21:09:33 2011 New Revision: 221553 URL: http://svn.freebsd.org/changeset/base/221553 Log: MFC r217637,218178 Add another ID for the ZTE MF190 Surf Stick New ID for the Novatel MC547 Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs 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/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri May 6 20:46:29 2011 (r221552) +++ stable/8/sys/dev/usb/serial/u3g.c Fri May 6 21:09:33 2011 (r221553) @@ -302,6 +302,7 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, EU740, 0), U3G_DEV(NOVATEL, EU870D, 0), U3G_DEV(NOVATEL, MC760, 0), + U3G_DEV(NOVATEL, MC547, 0), U3G_DEV(NOVATEL, MC950D, 0), U3G_DEV(NOVATEL, U720, 0), U3G_DEV(NOVATEL, U727, 0), @@ -415,6 +416,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E0078, 0), U3G_DEV(QUALCOMMINC, E0082, 0), U3G_DEV(QUALCOMMINC, E0086, 0), + U3G_DEV(QUALCOMMINC, SURFSTICK, 0), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri May 6 20:46:29 2011 (r221552) +++ stable/8/sys/dev/usb/usbdevs Fri May 6 21:09:33 2011 (r221553) @@ -2385,6 +2385,7 @@ product NOVATEL ZEROCD2 0x5030 Novatel product NOVATEL U727_2 0x5100 Merlin U727 CDMA product NOVATEL U760 0x6000 Novatel U760 product NOVATEL MC760 0x6002 Novatel MC760 +product NOVATEL MC547 0x7042 Novatel MC547 product NOVATEL2 FLEXPACKGPS 0x0100 NovAtel FlexPack GPS receiver /* Merlin products */ @@ -2693,6 +2694,7 @@ product QUALCOMMINC E0076 0x0076 3G mode product QUALCOMMINC E0078 0x0078 3G modem product QUALCOMMINC E0082 0x0082 3G modem product QUALCOMMINC E0086 0x0086 3G modem +product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem From owner-svn-src-all@FreeBSD.ORG Fri May 6 21:25:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D58D11065670; Fri, 6 May 2011 21:25:37 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5175B8FC12; Fri, 6 May 2011 21:25:37 +0000 (UTC) Received: by ywf7 with SMTP id 7so1685340ywf.13 for ; Fri, 06 May 2011 14:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=BmwGvuTQN/TW4Zgw6Y8f8BBU/DmpKZPJsFIekdC9M9o=; b=KLVXjW8Ei0A/f4b2fXUHFIEieEsHprn7pPnGsb+oPe9wvjt7Ev+8d5jdCDSqAXOmqT HXJiNPEI9KcBIlgkMukJ4A6ZBK3m0yv/MoViQkTDUQX45IOVC5Q/NPYEXjXXjuRO0jf3 fPF0QL5nhKtIktAjJsLSkrhwmtjud+AluiELk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=k/7TuRAUmZdz0VDpXvrB4bZjqjkjV7lV8BcX4uyuj6DdH9CoxWM+XGtCFncXpR98GC fSAkzQQKnZY4lmT8Bn85P/ZHKgzh7Xn500xAp+GwPXiK2KZNPgxpVW/VpSd6OLObj23k SVLwJEA0GEvfty22mcooWJONkFXggGdgiON2g= MIME-Version: 1.0 Received: by 10.236.77.228 with SMTP id d64mr439316yhe.305.1304717136716; Fri, 06 May 2011 14:25:36 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.236.111.33 with HTTP; Fri, 6 May 2011 14:25:36 -0700 (PDT) In-Reply-To: <201105062043.p46Kh2Vs065320@svn.freebsd.org> References: <201105062043.p46Kh2Vs065320@svn.freebsd.org> Date: Fri, 6 May 2011 17:25:36 -0400 X-Google-Sender-Auth: kw4U8mO7VcyRAgvf8eoh0-M7UpY Message-ID: From: Attilio Rao To: Nathan Whitehorn Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221550 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 21:25:37 -0000 2011/5/6 Nathan Whitehorn : > Author: nwhitehorn > Date: Fri May =C2=A06 20:43:02 2011 > New Revision: 221550 > URL: http://svn.freebsd.org/changeset/base/221550 > > Log: > =C2=A0SMP has worked perfectly for a very long time on 32-bit PowerPC on = both > =C2=A0UP and SMP hardware. Enable it in GENERIC. > While working on largeSMP, I think there is a breakage in atomic.h. More specifically, atomic_store_rel_long() (and related functions) are not going to properly work because powerpc defines them as: atomic_store_rel_long -> atomic_store_rel_32(volatile u_int *p, u_int v) while this should really follow the long arguments. This happens because powerpc doesn't follow the other architectures semantic on defining the "similar" atomic operations. Other arches define an hardcode version of _type version of the function and than make a macro the _32 (or whatever) version. In other words this is what they do: void atomic_store_rel_32() { ... } #define atomic_store_rel_int atomic_store_rel_32 which si clearly dangerous for cases as reported above. Maybe that could be fixed by passing sized types, rather than simply int or long in numbered version, but I'd really prefer to follow the semantic by other architectures and then have: void atomic_store_rel_int() { ... } #define atomic_store_rel_32 atomic_store_rel_int I fixed the ATOMIC_STORE_LOAD case in my code, because I needed it, but the final cleanup is much bigger. I can make a patch tomorrow if you can test it. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Fri May 6 21:26:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14C5B106564A; Fri, 6 May 2011 21:26:06 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 92A4F8FC12; Fri, 6 May 2011 21:26:05 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id C96611FFC58; Fri, 6 May 2011 21:26:04 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9BC04844FE; Fri, 6 May 2011 23:26:04 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Rick Macklem References: <1202195776.1136829.1304715967146.JavaMail.root@erie.cs.uoguelph.ca> Date: Fri, 06 May 2011 23:26:04 +0200 In-Reply-To: <1202195776.1136829.1304715967146.JavaMail.root@erie.cs.uoguelph.ca> (Rick Macklem's message of "Fri, 6 May 2011 17:06:07 -0400 (EDT)") Message-ID: <86tyd7r05v.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Rick Macklem , svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 21:26:06 -0000 So, how about % cd /usr/src/sys % svn rm nfsclient ? :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Fri May 6 22:01:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5539E1065670; Fri, 6 May 2011 22:01:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37FC28FC0A; Fri, 6 May 2011 22:01:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46M1lKW068048; Fri, 6 May 2011 22:01:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46M1lq0068046; Fri, 6 May 2011 22:01:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062201.p46M1lq0068046@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 22:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221555 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 22:01:47 -0000 Author: yongari Date: Fri May 6 22:01:46 2011 New Revision: 221555 URL: http://svn.freebsd.org/changeset/base/221555 Log: Rewrite RX filter logic and provide controller specific filter handler for 3C90x and 3C90xB/C respectively. This simplifies ioctl handler as well as enhancing readability. While I'm here don't reprogram multicast filter when driver is not running. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 21:53:29 2011 (r221554) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:01:46 2011 (r221555) @@ -263,10 +263,11 @@ static void xl_mii_send(struct xl_softc static int xl_mii_readreg(struct xl_softc *, struct xl_mii_frame *); static int xl_mii_writereg(struct xl_softc *, struct xl_mii_frame *); +static void xl_rxfilter(struct xl_softc *); +static void xl_rxfilter_90x(struct xl_softc *); +static void xl_rxfilter_90xB(struct xl_softc *); static void xl_setcfg(struct xl_softc *); static void xl_setmode(struct xl_softc *, int); -static void xl_setmulti(struct xl_softc *); -static void xl_setmulti_hash(struct xl_softc *); static void xl_reset(struct xl_softc *); static int xl_list_rx_init(struct xl_softc *); static int xl_list_tx_init(struct xl_softc *); @@ -701,101 +702,133 @@ xl_read_eeprom(struct xl_softc *sc, cadd return (err ? 1 : 0); } +static void +xl_rxfilter(struct xl_softc *sc) +{ + + if (sc->xl_type == XL_TYPE_905B) + xl_rxfilter_90xB(sc); + else + xl_rxfilter_90x(sc); +} + /* * NICs older than the 3c905B have only one multicast option, which * is to enable reception of all multicast frames. */ static void -xl_setmulti(struct xl_softc *sc) +xl_rxfilter_90x(struct xl_softc *sc) { - struct ifnet *ifp = sc->xl_ifp; + struct ifnet *ifp; struct ifmultiaddr *ifma; u_int8_t rxfilt; - int mcnt = 0; XL_LOCK_ASSERT(sc); + ifp = sc->xl_ifp; + XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); + rxfilt &= ~(XL_RXFILTER_ALLFRAMES | XL_RXFILTER_ALLMULTI | + XL_RXFILTER_BROADCAST | XL_RXFILTER_INDIVIDUAL); - if (ifp->if_flags & IFF_ALLMULTI) { - rxfilt |= XL_RXFILTER_ALLMULTI; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - return; - } - - if_maddr_rlock(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) - mcnt++; - if_maddr_runlock(ifp); + /* Set the individual bit to receive frames for this host only. */ + rxfilt |= XL_RXFILTER_INDIVIDUAL; + /* Set capture broadcast bit to capture broadcast frames. */ + if (ifp->if_flags & IFF_BROADCAST) + rxfilt |= XL_RXFILTER_BROADCAST; - if (mcnt) - rxfilt |= XL_RXFILTER_ALLMULTI; - else - rxfilt &= ~XL_RXFILTER_ALLMULTI; + /* If we want promiscuous mode, set the allframes bit. */ + if (ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) { + if (ifp->if_flags & IFF_PROMISC) + rxfilt |= XL_RXFILTER_ALLFRAMES; + if (ifp->if_flags & IFF_ALLMULTI) + rxfilt |= XL_RXFILTER_ALLMULTI; + } else { + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + rxfilt |= XL_RXFILTER_ALLMULTI; + break; + } + if_maddr_runlock(ifp); + } - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); + CSR_WRITE_2(sc, XL_COMMAND, rxfilt | XL_CMD_RX_SET_FILT); + XL_SEL_WIN(7); } /* * 3c905B adapters have a hash filter that we can program. */ static void -xl_setmulti_hash(struct xl_softc *sc) +xl_rxfilter_90xB(struct xl_softc *sc) { - struct ifnet *ifp = sc->xl_ifp; - int h = 0, i; + struct ifnet *ifp; struct ifmultiaddr *ifma; + int i, mcnt; + u_int16_t h; u_int8_t rxfilt; - int mcnt = 0; XL_LOCK_ASSERT(sc); + ifp = sc->xl_ifp; + XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); + rxfilt &= ~(XL_RXFILTER_ALLFRAMES | XL_RXFILTER_ALLMULTI | + XL_RXFILTER_BROADCAST | XL_RXFILTER_INDIVIDUAL | + XL_RXFILTER_MULTIHASH); - if (ifp->if_flags & IFF_ALLMULTI) { - rxfilt |= XL_RXFILTER_ALLMULTI; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - return; - } else - rxfilt &= ~XL_RXFILTER_ALLMULTI; + /* Set the individual bit to receive frames for this host only. */ + rxfilt |= XL_RXFILTER_INDIVIDUAL; + /* Set capture broadcast bit to capture broadcast frames. */ + if (ifp->if_flags & IFF_BROADCAST) + rxfilt |= XL_RXFILTER_BROADCAST; - /* first, zot all the existing hash bits */ - for (i = 0; i < XL_HASHFILT_SIZE; i++) - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_HASH|i); - - /* now program new ones */ - if_maddr_rlock(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - /* - * Note: the 3c905B currently only supports a 64-bit hash - * table, which means we really only need 6 bits, but the - * manual indicates that future chip revisions will have a - * 256-bit hash table, hence the routine is set up to - * calculate 8 bits of position info in case we need it some - * day. - * Note II, The Sequel: _CURRENT_ versions of the 3c905B have - * a 256 bit hash table. This means we have to use all 8 bits - * regardless. On older cards, the upper 2 bits will be - * ignored. Grrrr.... - */ - h = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma->ifma_addr), ETHER_ADDR_LEN) & 0xFF; - CSR_WRITE_2(sc, XL_COMMAND, - h | XL_CMD_RX_SET_HASH | XL_HASH_SET); - mcnt++; + /* If we want promiscuous mode, set the allframes bit. */ + if (ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) { + if (ifp->if_flags & IFF_PROMISC) + rxfilt |= XL_RXFILTER_ALLFRAMES; + if (ifp->if_flags & IFF_ALLMULTI) + rxfilt |= XL_RXFILTER_ALLMULTI; + } else { + /* First, zot all the existing hash bits. */ + for (i = 0; i < XL_HASHFILT_SIZE; i++) + CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_HASH | i); + + /* Now program new ones. */ + mcnt = 0; + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + /* + * Note: the 3c905B currently only supports a 64-bit + * hash table, which means we really only need 6 bits, + * but the manual indicates that future chip revisions + * will have a 256-bit hash table, hence the routine + * is set up to calculate 8 bits of position info in + * case we need it some day. + * Note II, The Sequel: _CURRENT_ versions of the + * 3c905B have a 256 bit hash table. This means we have + * to use all 8 bits regardless. On older cards, the + * upper 2 bits will be ignored. Grrrr.... + */ + h = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN) & 0xFF; + CSR_WRITE_2(sc, XL_COMMAND, + h | XL_CMD_RX_SET_HASH | XL_HASH_SET); + mcnt++; + } + if_maddr_runlock(ifp); + if (mcnt > 0) + rxfilt |= XL_RXFILTER_MULTIHASH; } - if_maddr_runlock(ifp); - - if (mcnt) - rxfilt |= XL_RXFILTER_MULTIHASH; - else - rxfilt &= ~XL_RXFILTER_MULTIHASH; CSR_WRITE_2(sc, XL_COMMAND, rxfilt | XL_CMD_RX_SET_FILT); + XL_SEL_WIN(7); } static void @@ -2763,7 +2796,6 @@ xl_init_locked(struct xl_softc *sc) { struct ifnet *ifp = sc->xl_ifp; int error, i; - u_int16_t rxfilt = 0; struct mii_data *mii = NULL; XL_LOCK_ASSERT(sc); @@ -2862,39 +2894,7 @@ xl_init_locked(struct xl_softc *sc) } /* Set RX filter bits. */ - XL_SEL_WIN(5); - rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); - - /* Set the individual bit to receive frames for this host only. */ - rxfilt |= XL_RXFILTER_INDIVIDUAL; - - /* If we want promiscuous mode, set the allframes bit. */ - if (ifp->if_flags & IFF_PROMISC) { - rxfilt |= XL_RXFILTER_ALLFRAMES; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - } else { - rxfilt &= ~XL_RXFILTER_ALLFRAMES; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - } - - /* - * Set capture broadcast bit to capture broadcast frames. - */ - if (ifp->if_flags & IFF_BROADCAST) { - rxfilt |= XL_RXFILTER_BROADCAST; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - } else { - rxfilt &= ~XL_RXFILTER_BROADCAST; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - } - - /* - * Program the multicast filter, if necessary. - */ - if (sc->xl_type == XL_TYPE_905B) - xl_setmulti_hash(sc); - else - xl_setmulti(sc); + xl_rxfilter(sc); /* * Load the address of the RX list. We have to @@ -3123,30 +3123,16 @@ xl_ioctl(struct ifnet *ifp, u_long comma struct ifreq *ifr = (struct ifreq *) data; int error = 0, mask; struct mii_data *mii = NULL; - u_int8_t rxfilt; switch (command) { case SIOCSIFFLAGS: XL_LOCK(sc); - - XL_SEL_WIN(5); - rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING && - ifp->if_flags & IFF_PROMISC && - !(sc->xl_if_flags & IFF_PROMISC)) { - rxfilt |= XL_RXFILTER_ALLFRAMES; - CSR_WRITE_2(sc, XL_COMMAND, - XL_CMD_RX_SET_FILT|rxfilt); - XL_SEL_WIN(7); - } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && - !(ifp->if_flags & IFF_PROMISC) && - sc->xl_if_flags & IFF_PROMISC) { - rxfilt &= ~XL_RXFILTER_ALLFRAMES; - CSR_WRITE_2(sc, XL_COMMAND, - XL_CMD_RX_SET_FILT|rxfilt); - XL_SEL_WIN(7); - } else + (ifp->if_flags ^ sc->xl_if_flags) & + (IFF_PROMISC | IFF_ALLMULTI)) + xl_rxfilter(sc); + else xl_init_locked(sc); } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) @@ -3154,18 +3140,14 @@ xl_ioctl(struct ifnet *ifp, u_long comma } sc->xl_if_flags = ifp->if_flags; XL_UNLOCK(sc); - error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: /* XXX Downcall from if_addmulti() possibly with locks held. */ XL_LOCK(sc); - if (sc->xl_type == XL_TYPE_905B) - xl_setmulti_hash(sc); - else - xl_setmulti(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + xl_rxfilter(sc); XL_UNLOCK(sc); - error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: From owner-svn-src-all@FreeBSD.ORG Fri May 6 22:07:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19647106566C; Fri, 6 May 2011 22:07:32 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0711F8FC13; Fri, 6 May 2011 22:07:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46M7VSL068244; Fri, 6 May 2011 22:07:31 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46M7VXT068241; Fri, 6 May 2011 22:07:31 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201105062207.p46M7VXT068241@svn.freebsd.org> From: Nick Hibma Date: Fri, 6 May 2011 22:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221556 - in stable/8/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 22:07:32 -0000 Author: n_hibma Date: Fri May 6 22:07:31 2011 New Revision: 221556 URL: http://svn.freebsd.org/changeset/base/221556 Log: MFC r218422: Curitel UM150 needs a quirk to stop it from detaching straight after attach (resetting actually). Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs 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/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Fri May 6 22:01:46 2011 (r221555) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Fri May 6 22:07:31 2011 (r221556) @@ -136,6 +136,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(SIEMENS2, ES75, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(QUALCOMM, CDMA_MSM, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(QUALCOMM2, CDMA_MSM, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), + USB_QUIRK(CURITEL, UM150, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM175, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), /* USB Mass Storage Class Quirks */ Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Fri May 6 22:01:46 2011 (r221555) +++ stable/8/sys/dev/usb/usbdevs Fri May 6 22:07:31 2011 (r221556) @@ -1308,6 +1308,7 @@ product CTX EX1300 0x9999 Ex1300 hub product CURITEL HX550C 0x1101 CDMA 2000 1xRTT USB modem (HX-550C) product CURITEL HX57XB 0x2101 CDMA 2000 1xRTT USB modem (HX-570/575B/PR-600) product CURITEL PC5740 0x3701 Broadband Wireless modem +product CURITEL UM150 0x3711 EVDO modem product CURITEL UM175 0x3714 EVDO modem /* CyberPower products */ From owner-svn-src-all@FreeBSD.ORG Fri May 6 22:16:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D94981065673; Fri, 6 May 2011 22:16:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADAC48FC23; Fri, 6 May 2011 22:16:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46MGhaO068574; Fri, 6 May 2011 22:16:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46MGht2068572; Fri, 6 May 2011 22:16:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062216.p46MGht2068572@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 22:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221557 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 22:16:44 -0000 Author: yongari Date: Fri May 6 22:16:43 2011 New Revision: 221557 URL: http://svn.freebsd.org/changeset/base/221557 Log: Remove unnecessary htole32/le32toh dance. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 22:07:31 2011 (r221556) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:16:43 2011 (r221557) @@ -2518,8 +2518,7 @@ xl_encap(struct xl_softc *sc, struct xl_ htole32(sc->xl_cdata.xl_tx_segs[i].ds_len); total_len += sc->xl_cdata.xl_tx_segs[i].ds_len; } - c->xl_ptr->xl_frag[nseg - 1].xl_len = - htole32(sc->xl_cdata.xl_tx_segs[nseg - 1].ds_len | XL_LAST_FRAG); + c->xl_ptr->xl_frag[nseg - 1].xl_len |= htole32(XL_LAST_FRAG); c->xl_ptr->xl_status = htole32(total_len); c->xl_ptr->xl_next = 0; @@ -2644,8 +2643,7 @@ xl_start_locked(struct ifnet *ifp) * get an interrupt once for the whole chain rather than * once for each packet. */ - cur_tx->xl_ptr->xl_status = htole32(le32toh(cur_tx->xl_ptr->xl_status) | - XL_TXSTAT_DL_INTR); + cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, BUS_DMASYNC_PREWRITE); @@ -2661,8 +2659,8 @@ xl_start_locked(struct ifnet *ifp) sc->xl_cdata.xl_tx_tail->xl_ptr->xl_next = htole32(start_tx->xl_phys); status = sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status; - sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status = - htole32(le32toh(status) & ~XL_TXSTAT_DL_INTR); + sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status &= + htole32(~XL_TXSTAT_DL_INTR); sc->xl_cdata.xl_tx_tail = cur_tx; } else { sc->xl_cdata.xl_tx_head = start_tx; @@ -2766,8 +2764,7 @@ xl_start_90xB_locked(struct ifnet *ifp) * get an interrupt once for the whole chain rather than * once for each packet. */ - cur_tx->xl_ptr->xl_status = htole32(le32toh(cur_tx->xl_ptr->xl_status) | - XL_TXSTAT_DL_INTR); + cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, BUS_DMASYNC_PREWRITE); From owner-svn-src-all@FreeBSD.ORG Fri May 6 22:26:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B59B7106566C; Fri, 6 May 2011 22:26:57 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A48F78FC13; Fri, 6 May 2011 22:26:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46MQvKR069084; Fri, 6 May 2011 22:26:57 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46MQvJT069082; Fri, 6 May 2011 22:26:57 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062226.p46MQvJT069082@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 22:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221558 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 22:26:57 -0000 Author: yongari Date: Fri May 6 22:26:57 2011 New Revision: 221558 URL: http://svn.freebsd.org/changeset/base/221558 Log: Set status word once instead of twice. For 3C90xB/3C90xC, frame length of status word is ignored. While here move bus_dmamap_sync() up where DMA map is loaded. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 22:16:43 2011 (r221557) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:26:57 2011 (r221558) @@ -2507,6 +2507,7 @@ xl_encap(struct xl_softc *sc, struct xl_ *m_head = NULL; return (EIO); } + bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREWRITE); total_len = 0; for (i = 0; i < nseg; i++) { @@ -2519,8 +2520,6 @@ xl_encap(struct xl_softc *sc, struct xl_ total_len += sc->xl_cdata.xl_tx_segs[i].ds_len; } c->xl_ptr->xl_frag[nseg - 1].xl_len |= htole32(XL_LAST_FRAG); - c->xl_ptr->xl_status = htole32(total_len); - c->xl_ptr->xl_next = 0; if (sc->xl_type == XL_TYPE_905B) { status = XL_TXSTAT_RND_DEFEAT; @@ -2535,11 +2534,12 @@ xl_encap(struct xl_softc *sc, struct xl_ status |= XL_TXSTAT_UDPCKSUM; } #endif - c->xl_ptr->xl_status = htole32(status); - } + } else + status = total_len; + c->xl_ptr->xl_status = htole32(status); + c->xl_ptr->xl_next = 0; c->xl_mbuf = *m_head; - bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREWRITE); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri May 6 22:31:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F4A9106564A; Fri, 6 May 2011 22:31:27 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DE688FC08; Fri, 6 May 2011 22:31:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46MVRuB069250; Fri, 6 May 2011 22:31:27 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46MVRjp069246; Fri, 6 May 2011 22:31:27 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105062231.p46MVRjp069246@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 May 2011 22:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221559 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 22:31:27 -0000 Author: jilles Date: Fri May 6 22:31:27 2011 New Revision: 221559 URL: http://svn.freebsd.org/changeset/base/221559 Log: sh: Track if the current locale's charset is UTF-8 or not. Modified: head/bin/sh/main.c head/bin/sh/var.c head/bin/sh/var.h Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Fri May 6 22:26:57 2011 (r221558) +++ head/bin/sh/main.c Fri May 6 22:31:27 2011 (r221559) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); int rootpid; int rootshell; struct jmploc main_handler; +int localeisutf8; static void read_profile(const char *); static char *find_dot_file(char *); @@ -96,6 +97,7 @@ main(int argc, char *argv[]) char *shinit; (void) setlocale(LC_ALL, ""); + updatecharset(); state = 0; if (setjmp(main_handler.loc)) { switch (exception) { Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Fri May 6 22:26:57 2011 (r221558) +++ head/bin/sh/var.c Fri May 6 22:31:27 2011 (r221559) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include "shell.h" #include "output.h" @@ -361,6 +362,7 @@ setvareq(char *s, int flags) if ((vp->flags & VEXPORT) && localevar(s)) { change_env(s, 1); (void) setlocale(LC_ALL, ""); + updatecharset(); } INTON; return; @@ -379,6 +381,7 @@ setvareq(char *s, int flags) if ((vp->flags & VEXPORT) && localevar(s)) { change_env(s, 1); (void) setlocale(LC_ALL, ""); + updatecharset(); } INTON; } @@ -480,6 +483,7 @@ bltinsetlocale(void) if (loc != NULL) { setlocale(LC_ALL, loc); INTON; + updatecharset(); return; } locdef = bltinlookup("LANG", 0); @@ -491,6 +495,7 @@ bltinsetlocale(void) setlocale(locale_categories[i], loc); } INTON; + updatecharset(); } /* @@ -505,12 +510,24 @@ bltinunsetlocale(void) for (lp = cmdenviron ; lp ; lp = lp->next) { if (localevar(lp->text)) { setlocale(LC_ALL, ""); + updatecharset(); return; } } INTON; } +/* + * Update the localeisutf8 flag. + */ +void +updatecharset(void) +{ + char *charset; + + charset = nl_langinfo(CODESET); + localeisutf8 = !strcmp(charset, "UTF-8"); +} /* * Generate a list of exported variables. This routine is used to construct @@ -656,6 +673,7 @@ exportcmd(int argc, char **argv) if ((vp->flags & VEXPORT) && localevar(vp->text)) { change_env(vp->text, 1); (void) setlocale(LC_ALL, ""); + updatecharset(); } goto found; } @@ -850,6 +868,7 @@ unsetvar(const char *s) if ((vp->flags & VEXPORT) && localevar(vp->text)) { change_env(s, 0); setlocale(LC_ALL, ""); + updatecharset(); } vp->flags &= ~VEXPORT; vp->flags |= VUNSET; Modified: head/bin/sh/var.h ============================================================================== --- head/bin/sh/var.h Fri May 6 22:26:57 2011 (r221558) +++ head/bin/sh/var.h Fri May 6 22:31:27 2011 (r221559) @@ -81,6 +81,8 @@ extern struct var vhistsize; extern struct var vterm; #endif +extern int localeisutf8; + /* * The following macros access the values of the above variables. * They have to skip over the name. They return the null string @@ -112,6 +114,7 @@ char *lookupvar(const char *); char *bltinlookup(const char *, int); void bltinsetlocale(void); void bltinunsetlocale(void); +void updatecharset(void); char **environment(void); int showvarscmd(int, char **); int exportcmd(int, char **); From owner-svn-src-all@FreeBSD.ORG Fri May 6 22:36:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D17A0106566B; Fri, 6 May 2011 22:36:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C04408FC08; Fri, 6 May 2011 22:36:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46MahAn069452; Fri, 6 May 2011 22:36:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46Mah8l069450; Fri, 6 May 2011 22:36:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062236.p46Mah8l069450@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 22:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221560 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 22:36:43 -0000 Author: yongari Date: Fri May 6 22:36:43 2011 New Revision: 221560 URL: http://svn.freebsd.org/changeset/base/221560 Log: Call bus_dmamap_sync() only after TX DPD update. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 22:31:27 2011 (r221559) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:36:43 2011 (r221560) @@ -2644,8 +2644,6 @@ xl_start_locked(struct ifnet *ifp) * once for each packet. */ cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); - bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, - BUS_DMASYNC_PREWRITE); /* * Queue the packets. If the TX channel is clear, update @@ -2666,6 +2664,8 @@ xl_start_locked(struct ifnet *ifp) sc->xl_cdata.xl_tx_head = start_tx; sc->xl_cdata.xl_tx_tail = cur_tx; } + bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, + BUS_DMASYNC_PREWRITE); if (!CSR_READ_4(sc, XL_DOWNLIST_PTR)) CSR_WRITE_4(sc, XL_DOWNLIST_PTR, start_tx->xl_phys); @@ -2765,12 +2765,12 @@ xl_start_90xB_locked(struct ifnet *ifp) * once for each packet. */ cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); - bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, - BUS_DMASYNC_PREWRITE); /* Start transmission */ sc->xl_cdata.xl_tx_prod = idx; start_tx->xl_prev->xl_ptr->xl_next = htole32(start_tx->xl_phys); + bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, + BUS_DMASYNC_PREWRITE); /* * Set a timeout in case the chip goes out to lunch. From owner-svn-src-all@FreeBSD.ORG Fri May 6 22:45:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E52AE106564A; Fri, 6 May 2011 22:45:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D41CB8FC12; Fri, 6 May 2011 22:45:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46MjD3V069751; Fri, 6 May 2011 22:45:13 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46MjD9Z069748; Fri, 6 May 2011 22:45:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062245.p46MjD9Z069748@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 22:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221561 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 22:45:14 -0000 Author: yongari Date: Fri May 6 22:45:13 2011 New Revision: 221561 URL: http://svn.freebsd.org/changeset/base/221561 Log: Updating status word should be the last operation of UPD structure renewal. Disable instruction reordering by adding volatile to xl_list_onefrag structure. Modified: head/sys/dev/xl/if_xl.c head/sys/dev/xl/if_xlreg.h Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 22:36:43 2011 (r221560) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:45:13 2011 (r221561) @@ -1904,8 +1904,8 @@ xl_newbuf(struct xl_softc *sc, struct xl sc->xl_tmpmap = map; c->xl_mbuf = m_new; c->xl_ptr->xl_frag.xl_len = htole32(m_new->m_len | XL_LAST_FRAG); - c->xl_ptr->xl_status = 0; c->xl_ptr->xl_frag.xl_addr = htole32(segs->ds_addr); + c->xl_ptr->xl_status = 0; bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREREAD); return (0); } Modified: head/sys/dev/xl/if_xlreg.h ============================================================================== --- head/sys/dev/xl/if_xlreg.h Fri May 6 22:36:43 2011 (r221560) +++ head/sys/dev/xl/if_xlreg.h Fri May 6 22:45:13 2011 (r221561) @@ -468,8 +468,8 @@ struct xl_list { struct xl_list_onefrag { u_int32_t xl_next; /* final entry has 0 nextptr */ - u_int32_t xl_status; - struct xl_frag xl_frag; + volatile u_int32_t xl_status; + volatile struct xl_frag xl_frag; }; struct xl_list_data { From owner-svn-src-all@FreeBSD.ORG Fri May 6 22:55:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46193106564A; Fri, 6 May 2011 22:55:54 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 355578FC0C; Fri, 6 May 2011 22:55:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46MtsnN070224; Fri, 6 May 2011 22:55:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46MtsCR070222; Fri, 6 May 2011 22:55:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062255.p46MtsCR070222@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 22:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221563 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 22:55:54 -0000 Author: yongari Date: Fri May 6 22:55:53 2011 New Revision: 221563 URL: http://svn.freebsd.org/changeset/base/221563 Log: Terminate interrupt handler if driver detect it's not running. Also add check for driver running state before trying to send frames. While I'm here, use for loop. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 22:45:33 2011 (r221562) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:55:53 2011 (r221563) @@ -2273,10 +2273,14 @@ xl_intr(void *arg) } #endif - while ((status = CSR_READ_2(sc, XL_STATUS)) & XL_INTRS && - status != 0xFFFF) { + for (;;) { + status = CSR_READ_2(sc, XL_STATUS); + if ((status & XL_INTRS) == 0 || status == 0xFFFF) + break; CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK|(status & XL_INTRS)); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; if (status & XL_STAT_UP_COMPLETE) { int curpkts; @@ -2304,6 +2308,7 @@ xl_intr(void *arg) if (status & XL_STAT_ADFAIL) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xl_init_locked(sc); + break; } if (status & XL_STAT_STATSOFLOW) { @@ -2313,7 +2318,8 @@ xl_intr(void *arg) } } - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && + ifp->if_drv_flags & IFF_DRV_RUNNING) { if (sc->xl_type == XL_TYPE_905B) xl_start_90xB_locked(ifp); else From owner-svn-src-all@FreeBSD.ORG Fri May 6 23:01:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96C3B106566B; Fri, 6 May 2011 23:01:29 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B548FC13; Fri, 6 May 2011 23:01:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46N1Tmw070457; Fri, 6 May 2011 23:01:29 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46N1TRI070455; Fri, 6 May 2011 23:01:29 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062301.p46N1TRI070455@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 23:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221564 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 23:01:29 -0000 Author: yongari Date: Fri May 6 23:01:29 2011 New Revision: 221564 URL: http://svn.freebsd.org/changeset/base/221564 Log: Change xl_rxeof() a bit to return the number of processed frames in RX descriptor ring. Previously it returned the number of frames that were successfully passed to upper stack which in turn means it ignored frames that were discarded due to errors. The number of processed frames in RX descriptor ring is used to detect whether driver is out of sync with controller's current descriptor pointer. Returning number of processed frames reduces unnecessary (probably wrong) re-synchronization. While here, remove unnecessary local variable initialization. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 22:55:53 2011 (r221563) +++ head/sys/dev/xl/if_xl.c Fri May 6 23:01:29 2011 (r221564) @@ -1944,7 +1944,7 @@ xl_rxeof(struct xl_softc *sc) struct mbuf *m; struct ifnet *ifp = sc->xl_ifp; struct xl_chain_onefrag *cur_rx; - int total_len = 0; + int total_len; int rx_npkts = 0; u_int32_t rxstat; @@ -1963,6 +1963,7 @@ again: cur_rx = sc->xl_cdata.xl_rx_head; sc->xl_cdata.xl_rx_head = cur_rx->xl_next; total_len = rxstat & XL_RXSTAT_LENMASK; + rx_npkts++; /* * Since we have told the chip to allow large frames, @@ -2047,7 +2048,6 @@ again: XL_UNLOCK(sc); (*ifp->if_input)(ifp, m); XL_LOCK(sc); - rx_npkts++; /* * If we are running from the taskqueue, the interface @@ -2283,11 +2283,7 @@ xl_intr(void *arg) break; if (status & XL_STAT_UP_COMPLETE) { - int curpkts; - - curpkts = ifp->if_ipackets; - xl_rxeof(sc); - if (curpkts == ifp->if_ipackets) { + if (xl_rxeof(sc) == 0) { while (xl_rx_resync(sc)) xl_rxeof(sc); } From owner-svn-src-all@FreeBSD.ORG Fri May 6 23:49:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74CDF1065673; Fri, 6 May 2011 23:49:11 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A25C8FC0A; Fri, 6 May 2011 23:49:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p46NnB8Y071920; Fri, 6 May 2011 23:49:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p46NnBWj071918; Fri, 6 May 2011 23:49:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105062349.p46NnBWj071918@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 6 May 2011 23:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221565 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2011 23:49:11 -0000 Author: yongari Date: Fri May 6 23:49:10 2011 New Revision: 221565 URL: http://svn.freebsd.org/changeset/base/221565 Log: Reuse the TX descriptor(DPD) if xl_encap() failed instead of just picking the next available one. This may explain why xl(4) sees TX underrun error with no queued frame. I hope this addresses a long standing xl(4) watchdog timeout issue as well. Obtained from: OpenBSD Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 23:01:29 2011 (r221564) +++ head/sys/dev/xl/if_xl.c Fri May 6 23:49:10 2011 (r221565) @@ -2571,8 +2571,9 @@ static void xl_start_locked(struct ifnet *ifp) { struct xl_softc *sc = ifp->if_softc; - struct mbuf *m_head = NULL; + struct mbuf *m_head; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; + struct xl_chain *prev_tx; u_int32_t status; int error; @@ -2603,11 +2604,13 @@ xl_start_locked(struct ifnet *ifp) break; /* Pick a descriptor off the free list. */ + prev_tx = cur_tx; cur_tx = sc->xl_cdata.xl_tx_free; /* Pack the data into the descriptor. */ error = xl_encap(sc, cur_tx, &m_head); if (error) { + cur_tx = prev_tx; if (m_head == NULL) break; ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -2702,8 +2705,9 @@ static void xl_start_90xB_locked(struct ifnet *ifp) { struct xl_softc *sc = ifp->if_softc; - struct mbuf *m_head = NULL; + struct mbuf *m_head; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; + struct xl_chain *prev_tx; int error, idx; XL_LOCK_ASSERT(sc); @@ -2726,11 +2730,13 @@ xl_start_90xB_locked(struct ifnet *ifp) if (m_head == NULL) break; + prev_tx = cur_tx; cur_tx = &sc->xl_cdata.xl_tx_chain[idx]; /* Pack the data into the descriptor. */ error = xl_encap(sc, cur_tx, &m_head); if (error) { + cur_tx = prev_tx; if (m_head == NULL) break; ifp->if_drv_flags |= IFF_DRV_OACTIVE; From owner-svn-src-all@FreeBSD.ORG Sat May 7 00:06:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B72491065670; Sat, 7 May 2011 00:06:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A68A78FC0A; Sat, 7 May 2011 00:06:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47062CU072457; Sat, 7 May 2011 00:06:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47062h8072454; Sat, 7 May 2011 00:06:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105070006.p47062h8072454@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 May 2011 00:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221566 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 00:06:02 -0000 Author: yongari Date: Sat May 7 00:06:02 2011 New Revision: 221566 URL: http://svn.freebsd.org/changeset/base/221566 Log: Rename xl_stats_update() callout handler to xl_tick() and move MII tick driving logic to xl_tick(). Now xl_tick() handles MII tick as well as periodic updating of statistics. This change removes a hack used in interrupt handler where it wanted to update statistics without driving MII tick. Modified: head/sys/dev/xl/if_xl.c head/sys/dev/xl/if_xlreg.h Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 6 23:49:10 2011 (r221565) +++ head/sys/dev/xl/if_xl.c Sat May 7 00:06:02 2011 (r221566) @@ -225,8 +225,8 @@ static int xl_attach(device_t); static int xl_detach(device_t); static int xl_newbuf(struct xl_softc *, struct xl_chain_onefrag *); -static void xl_stats_update(void *); -static void xl_stats_update_locked(struct xl_softc *); +static void xl_tick(void *); +static void xl_stats_update(struct xl_softc *); static int xl_encap(struct xl_softc *, struct xl_chain *, struct mbuf **); static int xl_rxeof(struct xl_softc *); static void xl_rxeof_task(void *, int); @@ -1330,7 +1330,7 @@ xl_attach(device_t dev) goto fail; } - callout_init_mtx(&sc->xl_stat_callout, &sc->xl_mtx, 0); + callout_init_mtx(&sc->xl_tick_callout, &sc->xl_mtx, 0); TASK_INIT(&sc->xl_task, 0, xl_rxeof_task, sc); /* @@ -1695,7 +1695,7 @@ xl_detach(device_t dev) xl_stop(sc); XL_UNLOCK(sc); taskqueue_drain(taskqueue_swi, &sc->xl_task); - callout_drain(&sc->xl_stat_callout); + callout_drain(&sc->xl_tick_callout); ether_ifdetach(ifp); } if (sc->xl_miibus) @@ -2307,11 +2307,8 @@ xl_intr(void *arg) break; } - if (status & XL_STAT_STATSOFLOW) { - sc->xl_stats_no_timeout = 1; - xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; - } + if (status & XL_STAT_STATSOFLOW) + xl_stats_update(sc); } if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && @@ -2379,49 +2376,46 @@ xl_poll_locked(struct ifnet *ifp, enum p xl_init_locked(sc); } - if (status & XL_STAT_STATSOFLOW) { - sc->xl_stats_no_timeout = 1; + if (status & XL_STAT_STATSOFLOW) xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; - } } } return (rx_npkts); } #endif /* DEVICE_POLLING */ -/* - * XXX: This is an entry point for callout which needs to take the lock. - */ static void -xl_stats_update(void *xsc) +xl_tick(void *xsc) { struct xl_softc *sc = xsc; + struct mii_data *mii; XL_LOCK_ASSERT(sc); + if (sc->xl_miibus != NULL) { + mii = device_get_softc(sc->xl_miibus); + mii_tick(mii); + } + + xl_stats_update(sc); if (xl_watchdog(sc) == EJUSTRETURN) return; - xl_stats_update_locked(sc); + callout_reset(&sc->xl_tick_callout, hz, xl_tick, sc); } static void -xl_stats_update_locked(struct xl_softc *sc) +xl_stats_update(struct xl_softc *sc) { struct ifnet *ifp = sc->xl_ifp; struct xl_stats xl_stats; u_int8_t *p; int i; - struct mii_data *mii = NULL; XL_LOCK_ASSERT(sc); bzero((char *)&xl_stats, sizeof(struct xl_stats)); - if (sc->xl_miibus != NULL) - mii = device_get_softc(sc->xl_miibus); - p = (u_int8_t *)&xl_stats; /* Read all the stats registers. */ @@ -2443,14 +2437,7 @@ xl_stats_update_locked(struct xl_softc * */ XL_SEL_WIN(4); CSR_READ_1(sc, XL_W4_BADSSD); - - if ((mii != NULL) && (!sc->xl_stats_no_timeout)) - mii_tick(mii); - XL_SEL_WIN(7); - - if (!sc->xl_stats_no_timeout) - callout_reset(&sc->xl_stat_callout, hz, xl_stats_update, sc); } /* @@ -2957,9 +2944,7 @@ xl_init_locked(struct xl_softc *sc) /* Clear out the stats counters. */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STATS_DISABLE); - sc->xl_stats_no_timeout = 1; - xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; + xl_stats_update(sc); XL_SEL_WIN(4); CSR_WRITE_2(sc, XL_W4_NET_DIAG, XL_NETDIAG_UPPER_BYTES_ENABLE); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STATS_ENABLE); @@ -3000,7 +2985,7 @@ xl_init_locked(struct xl_softc *sc) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->xl_wdog_timer = 0; - callout_reset(&sc->xl_stat_callout, hz, xl_stats_update, sc); + callout_reset(&sc->xl_tick_callout, hz, xl_tick, sc); } /* @@ -3309,7 +3294,7 @@ xl_stop(struct xl_softc *sc) bus_space_write_4(sc->xl_ftag, sc->xl_fhandle, 4, 0x8000); /* Stop the stats updater. */ - callout_stop(&sc->xl_stat_callout); + callout_stop(&sc->xl_tick_callout); /* * Free data in the RX lists. Modified: head/sys/dev/xl/if_xlreg.h ============================================================================== --- head/sys/dev/xl/if_xlreg.h Fri May 6 23:49:10 2011 (r221565) +++ head/sys/dev/xl/if_xlreg.h Sat May 7 00:06:02 2011 (r221566) @@ -614,13 +614,12 @@ struct xl_softc { u_int32_t xl_xcvr; u_int16_t xl_media; u_int16_t xl_caps; - u_int8_t xl_stats_no_timeout; u_int16_t xl_tx_thresh; int xl_pmcap; int xl_if_flags; struct xl_list_data xl_ldata; struct xl_chain_data xl_cdata; - struct callout xl_stat_callout; + struct callout xl_tick_callout; int xl_wdog_timer; int xl_flags; struct resource *xl_fres; From owner-svn-src-all@FreeBSD.ORG Sat May 7 00:06:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1C901065673; Sat, 7 May 2011 00:06:58 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id 7B1128FC0C; Sat, 7 May 2011 00:06:58 +0000 (UTC) Received: from dhcp-192-168-2-13.wifi.xcllnt.net (atm.xcllnt.net [70.36.220.6]) (authenticated bits=0) by mail.xcllnt.net (8.14.4/8.14.4) with ESMTP id p4706qD3039962 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 6 May 2011 17:06:57 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <4DC3FC8F.2070200@freebsd.org> Date: Fri, 6 May 2011 17:06:52 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <97F11E8D-E0D3-4BF9-8188-1B58DAF37054@xcllnt.net> References: <201105051416.p45EGfcd003037@svn.freebsd.org> <8FF5539E-F91D-46C6-9019-B40CB8010A85@xcllnt.net> <4DC36B2B.4010509@freebsd.org> <4DC3FC8F.2070200@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221497 - head/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 00:06:58 -0000 On May 6, 2011, at 6:50 AM, Nathan Whitehorn wrote: > On 05/06/11 00:21, Marcel Moolenaar wrote: >> On May 5, 2011, at 8:29 PM, Nathan Whitehorn wrote: >>=20 >>> On 05/05/11 16:18, Marcel Moolenaar wrote: >>>> On May 5, 2011, at 7:16 AM, Nathan Whitehorn wrote: >>>>=20 >>>>> @@ -84,15 +63,13 @@ if [ $bootable =3D yes ]; then >>>>> mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi >>>>> umount $MNT >>>>> mdconfig -d -u $md >>>>> - BOOTOPTS=3D"-b $EFIPART -no-emul-boot" >>>>> + BOOTOPTS=3D"-b bootimage=3Di386;$EFIPART -o no-emul-boot" >>>>> else >>>>> BOOTOPTS=3D"" >>>>> fi >>>> Thanks! >>>>=20 >>>> Can you explain what this particular change does or why it's done? >>>>=20 >>> I'm cleaning up the release-building code, and am switching them = from mkisofs to makefs, which provides the same functionality. This = started with some irritation with the cdrtools port and a bug in the HFS = hybrid generation that was breaking PPC release CD generation. Switching = these to depend on makefs in general speeds the release-building process = and removes the number of dependencies involved, since makefs is built = as part of base. >> Actually, I was just interested in the 'bootimage=3Di386' part >> of your change. I totally get why you're doing it :-) >=20 > Ah, OK :) >=20 > That just sets the El Torito system type to 0 (x86), which is what = IA64 uses, as far as I can tell, and doesn't turn on any special magic = like is done for the mac. I suppose while we're monkeying about with = makefs, we could add an 'ia64' alias. Nah, don't worry about it... --=20 Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Sat May 7 00:18:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29F671065674; Sat, 7 May 2011 00:18:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19D318FC1B; Sat, 7 May 2011 00:18:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p470IwhR072856; Sat, 7 May 2011 00:18:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p470IwnZ072854; Sat, 7 May 2011 00:18:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105070018.p470IwnZ072854@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 May 2011 00:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221567 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 00:18:59 -0000 Author: yongari Date: Sat May 7 00:18:58 2011 New Revision: 221567 URL: http://svn.freebsd.org/changeset/base/221567 Log: Rearm watchdog timer if driver kick controller to recover from TX underrun error. While here, prepend 0x to status code to show TX status is hex number. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sat May 7 00:06:02 2011 (r221566) +++ head/sys/dev/xl/if_xl.c Sat May 7 00:18:58 2011 (r221567) @@ -2207,7 +2207,7 @@ xl_txeoc(struct xl_softc *sc) txstat & XL_TXSTATUS_JABBER || txstat & XL_TXSTATUS_RECLAIM) { device_printf(sc->xl_dev, - "transmission error: %x\n", txstat); + "transmission error: 0x%02x\n", txstat); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_RESET); xl_wait(sc); if (sc->xl_type == XL_TYPE_905B) { @@ -2220,11 +2220,14 @@ xl_txeoc(struct xl_softc *sc) CSR_WRITE_4(sc, XL_DOWNLIST_PTR, c->xl_phys); CSR_WRITE_1(sc, XL_DOWN_POLL, 64); + sc->xl_wdog_timer = 5; } } else { - if (sc->xl_cdata.xl_tx_head != NULL) + if (sc->xl_cdata.xl_tx_head != NULL) { CSR_WRITE_4(sc, XL_DOWNLIST_PTR, sc->xl_cdata.xl_tx_head->xl_phys); + sc->xl_wdog_timer = 5; + } } /* * Remember to set this for the From owner-svn-src-all@FreeBSD.ORG Sat May 7 00:25:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0EF71065689; Sat, 7 May 2011 00:25:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0EF58FC14; Sat, 7 May 2011 00:25:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p470PCKP073070; Sat, 7 May 2011 00:25:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p470PC4k073067; Sat, 7 May 2011 00:25:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105070025.p470PC4k073067@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 May 2011 00:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221568 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 00:25:13 -0000 Author: yongari Date: Sat May 7 00:25:12 2011 New Revision: 221568 URL: http://svn.freebsd.org/changeset/base/221568 Log: XL_DMACTL is 32bit register, use 32bit write macro. While I'm here add more bits for the register. Modified: head/sys/dev/xl/if_xl.c head/sys/dev/xl/if_xlreg.h Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sat May 7 00:18:58 2011 (r221567) +++ head/sys/dev/xl/if_xl.c Sat May 7 00:25:12 2011 (r221568) @@ -2969,7 +2969,7 @@ xl_init_locked(struct xl_softc *sc) /* Set the RX early threshold */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_THRESH|(XL_PACKET_SIZE >>2)); - CSR_WRITE_2(sc, XL_DMACTL, XL_DMACTL_UP_RX_EARLY); + CSR_WRITE_4(sc, XL_DMACTL, XL_DMACTL_UP_RX_EARLY); /* Enable receiver and transmitter. */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_ENABLE); Modified: head/sys/dev/xl/if_xlreg.h ============================================================================== --- head/sys/dev/xl/if_xlreg.h Sat May 7 00:18:58 2011 (r221567) +++ head/sys/dev/xl/if_xlreg.h Sat May 7 00:25:12 2011 (r221568) @@ -124,6 +124,11 @@ #define XL_DMACTL_DOWN_INPROG 0x00000080 #define XL_DMACTL_COUNTER_SPEED 0x00000100 #define XL_DMACTL_DOWNDOWN_MODE 0x00000200 +#define XL_DMACTL_UP_ALTSEQ_DIS 0x00010000 /* 3c90xB/3c90xC */ +#define XL_DMACTL_DOWN_ALTSEQ_DIS 0x00020000 /* 3c90xC only */ +#define XL_DMACTL_DEFEAT_MWI 0x00100000 /* 3c90xB/3c90xC */ +#define XL_DMACTL_DEFEAT_MRL 0x00100000 /* 3c90xB/3c90xC */ +#define XL_DMACTL_UP_OVERRUN_DISC_DIS 0x00200000 /* 3c90xB/3c90xC */ #define XL_DMACTL_TARGET_ABORT 0x40000000 #define XL_DMACTL_MASTER_ABORT 0x80000000 From owner-svn-src-all@FreeBSD.ORG Sat May 7 01:05:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 054BA106566B; Sat, 7 May 2011 01:05:32 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7F8C8FC08; Sat, 7 May 2011 01:05:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4715VGW074290; Sat, 7 May 2011 01:05:31 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4715V0S074281; Sat, 7 May 2011 01:05:31 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105070105.p4715V0S074281@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 7 May 2011 01:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221569 - in head: lib/libdwarf lib/libelf sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 01:05:32 -0000 Author: obrien Date: Sat May 7 01:05:31 2011 New Revision: 221569 URL: http://svn.freebsd.org/changeset/base/221569 Log: Add the ability to search for all the inlined instances of a given function. Reviewed by: jb Obtained from: Juniper Networks Added: head/lib/libdwarf/dwarf_func.c (contents, props changed) Modified: head/lib/libdwarf/Makefile head/lib/libdwarf/_libdwarf.h head/lib/libdwarf/dwarf_init.c head/lib/libdwarf/libdwarf.h head/lib/libelf/Makefile head/lib/libelf/libelf_data.c head/sys/sys/elf_common.h Modified: head/lib/libdwarf/Makefile ============================================================================== --- head/lib/libdwarf/Makefile Sat May 7 00:25:12 2011 (r221568) +++ head/lib/libdwarf/Makefile Sat May 7 01:05:31 2011 (r221569) @@ -14,6 +14,7 @@ SRCS= \ dwarf_errno.c \ dwarf_finish.c \ dwarf_form.c \ + dwarf_func.c \ dwarf_init.c \ dwarf_loc.c Modified: head/lib/libdwarf/_libdwarf.h ============================================================================== --- head/lib/libdwarf/_libdwarf.h Sat May 7 00:25:12 2011 (r221568) +++ head/lib/libdwarf/_libdwarf.h Sat May 7 01:05:31 2011 (r221569) @@ -163,6 +163,37 @@ struct _Dwarf_Debug { dbg_cu; /* List of compilation units. */ Dwarf_CU dbg_cu_current; /* Ptr to the current compilation unit. */ + + STAILQ_HEAD(, _Dwarf_Func) dbg_func; /* List of functions */ +}; + +struct _Dwarf_Func { + Dwarf_Die func_die; + const char *func_name; + Dwarf_Addr func_low_pc; + Dwarf_Addr func_high_pc; + int func_is_inlined; + /* inlined instance */ + STAILQ_HEAD(, _Dwarf_Inlined_Func) func_inlined_instances; + STAILQ_ENTRY(_Dwarf_Func) func_next; }; +struct _Dwarf_Inlined_Func { + struct _Dwarf_Func *ifunc_origin; + Dwarf_Die ifunc_abstract; + Dwarf_Die ifunc_concrete; + Dwarf_Addr ifunc_low_pc; + Dwarf_Addr ifunc_high_pc; + STAILQ_ENTRY(_Dwarf_Inlined_Func) ifunc_next; +}; + +void dwarf_build_function_table(Dwarf_Debug dbg); + +#ifdef DWARF_DEBUG +#include +#define DWARF_ASSERT(x) assert(x) +#else +#define DWARF_ASSERT(x) +#endif + #endif /* !__LIBDWARF_H_ */ Added: head/lib/libdwarf/dwarf_func.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libdwarf/dwarf_func.c Sat May 7 01:05:31 2011 (r221569) @@ -0,0 +1,227 @@ +/*- + * Copyright (c) 2008-2009, 2011, Juniper Networks, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 REGENTS 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. + * + * JNPR: dwarf_func.c 336441 2009-10-17 09:19:54Z deo + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include <_libdwarf.h> + +static void +dwarf_add_function(Dwarf_Debug dbg, Dwarf_Func func) +{ + + STAILQ_INSERT_TAIL(&dbg->dbg_func, func, func_next); +} + +int +dwarf_function_get_addr_range(Dwarf_Func f, Dwarf_Addr *low_pc, + Dwarf_Addr *high_pc) +{ + + *low_pc = f->func_low_pc; + *high_pc = f->func_high_pc; + return 0; +} + +int +dwarf_inlined_function_get_addr_range(Dwarf_Inlined_Func f, Dwarf_Addr *low_pc, + Dwarf_Addr *high_pc) +{ + + *low_pc = f->ifunc_low_pc; + *high_pc = f->ifunc_high_pc; + return 0; +} + +int +dwarf_function_is_inlined(Dwarf_Func f) +{ + + if (f->func_is_inlined == DW_INL_inlined || + f->func_is_inlined == DW_INL_declared_inlined) + return 1; + else + return 0; +} + +Dwarf_Func +dwarf_find_function_by_name(Dwarf_Debug dbg, const char *name) +{ + /* XXX: replace with a fast version */ + + Dwarf_Func func; + STAILQ_FOREACH(func, &dbg->dbg_func, func_next) { + if (strcmp(name, func->func_name) == 0) + return func; + } + return NULL; +} + +Dwarf_Func +dwarf_find_function_by_offset(Dwarf_Debug dbg, Dwarf_Off off) +{ + + Dwarf_Func func; + Dwarf_Die die; + /* printf("look for %llx\n", off); */ + STAILQ_FOREACH(func, &dbg->dbg_func, func_next) { + die = func->func_die; + if ((off_t)die->die_offset == off) { + return func; + } + } + return NULL; +} + +void +dwarf_build_function_table(Dwarf_Debug dbg) +{ + Dwarf_CU cu; + Dwarf_AttrValue av; + Dwarf_Die die, origin_die; + Dwarf_Func func, origin_func; + Dwarf_Inlined_Func ifunc; + unsigned long long offset; + const char *name; + Dwarf_Error error; + + /* + * find out all the functions + */ + STAILQ_FOREACH(cu, &dbg->dbg_cu, cu_next) { + STAILQ_FOREACH(die, &cu->cu_die, die_next) { + if (die->die_a->a_tag == DW_TAG_subprogram) { + /* + * Some function has multiple entries, i.e. + * if a function is inlined, it has many + * abstract/concrete instances, the abstract + * instances are with DW_TAG_subprogram. + */ + dwarf_attrval_string(die, DW_AT_name, &name, + &error); + func = dwarf_find_function_by_name(dbg, name); + if (func == NULL) { + func = malloc( + sizeof(struct _Dwarf_Func)); + DWARF_ASSERT(func); + + func->func_die = die; + func->func_name = name; + STAILQ_INIT( + &func->func_inlined_instances); + + dwarf_add_function(dbg, func); + STAILQ_FOREACH(av, &die->die_attrval, + av_next) { + switch (av->av_attrib) { + case DW_AT_low_pc: + func->func_low_pc = + av->u[0].u64; + break; + case DW_AT_high_pc: + func->func_high_pc = + av->u[0].u64; + break; + case DW_AT_inline: + func->func_is_inlined = + av->u[0].u64; + break; + } + } + } + } + } + } + + /* + * Now check the concrete inlined instances. + */ + STAILQ_FOREACH(cu, &dbg->dbg_cu, cu_next) { + STAILQ_FOREACH(die, &cu->cu_die, die_next) { + if (die->die_a->a_tag == DW_TAG_inlined_subroutine) { + ifunc = malloc( + sizeof(struct _Dwarf_Inlined_Func)); + DWARF_ASSERT(ifunc); + STAILQ_FOREACH(av, &die->die_attrval, av_next) { + switch (av->av_attrib) { + case DW_AT_abstract_origin: + offset = av->u[0].u64 + + die->die_cu->cu_offset; + origin_die = dwarf_die_find( + die, offset); + DWARF_ASSERT(origin_die != 0); + + /* + * the abstract origin must + * have been merged with + * another die + */ + dwarf_attrval_string( + origin_die, DW_AT_name, + &name, &error); + origin_func = + dwarf_find_function_by_name + (dbg, name); + DWARF_ASSERT(origin_func != 0); + + STAILQ_INSERT_TAIL( + &origin_func-> + func_inlined_instances, + ifunc, ifunc_next); + + break; + case DW_AT_low_pc: + ifunc->ifunc_low_pc = + av->u[0].u64; + break; + case DW_AT_high_pc: + ifunc->ifunc_high_pc = + av->u[0].u64; + break; + } + } + } + } + } +} + +void +dwarf_function_iterate_inlined_instance(Dwarf_Func func, + Dwarf_Inlined_Callback f, void *data) +{ + Dwarf_Inlined_Func ifunc; + + if (!dwarf_function_is_inlined(func)) + return; + STAILQ_FOREACH(ifunc, &func->func_inlined_instances, ifunc_next) { + f(ifunc, data); + } +} Modified: head/lib/libdwarf/dwarf_init.c ============================================================================== --- head/lib/libdwarf/dwarf_init.c Sat May 7 00:25:12 2011 (r221568) +++ head/lib/libdwarf/dwarf_init.c Sat May 7 01:05:31 2011 (r221569) @@ -578,6 +578,9 @@ dwarf_init_info(Dwarf_Debug dbg, Dwarf_E offset = next_offset; } + /* Build the function table. */ + dwarf_build_function_table(dbg); + return ret; } @@ -686,6 +689,7 @@ dwarf_elf_init(Elf *elf, int mode, Dwarf dbg->dbg_mode = mode; STAILQ_INIT(&dbg->dbg_cu); + STAILQ_INIT(&dbg->dbg_func); *ret_dbg = dbg; Modified: head/lib/libdwarf/libdwarf.h ============================================================================== --- head/lib/libdwarf/libdwarf.h Sat May 7 00:25:12 2011 (r221568) +++ head/lib/libdwarf/libdwarf.h Sat May 7 01:05:31 2011 (r221569) @@ -51,6 +51,7 @@ typedef struct _Dwarf_Debug *Dwarf_Debug typedef struct _Dwarf_Die *Dwarf_Die; typedef struct _Dwarf_Fde *Dwarf_Fde; typedef struct _Dwarf_Func *Dwarf_Func; +typedef struct _Dwarf_Inlined_Func *Dwarf_Inlined_Func; typedef struct _Dwarf_Global *Dwarf_Global; typedef struct _Dwarf_Line *Dwarf_Line; typedef struct _Dwarf_Type *Dwarf_Type; @@ -71,6 +72,9 @@ typedef struct { Dwarf_Loc *ld_s; } Dwarf_Locdesc; +/* receiver function for dwarf_function_iterate_inlined_instance() API */ +typedef void (*Dwarf_Inlined_Callback)(Dwarf_Inlined_Func, void *); + /* * Error numbers which are specific to this implementation. */ @@ -157,6 +161,16 @@ void dwarf_dump_strtab(Dwarf_Debug); void dwarf_dump_symtab(Dwarf_Debug); void dwarf_dump_raw(Dwarf_Debug); void dwarf_dump_tree(Dwarf_Debug); +Dwarf_Func dwarf_find_function_by_offset(Dwarf_Debug dbg, Dwarf_Off off); +Dwarf_Func dwarf_find_function_by_name(Dwarf_Debug dbg, const char *name); +int dwarf_function_get_addr_range(Dwarf_Func f, + Dwarf_Addr *low_pc, Dwarf_Addr *high_pc); +int dwarf_function_is_inlined(Dwarf_Func f); +void dwarf_function_iterate_inlined_instance(Dwarf_Func func, + Dwarf_Inlined_Callback f, void *data); +int dwarf_inlined_function_get_addr_range(Dwarf_Inlined_Func f, + Dwarf_Addr *low_pc, Dwarf_Addr *high_pc); + __END_DECLS #endif /* !_LIBDWARF_H_ */ Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Sat May 7 00:25:12 2011 (r221568) +++ head/lib/libelf/Makefile Sat May 7 01:05:31 2011 (r221569) @@ -57,7 +57,7 @@ INCS= libelf.h gelf.h GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c CLEANFILES= ${GENSRCS} -CFLAGS+= -I. -I${.CURDIR} +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys SHLIB_MAJOR= 1 Modified: head/lib/libelf/libelf_data.c ============================================================================== --- head/lib/libelf/libelf_data.c Sat May 7 00:25:12 2011 (r221568) +++ head/lib/libelf/libelf_data.c Sat May 7 01:05:31 2011 (r221569) @@ -84,6 +84,8 @@ _libelf_xlate_shtype(uint32_t sht) case SHT_SUNW_dof: return (ELF_T_BYTE); #endif + case SHT_MIPS_DWARF: + /* FALLTHROUGH */ case SHT_AMD64_UNWIND: /* == SHT_IA_64_UNWIND */ return (ELF_T_BYTE); default: Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Sat May 7 00:25:12 2011 (r221568) +++ head/sys/sys/elf_common.h Sat May 7 01:05:31 2011 (r221569) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2000, 2001, 2008, 2011, David E. O'Brien * Copyright (c) 1998 John D. Polstra. * All rights reserved. * @@ -295,6 +296,7 @@ typedef struct { #define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ #define SHT_LOPROC 0x70000000 /* reserved range for processor */ #define SHT_AMD64_UNWIND 0x70000001 /* unwind information */ +#define SHT_MIPS_DWARF 0x7000001e /* MIPS gcc uses MIPS_DWARF */ #define SHT_HIPROC 0x7fffffff /* specific section header types */ #define SHT_LOUSER 0x80000000 /* reserved range for application */ #define SHT_HIUSER 0xffffffff /* specific indexes */ From owner-svn-src-all@FreeBSD.ORG Sat May 7 02:00:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F779106564A; Sat, 7 May 2011 02:00:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EEA08FC0C; Sat, 7 May 2011 02:00:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4720ZcW075927; Sat, 7 May 2011 02:00:35 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4720ZYE075925; Sat, 7 May 2011 02:00:35 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105070200.p4720ZYE075925@svn.freebsd.org> From: Rick Macklem Date: Sat, 7 May 2011 02:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221570 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 02:00:36 -0000 Author: rmacklem Date: Sat May 7 02:00:35 2011 New Revision: 221570 URL: http://svn.freebsd.org/changeset/base/221570 Log: MFC: r220967 Fix a LOR in vfs_busy() where, after msleeping, it would lock the mutexes in the wrong order for the case where the MBF_MNTLSTLOCK is set. I believe this did have the potential for deadlock. For example, if multiple nfsd threads called vfs_busyfs(), which calls vfs_busy() with MBF_MNTLSTLOCK. Thanks go to pho for catching this during his testing. Modified: stable/8/sys/kern/vfs_subr.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/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Sat May 7 01:05:31 2011 (r221569) +++ stable/8/sys/kern/vfs_subr.c Sat May 7 02:00:35 2011 (r221570) @@ -380,9 +380,10 @@ vfs_busy(struct mount *mp, int flags) if (flags & MBF_MNTLSTLOCK) mtx_unlock(&mountlist_mtx); mp->mnt_kern_flag |= MNTK_MWAIT; - msleep(mp, MNT_MTX(mp), PVFS, "vfs_busy", 0); + msleep(mp, MNT_MTX(mp), PVFS | PDROP, "vfs_busy", 0); if (flags & MBF_MNTLSTLOCK) mtx_lock(&mountlist_mtx); + MNT_ILOCK(mp); } if (flags & MBF_MNTLSTLOCK) mtx_unlock(&mountlist_mtx); From owner-svn-src-all@FreeBSD.ORG Sat May 7 02:19:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D582106564A; Sat, 7 May 2011 02:19:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DA778FC12; Sat, 7 May 2011 02:19:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p472JkTa076489; Sat, 7 May 2011 02:19:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p472JkSV076487; Sat, 7 May 2011 02:19:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105070219.p472JkSV076487@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 May 2011 02:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221571 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 02:19:46 -0000 Author: yongari Date: Sat May 7 02:19:46 2011 New Revision: 221571 URL: http://svn.freebsd.org/changeset/base/221571 Log: Remove unneeded use of variable status. This should have been done in r221557. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sat May 7 02:00:35 2011 (r221570) +++ head/sys/dev/xl/if_xl.c Sat May 7 02:19:46 2011 (r221571) @@ -2564,7 +2564,6 @@ xl_start_locked(struct ifnet *ifp) struct mbuf *m_head; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; struct xl_chain *prev_tx; - u_int32_t status; int error; XL_LOCK_ASSERT(sc); @@ -2651,7 +2650,6 @@ xl_start_locked(struct ifnet *ifp) sc->xl_cdata.xl_tx_tail->xl_next = start_tx; sc->xl_cdata.xl_tx_tail->xl_ptr->xl_next = htole32(start_tx->xl_phys); - status = sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status; sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status &= htole32(~XL_TXSTAT_DL_INTR); sc->xl_cdata.xl_tx_tail = cur_tx; From owner-svn-src-all@FreeBSD.ORG Sat May 7 02:37:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 802BB106566C; Sat, 7 May 2011 02:37:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F4AC8FC20; Sat, 7 May 2011 02:37:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p472bZwM077130; Sat, 7 May 2011 02:37:35 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p472bZ0D077117; Sat, 7 May 2011 02:37:35 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201105070237.p472bZ0D077117@svn.freebsd.org> From: Glen Barber Date: Sat, 7 May 2011 02:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221572 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 02:37:35 -0000 Author: gjb (doc committer) Date: Sat May 7 02:37:34 2011 New Revision: 221572 URL: http://svn.freebsd.org/changeset/base/221572 Log: MFC 205076 [1], 209034 [1], 211406 [2]: manlint fixes. Reported by: manlint Obtained from: uqs[1], joel[2] Modified: stable/8/share/man/man4/acpi_wmi.4 stable/8/share/man/man4/ae.4 stable/8/share/man/man4/altq.4 stable/8/share/man/man4/amdtemp.4 stable/8/share/man/man4/cxgb.4 stable/8/share/man/man4/ddb.4 stable/8/share/man/man4/enc.4 stable/8/share/man/man4/io.4 stable/8/share/man/man4/ipsec.4 stable/8/share/man/man4/iscsi_initiator.4 stable/8/share/man/man4/textdump.4 stable/8/share/man/man4/uart.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/acpi_wmi.4 ============================================================================== --- stable/8/share/man/man4/acpi_wmi.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/acpi_wmi.4 Sat May 7 02:37:34 2011 (r221572) @@ -57,7 +57,7 @@ information about GUIDs found in the sys WMI status device. .El .Sh EXAMPLES -.Bd Literal +.Bd -literal # cat /dev/wmistat GUID INST EXPE METH STR EVENT OID {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA Modified: stable/8/share/man/man4/ae.4 ============================================================================== --- stable/8/share/man/man4/ae.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/ae.4 Sat May 7 02:37:34 2011 (r221572) @@ -41,7 +41,7 @@ kernel configuration file: Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : -.Bd -literal -offset -indent +.Bd -literal -offset indent if_ae_load="YES" .Ed .Sh DESCRIPTION Modified: stable/8/share/man/man4/altq.4 ============================================================================== --- stable/8/share/man/man4/altq.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/altq.4 Sat May 7 02:37:34 2011 (r221572) @@ -122,7 +122,7 @@ They have been applied to the following .Xr an 4 , .Xr ath 4 , .Xr aue 4 , -.Xt axe 4 , +.Xr axe 4 , .Xr bce 4 , .Xr bfe 4 , .Xr bge 4 , Modified: stable/8/share/man/man4/amdtemp.4 ============================================================================== --- stable/8/share/man/man4/amdtemp.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/amdtemp.4 Sat May 7 02:37:34 2011 (r221572) @@ -75,6 +75,5 @@ The driver first appeared in .Fx 7.1 . .Sh AUTHORS -.An .An Rui Paulo Aq rpaulo@FreeBSD.org .An Norikatsu Shigemura Aq nork@FreeBSD.org Modified: stable/8/share/man/man4/cxgb.4 ============================================================================== --- stable/8/share/man/man4/cxgb.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/cxgb.4 Sat May 7 02:37:34 2011 (r221572) @@ -92,8 +92,6 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . -.Bl -tag -width indent -.El .Sh DIAGNOSTICS .Bl -diag .It "cxgb%d: Unable to allocate bus resource: memory" Modified: stable/8/share/man/man4/ddb.4 ============================================================================== --- stable/8/share/man/man4/ddb.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/ddb.4 Sat May 7 02:37:34 2011 (r221572) @@ -703,7 +703,7 @@ Show information from the local APIC reg .It Ic show Cm lock Ar addr Show lock structure. The output format is as follows: -.Bl -tag -offset 0 -width "flags" +.Bl -tag -width "flags" .It Ic class: Class of the lock. Possible types include Modified: stable/8/share/man/man4/enc.4 ============================================================================== --- stable/8/share/man/man4/enc.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/enc.4 Sat May 7 02:37:34 2011 (r221572) @@ -82,10 +82,10 @@ framework can be independently controlle variables: .Bl -column net.enc.out.ipsec_filter_mask 0x00000000 0x00000000 .It Sy "Name Defaults Suggested" -.It "net.enc.out.ipsec_bpf_mask" 0x00000003 0x00000001 -.It "net.enc.out.ipsec_filter_mask" 0x00000001 0x00000001 -.It "net.enc.in.ipsec_bpf_mask" 0x00000001 0x00000002 -.It "net.enc.in.ipsec_filter_mask" 0x00000001 0x00000002 +.It "net.enc.out.ipsec_bpf_mask 0x00000003 0x00000001" +.It "net.enc.out.ipsec_filter_mask 0x00000001 0x00000001" +.It "net.enc.in.ipsec_bpf_mask 0x00000001 0x00000002" +.It "net.enc.in.ipsec_filter_mask 0x00000001 0x00000002" .El .Pp For the incoming path a value of Modified: stable/8/share/man/man4/io.4 ============================================================================== --- stable/8/share/man/man4/io.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/io.4 Sat May 7 02:37:34 2011 (r221572) @@ -40,7 +40,6 @@ .In sys/ioctl.h .In dev/io/iodev.h .In machine/iodev.h -.Pp .Bd -literal struct iodev_pio_req { u_int access; @@ -48,6 +47,7 @@ struct iodev_pio_req { u_int width; u_int val; }; +.Ed .Sh DESCRIPTION The special file .Pa /dev/io Modified: stable/8/share/man/man4/ipsec.4 ============================================================================== --- stable/8/share/man/man4/ipsec.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/ipsec.4 Sat May 7 02:37:34 2011 (r221572) @@ -90,8 +90,8 @@ To properly filter on the inner packets tunnel with firewalls, you can change the values of the following sysctls .Bl -column net.inet6.ipsec6.filtertunnel default enable .It Sy "Name Default Enable" -.It net.inet.ipsec.filtertunnel 0 1 -.It net.inet6.ipsec6.filtertunnel 0 1 +.It "net.inet.ipsec.filtertunnel 0 1" +.It "net.inet6.ipsec6.filtertunnel 0 1" .El .\" .Ss Kernel interface Modified: stable/8/share/man/man4/iscsi_initiator.4 ============================================================================== --- stable/8/share/man/man4/iscsi_initiator.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/iscsi_initiator.4 Sat May 7 02:37:34 2011 (r221572) @@ -78,7 +78,7 @@ the IP address of the target of session .Em n . .It Va net.iscsi.n.stats statistics for session -.EM n +.Em n .It Va net.iscsi.n.pid the .Em "process id" Modified: stable/8/share/man/man4/textdump.4 ============================================================================== --- stable/8/share/man/man4/textdump.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/textdump.4 Sat May 7 02:37:34 2011 (r221572) @@ -74,7 +74,7 @@ May be disabled by clearing the sysctl. .It Pa config.txt Kernel configuration, if -.Od options INCLUDE_CONFIG_FILE +.Cd options INCLUDE_CONFIG_FILE has been compiled into the kernel. May be disabled by clearing the .Dv debug.ddb.textdump.do_config Modified: stable/8/share/man/man4/uart.4 ============================================================================== --- stable/8/share/man/man4/uart.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/uart.4 Sat May 7 02:37:34 2011 (r221572) @@ -46,7 +46,6 @@ In .Cd hint.uart.0.baud="38400" .Cd hint.uart.0.port="0x3f8" .Cd hint.uart.0.flags="0x10" -.Ed .Pp With .Ar flags From owner-svn-src-all@FreeBSD.ORG Sat May 7 02:54:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A20EB106566B; Sat, 7 May 2011 02:54:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91BE28FC13; Sat, 7 May 2011 02:54:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p472sqgM077764; Sat, 7 May 2011 02:54:52 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p472sqbX077762; Sat, 7 May 2011 02:54:52 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105070254.p472sqbX077762@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 02:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221573 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 02:54:52 -0000 Author: adrian Date: Sat May 7 02:54:52 2011 New Revision: 221573 URL: http://svn.freebsd.org/changeset/base/221573 Log: Fix the OWL revision checks. A quick story, which is partially documented in the commit. The silicon revision in Linux ath9k and the Atheros HAL use an AR_SREV_REVISION mask of 0x07. FreeBSD's HAL uses the AR5212 AR_SREV_REVISION mask of 0x0F. Thus the OWL silicon revisions were coming through as 0xA, 0xB, 0xC, rather than 0x0, 0x1 and 0x2. My ath9k-sourced AR_SREV_OWL_ macros were thus using the wrong silicon revision values and wouldn't correctly match. This commit does a few things: * Change the AR_SREV_OWL_ macros to use the AR_SREV_REVISION_OWL_* values, not AR_XSREV_REVISION_OWL macros; * Disable AR_XSREV_REVISION_OWL_* values; * Modify the IS_5416 to properly check the MAC is OWL, rather than potentially matching on non-OWL revisions (which shouldn't happen unless there's a silicon revision of higher than 0x9 in a later chip..) * Add a couple more macros from the Atheros HAL for compatibility. The main difference now is that the Atheros HAL defines AR_SREV_OWL_{20,22}_OR_LATER subtly differently - it fails on all HOWL silicon. The AR_SREV_5416_*_OR_LATER macros match on the relevant OWL version -and- all HOWL versions, along with subsequent versions. A subsequent commit is going to migrate the uses of AR_SREV_OWL_X_OR_LATER to AR_SREV_5416_X_OR_LATER to match what's going on in the Atheros HAL. There's only two uses of AR_SREV_OWL_X_OR_LATER which currently don't apply to FreeBSD but it may do in the future. Yes, it's all confusing! Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sat May 7 02:37:34 2011 (r221572) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sat May 7 02:54:52 2011 (r221573) @@ -580,6 +580,17 @@ #define AR_EEPROM_STATUS_DATA_PROT_ACCESS 0x00040000 #define AR_EEPROM_STATUS_DATA_ABSENT_ACCESS 0x00080000 +/* + * AR5212 defines the MAC revision mask as 0xF, but both ath9k and + * the Atheros HAL define it as 0x7. + * + * What this means however is AR5416 silicon revisions have + * changed. The below macros are for what is contained in the + * lower four bits; if the lower three bits are taken into account + * the revisions become 1.0 => 0x0, 2.0 => 0x1, 2.2 => 0x2. + */ + +/* These are the legacy revisions, with a four bit AR_SREV_REVISION mask */ #define AR_SREV_REVISION_OWL_10 0x08 #define AR_SREV_REVISION_OWL_20 0x09 #define AR_SREV_REVISION_OWL_22 0x0a @@ -590,9 +601,13 @@ #define AR_RAD2122_SREV_MAJOR 0xf0 /* Fowl: 2+5G/2x2 */ /* Test macro for owl 1.0 */ -#define IS_5416V1(_ah) ((_ah)->ah_macRev == AR_SREV_REVISION_OWL_10) -#define IS_5416V2(_ah) ((_ah)->ah_macRev >= AR_SREV_REVISION_OWL_20) -#define IS_5416V2_2(_ah) ((_ah)->ah_macRev == AR_SREV_REVISION_OWL_22) +#define IS_5416V1(_ah) (AR_SREV_OWL((ah)) && (_ah)->ah_macRev == AR_SREV_REVISION_OWL_10) +#define IS_5416V2(_ah) (AR_SREV_OWL((ah)) && (_ah)->ah_macRev >= AR_SREV_REVISION_OWL_20) +#define IS_5416V2_2(_ah) (AR_SREV_OWL((ah)) && (_ah)->ah_macRev == AR_SREV_REVISION_OWL_22) + +/* Misc; compatibility with Atheros HAL */ +#define AR_SREV_5416_V20_OR_LATER(_ah) (AR_SREV_HOWL((_ah)) || AR_SREV_OWL_20_OR_LATER(_ah)) +#define AR_SREV_5416_V22_OR_LATER(_ah) (AR_SREV_HOWL((_ah)) || AR_SREV_OWL_22_OR_LATER(_ah)) /* Expanded Mac Silicon Rev (16 bits starting with Sowl) */ #define AR_XSREV_ID 0xFFFFFFFF /* Chip ID */ @@ -609,9 +624,20 @@ #define AR_XSREV_VERSION_OWL_PCI 0x0D #define AR_XSREV_VERSION_OWL_PCIE 0x0C + + +/* + * These are from ath9k/Atheros and assume an AR_SREV version mask + * of 0x07, rather than 0x0F which is being used in the FreeBSD HAL. + * Thus, don't use these values as they're incorrect here; use + * AR_SREV_REVISION_OWL_{10,20,22}. + */ +#if 0 #define AR_XSREV_REVISION_OWL_10 0 /* Owl 1.0 */ #define AR_XSREV_REVISION_OWL_20 1 /* Owl 2.0/2.1 */ #define AR_XSREV_REVISION_OWL_22 2 /* Owl 2.2 */ +#endif + #define AR_XSREV_VERSION_HOWL 0x14 /* Howl (AR9130) */ #define AR_XSREV_VERSION_SOWL 0x40 /* Sowl (AR9160) */ #define AR_XSREV_REVISION_SOWL_10 0 /* Sowl 1.0 */ @@ -632,12 +658,12 @@ #define AR_SREV_OWL_20_OR_LATER(_ah) \ ((AR_SREV_OWL(_ah) && \ - AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_20) || \ + AH_PRIVATE((_ah))->ah_macRev >= AR_SREV_REVISION_OWL_20) || \ AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_HOWL) #define AR_SREV_OWL_22_OR_LATER(_ah) \ ((AR_SREV_OWL(_ah) && \ - AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_22) || \ + AH_PRIVATE((_ah))->ah_macRev >= AR_SREV_REVISION_OWL_22) || \ AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_HOWL) /* Howl (AR9130) */ From owner-svn-src-all@FreeBSD.ORG Sat May 7 02:59:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5D92106566C; Sat, 7 May 2011 02:59:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D589F8FC23; Sat, 7 May 2011 02:59:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p472xORZ077932; Sat, 7 May 2011 02:59:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p472xO30077927; Sat, 7 May 2011 02:59:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105070259.p472xO30077927@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 02:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221574 - in head/sys/dev/ath/ath_hal: ar5416 ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 02:59:25 -0000 Author: adrian Date: Sat May 7 02:59:24 2011 New Revision: 221574 URL: http://svn.freebsd.org/changeset/base/221574 Log: Change AR_SREV_OWL_{X}_OR_LATER to AR_SREV_5416_{X}_OR_LATER. For now, these are equivalent macros. AR_SREV_OWL{X}_OR_LATER will later change to exclude Howl (AR9130) in line with what the Atheros HAL does. This should not functionally change anything. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat May 7 02:54:52 2011 (r221573) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat May 7 02:59:24 2011 (r221574) @@ -1465,7 +1465,7 @@ ar5416GetRegChainOffset(struct ath_hal * { int regChainOffset; - if (AR_SREV_OWL_20_OR_LATER(ah) && + if (AR_SREV_5416_V20_OR_LATER(ah) && (AH5416(ah)->ah_rx_chainmask == 0x5 || AH5416(ah)->ah_tx_chainmask == 0x5) && (i != 0)) { /* Regs are swapped from chain 2 to 1 for 5416 2_0 with @@ -1518,7 +1518,7 @@ ar5416SetBoardValues(struct ath_hal *ah, * XXX update */ - if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) + if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) ar5416SetDefGainValues(ah, pModal, eep, txRxAttenLocal, regChainOffset, i); } @@ -2217,7 +2217,7 @@ ar5416SetPowerCalTable(struct ath_hal *a &tMinCalPower, gainBoundaries, pdadcValues, numXpdGain); - if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) { + if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) { ar5416SetGainBoundariesClosedLoop(ah, i, pdGainOverlap_t2, gainBoundaries); } @@ -2329,7 +2329,7 @@ ar5416GetGainBoundariesAndPdadcs(struct pPdGainBoundaries[i] = (uint16_t)AH_MIN(AR5416_MAX_RATE_POWER, pPdGainBoundaries[i]); /* NB: only applies to owl 1.0 */ - if ((i == 0) && !AR_SREV_OWL_20_OR_LATER(ah) ) { + if ((i == 0) && !AR_SREV_5416_V20_OR_LATER(ah) ) { /* * fix the gain delta, but get a delta that can be applied to min to * keep the upper power values accurate, don't think max needs to @@ -2501,27 +2501,20 @@ ar5416OverrideIni(struct ath_hal *ah, co } /* - * The AR5416 initvals have this already set to 0x11; AR9160 has - * the register set to 0x0. Figure out whether AR9130/AR9160 needs - * this before moving forward with it. - */ -#if 0 - /* Disable BB clock gating for AR5416v2, AR9130, AR9160 */ - if (AR_SREV_OWL_20_OR_LATER(ah) || AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) { - /* - * Disable BB clock gating - * Necessary to avoid issues on AR5416 2.0 - */ - OS_REG_WRITE(ah, 0x9800 + (651 << 2), 0x11); - } -#endif - - /* * Disable RIFS search on some chips to avoid baseband * hang issues. */ if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) (void) ar5416SetRifsDelay(ah, AH_FALSE); + + if (!AR_SREV_5416_V20_OR_LATER(ah) || AR_SREV_MERLIN(ah)) + return; + + /* + * Disable BB clock gating + * Necessary to avoid issues on AR5416 2.0 + */ + OS_REG_WRITE(ah, 0x9800 + (651 << 2), 0x11); } struct ini { Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Sat May 7 02:54:52 2011 (r221573) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Sat May 7 02:59:24 2011 (r221574) @@ -387,11 +387,11 @@ struct ar5416_desc { #define RXSTATUS_OFFSET(ah) 4 #define RXSTATUS_NUMWORDS(ah) 9 #define RXSTATUS_RATE(ah, ads) \ - (AR_SREV_OWL_20_OR_LATER(ah) ? \ + (AR_SREV_5416_V20_OR_LATER(ah) ? \ MS((ads)->ds_rxstatus0, AR_RxRate) : \ ((ads)->ds_rxstatus3 >> 2) & 0xFF) #define RXSTATUS_DUPLICATE(ah, ads) \ - (AR_SREV_OWL_20_OR_LATER(ah) ? \ + (AR_SREV_5416_V20_OR_LATER(ah) ? \ MS((ads)->ds_rxstatus3, AR_Parallel40) : \ ((ads)->ds_rxstatus3 >> 10) & 0x1) #endif /* _ATH_AR5416_DESC_H_ */ Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c Sat May 7 02:54:52 2011 (r221573) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c Sat May 7 02:59:24 2011 (r221574) @@ -368,7 +368,7 @@ ar9280SetPowerCalTable(struct ath_hal *a gainBoundaries, numXpdGain, pdGainOverlap_t2, pwr_table_offset, &diff); - if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) { + if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) { /* Set gain boundaries for either open- or closed-loop TPC */ if (AR_SREV_MERLIN_20_OR_LATER(ah) && ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL)) Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Sat May 7 02:54:52 2011 (r221573) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Sat May 7 02:59:24 2011 (r221574) @@ -648,7 +648,7 @@ ar9285SetPowerCalTable(struct ath_hal *a &tMinCalPower, gainBoundaries, pdadcValues, numXpdGain); - if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) { + if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) { /* * Note the pdadc table may not start at 0 dBm power, could be * negative or greater than 0. Need to offset the power @@ -762,7 +762,7 @@ ar9285GetGainBoundariesAndPdadcs(struct pPdGainBoundaries[i] = (uint16_t)AH_MIN(AR5416_MAX_RATE_POWER, pPdGainBoundaries[i]); /* NB: only applies to owl 1.0 */ - if ((i == 0) && !AR_SREV_OWL_20_OR_LATER(ah) ) { + if ((i == 0) && !AR_SREV_5416_V20_OR_LATER(ah) ) { /* * fix the gain delta, but get a delta that can be applied to min to * keep the upper power values accurate, don't think max needs to From owner-svn-src-all@FreeBSD.ORG Sat May 7 03:09:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEEC4106566B; Sat, 7 May 2011 03:09:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AEC808FC14; Sat, 7 May 2011 03:09:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4739GLM078412; Sat, 7 May 2011 03:09:16 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4739Gx0078410; Sat, 7 May 2011 03:09:16 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201105070309.p4739Gx0078410@svn.freebsd.org> From: Glen Barber Date: Sat, 7 May 2011 03:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221575 - stable/8/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 03:09:16 -0000 Author: gjb (doc committer) Date: Sat May 7 03:09:16 2011 New Revision: 221575 URL: http://svn.freebsd.org/changeset/base/221575 Log: MFC 205076 [1]: manlint fixes. Reported by: manlint Obtained from: uqs [1] Modified: stable/8/share/man/man9/fail.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/fail.9 ============================================================================== --- stable/8/share/man/man9/fail.9 Sat May 7 02:59:24 2011 (r221574) +++ stable/8/share/man/man9/fail.9 Sat May 7 03:09:16 2011 (r221575) @@ -84,7 +84,7 @@ below. The remaining .Fn KFAIL_POINT_* macros are wrappers around common error injection paths: -.Bl -tag -width 8 +.Bl -inset .It Fn KFAIL_POINT_RETURN parent name is the equivalent of .Sy KFAIL_POINT_CODE(..., return RETURN_VALUE) @@ -96,8 +96,7 @@ is the equivalent of .Sy KFAIL_POINT_CODE(..., error_var = RETURN_VALUE) .It Fn KFAIL_POINT_GOTO parent name error_var label is the equivalent of -.Sy KFAIL_POINT_CODE(..., - { error_var = RETURN_VALUE; goto label;}) +.Sy KFAIL_POINT_CODE(..., { error_var = RETURN_VALUE; goto label;}) .El .Sh SYSCTL VARIABLES The From owner-svn-src-all@FreeBSD.ORG Sat May 7 03:29:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 161D0106567A; Sat, 7 May 2011 03:29:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05D208FC13; Sat, 7 May 2011 03:29:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p473TMFH079201; Sat, 7 May 2011 03:29:22 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p473TMZG079198; Sat, 7 May 2011 03:29:22 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201105070329.p473TMZG079198@svn.freebsd.org> From: Glen Barber Date: Sat, 7 May 2011 03:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221576 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 03:29:23 -0000 Author: gjb (doc committer) Date: Sat May 7 03:29:22 2011 New Revision: 221576 URL: http://svn.freebsd.org/changeset/base/221576 Log: MFC 198441 [1]: manlint fixes. Reported by: manlint Obtained from: rpaulo [1] Modified: stable/8/share/man/man4/acpi_hp.4 stable/8/share/man/man4/acpi_wmi.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/acpi_hp.4 ============================================================================== --- stable/8/share/man/man4/acpi_hp.4 Sat May 7 03:09:16 2011 (r221575) +++ stable/8/share/man/man4/acpi_hp.4 Sat May 7 03:29:22 2011 (r221576) @@ -256,7 +256,7 @@ sysctl dev.acpi_hp.0.cmi_detail=7 The .Nm device driver first appeared in -.Fx CURRENT . +.Fx 8.0 . .Sh AUTHORS .An -nosplit The @@ -279,7 +279,7 @@ http://www.microsoft.com/whdc/system/pnp This manual page was written by .An Michael Gmelin Aq freebsd@grem.de .Sh BUGS -This driver is experimental and has only been tested on CURRENT i386 on an +This driver is experimental and has only been tested on i386 on an HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). Expect undefined results when operating on different hardware. .Pp Modified: stable/8/share/man/man4/acpi_wmi.4 ============================================================================== --- stable/8/share/man/man4/acpi_wmi.4 Sat May 7 03:09:16 2011 (r221575) +++ stable/8/share/man/man4/acpi_wmi.4 Sat May 7 03:29:22 2011 (r221576) @@ -79,7 +79,7 @@ GUID IN The .Nm device driver first appeared in -.Fx CURRENT . +.Fx 8.0 . .Sh AUTHORS .An -nosplit The From owner-svn-src-all@FreeBSD.ORG Sat May 7 03:49:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 107EF106564A; Sat, 7 May 2011 03:49:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 007008FC12; Sat, 7 May 2011 03:49:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p473n7ZA080312; Sat, 7 May 2011 03:49:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p473n7U9080310; Sat, 7 May 2011 03:49:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201105070349.p473n7U9080310@svn.freebsd.org> From: Glen Barber Date: Sat, 7 May 2011 03:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221577 - stable/7/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 03:49:08 -0000 Author: gjb (doc committer) Date: Sat May 7 03:49:07 2011 New Revision: 221577 URL: http://svn.freebsd.org/changeset/base/221577 Log: MFC 173192 [1]: manlint fixes. Reported by: manlint Obtained from: keramida [1] Modified: stable/7/share/man/man5/quota.user.5 Directory Properties: stable/7/share/man/man5/ (props changed) Modified: stable/7/share/man/man5/quota.user.5 ============================================================================== --- stable/7/share/man/man5/quota.user.5 Sat May 7 03:29:22 2011 (r221576) +++ stable/7/share/man/man5/quota.user.5 Sat May 7 03:49:07 2011 (r221577) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 3, 2007 +.Dd October 30, 2007 .Dt QUOTA.USER 5 .Os .Sh NAME @@ -50,7 +50,7 @@ file. .Pp The data files contain the following information: .Pp -.Bl -bullet -indent offset -compact +.Bl -bullet -offset indent -compact .It Current block usage .It From owner-svn-src-all@FreeBSD.ORG Sat May 7 03:58:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1D61106566C; Sat, 7 May 2011 03:58:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1A308FC0C; Sat, 7 May 2011 03:58:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p473wRiv080636; Sat, 7 May 2011 03:58:27 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p473wR1t080634; Sat, 7 May 2011 03:58:27 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201105070358.p473wR1t080634@svn.freebsd.org> From: Glen Barber Date: Sat, 7 May 2011 03:58:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221578 - stable/7/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 03:58:28 -0000 Author: gjb (doc committer) Date: Sat May 7 03:58:27 2011 New Revision: 221578 URL: http://svn.freebsd.org/changeset/base/221578 Log: MFC 205076 [1]: manlint fixes. Reported by: manlint Obtained from: uqs [1] Modified: stable/7/share/man/man9/fail.9 Directory Properties: stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man9/fail.9 ============================================================================== --- stable/7/share/man/man9/fail.9 Sat May 7 03:49:07 2011 (r221577) +++ stable/7/share/man/man9/fail.9 Sat May 7 03:58:27 2011 (r221578) @@ -85,7 +85,7 @@ below. The remaining .Fn KFAIL_POINT_* macros are wrappers around common error injection paths: -.Bl -tag -width 8 +.Bl -inset .It Fn KFAIL_POINT_RETURN parent name is the equivalent of .Sy KFAIL_POINT_CODE(..., return RETURN_VALUE) @@ -97,8 +97,7 @@ is the equivalent of .Sy KFAIL_POINT_CODE(..., error_var = RETURN_VALUE) .It Fn KFAIL_POINT_GOTO parent name error_var label is the equivalent of -.Sy KFAIL_POINT_CODE(..., - { error_var = RETURN_VALUE; goto label;}) +.Sy KFAIL_POINT_CODE(..., { error_var = RETURN_VALUE; goto label;}) .El .Pp .Sh SYSCTL VARIABLES From owner-svn-src-all@FreeBSD.ORG Sat May 7 04:40:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E06291065675; Sat, 7 May 2011 04:40:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B89728FC16; Sat, 7 May 2011 04:40:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p474eivt082002; Sat, 7 May 2011 04:40:44 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p474eiYu082000; Sat, 7 May 2011 04:40:44 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105070440.p474eiYu082000@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 7 May 2011 04:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221579 - head/sys/dev/xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 04:40:45 -0000 Author: yongari Date: Sat May 7 04:40:44 2011 New Revision: 221579 URL: http://svn.freebsd.org/changeset/base/221579 Log: Fix build. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Sat May 7 03:58:27 2011 (r221578) +++ head/sys/dev/xl/if_xl.c Sat May 7 04:40:44 2011 (r221579) @@ -2380,7 +2380,7 @@ xl_poll_locked(struct ifnet *ifp, enum p } if (status & XL_STAT_STATSOFLOW) - xl_stats_update_locked(sc); + xl_stats_update(sc); } } return (rx_npkts); From owner-svn-src-all@FreeBSD.ORG Sat May 7 06:45:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8ABA106564A; Sat, 7 May 2011 06:45:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FBC28FC15; Sat, 7 May 2011 06:45:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p476jZw1085643; Sat, 7 May 2011 06:45:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p476jZRK085640; Sat, 7 May 2011 06:45:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105070645.p476jZRK085640@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 06:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221580 - in head/sys/dev/ath/ath_hal: . ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 06:45:35 -0000 Author: adrian Date: Sat May 7 06:45:35 2011 New Revision: 221580 URL: http://svn.freebsd.org/changeset/base/221580 Log: Some BB hang changes: * Add Howl (ar9130) to the list of chips that have DFS/BB/MAC hangs * Don't treat unknown BB hangs as fatal; ath9k/Atheros HAL don't treat it as such. * Add HAL_DEBUG_DFS to the debug fields in ath_hal/ah_debug.h The BB hang check simply loops over an observation register checking for a stuck state engine, but it can happen under high traffic conditions. Ath9k and the Atheros HAL simply log a debug message and continue. Private to FreeBSD: * Add HAL_DEBUG_HANG to the debug fields * Change the hang debugging to HAL_DEBUG_HANG rather than HAL_DEBUG_DFS like in the Atheros HAL. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ah_debug.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_debug.h Sat May 7 04:40:44 2011 (r221579) +++ head/sys/dev/ath/ath_hal/ah_debug.h Sat May 7 06:45:35 2011 (r221580) @@ -45,6 +45,8 @@ enum { HAL_DEBUG_GPIO = 0x00040000, /* GPIO debugging */ HAL_DEBUG_INTERRUPT = 0x00080000, /* interrupt handling */ HAL_DEBUG_DIVERSITY = 0x00100000, /* diversity debugging */ + HAL_DEBUG_DFS = 0x00200000, /* DFS debugging */ + HAL_DEBUG_HANG = 0x00400000, /* BB/MAC hang debugging */ HAL_DEBUG_ANY = 0xffffffff }; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 04:40:44 2011 (r221579) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 06:45:35 2011 (r221580) @@ -283,9 +283,9 @@ ar5416GetCapability(struct ath_hal *ah, case HAL_CAP_BB_HANG: switch (capability) { case HAL_BB_HANG_RIFS: - return AR_SREV_SOWL(ah) ? HAL_OK : HAL_ENOTSUPP; + return (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) ? HAL_OK : HAL_ENOTSUPP; case HAL_BB_HANG_DFS: - return AR_SREV_SOWL(ah) ? HAL_OK : HAL_ENOTSUPP; + return (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) ? HAL_OK : HAL_ENOTSUPP; case HAL_BB_HANG_RX_CLEAR: return AR_SREV_MERLIN(ah) ? HAL_OK : HAL_ENOTSUPP; } @@ -293,7 +293,7 @@ ar5416GetCapability(struct ath_hal *ah, case HAL_CAP_MAC_HANG: return ((ah->ah_macVersion == AR_XSREV_VERSION_OWL_PCI) || (ah->ah_macVersion == AR_XSREV_VERSION_OWL_PCIE) || - AR_SREV_SOWL(ah)) ? + AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_DIVERSITY: /* disable classic fast diversity */ return HAL_ENXIO; @@ -466,7 +466,7 @@ ar5416DetectMacHang(struct ath_hal *ah) if (ar5416CompareDbgHang(ah, &mac_dbg, &hang_sig2)) return HAL_MAC_HANG_SIG2; - HALDEBUG(ah, HAL_DEBUG_ANY, "%s Found an unknown MAC hang signature " + HALDEBUG(ah, HAL_DEBUG_HANG, "%s Found an unknown MAC hang signature " "DMADBG_3=0x%x DMADBG_4=0x%x DMADBG_5=0x%x DMADBG_6=0x%x\n", __func__, mac_dbg.dma_dbg_3, mac_dbg.dma_dbg_4, mac_dbg.dma_dbg_5, mac_dbg.dma_dbg_6); @@ -515,13 +515,13 @@ ar5416DetectBBHang(struct ath_hal *ah) } for (i = 0; i < N(hang_list); i++) if ((hang_sig & hang_list[i].mask) == hang_list[i].val) { - HALDEBUG(ah, HAL_DEBUG_ANY, + HALDEBUG(ah, HAL_DEBUG_HANG, "%s BB hang, signature 0x%x, code 0x%x\n", __func__, hang_sig, hang_list[i].code); return hang_list[i].code; } - HALDEBUG(ah, HAL_DEBUG_ANY, "%s Found an unknown BB hang signature! " + HALDEBUG(ah, HAL_DEBUG_HANG, "%s Found an unknown BB hang signature! " "<0x806c>=0x%x\n", __func__, hang_sig); return HAL_BB_HANG_UNKNOWN; From owner-svn-src-all@FreeBSD.ORG Sat May 7 06:47:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8448B106566B; Sat, 7 May 2011 06:47:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 616B58FC0A; Sat, 7 May 2011 06:47:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p476l9Tn085721; Sat, 7 May 2011 06:47:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p476l9RD085719; Sat, 7 May 2011 06:47:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105070647.p476l9RD085719@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 06:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221581 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 06:47:09 -0000 Author: adrian Date: Sat May 7 06:47:09 2011 New Revision: 221581 URL: http://svn.freebsd.org/changeset/base/221581 Log: Add some comments about which HAL capabilities are currently FreeBSD specific. The Atheros HAL and FreeBSD HAL share the same capabilities up until HAL_CAP_11D, where things begin to diverge. I'll look at tidying these up soon. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat May 7 06:45:35 2011 (r221580) +++ head/sys/dev/ath/ath_hal/ah.h Sat May 7 06:47:09 2011 (r221581) @@ -109,6 +109,8 @@ typedef enum { HAL_CAP_TPC_ACK = 26, /* ack txpower with per-packet tpc */ HAL_CAP_TPC_CTS = 27, /* cts txpower with per-packet tpc */ HAL_CAP_11D = 28, /* 11d beacon support for changing cc */ + + /* The following are currently different IDs to the Atheros HAL */ HAL_CAP_INTMIT = 29, /* interference mitigation */ HAL_CAP_RXORN_FATAL = 30, /* HAL_INT_RXORN treated as fatal */ HAL_CAP_HT = 31, /* hardware can support HT */ @@ -124,6 +126,11 @@ typedef enum { HAL_CAP_HAS_PSPOLL = 41, /* hardware has ps-poll support */ HAL_CAP_RXDESC_SELFLINK = 42, /* support a self-linked tail RX descriptor */ HAL_CAP_GTXTO = 43, /* hardware supports global tx timeout */ + + /* The following are back to normal, shared with the Atheros HAL */ + + /* The following are private to the FreeBSD HAL (224 onward) */ + } HAL_CAPABILITY_TYPE; /* From owner-svn-src-all@FreeBSD.ORG Sat May 7 06:52:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59294106566C; Sat, 7 May 2011 06:52:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 489248FC12; Sat, 7 May 2011 06:52:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p476q58a085890; Sat, 7 May 2011 06:52:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p476q50Z085888; Sat, 7 May 2011 06:52:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105070652.p476q50Z085888@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 06:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221582 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 06:52:05 -0000 Author: adrian Date: Sat May 7 06:52:04 2011 New Revision: 221582 URL: http://svn.freebsd.org/changeset/base/221582 Log: Instead of returning an unknown mac/bb signature, just return 0. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 06:47:09 2011 (r221581) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 06:52:04 2011 (r221582) @@ -471,7 +471,7 @@ ar5416DetectMacHang(struct ath_hal *ah) __func__, mac_dbg.dma_dbg_3, mac_dbg.dma_dbg_4, mac_dbg.dma_dbg_5, mac_dbg.dma_dbg_6); - return HAL_MAC_HANG_UNKNOWN; + return 0; } /* @@ -524,7 +524,7 @@ ar5416DetectBBHang(struct ath_hal *ah) HALDEBUG(ah, HAL_DEBUG_HANG, "%s Found an unknown BB hang signature! " "<0x806c>=0x%x\n", __func__, hang_sig); - return HAL_BB_HANG_UNKNOWN; + return 0; #undef N } #undef NUM_STATUS_READS From owner-svn-src-all@FreeBSD.ORG Sat May 7 09:26:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BC07106564A; Sat, 7 May 2011 09:26:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B1098FC08; Sat, 7 May 2011 09:26:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p479QCIX090458; Sat, 7 May 2011 09:26:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p479QCGa090456; Sat, 7 May 2011 09:26:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201105070926.p479QCGa090456@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 May 2011 09:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221583 - stable/8/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 09:26:12 -0000 Author: avg Date: Sat May 7 09:26:11 2011 New Revision: 221583 URL: http://svn.freebsd.org/changeset/base/221583 Log: MFC r221388: SNDCTL_DSP_GETIPTR: set pointer to sndbuf_getfreeptr() Modified: stable/8/sys/dev/sound/pcm/dsp.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/sound/pcm/dsp.c ============================================================================== --- stable/8/sys/dev/sound/pcm/dsp.c Sat May 7 06:52:04 2011 (r221582) +++ stable/8/sys/dev/sound/pcm/dsp.c Sat May 7 09:26:11 2011 (r221583) @@ -1655,7 +1655,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd /* XXX abusive DMA update: chn_rdupdate(rdch); */ a->bytes = sndbuf_gettotal(bs); a->blocks = sndbuf_getblocks(bs) - rdch->blocks; - a->ptr = sndbuf_getreadyptr(bs); + a->ptr = sndbuf_getfreeptr(bs); rdch->blocks = sndbuf_getblocks(bs); CHN_UNLOCK(rdch); } else From owner-svn-src-all@FreeBSD.ORG Sat May 7 09:33:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D53D106564A; Sat, 7 May 2011 09:33:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CBE18FC16; Sat, 7 May 2011 09:33:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p479Xci2090734; Sat, 7 May 2011 09:33:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p479Xc1X090732; Sat, 7 May 2011 09:33:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201105070933.p479Xc1X090732@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 May 2011 09:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221584 - stable/7/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 09:33:38 -0000 Author: avg Date: Sat May 7 09:33:37 2011 New Revision: 221584 URL: http://svn.freebsd.org/changeset/base/221584 Log: MFC r221388: SNDCTL_DSP_GETIPTR: set pointer to sndbuf_getfreeptr() Modified: stable/7/sys/dev/sound/pcm/dsp.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/dev/sound/pcm/dsp.c ============================================================================== --- stable/7/sys/dev/sound/pcm/dsp.c Sat May 7 09:26:11 2011 (r221583) +++ stable/7/sys/dev/sound/pcm/dsp.c Sat May 7 09:33:37 2011 (r221584) @@ -1342,7 +1342,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd /* XXX abusive DMA update: chn_rdupdate(rdch); */ a->bytes = sndbuf_gettotal(bs); a->blocks = sndbuf_getblocks(bs) - rdch->blocks; - a->ptr = sndbuf_getreadyptr(bs); + a->ptr = sndbuf_getfreeptr(bs); rdch->blocks = sndbuf_getblocks(bs); CHN_UNLOCK(rdch); } else From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:06:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CFD0106564A; Sat, 7 May 2011 10:06:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D6838FC0A; Sat, 7 May 2011 10:06:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47A6hUr091781; Sat, 7 May 2011 10:06:43 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47A6hak091779; Sat, 7 May 2011 10:06:43 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201105071006.p47A6hak091779@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 May 2011 10:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221585 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:06:43 -0000 Author: avg Date: Sat May 7 10:06:43 2011 New Revision: 221585 URL: http://svn.freebsd.org/changeset/base/221585 Log: scsi_cd: silence READ_TOC errors in CDIOREADTOCHEADER ioctl An optical disk may not have a TOC (e.g. for blank media) and userland software may legitimately try to use CDIOREADTOCHEADER to find out about the TOC. Silence from: scsi@ MFC after: 10 days Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Sat May 7 09:33:37 2011 (r221584) +++ head/sys/cam/scsi/scsi_cd.c Sat May 7 10:06:43 2011 (r221585) @@ -2138,7 +2138,7 @@ cdioctl(struct disk *dp, u_long cmd, voi ("trying to do CDIOREADTOCHEADER\n")); error = cdreadtoc(periph, 0, 0, (u_int8_t *)th, - sizeof (*th), /*sense_flags*/0); + sizeof (*th), /*sense_flags*/SF_NO_PRINT); if (error) { free(th, M_SCSICD); cam_periph_unlock(periph); From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:08:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E60106566C; Sat, 7 May 2011 10:08:01 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8979B8FC17; Sat, 7 May 2011 10:08:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47A81Oq091858; Sat, 7 May 2011 10:08:01 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47A81WF091855; Sat, 7 May 2011 10:08:01 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071008.p47A81WF091855@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 10:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221586 - stable/8/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:08:01 -0000 Author: kaiw Date: Sat May 7 10:08:01 2011 New Revision: 221586 URL: http://svn.freebsd.org/changeset/base/221586 Log: MFC r201166 (kientzle): ar only needs to support ar format. Modified: stable/8/usr.bin/ar/acpyacc.y stable/8/usr.bin/ar/read.c Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/acpyacc.y ============================================================================== --- stable/8/usr.bin/ar/acpyacc.y Sat May 7 10:06:43 2011 (r221585) +++ stable/8/usr.bin/ar/acpyacc.y Sat May 7 10:08:01 2011 (r221586) @@ -251,7 +251,7 @@ arscp_open(char *fname) if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, EX_SOFTWARE, 0, "archive_read_new failed"); archive_read_support_compression_all(a); - archive_read_support_format_all(a); + archive_read_support_format_ar(a); AC(archive_read_open_file(a, fname, DEF_BLKSZ)); if ((r = archive_read_next_header(a, &entry))) bsdar_warnc(bsdar, 0, "%s", archive_error_string(a)); Modified: stable/8/usr.bin/ar/read.c ============================================================================== --- stable/8/usr.bin/ar/read.c Sat May 7 10:06:43 2011 (r221585) +++ stable/8/usr.bin/ar/read.c Sat May 7 10:08:01 2011 (r221586) @@ -88,7 +88,7 @@ read_archive(struct bsdar *bsdar, char m if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, EX_SOFTWARE, 0, "archive_read_new failed"); archive_read_support_compression_all(a); - archive_read_support_format_all(a); + archive_read_support_format_ar(a); AC(archive_read_open_file(a, bsdar->filename, DEF_BLKSZ)); for (;;) { From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:23:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FF321065670; Sat, 7 May 2011 10:23:07 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EB758FC08; Sat, 7 May 2011 10:23:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47AN7eD092373; Sat, 7 May 2011 10:23:07 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47AN7ux092365; Sat, 7 May 2011 10:23:07 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071023.p47AN7ux092365@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 10:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221587 - stable/8/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:23:07 -0000 Author: kaiw Date: Sat May 7 10:23:07 2011 New Revision: 221587 URL: http://svn.freebsd.org/changeset/base/221587 Log: MFC r208189: Removed ar(1)'s support for compressed archives. This change removes ar(1)'s dependencies on compressor libraries -lz, -lbz2 and -llzma and fixes building HEAD on some versions of FreeBSD[78]. Option -j and -z is now accepted but ignored. Compressed ar(1) archives are not useful without a ld(1) that can read them. Also, the current ar(1) compression scheme prevents random access of archive members and needs to be redesigned anyway. Modified: stable/8/usr.bin/ar/Makefile stable/8/usr.bin/ar/acpyacc.y stable/8/usr.bin/ar/ar.1 stable/8/usr.bin/ar/ar.c stable/8/usr.bin/ar/ar.h stable/8/usr.bin/ar/read.c stable/8/usr.bin/ar/write.c Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/Makefile ============================================================================== --- stable/8/usr.bin/ar/Makefile Sat May 7 10:08:01 2011 (r221586) +++ stable/8/usr.bin/ar/Makefile Sat May 7 10:23:07 2011 (r221587) @@ -5,15 +5,8 @@ SRCS= ar.c acplex.l acpyacc.y read.c uti WARNS?= 5 -DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF} -LDADD= -larchive -lbz2 -lz -lelf - -# Do not depend on liblzma if we are building the bootstrap-tools and -# the local system doesn't include liblzma -.if !defined(BOOTSTRAPPING) || ${BOOTSTRAPPING} >= 800505 -DPADD+= ${LIBLZMA} -LDADD+= -llzma -.endif +DPADD= ${LIBARCHIVE} ${LIBELF} +LDADD= -larchive -lelf CFLAGS+=-I. -I${.CURDIR} Modified: stable/8/usr.bin/ar/acpyacc.y ============================================================================== --- stable/8/usr.bin/ar/acpyacc.y Sat May 7 10:08:01 2011 (r221586) +++ stable/8/usr.bin/ar/acpyacc.y Sat May 7 10:23:07 2011 (r221587) @@ -250,7 +250,7 @@ arscp_open(char *fname) if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, EX_SOFTWARE, 0, "archive_read_new failed"); - archive_read_support_compression_all(a); + archive_read_support_compression_none(a); archive_read_support_format_ar(a); AC(archive_read_open_file(a, fname, DEF_BLKSZ)); if ((r = archive_read_next_header(a, &entry))) Modified: stable/8/usr.bin/ar/ar.1 ============================================================================== --- stable/8/usr.bin/ar/ar.1 Sat May 7 10:08:01 2011 (r221586) +++ stable/8/usr.bin/ar/ar.1 Sat May 7 10:23:07 2011 (r221587) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 31, 2007 +.Dd May 17, 2010 .Dt AR 1 .Os .Sh NAME @@ -186,8 +186,7 @@ Synonymous with option Synonymous with option .Fl b . .It Fl j -Compress the resulting archive with -.Xr bzip2 1 . +This option is accepted but ignored. .It Fl m Move archive members specified by arguments .Ar files ... @@ -344,8 +343,7 @@ of extraction unless the .Fl o option was specified. .It Fl z -Compress the resulting archive with -.Xr gzip 1 . +This option is accepted but ignored. .El .Sh EXAMPLES To create a new archive Modified: stable/8/usr.bin/ar/ar.c ============================================================================== --- stable/8/usr.bin/ar/ar.c Sat May 7 10:08:01 2011 (r221586) +++ stable/8/usr.bin/ar/ar.c Sat May 7 10:23:07 2011 (r221587) @@ -178,7 +178,7 @@ main(int argc, char **argv) bsdar->options |= AR_TR; break; case 'j': - bsdar->options |= AR_J; + /* ignored */ break; case 'l': /* ignored, for GNU ar comptibility */ @@ -223,7 +223,7 @@ main(int argc, char **argv) set_mode(bsdar, opt); break; case 'z': - bsdar->options |= AR_Z; + /* ignored */ break; case OPTION_HELP: bsdar_usage(); Modified: stable/8/usr.bin/ar/ar.h ============================================================================== --- stable/8/usr.bin/ar/ar.h Sat May 7 10:08:01 2011 (r221586) +++ stable/8/usr.bin/ar/ar.h Sat May 7 10:23:07 2011 (r221587) @@ -81,7 +81,6 @@ struct bsdar { const char *addlib; /* target of ADDLIB. */ const char *posarg; /* position arg for modifiers -a, -b. */ char mode; /* program mode */ - char compression; /* compression mode */ int options; /* command line options */ const char *progname; /* program name */ Modified: stable/8/usr.bin/ar/read.c ============================================================================== --- stable/8/usr.bin/ar/read.c Sat May 7 10:08:01 2011 (r221586) +++ stable/8/usr.bin/ar/read.c Sat May 7 10:23:07 2011 (r221587) @@ -87,7 +87,7 @@ read_archive(struct bsdar *bsdar, char m if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, EX_SOFTWARE, 0, "archive_read_new failed"); - archive_read_support_compression_all(a); + archive_read_support_compression_none(a); archive_read_support_format_ar(a); AC(archive_read_open_file(a, bsdar->filename, DEF_BLKSZ)); Modified: stable/8/usr.bin/ar/write.c ============================================================================== --- stable/8/usr.bin/ar/write.c Sat May 7 10:08:01 2011 (r221586) +++ stable/8/usr.bin/ar/write.c Sat May 7 10:23:07 2011 (r221587) @@ -247,7 +247,7 @@ read_objs(struct bsdar *bsdar, const cha if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, EX_SOFTWARE, 0, "archive_read_new failed"); - archive_read_support_compression_all(a); + archive_read_support_compression_none(a); archive_read_support_format_ar(a); AC(archive_read_open_filename(a, archive, DEF_BLKSZ)); for (;;) { @@ -264,13 +264,6 @@ read_objs(struct bsdar *bsdar, const cha continue; } - /* - * Remember the compression mode of existing archive. - * If neither -j nor -z is specified, this mode will - * be used for resulting archive. - */ - bsdar->compression = archive_compression(a); - name = archive_entry_pathname(entry); /* @@ -360,9 +353,6 @@ write_archive(struct bsdar *bsdar, char pos = NULL; memset(&sb, 0, sizeof(sb)); - /* By default, no compression is assumed. */ - bsdar->compression = ARCHIVE_COMPRESSION_NONE; - /* * Test if the specified archive exists, to figure out * whether we are creating one here. @@ -618,23 +608,7 @@ write_objs(struct bsdar *bsdar) bsdar_errc(bsdar, EX_SOFTWARE, 0, "archive_write_new failed"); archive_write_set_format_ar_svr4(a); - - /* The compression mode of the existing archive is used - * for the result archive or if creating a new archive, we - * do not compress archive by default. This default behavior can - * be overrided by compression mode specified explicitly - * through command line option `-j' or `-z'. - */ - if (bsdar->options & AR_J) - bsdar->compression = ARCHIVE_COMPRESSION_BZIP2; - if (bsdar->options & AR_Z) - bsdar->compression = ARCHIVE_COMPRESSION_GZIP; - if (bsdar->compression == ARCHIVE_COMPRESSION_BZIP2) - archive_write_set_compression_bzip2(a); - else if (bsdar->compression == ARCHIVE_COMPRESSION_GZIP) - archive_write_set_compression_gzip(a); - else - archive_write_set_compression_none(a); + archive_write_set_compression_none(a); AC(archive_write_open_filename(a, bsdar->filename)); From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:27:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19339106564A; Sat, 7 May 2011 10:27:24 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 082828FC15; Sat, 7 May 2011 10:27:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47ARNfg092542; Sat, 7 May 2011 10:27:23 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47ARN6Z092537; Sat, 7 May 2011 10:27:23 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071027.p47ARN6Z092537@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 10:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221588 - stable/8/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:27:24 -0000 Author: kaiw Date: Sat May 7 10:27:23 2011 New Revision: 221588 URL: http://svn.freebsd.org/changeset/base/221588 Log: MFC r213643 (kientzle): Add -D (deterministic) option to ar. When set, it forces all timestamps and owners to zero and modes to 0644. Useful for producing libraries that are bitwise identical across multiple build runs. Modified: stable/8/usr.bin/ar/ar.1 stable/8/usr.bin/ar/ar.c stable/8/usr.bin/ar/ar.h stable/8/usr.bin/ar/write.c Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/ar.1 ============================================================================== --- stable/8/usr.bin/ar/ar.1 Sat May 7 10:23:07 2011 (r221587) +++ stable/8/usr.bin/ar/ar.1 Sat May 7 10:27:23 2011 (r221588) @@ -62,6 +62,7 @@ .Op Fl a Ar position-after .Op Fl b Ar position-before .Op Fl c +.Op Fl D .Op Fl i Ar position-before .Op Fl j .Op Fl s @@ -179,6 +180,16 @@ from the archive specified by argument .Ar archive . The archive's symbol table, if present, is updated to reflect the new contents of the archive. +.It Fl D +When used in combination with the +.Fl r +or +.Fl q +option, insert 0's instead of the real mtime, uid and gid values +and 0644 instead of file mode from the members named by arguments +.Ar files ... . +This ensures that checksums on the resulting archives are reproducible +when member contents are identical. .It Fl f Synonymous with option .Fl T . Modified: stable/8/usr.bin/ar/ar.c ============================================================================== --- stable/8/usr.bin/ar/ar.c Sat May 7 10:23:07 2011 (r221587) +++ stable/8/usr.bin/ar/ar.c Sat May 7 10:27:23 2011 (r221588) @@ -154,7 +154,7 @@ main(int argc, char **argv) } } - while ((opt = getopt_long(argc, argv, "abCcdfijlMmopqrSsTtuVvxz", + while ((opt = getopt_long(argc, argv, "abCcdDfijlMmopqrSsTtuVvxz", longopts, NULL)) != -1) { switch(opt) { case 'a': @@ -173,6 +173,9 @@ main(int argc, char **argv) case 'd': set_mode(bsdar, opt); break; + case 'D': + bsdar->options |= AR_D; + break; case 'f': case 'T': bsdar->options |= AR_TR; @@ -269,6 +272,8 @@ main(int argc, char **argv) only_mode(bsdar, "-c", "qr"); if (bsdar->options & AR_CC) only_mode(bsdar, "-C", "x"); + if (bsdar->options & AR_D) + only_mode(bsdar, "-D", "qr"); if (bsdar->options & AR_O) only_mode(bsdar, "-o", "x"); if (bsdar->options & AR_SS) @@ -356,9 +361,9 @@ bsdar_usage() (void)fprintf(stderr, "\tar -m [-Tjsvz] archive file ...\n"); (void)fprintf(stderr, "\tar -m [-Tabijsvz] position archive file ...\n"); (void)fprintf(stderr, "\tar -p [-Tv] archive [file ...]\n"); - (void)fprintf(stderr, "\tar -q [-Tcjsvz] archive file ...\n"); - (void)fprintf(stderr, "\tar -r [-Tcjsuvz] archive file ...\n"); - (void)fprintf(stderr, "\tar -r [-Tabcijsuvz] position archive file ...\n"); + (void)fprintf(stderr, "\tar -q [-TcDjsvz] archive file ...\n"); + (void)fprintf(stderr, "\tar -r [-TcDjsuvz] archive file ...\n"); + (void)fprintf(stderr, "\tar -r [-TabcDijsuvz] position archive file ...\n"); (void)fprintf(stderr, "\tar -s [-jz] archive\n"); (void)fprintf(stderr, "\tar -t [-Tv] archive [file ...]\n"); (void)fprintf(stderr, "\tar -x [-CTouv] archive [file ...]\n"); Modified: stable/8/usr.bin/ar/ar.h ============================================================================== --- stable/8/usr.bin/ar/ar.h Sat May 7 10:23:07 2011 (r221587) +++ stable/8/usr.bin/ar/ar.h Sat May 7 10:27:23 2011 (r221588) @@ -43,6 +43,7 @@ #define AR_U 0x0200 /* only extract or update newer members.*/ #define AR_V 0x0400 /* verbose mode */ #define AR_Z 0x0800 /* gzip compression */ +#define AR_D 0x1000 /* insert dummy mode, mtime, uid and gid */ #define DEF_BLKSZ 10240 /* default block size */ Modified: stable/8/usr.bin/ar/write.c ============================================================================== --- stable/8/usr.bin/ar/write.c Sat May 7 10:23:07 2011 (r221587) +++ stable/8/usr.bin/ar/write.c Sat May 7 10:27:23 2011 (r221588) @@ -163,11 +163,24 @@ create_obj_from_file(struct bsdar *bsdar if (mtime != 0 && bsdar->options & AR_U && sb.st_mtime <= mtime) goto giveup; - obj->uid = sb.st_uid; - obj->gid = sb.st_gid; - obj->md = sb.st_mode; + /* + * When option '-D' is specified, mtime and UID / GID from the file + * will be replaced with 0, and file mode with 644. This ensures that + * checksums will match for two archives containing the exact same + * files. + */ + if (bsdar->options & AR_D) { + obj->uid = 0; + obj->gid = 0; + obj->mtime = 0; + obj->md = S_IFREG | 0644; + } else { + obj->uid = sb.st_uid; + obj->gid = sb.st_gid; + obj->mtime = sb.st_mtime; + obj->md = sb.st_mode; + } obj->size = sb.st_size; - obj->mtime = sb.st_mtime; obj->dev = sb.st_dev; obj->ino = sb.st_ino; @@ -621,7 +634,8 @@ write_objs(struct bsdar *bsdar) bsdar->options & AR_S) { entry = archive_entry_new(); archive_entry_copy_pathname(entry, "/"); - archive_entry_set_mtime(entry, time(NULL), 0); + if ((bsdar->options & AR_D) == 0) + archive_entry_set_mtime(entry, time(NULL), 0); archive_entry_set_size(entry, (bsdar->s_cnt + 1) * sizeof(uint32_t) + bsdar->s_sn_sz); AC(archive_write_header(a, entry)); From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:31:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06231106566B; Sat, 7 May 2011 10:31:35 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA06E8FC0A; Sat, 7 May 2011 10:31:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47AVYEG092718; Sat, 7 May 2011 10:31:34 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47AVYeF092715; Sat, 7 May 2011 10:31:34 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071031.p47AVYeF092715@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 10:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221589 - stable/8/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:31:35 -0000 Author: kaiw Date: Sat May 7 10:31:34 2011 New Revision: 221589 URL: http://svn.freebsd.org/changeset/base/221589 Log: MFC r216014: Add option -D for ranlib(1). When -D is speicified, ranlib(1) will generate a deterministic archive symbol table (i.e. timestamp for the symbol table member header is set to 0). Submitted by: Erik Cederstrand Modified: stable/8/usr.bin/ar/ar.1 stable/8/usr.bin/ar/ar.c Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/ar.1 ============================================================================== --- stable/8/usr.bin/ar/ar.1 Sat May 7 10:27:23 2011 (r221588) +++ stable/8/usr.bin/ar/ar.1 Sat May 7 10:31:34 2011 (r221589) @@ -92,6 +92,7 @@ .Ar archive .Op Ar files ... .Nm ranlib +.Op Fl D .Ar archive ... .Sh DESCRIPTION The Modified: stable/8/usr.bin/ar/ar.c ============================================================================== --- stable/8/usr.bin/ar/ar.c Sat May 7 10:27:23 2011 (r221588) +++ stable/8/usr.bin/ar/ar.c Sat May 7 10:31:34 2011 (r221589) @@ -113,12 +113,15 @@ main(int argc, char **argv) len = strlen(bsdar->progname); if (len >= strlen("ranlib") && strcmp(bsdar->progname + len - strlen("ranlib"), "ranlib") == 0) { - while ((opt = getopt_long(argc, argv, "tV", longopts, + while ((opt = getopt_long(argc, argv, "tDV", longopts, NULL)) != -1) { switch(opt) { case 't': /* Ignored. */ break; + case 'D': + bsdar->options |= AR_D; + break; case 'V': ranlib_version(); break; From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:32:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 703EB1065675; Sat, 7 May 2011 10:32:52 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F3B68FC17; Sat, 7 May 2011 10:32:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47AWqMT092801; Sat, 7 May 2011 10:32:52 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47AWqWK092799; Sat, 7 May 2011 10:32:52 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071032.p47AWqWK092799@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 10:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221590 - stable/8/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:32:52 -0000 Author: kaiw Date: Sat May 7 10:32:52 2011 New Revision: 221590 URL: http://svn.freebsd.org/changeset/base/221590 Log: MFC r216716: * Add mention of the `-f`, `-q`, `-S`, and `-V` options in the synopsis section. * Document the `-l`, `-M` and `-S` options. * Improve the text describing the behavior of the `-r` option. * Start a section on standard compliance. * Indicate in the synopsis that the `-S` and `-s` options are mutually exclusive. Modified: stable/8/usr.bin/ar/ar.1 Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/ar.1 ============================================================================== --- stable/8/usr.bin/ar/ar.1 Sat May 7 10:31:34 2011 (r221589) +++ stable/8/usr.bin/ar/ar.1 Sat May 7 10:32:52 2011 (r221590) @@ -34,28 +34,42 @@ .Nm .Fl d .Op Fl T +.Op Fl f .Op Fl j .Op Fl v .Op Fl z .Ar archive -.Ar files ... +.Ar .Nm .Fl m .Op Fl T .Op Fl a Ar position-after .Op Fl b Ar position-before +.Op Fl f .Op Fl i Ar position-before .Op Fl j -.Op Fl s +.Op Fl s | Fl S .Op Fl z .Ar archive -.Ar files ... +.Ar .Nm .Fl p .Op Fl T +.Op Fl f .Op Fl v .Ar archive -.Op Ar files ... +.Op Ar +.Nm +.Fl q +.Op Fl T +.Op Fl c +.Op Fl D +.Op Fl f +.Op Fl s | Fl S +.Op Fl v +.Op Fl z +.Ar archive +.Ar .Nm .Fl r .Op Fl T @@ -63,14 +77,15 @@ .Op Fl b Ar position-before .Op Fl c .Op Fl D +.Op Fl f .Op Fl i Ar position-before .Op Fl j -.Op Fl s +.Op Fl s | Fl S .Op Fl u .Op Fl v .Op Fl z .Ar archive -.Ar files ... +.Ar .Nm .Fl s .Op Fl j @@ -78,19 +93,23 @@ .Ar archive .Nm .Fl t +.Op Fl f .Op Fl T .Op Fl v .Ar archive -.Op Ar files ... +.Op Ar .Nm .Fl x .Op Fl C .Op Fl T +.Op Fl f .Op Fl o .Op Fl u .Op Fl v .Ar archive -.Op Ar files ... +.Op Ar +.Nm +.Fl M .Nm ranlib .Op Fl D .Ar archive ... @@ -141,13 +160,13 @@ When used with option .Fl m this option specifies that the archive members specified by arguments -.Ar files ... +.Ar are moved to after the archive member named by argument .Ar member-after . When used with option .Fl r this option specifies that the files specified by arguments -.Ar files ... +.Ar are added after the archive member named by argument .Ar member-after . .It Fl b Ar member-before @@ -155,13 +174,13 @@ When used with option .Fl m this option specifies that the archive members specified by arguments -.Ar files ... +.Ar are moved to before the archive member named by argument .Ar member-before . When used with option .Fl r this option specifies that the files specified by arguments -.Ar files ... +.Ar are added before the archive member named by argument .Ar member-before . .It Fl c @@ -176,7 +195,7 @@ Prevent extracted files from replacing l in the file system. .It Fl d Delete the members named by arguments -.Ar files ... +.Ar from the archive specified by argument .Ar archive . The archive's symbol table, if present, is updated to reflect @@ -188,7 +207,7 @@ or .Fl q option, insert 0's instead of the real mtime, uid and gid values and 0644 instead of file mode from the members named by arguments -.Ar files ... . +.Ar . This ensures that checksums on the resulting archives are reproducible when member contents are identical. .It Fl f @@ -199,9 +218,13 @@ Synonymous with option .Fl b . .It Fl j This option is accepted but ignored. +.It Fl l +This option is accepted for compatibility with GNU +.Xr ar 1 , +but is ignored. .It Fl m Move archive members specified by arguments -.Ar files ... +.Ar within the archive. If a position has been specified by one of the .Fl a , @@ -214,19 +237,21 @@ If no position has been specified, the s to the end of the archive. If the archive has a symbol table, it is updated to reflect the new contents of the archive. +.It Fl M +Read and execute MRI librarian commands from standard input. .It Fl o Preserve the original modification times of members when extracting them. .It Fl p Write the contents of the specified archive members named by arguments -.Ar files ... +.Ar to standard output. If no members were specified, the contents of all the files in the archive are written in the order they appear in the archive. .It Fl q Append the files specified by arguments -.Ar files ... +.Ar to the archive specified by argument .Ar archive without checking if the files already exist in the archive and @@ -241,14 +266,14 @@ option will update the archive's symbol table. .It Fl r Replace (add) the files specified by arguments -.Ar files ... +.Ar in the archive specified by argument .Ar archive , creating the archive if necessary. -Files that replace existing files do not change the order of files -within the archive. +Replacing existing members will not change the order of members within +the archive. If a file named in arguments -.Ar files ... +.Ar does not exist, existing members in the archive that match that name are not changed. New files are added to the end of the archive unless one of the @@ -271,9 +296,11 @@ with the .Fl s option alone is equivalent to invoking .Nm ranlib . +.It Fl S +Do not generate an archive symbol table. .It Fl t List the files specified by arguments -.Ar files ... +.Ar in the order in which they appear in the archive, one per line. If no files are specified, all files in the archive are listed. .It Fl T @@ -284,13 +311,13 @@ Conditionally update the archive or extr When used with the .Fl r option, files named by arguments -.Ar files ... +.Ar will be replaced in the archive if they are newer than their archived versions. When used with the .Fl x option, the members specified by arguments -.Ar files ... +.Ar will be extracted only if they are newer than the corresponding files in the file system. .It Fl v @@ -340,9 +367,11 @@ the file size in bytes, the file modific format .Dq "%b %e %H:%M %Y" , and the name of the file. +.It Fl V +Print a version string and exit. .It Fl x Extract archive members specified by arguments -.Ar files ... +.Ar into the current directory. If no members have been specified, extract all members of the archive. If the file corresponding to an extracted member does not exist it @@ -393,12 +422,27 @@ use: .Xr strftime 3 , .Xr strmode 3 , .Xr ar 5 -.\" .Sh COMPATIBILITY -.\" .Nm -.\" is expected to be compatible with GNU and SVR4 -.\" .Nm . -.\" .Sh STANDARDS -.\" Do the POSIX/SuSv3 standards have anything to say about AR(1)? +.Sh STANDARDS COMPLIANCE +The +.Nm +utility's support for the +.Fl a , +.Fl b , +.Fl c , +.Fl i , +.Fl m , +.Fl p , +.Fl q , +.Fl r , +.Fl s , +.Fl t , +.Fl u , +.Fl v , +.Fl C +and +.Fl T +options is believed to be compliant with +.St -p1003.2 . .Sh HISTORY An .Nm From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:34:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16A46106564A; Sat, 7 May 2011 10:34:00 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEBBC8FC19; Sat, 7 May 2011 10:33:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47AXxGw092898; Sat, 7 May 2011 10:33:59 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47AXxQh092896; Sat, 7 May 2011 10:33:59 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071033.p47AXxQh092896@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 10:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221591 - stable/8/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:34:00 -0000 Author: kaiw Date: Sat May 7 10:33:59 2011 New Revision: 221591 URL: http://svn.freebsd.org/changeset/base/221591 Log: MFC r216717: Improve the description of the `-q` option. Modified: stable/8/usr.bin/ar/ar.1 Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/ar.1 ============================================================================== --- stable/8/usr.bin/ar/ar.1 Sat May 7 10:32:52 2011 (r221590) +++ stable/8/usr.bin/ar/ar.1 Sat May 7 10:33:59 2011 (r221591) @@ -141,10 +141,7 @@ utility can create and manage an archive .Xr ar 5 ) used to speed up link editing operations. If a symbol table is present in an archive, it will be -kept up-to-date by subsequent operations on the archive (excepting -the quick update specified by the -.Fl q -option). +kept up-to-date by subsequent operations on the archive. .Pp The .Nm ranlib @@ -254,16 +251,11 @@ Append the files specified by arguments .Ar to the archive specified by argument .Ar archive -without checking if the files already exist in the archive and -without updating the archive's symbol table. -If the archive file +without checking if the files already exist in the archive. +The archive symbol table will be updated as needed. +If the file specified by the argument .Ar archive -does not already exist, a new archive is created. -However, to be compatible with GNU -.Nm , -option -.Fl q -will update the archive's symbol table. +does not already exist, a new archive will be created. .It Fl r Replace (add) the files specified by arguments .Ar From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:35:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3E081065672; Sat, 7 May 2011 10:35:43 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A31098FC21; Sat, 7 May 2011 10:35:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47AZhn6092997; Sat, 7 May 2011 10:35:43 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47AZhi1092995; Sat, 7 May 2011 10:35:43 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071035.p47AZhi1092995@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 10:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221592 - stable/8/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:35:43 -0000 Author: kaiw Date: Sat May 7 10:35:43 2011 New Revision: 221592 URL: http://svn.freebsd.org/changeset/base/221592 Log: MFC r216719: Document the syntax accepted by the `-M` option. Modified: stable/8/usr.bin/ar/ar.1 Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/ar.1 ============================================================================== --- stable/8/usr.bin/ar/ar.1 Sat May 7 10:33:59 2011 (r221591) +++ stable/8/usr.bin/ar/ar.1 Sat May 7 10:35:43 2011 (r221592) @@ -236,6 +236,10 @@ If the archive has a symbol table, it is new contents of the archive. .It Fl M Read and execute MRI librarian commands from standard input. +The commands understood by the +.Nm +utility are described in the section +.Sx "MRI Librarian Commands" . .It Fl o Preserve the original modification times of members when extracting them. @@ -378,6 +382,117 @@ option was specified. .It Fl z This option is accepted but ignored. .El +.Ss "MRI Librarian Commands" +If the +.Fl M +option is specified, the +.Nm +utility will read and execute commands from its standard input. +If standard input is a terminal, the +.Nm +utility will display the prompt +.Dq Li "AR >" +before reading a line, and will continue operation even if errors are +encountered. +If standard input is not a terminal, the +.Nm +utility will not display a prompt and will terminate execution on +encountering an error. +.Pp +Each input line contains a single command. +Words in an input line are separated by whitespace characters. +The first word of the line is the command, the remaining words are +the arguments to the command. +The command word may be specified in either case. +Arguments may be separated by commas or blanks. +.Pp +Empty lines are allowed and are ignored. +Long lines are continued by ending them with the +.Dq Li + +character. +.Pp +The +.Dq Li * +and +.Dq Li "\;" +characters start a comment. +Comments extend till the end of the line. +.Pp +When executing an MRI librarian script the +.Nm +utility works on a temporary copy of an archive. +Changes to the copy are made permanent using the +.Ic save +command. +.Pp +Commands understood by the +.Nm +utility are: +.Bl -tag -width indent +.It Ic addlib Ar archive | Ic addlib Ar archive Pq Ar member Oo Li , Ar member Oc Ns ... +Add the contents of the archive named by argument +.Ar archive +to the current archive. +If specific members are named using the arguments +.Ar member , +then those members are added to the current archive. +If no members are specified, the entire contents of the archive +are added to the current archive. +.It Ic addmod Ar member Oo Li , Ar member Oc Ns ... +Add the files named by arguments +.Ar member +to the current archive. +.It Ic clear +Discard all the contents of the current archive. +.It Ic create Ar archive +Create a new archive named by the argument +.Ar archive , +and makes it the current archive. +If the named archive already exists, it will be overwritten +when the +.Ic save +command is issued. +.It Ic delete Ar module Oo Li , Ar member Oc Ns ... +Delete the modules named by the arguments +.Ar member +from the current archive. +.It Ic directory Ar archive Po Ar member Oo Li , Ar member Oc Ns ... Pc Op Ar outputfile +List each named module in the archive. +The format of the output depends on the verbosity setting set using +the +.Ic verbose +command. +Output is sent to standard output, or to the file specified by +argument +.Ar outputfile . +.It Ic end +Exit successfully from the +.Nm +utility. +Any unsaved changes to the current archive will be discarded. +.It Ic extract Ar member Oo Li , Ar member Oc Ns ... +Extract the members named by the arguments +.Ar member +from the current archive. +.It Ic list +Display the contents of the current archive in verbose style. +.It Ic open Ar archive +Open the archive named by argument +.Ar archive +and make it the current archive. +.It Ic replace Ar member Oo Li , Ar member Oc Ns ... +Replace named members in the current archive with the files specified +by arguments +.Ar member . +The files must be present in the current directory and the named +modules must already exist in the current archive. +.It Ic save +Commit all changes to the current archive. +.It Ic verbose +Toggle the verbosity of the +.Ic directory +command. +.El .Sh EXAMPLES To create a new archive .Pa ex.a @@ -405,6 +520,20 @@ To verbosely list the contents of archiv .Pa ex.a , use: .D1 "ar -tv ex.a" +.Pp +To create a new archive +.Pa ex.a +containing the files +.Pa ex1.o , +and +.Pa ex2.o , +using MRI librarian commands, use the following script: +.Bd -literal -offset indent +create ex.a * specify the output archive +addmod ex1.o ex2.o * add modules +save * save pending changes +end * exit the utility +.Ed .Sh DIAGNOSTICS .Ex -std .Sh SEE ALSO From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:40:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16871106564A; Sat, 7 May 2011 10:40:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06F398FC18; Sat, 7 May 2011 10:40:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47AevV3093176; Sat, 7 May 2011 10:40:57 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47Aevcm093174; Sat, 7 May 2011 10:40:57 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201105071040.p47Aevcm093174@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 May 2011 10:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221593 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:40:58 -0000 Author: avg Date: Sat May 7 10:40:57 2011 New Revision: 221593 URL: http://svn.freebsd.org/changeset/base/221593 Log: a whitespace nit MFC after: 4 days Modified: head/sys/boot/common/interp.c Modified: head/sys/boot/common/interp.c ============================================================================== --- head/sys/boot/common/interp.c Sat May 7 10:35:43 2011 (r221592) +++ head/sys/boot/common/interp.c Sat May 7 10:40:57 2011 (r221593) @@ -105,7 +105,7 @@ interact(void) /* * Read our default configuration */ - if(include("/boot/loader.rc")!=CMD_OK) + if(include("/boot/loader.rc") != CMD_OK) include("/boot/boot.conf"); printf("\n"); /* From owner-svn-src-all@FreeBSD.ORG Sat May 7 10:44:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 077B3106564A; Sat, 7 May 2011 10:44:09 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA7988FC13; Sat, 7 May 2011 10:44:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47Ai8TS093309; Sat, 7 May 2011 10:44:08 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47Ai82O093307; Sat, 7 May 2011 10:44:08 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071044.p47Ai82O093307@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 10:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221594 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 10:44:09 -0000 Author: kaiw Date: Sat May 7 10:44:08 2011 New Revision: 221594 URL: http://svn.freebsd.org/changeset/base/221594 Log: * Rewrite ar.5 mannual page to better document ar(1) archive format. * Use more standard BSD license. Obtained from: elftoolchain Modified: head/share/man/man5/ar.5 Modified: head/share/man/man5/ar.5 ============================================================================== --- head/share/man/man5/ar.5 Sat May 7 10:40:57 2011 (r221593) +++ head/share/man/man5/ar.5 Sat May 7 10:44:08 2011 (r221594) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007 Joseph Koshy. All rights reserved. +.\" Copyright (c) 2010 Joseph Koshy. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,226 +9,319 @@ .\" 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 Joseph Koshy ``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 Joseph Koshy 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. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" -.Dd September 7, 2007 -.Dt AR 5 +.Dd November 28, 2010 .Os +.Dt AR 5 .Sh NAME .Nm ar -.Nd format of archives managed by ar(1) and ranlib(1) +.Nd archive file format for +.Xr ar 1 +and +.Xr ranlib 1 .Sh SYNOPSIS .In ar.h .Sh DESCRIPTION -An archive managed by the +.Xr ar 1 +archives are created and managed by the .Xr ar 1 and .Xr ranlib 1 -utilities is a single file that stores the individual members of the -archive along with metadata for each member. -There are two major variants of the +utilities. +These archives are typically used during program development to +hold libraries of program objects. +An +.Xr ar 1 +archive is contained in a single operating system file. +.Pp +This manual page documents two variants of the .Xr ar 1 -archive format, the BSD variant and the SVR4/GNU variant. -Both variants are described by this manual page. +archive format: the BSD archive format, and the SVR4/GNU archive +format. .Pp -The header file +In both variants the archive file starts with an identifying byte +sequence of the seven ASCII characters +.Sq Li "!" +followed by a ASCII linefeed character +.Po +see the constant +.Dq ARMAG +in the header file .In ar.h -defines constants and structures used to describe the layout -of these archives. -.Ss Archive Layout -.Xr ar 1 -archives start with a string of magic bytes -.Qq !\en -(constant -.Dv ARMAG -in header -.In ar.h ) . -The content of the archive follows the magic bytes. -Each member stored in the archive is preceded by a fixed size -archive header that stores file permissions, last modification -time, the owner, and the group of the archived file. -.Pp -Archive headers start at an even byte offset in the archive -file. -If the length of the preceding archive member was odd, then an extra -newline character -.Dq "\en" -is used as padding. -.Pp -The archive header comprises six fixed-size ASCII strings followed -by a two character trailer (see -.Vt "struct ar_hdr" -in header file -.In ar.h Ns ): -.Bd -literal -struct ar_hdr { - char ar_name[16]; /* name */ - char ar_date[12]; /* modification time */ - char ar_uid[6]; /* user id */ - char ar_gid[6]; /* group id */ - char ar_mode[8]; /* octal file permissions */ - char ar_size[10]; /* size in bytes */ - char ar_fmag[2]; /* consistency check */ -}; -.Ed -.Pp -Unused characters in the header are filled with space (ASCII 20H) -characters. -Each field of the header abuts the next without additional padding. -.Pp -The members of the archive header are as follows: -.Bl -tag -width "Va ar_name" -compact -.It Va ar_date -This field holds the decimal representation of the -modification time, in seconds since the epoch, of the archive -member. -.It Va ar_fmag -This trailer field holds the two characters -.Qq `\en -(constant -.Dv ARFMAG -defined in header file -.In ar.h Ns ), -and is used for consistency checks. -.It Va ar_gid -This field holds the decimal representation of the numeric -user id of the creator of the member. -.It Va ar_mode -This field holds octal representation of the file permissions -for the member. -.It Va ar_name -This field holds the name of an archive member. -The usage of this field depends on the format variant: -.Bl -tag -width "SVR4/GNU" -compact -.It BSD -In the BSD variant, names that are shorter than 16 characters and -without embedded spaces are stored directly in this field. -If a name has an embedded space, or if it is longer than 16 -characters, then the string -.Qq "#1/" -followed by the decimal representation of the length of the file name -is placed in this field. -The actual file name is stored immediately after the archive header. -The content of the archive member follows the file name. +.Pc . +.Pp +Archive members follow the initial identifying byte sequence. +Each archive member is prefixed by a fixed size header describing the +file attributes associated with the member. +.Ss "Archive Headers" +An archive header describes the file attributes for the archive member that +follows it. The -.Va ar_size -field of the header (see below) will then hold the sum of the size of -the file name and the size of the member. -.It SVR4/GNU -In the SVR4/GNU variant, names up to 15 characters in length are -stored directly in this field, and are terminated by a -.Qq / -(ASCII 2FH) character. -Names larger than 15 characters in length are stored in a special -archive string table member (see -.Sx "Archive String Table" -below), and the -.Va ar_name -field holds the string -.Qq "/" -followed by the decimal representation of the offset in the archive -string table of the actual name. +.Xr ar 5 +format only supports a limited number of attributes: the file name, +the file creation time stamp, the uid and gid of the creator, the file +mode and the file size. +.Pp +Archive headers are placed at an even byte offset in the archive file. +If the data for an archive member ends at an odd byte offset, then a +padding byte with value 0x0A is used to position the next archive +header on an even byte offset. +.Pp +An archive header comprises the following fixed sized fields: +.Bl -tag -width "Li ar_name" +.It Ar ar_name +(16 bytes) The file name of the archive member. +The format of this field varies between the BSD and SVR4/GNU formats and +is described in more detail in the section +.Sx "Representing File Names" +below. +.It Ar ar_date +(12 bytes) The file modification time for the member in seconds since the +epoch, encoded as a decimal number. +.It Ar ar_uid +(6 bytes) The uid associated with the archive member, encoded as a +decimal number. +.It Ar ar_gid +(6 bytes) The gid associated with the archive member, encoded as a +decimal number. +.It Ar ar_mode +(8 bytes) The file mode for the archive member, encoded as an octal +number. +.It Ar ar_size +(10 bytes) In the SVR4/GNU archive format this field holds the size in +bytes of the archive member, encoded as a decimal number. +In the BSD archive format, for short file names, this field +holds the size in bytes of the archive member, encoded as a decimal +number. +For long file names +.Po +see +.Sx "Representing File Names" +below +.Pc , +the field contains the combined size of the +archive member and its file name, encoded as a decimal number. +.It Ar ar_fmag +(2 bytes) This field holds 2 bytes with values 0x96 and 0x0A +respectively, marking the end of the header. +.El +.Pp +Unused bytes in the fields of an archive header are set to the value +0x20. +.Ss "Representing File Names" +The BSD and SVR4/GNU variants use different schemes for encoding file +names for members. +.Bl -tag -width "SVR4/GNU" +.It "BSD" +File names that are upto 16 bytes long and which do not contain +embedded spaces are stored directly in the +.Ar ar_name +field of the archive header. +File names that are either longer than 16 bytes or which contain +embedded spaces are stored immediately after the archive header +and the +.Ar ar_name +field of the archive header is set to the string +.Dq "#1/" +followed by a decimal representation of the number of bytes needed for +the file name. +In addition, the +.Ar ar_size +field of the archive header is set to the decimal representation of +the combined sizes of the archive member and the file name. +The file contents of the member follows the file name without further +padding. +.Pp +As an example, if the file name for a member was +.Dq "A B" +and its contents was the string +.Dq "C D" , +then the +.Ar ar_name +field of the header would contain +.Dq Li "#1/3" , +the +.Ar ar_size +field of the header would contain +.Dq Li 6 , +and the bytes immediately following the header would be 0x41, 0x20, +0x42, 0x43, 0x20 and 0x44 +.Po +ASCII +.Dq "A BC D" +.Pc . +.It "SVR4/GNU" +File names that are upto 15 characters long are stored directly in the +.Ar ar_name +field of the header, terminated by a +.Dq Li / +character. +.Pp +If the file name is larger than would fit in space for the +.Ar ar_name +field, then the actual file name is kept in the archive +string table +.Po +see +.Sx "Archive String Tables" +below +.Pc , +and the decimal offset of the file name in the string table is stored +in the +.Ar ar_name +field, prefixed by a +.Dq Li / +character. +.Pp +As an example, if the real file name has been stored at offset 768 in +the archive string table, the +.Ar ar_name +field of the header will contain the string +.Dq /768 . .El -.It Va ar_size -In the SVR4/GNU variant, this field holds the decimal representation -of actual size in bytes of the archived file. -In the BSD variant, for member names that use the -.Va ar_name -field directly, this field holds the decimal representation of the -actual size in bytes of the archived member. -For member names that use the extension mechanism described above, the -field will hold the sum of the sizes, in bytes, of the filename and the -archive member. -.It Va ar_uid -This field holds the decimal representation of the numeric -group id of the creator of the member. +.Ss "Special Archive Members" +The following archive members are special. +.Bl -tag -width indent +.It Dq Li / +In the SVR4/GNU variant of the archive format, the archive member with +name +.Dq Li / +denotes an archive symbol table. +If present, this member will be the very first member in the +archive. +.It Dq Li // +In the SVR4/GNU variant of the archive format, the archive member with +name +.Dq Li // +denotes the archive string table. +This special member is used to hold filenames that do not fit in the +file name field of the header +.Po +see +.Sx "Representing File Names" +above +.Pc . +If present, this member immediately follows the archive symbol table +if an archive symbol table is present, or is the first member otherwise. +.It Dq Li "__.SYMDEF" +This special member contains the archive symbol table in the BSD +variant of the archive format. +If present, this member will be the very first member in the +archive. .El -.Ss Archive Symbol Table -An archive may additionally contain an archive symbol table -used by the link editor, -.Xr ld 1 . -This symbol table has the member name -.Qq __.SYMDEF -in the BSD variant of the archive format, and the name -.Qq / -in the SVR4/GNU variant. +.Ss "Archive String Tables" +An archive string table is used in the SVR4/GNU archive format to hold +file names that are too large to fit into the constraints of the +.Ar ar_name +field of the archive header. +An archive string table contains a sequence of file names. +Each file name in the archive string table is terminated by the +byte sequence 0x2F, 0x0A +.Po +the ASCII string +.Dq "/\en" +.Pc . +No padding is used to separate adjacent file names. +.Ss "Archive Symbol Tables" +Archive symbol tables are used to speed up link editing by providing a +mapping between the program symbols defined in the archive +and the corresponding archive members. +Archive symbol tables are managed by the +.Xr ranlib 1 +utility. .Pp -The format of the symbol table depends on the format variant: -.Bl -tag -width "SVR4/GNU" -compact +The format of archive symbol tables is as follows: +.Bl -tag -width "SVR4/GNU" .It BSD -In the BSD variant, the symbol table has 4 parts encoded in -a machine dependent manner: -.Bl -enum -compact -.It -The first part is a binary value containing size in bytes of the -second part encoded as a C -.Dq long . -.It -The second part is a list of -.Vt struct ranlib -structures (see -.In ranlib.h Ns ). -Each ranlib structure describes one symbol and comprises of -two C -.Dq long -values. -The first -.Dq long -is a zero-based offset into the string table in the fourth part -for the symbol's name. -The second -.Dq long -is an offset from the beginning of the archive to the start -of the archive header for the member that defines the symbol. -.It -The third part is a binary value denoting the length of the -string table contained in the fourth part. -.It -The fourth part is a string table containing NUL-terminated -strings. +In the BSD archive format, the archive symbol table comprises +of two parts: a part containing an array of +.Vt "struct ranlib" +descriptors, followed by a part containing a symbol string table. +The sizes and layout of the structures that make up a BSD format +archive symbol table are machine dependent. +.Pp +The part containing +.Vt "struct ranlib" +descriptors begins with a field containing the size in bytes of the +array of +.Vt "struct ranlib" +descriptors encoded as a C +.Vt long +value. +.Pp +The array of +.Vt "struct ranlib" +descriptors follows the size field. +Each +.Vt "struct ranlib" +descriptor describes one symbol. +.Pp +A +.Vt "struct ranlib" +descriptor comprises two fields: +.Bl -tag -width "Ar ran_strx" -compact +.It Ar ran_strx +.Pq C Vt long +This field contains the zero-based offset of the symbol name in the +symbol string table. +.It Ar ran_off +.Pq C Vt long +This field is the file offset to the archive header for the archive +member defining the symbol. .El +.Pp +The part containing the symbol string table begins with a field +containing the size in bytes of the string table, encoded as a C +.Vt long +value. +This string table follows the size field, and contains +NUL-terminated strings for the symbols in the symbol table. .It SVR4/GNU -In the SVR4/GNU variant, the symbol table comprises of three parts -which follow each other without padding: -.Bl -enum -compact -.It -The first part comprises of a count of entries in the symbol table, -stored a 4 byte binary value in MSB first order. -.It -The next part is an array of 4 byte file offsets within the archive -to archive header for members that define the symbol in question. -Each offset in stored in MSB first order. -.It -The third part is a string table, that contains NUL-terminated -strings for the symbols in the symbol table. -.El +In the SVR4/GNU archive format, the archive symbol table starts with a +4-byte binary value containing the number of entries contained in the +archive symbol table. +This count of entries is stored most significant byte first. +.Pp +Next, there are +.Ar count +4-byte numbers, each stored most significant byte first. +Each number is a binary offset to the archive header for the member in +the archive file for the corresponding symbol table entry. +.Pp +After the binary offset values, there are +.Ar count +NUL-terminated strings in sequence, holding the symbol names for +the corresponding symbol table entries. .El -.Ss Archive String Table -In the SVR4/GNU variant of the +.Sh STANDARDS COMPLIANCE +The .Xr ar 1 -archive format, long file names are stored in a separate -archive string table and referenced from the archive header -for each member. -Each file name is terminated by the string -.Qq /\en . -The string table itself has a name of -.Qq // . +archive format is not currently specified by a standard. +.Pp +This manual page documents the +.Xr ar 1 +archive formats used by the +.Bx 4.4 +and +.Ux SVR4 +operating system releases. .Sh SEE ALSO .Xr ar 1 , +.Xr ld 1 , .Xr ranlib 1 , -.Xr archive 3 , .Xr elf 3 , -.Xr gelf 3 , -.Xr elf 5 +.Xr elf_getarsym 3 , +.Xr elf_rand 3 From owner-svn-src-all@FreeBSD.ORG Sat May 7 11:04:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50898106566B; Sat, 7 May 2011 11:04:37 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB838FC15; Sat, 7 May 2011 11:04:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47B4bpS095809; Sat, 7 May 2011 11:04:37 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47B4bPH095807; Sat, 7 May 2011 11:04:37 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071104.p47B4bPH095807@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 11:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221595 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 11:04:37 -0000 Author: kaiw Date: Sat May 7 11:04:36 2011 New Revision: 221595 URL: http://svn.freebsd.org/changeset/base/221595 Log: For zero-sized sections, set the `d_buf` field of the `Elf_Data` descriptor returned by `elf_rawdata()` to NULL. Obtained from: elftoolchain Modified: head/lib/libelf/elf_data.c Modified: head/lib/libelf/elf_data.c ============================================================================== --- head/lib/libelf/elf_data.c Sat May 7 10:44:08 2011 (r221594) +++ head/lib/libelf/elf_data.c Sat May 7 11:04:36 2011 (r221595) @@ -225,7 +225,8 @@ elf_rawdata(Elf_Scn *s, Elf_Data *d) if ((d = _libelf_allocate_data(s)) == NULL) return (NULL); - d->d_buf = sh_type == SHT_NOBITS ? NULL : e->e_rawfile + sh_offset; + d->d_buf = (sh_type == SHT_NOBITS || sh_size == 0) ? NULL : + e->e_rawfile + sh_offset; d->d_off = 0; d->d_align = sh_align; d->d_size = sh_size; From owner-svn-src-all@FreeBSD.ORG Sat May 7 11:05:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F8C9106566B; Sat, 7 May 2011 11:05:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55A418FC17; Sat, 7 May 2011 11:05:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47B5Hk1095877; Sat, 7 May 2011 11:05:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47B5Hnk095870; Sat, 7 May 2011 11:05:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105071105.p47B5Hnk095870@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 11:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221596 - in head/sys/dev/ath/ath_hal: . ar5416 ar9001 ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 11:05:17 -0000 Author: adrian Date: Sat May 7 11:05:16 2011 New Revision: 221596 URL: http://svn.freebsd.org/changeset/base/221596 Log: Read in the extended regulatory domain flags so future code can use them. These describe FCC/Japan channel and DFS behaviour. The AR9285 and later chips don't set these bits in the eeprom, the correct behaviour is to just assume all five bits are enabled. Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sat May 7 11:04:36 2011 (r221595) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sat May 7 11:05:16 2011 (r221596) @@ -298,6 +298,7 @@ struct ath_hal_private { * State for regulatory domain handling. */ HAL_REG_DOMAIN ah_currentRD; /* EEPROM regulatory domain */ + HAL_REG_DOMAIN ah_currentRDext; /* EEPROM extended regdomain flags */ HAL_CHANNEL_INTERNAL ah_channels[AH_MAXCHAN]; /* private chan state */ u_int ah_nchan; /* valid items in ah_channels */ const struct regDomain *ah_rd2GHz; /* reg state for 2G band */ Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat May 7 11:04:36 2011 (r221595) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat May 7 11:05:16 2011 (r221596) @@ -371,6 +371,8 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s /* Read Reg Domain */ AH_PRIVATE(ah)->ah_currentRD = ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL); + AH_PRIVATE(ah)->ah_currentRDext = + ath_hal_eepromGet(ah, AR_EEP_REGDMN_1, AH_NULL); /* * ah_miscMode is populated by ar5416FillCapabilityInfo() Modified: head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Sat May 7 11:04:36 2011 (r221595) +++ head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Sat May 7 11:05:16 2011 (r221596) @@ -236,6 +236,9 @@ ar9130Attach(uint16_t devid, HAL_SOFTC s /* Read Reg Domain */ AH_PRIVATE(ah)->ah_currentRD = ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL); + AH_PRIVATE(ah)->ah_currentRDext = + ath_hal_eepromGet(ah, AR_EEP_REGDMN_1, AH_NULL); + /* * ah_miscMode is populated by ar5416FillCapabilityInfo() Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Sat May 7 11:04:36 2011 (r221595) +++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Sat May 7 11:05:16 2011 (r221596) @@ -241,6 +241,8 @@ ar9160Attach(uint16_t devid, HAL_SOFTC s /* Read Reg Domain */ AH_PRIVATE(ah)->ah_currentRD = ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL); + AH_PRIVATE(ah)->ah_currentRDext = + ath_hal_eepromGet(ah, AR_EEP_REGDMN_1, AH_NULL); /* * ah_miscMode is populated by ar5416FillCapabilityInfo() Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Sat May 7 11:04:36 2011 (r221595) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Sat May 7 11:05:16 2011 (r221596) @@ -325,6 +325,8 @@ ar9280Attach(uint16_t devid, HAL_SOFTC s /* Read Reg Domain */ AH_PRIVATE(ah)->ah_currentRD = ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL); + AH_PRIVATE(ah)->ah_currentRDext = + ath_hal_eepromGet(ah, AR_EEP_REGDMN_1, AH_NULL); /* * ah_miscMode is populated by ar5416FillCapabilityInfo() Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sat May 7 11:04:36 2011 (r221595) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sat May 7 11:05:16 2011 (r221596) @@ -284,6 +284,11 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s /* Read Reg Domain */ AH_PRIVATE(ah)->ah_currentRD = ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, AH_NULL); + /* + * For Kite and later chipsets, the following bits are not + * programmed in EEPROM and so are set as enabled always. + */ + AH_PRIVATE(ah)->ah_currentRDext = AR9285_RDEXT_DEFAULT; /* * ah_miscMode is populated by ar5416FillCapabilityInfo() From owner-svn-src-all@FreeBSD.ORG Sat May 7 11:10:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B97A31065672; Sat, 7 May 2011 11:10:58 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA12F8FC14; Sat, 7 May 2011 11:10:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47BAwuv096096; Sat, 7 May 2011 11:10:58 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47BAwmU096094; Sat, 7 May 2011 11:10:58 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201105071110.p47BAwmU096094@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 7 May 2011 11:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221597 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 11:10:59 -0000 Author: jh Date: Sat May 7 11:10:58 2011 New Revision: 221597 URL: http://svn.freebsd.org/changeset/base/221597 Log: Add WITNESS_WARN() to getenv() to explicitly note that the function may sleep. This helps to expose bugs when the requested environment variable doesn't exist. Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Sat May 7 11:05:16 2011 (r221596) +++ head/sys/kern/kern_environment.c Sat May 7 11:10:58 2011 (r221597) @@ -310,6 +310,7 @@ getenv(const char *name) int len; if (dynamic_kenv) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv"); mtx_lock(&kenv_lock); cp = _getenv_dynamic(name, NULL); if (cp != NULL) { From owner-svn-src-all@FreeBSD.ORG Sat May 7 11:29:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CE2C106566B; Sat, 7 May 2011 11:29:49 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1B6E8FC0A; Sat, 7 May 2011 11:29:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47BTmL4096679; Sat, 7 May 2011 11:29:48 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47BTmH4096677; Sat, 7 May 2011 11:29:48 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201105071129.p47BTmH4096677@svn.freebsd.org> From: Kai Wang Date: Sat, 7 May 2011 11:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221598 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 11:29:49 -0000 Author: kaiw Date: Sat May 7 11:29:48 2011 New Revision: 221598 URL: http://svn.freebsd.org/changeset/base/221598 Log: Document the behavior of `elf_getdata()` and `elf_rawdata()` with zero-sized ELF sections. Obtained from: elftoolchain Modified: head/lib/libelf/elf_getdata.3 Modified: head/lib/libelf/elf_getdata.3 ============================================================================== --- head/lib/libelf/elf_getdata.3 Sat May 7 11:10:58 2011 (r221597) +++ head/lib/libelf/elf_getdata.3 Sat May 7 11:29:48 2011 (r221598) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2006,2008,2010 Joseph Koshy. All rights reserved. +.\" Copyright (c) 2006,2008,2010-2011 Joseph Koshy. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 30, 2010 +.Dd January 26, 2011 .Dt ELF_GETDATA 3 .Os .Sh NAME @@ -142,9 +142,10 @@ always returns .Vt Elf_Data structures of type .Dv ELF_T_BYTE . -.Ss Special handling of SHT_NOBITS sections +.Ss Special handling of zero-sized and SHT_NOBITS sections For sections of type -.Dv SHT_NOBITS , +.Dv SHT_NOBITS, +and for zero-sized sections, the functions .Fn elf_getdata and From owner-svn-src-all@FreeBSD.ORG Sat May 7 11:49:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F5541065670; Sat, 7 May 2011 11:49:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id E61ED8FC0A; Sat, 7 May 2011 11:49:02 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p47Bmx1C060995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 7 May 2011 14:48:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p47BmxlS000480; Sat, 7 May 2011 14:48:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p47Bmu5i000479; Sat, 7 May 2011 14:48:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 7 May 2011 14:48:56 +0300 From: Kostik Belousov To: Jaakko Heinonen Message-ID: <20110507114856.GN48734@deviant.kiev.zoral.com.ua> References: <201105071110.p47BAwmU096094@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="afReowZ/oS2gITrV" Content-Disposition: inline In-Reply-To: <201105071110.p47BAwmU096094@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221597 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 11:49:03 -0000 --afReowZ/oS2gITrV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 07, 2011 at 11:10:58AM +0000, Jaakko Heinonen wrote: > Author: jh > Date: Sat May 7 11:10:58 2011 > New Revision: 221597 > URL: http://svn.freebsd.org/changeset/base/221597 >=20 > Log: > Add WITNESS_WARN() to getenv() to explicitly note that the function may > sleep. This helps to expose bugs when the requested environment variable > doesn't exist. >=20 > Modified: > head/sys/kern/kern_environment.c >=20 > Modified: head/sys/kern/kern_environment.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_environment.c Sat May 7 11:05:16 2011 (r221596) > +++ head/sys/kern/kern_environment.c Sat May 7 11:10:58 2011 (r221597) > @@ -310,6 +310,7 @@ getenv(const char *name) > int len; > =20 > if (dynamic_kenv) { > + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv"); > mtx_lock(&kenv_lock); > cp =3D _getenv_dynamic(name, NULL); > if (cp !=3D NULL) { This might be somewhat excessive. Since malloc() warns or panics anyway, what about moving the WITNESS_WARN into "not found" branch ? --afReowZ/oS2gITrV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3FMagACgkQC3+MBN1Mb4hWEgCfWYpcAcycS6aL0BxxYbcqtD9N X+IAoMBpaqjPbDS4DIQVJ9J8ilImprmx =YH2G -----END PGP SIGNATURE----- --afReowZ/oS2gITrV-- From owner-svn-src-all@FreeBSD.ORG Sat May 7 11:50:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 738011065674; Sat, 7 May 2011 11:50:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id C93208FC0A; Sat, 7 May 2011 11:50:08 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p47Bo56E061082 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 7 May 2011 14:50:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p47Bo5Nu000494; Sat, 7 May 2011 14:50:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p47Bo5sD000493; Sat, 7 May 2011 14:50:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 7 May 2011 14:50:05 +0300 From: Kostik Belousov To: Andriy Gapon Message-ID: <20110507115005.GO48734@deviant.kiev.zoral.com.ua> References: <201105071040.p47Aevcm093174@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3dPKw/kcnFYEODXu" Content-Disposition: inline In-Reply-To: <201105071040.p47Aevcm093174@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221593 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 11:50:09 -0000 --3dPKw/kcnFYEODXu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 07, 2011 at 10:40:57AM +0000, Andriy Gapon wrote: > Author: avg > Date: Sat May 7 10:40:57 2011 > New Revision: 221593 > URL: http://svn.freebsd.org/changeset/base/221593 >=20 > Log: > a whitespace nit > =20 > MFC after: 4 days >=20 > Modified: > head/sys/boot/common/interp.c >=20 > Modified: head/sys/boot/common/interp.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/boot/common/interp.c Sat May 7 10:35:43 2011 (r221592) > +++ head/sys/boot/common/interp.c Sat May 7 10:40:57 2011 (r221593) > @@ -105,7 +105,7 @@ interact(void) > /* > * Read our default configuration > */ > - if(include("/boot/loader.rc")!=3DCMD_OK) > + if(include("/boot/loader.rc") !=3D CMD_OK) Why not add a space between if and '(' ? > include("/boot/boot.conf"); > printf("\n"); > /* --3dPKw/kcnFYEODXu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3FMewACgkQC3+MBN1Mb4i0dACgkrvoBEoowYoDaxDSOOmFwnkY ShEAn1nYIN9Y9wFaDT0z91Vb30CveZ5L =4boK -----END PGP SIGNATURE----- --3dPKw/kcnFYEODXu-- From owner-svn-src-all@FreeBSD.ORG Sat May 7 12:20:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E4631065670; Sat, 7 May 2011 12:20:55 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by mx1.freebsd.org (Postfix) with ESMTP id 22B948FC18; Sat, 7 May 2011 12:20:54 +0000 (UTC) Received: from a91-153-123-205.elisa-laajakaista.fi (a91-153-123-205.elisa-laajakaista.fi [91.153.123.205]) by gw03.mail.saunalahti.fi (Postfix) with SMTP id 1B89D216754; Sat, 7 May 2011 15:20:49 +0300 (EEST) Date: Sat, 7 May 2011 15:20:48 +0300 From: Jaakko Heinonen To: Kostik Belousov Message-ID: <20110507122048.GA1846@a91-153-123-205.elisa-laajakaista.fi> References: <201105071110.p47BAwmU096094@svn.freebsd.org> <20110507114856.GN48734@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110507114856.GN48734@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221597 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 12:20:55 -0000 On 2011-05-07, Kostik Belousov wrote: > > @@ -310,6 +310,7 @@ getenv(const char *name) > > int len; > > > > if (dynamic_kenv) { > > + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv"); > > mtx_lock(&kenv_lock); > > cp = _getenv_dynamic(name, NULL); > > if (cp != NULL) { > > This might be somewhat excessive. Since malloc() warns or panics anyway, > what about moving the WITNESS_WARN into "not found" branch ? Is this better? %%% Index: sys/kern/kern_environment.c =================================================================== --- sys/kern/kern_environment.c (revision 221597) +++ sys/kern/kern_environment.c (working copy) @@ -310,7 +310,6 @@ getenv(const char *name) int len; if (dynamic_kenv) { - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv"); mtx_lock(&kenv_lock); cp = _getenv_dynamic(name, NULL); if (cp != NULL) { @@ -322,6 +321,8 @@ getenv(const char *name) } else { mtx_unlock(&kenv_lock); ret = NULL; + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "getenv"); } } else ret = _getenv_static(name); %%% -- Jaakko From owner-svn-src-all@FreeBSD.ORG Sat May 7 12:27:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 991CE106566C; Sat, 7 May 2011 12:27:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 899228FC13; Sat, 7 May 2011 12:27:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47CRPiN098441; Sat, 7 May 2011 12:27:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47CRPUa098439; Sat, 7 May 2011 12:27:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105071227.p47CRPUa098439@svn.freebsd.org> From: Alexander Motin Date: Sat, 7 May 2011 12:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221599 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 12:27:25 -0000 Author: mav Date: Sat May 7 12:27:25 2011 New Revision: 221599 URL: http://svn.freebsd.org/changeset/base/221599 Log: Don't use MWAIT for short sleeps under XEN, as it was before r212541. This fixes panic during boot in PV mode on Xen 3.2. Modified: head/sys/i386/i386/machdep.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sat May 7 11:29:48 2011 (r221598) +++ head/sys/i386/i386/machdep.c Sat May 7 12:27:25 2011 (r221599) @@ -1359,6 +1359,7 @@ cpu_idle(int busy) if (mp_grab_cpu_hlt()) return; #endif +#ifndef XEN /* If we are busy - try to use fast methods. */ if (busy) { if ((cpu_feature2 & CPUID2_MON) && idle_mwait) { @@ -1367,7 +1368,6 @@ cpu_idle(int busy) } } -#ifndef XEN /* If we have time - switch timers into idle mode. */ if (!busy) { critical_enter(); @@ -1395,8 +1395,8 @@ cpu_idle(int busy) cpu_activeclock(); critical_exit(); } -#endif out: +#endif CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", busy, curcpu); } From owner-svn-src-all@FreeBSD.ORG Sat May 7 12:41:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A882106566B; Sat, 7 May 2011 12:41:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id E67058FC08; Sat, 7 May 2011 12:41:30 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p47CfR49064018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 7 May 2011 15:41:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p47CfRiR002839; Sat, 7 May 2011 15:41:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p47CfRuY002838; Sat, 7 May 2011 15:41:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 7 May 2011 15:41:27 +0300 From: Kostik Belousov To: Jaakko Heinonen Message-ID: <20110507124127.GP48734@deviant.kiev.zoral.com.ua> References: <201105071110.p47BAwmU096094@svn.freebsd.org> <20110507114856.GN48734@deviant.kiev.zoral.com.ua> <20110507122048.GA1846@a91-153-123-205.elisa-laajakaista.fi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ExLobwx2ErZCZZ6w" Content-Disposition: inline In-Reply-To: <20110507122048.GA1846@a91-153-123-205.elisa-laajakaista.fi> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221597 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 12:41:31 -0000 --ExLobwx2ErZCZZ6w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 07, 2011 at 03:20:48PM +0300, Jaakko Heinonen wrote: > On 2011-05-07, Kostik Belousov wrote: > > > @@ -310,6 +310,7 @@ getenv(const char *name) > > > int len; > > > =20 > > > if (dynamic_kenv) { > > > + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv"); > > > mtx_lock(&kenv_lock); > > > cp =3D _getenv_dynamic(name, NULL); > > > if (cp !=3D NULL) { > >=20 > > This might be somewhat excessive. Since malloc() warns or panics anyway, > > what about moving the WITNESS_WARN into "not found" branch ? >=20 > Is this better? Most likely, at least this is exactly what I meant. >=20 > %%% > Index: sys/kern/kern_environment.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/kern/kern_environment.c (revision 221597) > +++ sys/kern/kern_environment.c (working copy) > @@ -310,7 +310,6 @@ getenv(const char *name) > int len; > =20 > if (dynamic_kenv) { > - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv"); > mtx_lock(&kenv_lock); > cp =3D _getenv_dynamic(name, NULL); > if (cp !=3D NULL) { > @@ -322,6 +321,8 @@ getenv(const char *name) > } else { > mtx_unlock(&kenv_lock); > ret =3D NULL; > + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, > + "getenv"); > } > } else > ret =3D _getenv_static(name); > %%% >=20 > --=20 > Jaakko --ExLobwx2ErZCZZ6w Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3FPfcACgkQC3+MBN1Mb4itqgCgji+tg0Ghytbr7QggkpqKFmPP HC4AnjMTMUq6lLF7yg8i1QpIeLDzsz19 =2pTf -----END PGP SIGNATURE----- --ExLobwx2ErZCZZ6w-- From owner-svn-src-all@FreeBSD.ORG Sat May 7 13:08:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FB33106564A; Sat, 7 May 2011 13:08:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D996D8FC08; Sat, 7 May 2011 13:08:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47D8mPC099698; Sat, 7 May 2011 13:08:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47D8miY099695; Sat, 7 May 2011 13:08:48 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105071308.p47D8miY099695@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 13:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221600 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 13:08:49 -0000 Author: adrian Date: Sat May 7 13:08:48 2011 New Revision: 221600 URL: http://svn.freebsd.org/changeset/base/221600 Log: Update the ext channel cycpwr threshold 1 register for the extension channel when the channel is HT/40. The new ANI code (primarily for the AR9300/AR9400) in ath9k sets this register but the ANI code for the previous 11n chips didn't set this. Unlike ath9k, only set this for HT/40 channels. Obtained From: ath9k Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat May 7 12:27:25 2011 (r221599) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Sat May 7 13:08:48 2011 (r221600) @@ -296,6 +296,12 @@ ar5416AniControl(struct ath_hal *ah, HAL } OS_REG_RMW_FIELD(ah, AR_PHY_TIMING5, AR_PHY_TIMING5_CYCPWR_THR1, params->cycPwrThr1[level]); + + /* Only set the ext channel cycpwr_thr1 field for ht/40 */ + if (IEEE80211_IS_CHAN_HT40(AH_PRIVATE(ah)->ah_curchan)) + OS_REG_RMW_FIELD(ah, AR_PHY_EXT_CCA, + AR_PHY_EXT_TIMING5_CYCPWR_THR1, params->cycPwrThr1[level]); + if (level > aniState->spurImmunityLevel) ahp->ah_stats.ast_ani_spurup++; else if (level < aniState->spurImmunityLevel) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Sat May 7 12:27:25 2011 (r221599) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Sat May 7 13:08:48 2011 (r221600) @@ -100,6 +100,13 @@ #define AR_PHY_EXT_MINCCA_PWR_S 23 #define AR_PHY_EXT_CCA_THRESH62 0x007F0000 #define AR_PHY_EXT_CCA_THRESH62_S 16 +/* + * This duplicates AR_PHY_EXT_CCA_CYCPWR_THR1; it reads more like + * an ANI register this way. + */ +#define AR_PHY_EXT_TIMING5_CYCPWR_THR1 0x0000FE00 +#define AR_PHY_EXT_TIMING5_CYCPWR_THR1_S 9 + #define AR9280_PHY_EXT_MINCCA_PWR 0x01FF0000 #define AR9280_PHY_EXT_MINCCA_PWR_S 16 From owner-svn-src-all@FreeBSD.ORG Sat May 7 13:57:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC71D106566C; Sat, 7 May 2011 13:57:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACC758FC15; Sat, 7 May 2011 13:57:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47DvUYW001251; Sat, 7 May 2011 13:57:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47DvUoY001249; Sat, 7 May 2011 13:57:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201105071357.p47DvUoY001249@svn.freebsd.org> From: Andriy Gapon Date: Sat, 7 May 2011 13:57:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221601 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 13:57:30 -0000 Author: avg Date: Sat May 7 13:57:30 2011 New Revision: 221601 URL: http://svn.freebsd.org/changeset/base/221601 Log: a whitespace nit Reminder from: kib MFC after: 4 days Modified: head/sys/boot/common/interp.c Modified: head/sys/boot/common/interp.c ============================================================================== --- head/sys/boot/common/interp.c Sat May 7 13:08:48 2011 (r221600) +++ head/sys/boot/common/interp.c Sat May 7 13:57:30 2011 (r221601) @@ -105,7 +105,7 @@ interact(void) /* * Read our default configuration */ - if(include("/boot/loader.rc") != CMD_OK) + if (include("/boot/loader.rc") != CMD_OK) include("/boot/boot.conf"); printf("\n"); /* From owner-svn-src-all@FreeBSD.ORG Sat May 7 14:32:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 192D9106564A; Sat, 7 May 2011 14:32:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E26628FC1A; Sat, 7 May 2011 14:32:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47EWGpb002300; Sat, 7 May 2011 14:32:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47EWGi9002296; Sat, 7 May 2011 14:32:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105071432.p47EWGi9002296@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 7 May 2011 14:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221602 - in head: bin/sh tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 14:32:17 -0000 Author: jilles Date: Sat May 7 14:32:16 2011 New Revision: 221602 URL: http://svn.freebsd.org/changeset/base/221602 Log: sh: Add UTF-8 support to ${#var}. If the current locale uses UTF-8, ${#var} counts codepoints (more precisely, bytes b with (b & 0xc0) != 0x80). Added: head/tools/regression/bin/sh/expansion/length7.0 (contents, props changed) head/tools/regression/bin/sh/expansion/length8.0 (contents, props changed) Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat May 7 13:57:30 2011 (r221601) +++ head/bin/sh/expand.c Sat May 7 14:32:16 2011 (r221602) @@ -665,6 +665,7 @@ evalvar(char *p, int flag) int special; int startloc; int varlen; + int varlenb; int easy; int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); @@ -712,8 +713,15 @@ again: /* jump here after setting a vari if (special) { varvalue(var, varflags & VSQUOTE, subtype, flag); if (subtype == VSLENGTH) { - varlen = expdest - stackblock() - startloc; - STADJUST(-varlen, expdest); + varlenb = expdest - stackblock() - startloc; + varlen = varlenb; + if (localeisutf8) { + val = stackblock() + startloc; + for (;val != expdest; val++) + if ((*val & 0xC0) == 0x80) + varlen--; + } + STADJUST(-varlenb, expdest); } } else { char const *syntax = (varflags & VSQUOTE) ? DQSYNTAX @@ -721,7 +729,9 @@ again: /* jump here after setting a vari if (subtype == VSLENGTH) { for (;*val; val++) - varlen++; + if (!localeisutf8 || + (*val & 0xC0) != 0x80) + varlen++; } else { if (quotes) Added: head/tools/regression/bin/sh/expansion/length7.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/length7.0 Sat May 7 14:32:16 2011 (r221602) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +unset LC_ALL +LC_CTYPE=en_US.UTF-8 +export LC_CTYPE + +# a umlaut +s=$(printf '\303\244') +# euro sign +s=$s$(printf '\342\202\254') +# some sort of 't' outside BMP +s=$s$(printf '\360\235\225\245') +set -- "$s" +[ ${#s} = 3 ] && [ ${#1} = 3 ] Added: head/tools/regression/bin/sh/expansion/length8.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/length8.0 Sat May 7 14:32:16 2011 (r221602) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +unset LC_ALL +LC_CTYPE=en_US.ISO8859-1 +export LC_CTYPE + +# a umlaut +s=$(printf '\303\244') +# euro sign +s=$s$(printf '\342\202\254') +# some sort of 't' outside BMP +s=$s$(printf '\360\235\225\245') +set -- "$s" +[ ${#s} = 9 ] && [ ${#1} = 9 ] From owner-svn-src-all@FreeBSD.ORG Sat May 7 15:30:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6976106566C; Sat, 7 May 2011 15:30:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 950AF8FC16; Sat, 7 May 2011 15:30:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47FUN8o004435; Sat, 7 May 2011 15:30:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47FUNuu004425; Sat, 7 May 2011 15:30:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105071530.p47FUNuu004425@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 15:30:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221603 - in head/sys/dev/ath/ath_hal: . ar5416 ar9001 ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 15:30:23 -0000 Author: adrian Date: Sat May 7 15:30:23 2011 New Revision: 221603 URL: http://svn.freebsd.org/changeset/base/221603 Log: Do a HAL capabilities sync pass based on the Atheros HAL. * Shuffle some of the capability numbers around to match the Atheros HAL capability IDs, just for consistency. * Add some new capabilities to FreeBSD from the Atheros HAL which will be be shortly used when new chipsets are added (HAL SGI-20 support is for Kiwi/AR9287 support); for TX aggregation (MBSSID aggregate support, WDS aggregation support); CST/GTT support for carrier sense/TX timeout. Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ah.c Sat May 7 15:30:23 2011 (r221603) @@ -585,19 +585,49 @@ ath_hal_getcapability(struct ath_hal *ah return HAL_ENOTSUPP; case HAL_CAP_11D: return HAL_OK; - case HAL_CAP_RXORN_FATAL: /* HAL_INT_RXORN treated as fatal */ - return AH_PRIVATE(ah)->ah_rxornIsFatal ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_HT: return pCap->halHTSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_GTXTO: + return pCap->halGTTSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_FAST_CC: + return pCap->halFastCCSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_TX_CHAINMASK: /* mask of TX chains supported */ *result = pCap->halTxChainMask; return HAL_OK; case HAL_CAP_RX_CHAINMASK: /* mask of RX chains supported */ *result = pCap->halRxChainMask; return HAL_OK; + case HAL_CAP_NUM_GPIO_PINS: + *result = pCap->halNumGpioPins; + return HAL_OK; + case HAL_CAP_CST: + return pCap->halCSTSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_RTS_AGGR_LIMIT: + *result = pCap->halRtsAggrLimit; + return HAL_OK; + case HAL_CAP_4ADDR_AGGR: + return pCap->hal4AddrAggrSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_AUTO_SLEEP: + return pCap->halAutoSleepSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_MBSSID_AGGR_SUPPORT: + return pCap->halMbssidAggrSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ + return pCap->hal4kbSplitTransSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_REG_FLAG: + *result = AH_PRIVATE(ah)->ah_currentRDext; + return HAL_OK; + case HAL_CAP_BT_COEX: + return pCap->halBtCoexSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_HT20_SGI: + return pCap->halHTSGI20Support ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_RXTSTAMP_PREC: /* rx desc tstamp precision (bits) */ *result = pCap->halTstampPrecision; return HAL_OK; + + /* FreeBSD-specific entries for now */ + case HAL_CAP_RXORN_FATAL: /* HAL_INT_RXORN treated as fatal */ + return AH_PRIVATE(ah)->ah_rxornIsFatal ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_INTRMASK: /* mask of supported interrupts */ *result = pCap->halIntrMask; return HAL_OK; @@ -614,10 +644,6 @@ ath_hal_getcapability(struct ath_hal *ah default: return HAL_ENOTSUPP; } - case HAL_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ - return pCap->hal4kbSplitTransSupport ? HAL_OK : HAL_ENOTSUPP; - case HAL_CAP_HAS_PSPOLL: /* hardware has ps-poll support */ - return pCap->halHasPsPollSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_RXDESC_SELFLINK: /* hardware supports self-linked final RX descriptors correctly */ return pCap->halHasRxSelfLinkedTail ? HAL_OK : HAL_ENOTSUPP; default: Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ah.h Sat May 7 15:30:23 2011 (r221603) @@ -110,27 +110,40 @@ typedef enum { HAL_CAP_TPC_CTS = 27, /* cts txpower with per-packet tpc */ HAL_CAP_11D = 28, /* 11d beacon support for changing cc */ - /* The following are currently different IDs to the Atheros HAL */ - HAL_CAP_INTMIT = 29, /* interference mitigation */ - HAL_CAP_RXORN_FATAL = 30, /* HAL_INT_RXORN treated as fatal */ - HAL_CAP_HT = 31, /* hardware can support HT */ - HAL_CAP_TX_CHAINMASK = 32, /* mask of TX chains supported */ - HAL_CAP_RX_CHAINMASK = 33, /* mask of RX chains supported */ - HAL_CAP_RXTSTAMP_PREC = 34, /* rx desc tstamp precision (bits) */ - HAL_CAP_BB_HANG = 35, /* can baseband hang */ - HAL_CAP_MAC_HANG = 36, /* can MAC hang */ - HAL_CAP_INTRMASK = 37, /* bitmask of supported interrupts */ - HAL_CAP_BSSIDMATCH = 38, /* hardware has disable bssid match */ - HAL_CAP_STREAMS = 39, /* how many 802.11n spatial streams are available */ - HAL_CAP_SPLIT_4KB_TRANS = 40, /* hardware supports descriptors straddling a 4k page boundary */ - HAL_CAP_HAS_PSPOLL = 41, /* hardware has ps-poll support */ - HAL_CAP_RXDESC_SELFLINK = 42, /* support a self-linked tail RX descriptor */ - HAL_CAP_GTXTO = 43, /* hardware supports global tx timeout */ + HAL_CAP_HT = 30, /* hardware can support HT */ + HAL_CAP_GTXTO = 31, /* hardware supports global tx timeout */ + HAL_CAP_FAST_CC = 32, /* hardware supports fast channel change */ + HAL_CAP_TX_CHAINMASK = 33, /* mask of TX chains supported */ + HAL_CAP_RX_CHAINMASK = 34, /* mask of RX chains supported */ + HAL_CAP_NUM_GPIO_PINS = 36, /* number of GPIO pins */ - /* The following are back to normal, shared with the Atheros HAL */ + HAL_CAP_CST = 38, /* hardware supports carrier sense timeout */ + + HAL_CAP_RTS_AGGR_LIMIT = 42, /* aggregation limit with RTS */ + HAL_CAP_4ADDR_AGGR = 43, /* hardware is capable of 4addr aggregation */ + + HAL_CAP_AUTO_SLEEP = 48, /* hardware can go to network sleep + automatically after waking up to receive TIM */ + HAL_CAP_MBSSID_AGGR_SUPPORT = 49, /* Support for mBSSID Aggregation */ + HAL_CAP_SPLIT_4KB_TRANS = 50, /* hardware supports descriptors straddling a 4k page boundary */ + HAL_CAP_REG_FLAG = 51, /* Regulatory domain flags */ + + HAL_CAP_BT_COEX = 60, /* hardware is capable of bluetooth coexistence */ + + HAL_CAP_HT20_SGI = 96, /* hardware supports HT20 short GI */ + + HAL_CAP_RXTSTAMP_PREC = 100, /* rx desc tstamp precision (bits) */ /* The following are private to the FreeBSD HAL (224 onward) */ + HAL_CAP_INTMIT = 229, /* interference mitigation */ + HAL_CAP_RXORN_FATAL = 230, /* HAL_INT_RXORN treated as fatal */ + HAL_CAP_BB_HANG = 235, /* can baseband hang */ + HAL_CAP_MAC_HANG = 236, /* can MAC hang */ + HAL_CAP_INTRMASK = 237, /* bitmask of supported interrupts */ + HAL_CAP_BSSIDMATCH = 238, /* hardware has disable bssid match */ + HAL_CAP_STREAMS = 239, /* how many 802.11n spatial streams are available */ + HAL_CAP_RXDESC_SELFLINK = 242, /* support a self-linked tail RX descriptor */ } HAL_CAPABILITY_TYPE; /* Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sat May 7 15:30:23 2011 (r221603) @@ -184,6 +184,7 @@ typedef struct { halChanHalfRate : 1, halChanQuarterRate : 1, halHTSupport : 1, + halHTSGI20Support : 1, halRfSilentSupport : 1, halHwPhyCounterSupport : 1, halWowSupport : 1, @@ -197,13 +198,13 @@ typedef struct { halCSTSupport : 1, halRifsRxSupport : 1, halRifsTxSupport : 1, + hal4AddrAggrSupport : 1, halExtChanDfsSupport : 1, halForcePpmSupport : 1, halEnhancedPmSupport : 1, halMbssidAggrSupport : 1, halBssidMatchSupport : 1, hal4kbSplitTransSupport : 1, - halHasPsPollSupport : 1, halHasRxSelfLinkedTail : 1; uint32_t halWirelessModes; uint16_t halTotalQueues; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat May 7 15:30:23 2011 (r221603) @@ -812,6 +812,7 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halBssIdMaskSupport = AH_TRUE; pCap->halMcastKeySrchSupport = AH_FALSE; pCap->halTsfAddSupport = AH_TRUE; + pCap->hal4AddrAggrSupport = AH_FALSE; /* Broken in Owl */ if (ath_hal_eepromGet(ah, AR_EEP_MAXQCU, &val) == HAL_OK) pCap->halTotalQueues = val; @@ -862,10 +863,12 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halTxStreams = 2; pCap->halRxStreams = 2; pCap->halRtsAggrLimit = 8*1024; /* Owl 2.0 limit */ - pCap->halMbssidAggrSupport = AH_TRUE; + pCap->halMbssidAggrSupport = AH_FALSE; /* Broken on Owl */ pCap->halForcePpmSupport = AH_TRUE; pCap->halEnhancedPmSupport = AH_TRUE; pCap->halBssidMatchSupport = AH_TRUE; + pCap->halGTTSupport = AH_TRUE; + pCap->halCSTSupport = AH_TRUE; if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) && ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) { Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 15:30:23 2011 (r221603) @@ -278,8 +278,6 @@ ar5416GetCapability(struct ath_hal *ah, uint32_t capability, uint32_t *result) { switch (type) { - case HAL_CAP_GTXTO: - return HAL_OK; /* All AR5416+ supports Global TX Timeout */ case HAL_CAP_BB_HANG: switch (capability) { case HAL_BB_HANG_RIFS: Modified: head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Sat May 7 15:30:23 2011 (r221603) @@ -290,6 +290,14 @@ ar9130FillCapabilityInfo(struct ath_hal pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ pCap->halExtChanDfsSupport = AH_TRUE; pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ + /* + * MBSSID aggregation is broken in Howl v1.1, v1.2, v1.3 + * and works fine in v1.4. + * XXX todo, enable it for v1.4. + */ + pCap->halMbssidAggrSupport = AH_FALSE; + pCap->hal4AddrAggrSupport = AH_TRUE; + return AH_TRUE; } Modified: head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Sat May 7 15:30:23 2011 (r221603) @@ -294,6 +294,9 @@ ar9160FillCapabilityInfo(struct ath_hal pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ pCap->halExtChanDfsSupport = AH_TRUE; pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ + pCap->halMbssidAggrSupport = AH_TRUE; + pCap->hal4AddrAggrSupport = AH_TRUE; + /* AR9160 is a 2x2 stream device */ pCap->halTxStreams = 2; pCap->halRxStreams = 2; Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Sat May 7 15:30:23 2011 (r221603) @@ -784,8 +784,11 @@ ar9280FillCapabilityInfo(struct ath_hal pCap->hal4kbSplitTransSupport = AH_FALSE; /* Disable this so Block-ACK works correctly */ pCap->halHasRxSelfLinkedTail = AH_FALSE; + pCap->halMbssidAggrSupport = AH_TRUE; + pCap->hal4AddrAggrSupport = AH_TRUE; + if (AR_SREV_MERLIN_20_OR_LATER(ah)) - pCap->halHasPsPollSupport = AH_TRUE; + pCap->halPSPollBroken = AH_FALSE; pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sat May 7 14:32:16 2011 (r221602) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sat May 7 15:30:23 2011 (r221603) @@ -395,8 +395,11 @@ ar9285FillCapabilityInfo(struct ath_hal pCap->hal4kbSplitTransSupport = AH_FALSE; /* Disable this so Block-ACK works correctly */ pCap->halHasRxSelfLinkedTail = AH_FALSE; + pCap->halMbssidAggrSupport = AH_TRUE; + pCap->hal4AddrAggrSupport = AH_TRUE; + if (AR_SREV_KITE_12_OR_LATER(ah)) - pCap->halHasPsPollSupport = AH_TRUE; + pCap->halPSPollBroken = AH_FALSE; pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; From owner-svn-src-all@FreeBSD.ORG Sat May 7 16:28:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E0B1106564A; Sat, 7 May 2011 16:28:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BE638FC16; Sat, 7 May 2011 16:28:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47GSOGw006147; Sat, 7 May 2011 16:28:24 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47GSO16006145; Sat, 7 May 2011 16:28:24 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201105071628.p47GSO16006145@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 7 May 2011 16:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221604 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 16:28:24 -0000 Author: hselasky Date: Sat May 7 16:28:23 2011 New Revision: 221604 URL: http://svn.freebsd.org/changeset/base/221604 Log: Minor usbdump update: - Use memcpy() instead of bcopy(). - Replace all asserts() by standard error messages. - Update usage(). MFC after: 7 days Modified: head/usr.sbin/usbdump/usbdump.c Modified: head/usr.sbin/usbdump/usbdump.c ============================================================================== --- head/usr.sbin/usbdump/usbdump.c Sat May 7 15:30:23 2011 (r221603) +++ head/usr.sbin/usbdump/usbdump.c Sat May 7 16:28:23 2011 (r221604) @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -49,6 +48,8 @@ #include #include #include +#include +#include struct usbcap { int fd; /* fd for /dev/usbpf */ @@ -408,9 +409,15 @@ write_packets(struct usbcap *p, const ui int ret; ret = write(p->wfd, &len, sizeof(int)); - assert(ret == sizeof(int)); + if (ret != sizeof(int)) { + err(EXIT_FAILURE, "Could not write length " + "field of USB data payload"); + } ret = write(p->wfd, data, datalen); - assert(ret == datalen); + if (ret != datalen) { + err(EXIT_FAILURE, "Could not write " + "complete USB data payload"); + } } static void @@ -423,14 +430,16 @@ read_file(struct usbcap *p) while ((ret = read(p->rfd, &datalen, sizeof(int))) == sizeof(int)) { datalen = le32toh(datalen); data = malloc(datalen); - assert(data != NULL); + if (data == NULL) + errx(EX_SOFTWARE, "Out of memory."); ret = read(p->rfd, data, datalen); - assert(ret == datalen); + if (ret != datalen) { + err(EXIT_FAILURE, "Could not read complete " + "USB data payload"); + } print_packets(data, datalen); free(data); } - if (ret == -1) - fprintf(stderr, "read: %s\n", strerror(errno)); } static void @@ -466,14 +475,27 @@ init_rfile(struct usbcap *p) p->rfd = open(r_arg, O_RDONLY); if (p->rfd < 0) { - fprintf(stderr, "open: %s (%s)\n", r_arg, strerror(errno)); - exit(EXIT_FAILURE); + err(EXIT_FAILURE, "Could not open " + "'%s' for read", r_arg); } ret = read(p->rfd, &uf, sizeof(uf)); - assert(ret == sizeof(uf)); - assert(le32toh(uf.magic) == USBCAP_FILEHDR_MAGIC); - assert(uf.major == 0); - assert(uf.minor == 2); + if (ret != sizeof(uf)) { + err(EXIT_FAILURE, "Could not read USB capture " + "file header"); + } + if (le32toh(uf.magic) != USBCAP_FILEHDR_MAGIC) { + errx(EX_SOFTWARE, "Invalid magic field(0x%08x) " + "in USB capture file header.", + (unsigned int)le32toh(uf.magic)); + } + if (uf.major != 0) { + errx(EX_SOFTWARE, "Invalid major version(%d) " + "field in USB capture file header.", (int)uf.major); + } + if (uf.minor != 2) { + errx(EX_SOFTWARE, "Invalid minor version(%d) " + "field in USB capture file header.", (int)uf.minor); + } } static void @@ -484,15 +506,18 @@ init_wfile(struct usbcap *p) p->wfd = open(w_arg, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR); if (p->wfd < 0) { - fprintf(stderr, "open: %s (%s)\n", w_arg, strerror(errno)); - exit(EXIT_FAILURE); + err(EXIT_FAILURE, "Could not open " + "'%s' for write", r_arg); } - bzero(&uf, sizeof(uf)); + memset(&uf, 0, sizeof(uf)); uf.magic = htole32(USBCAP_FILEHDR_MAGIC); uf.major = 0; uf.minor = 2; ret = write(p->wfd, (const void *)&uf, sizeof(uf)); - assert(ret == sizeof(uf)); + if (ret != sizeof(uf)) { + err(EXIT_FAILURE, "Could not write " + "USB capture header"); + } } static void @@ -501,13 +526,13 @@ usage(void) #define FMT " %-14s %s\n" fprintf(stderr, "usage: usbdump [options]\n"); - fprintf(stderr, FMT, "-i ifname", "Listen on USB bus interface"); - fprintf(stderr, FMT, "-r file", "Read the raw packets from file"); - fprintf(stderr, FMT, "-s snaplen", "Snapshot bytes from each packet"); - fprintf(stderr, FMT, "-v", "Increases the verbose level"); - fprintf(stderr, FMT, "-w file", "Write the raw packets to file"); + fprintf(stderr, FMT, "-i ", "Listen on USB bus interface"); + fprintf(stderr, FMT, "-r ", "Read the raw packets from file"); + fprintf(stderr, FMT, "-s ", "Snapshot bytes from each packet"); + fprintf(stderr, FMT, "-v", "Increase the verbose level"); + fprintf(stderr, FMT, "-w ", "Write the raw packets to file"); #undef FMT - exit(1); + exit(EX_USAGE); } int @@ -525,7 +550,7 @@ main(int argc, char *argv[]) int fd, o; const char *optstring; - bzero(&uc, sizeof(struct usbcap)); + memset(&uc, 0, sizeof(struct usbcap)); optstring = "i:r:s:vw:"; while ((o = getopt(argc, argv, optstring)) != -1) { @@ -565,20 +590,15 @@ main(int argc, char *argv[]) } p->fd = fd = open("/dev/bpf", O_RDONLY); - if (p->fd < 0) { - fprintf(stderr, "(no devices found)\n"); - return (EXIT_FAILURE); - } + if (p->fd < 0) + err(EXIT_FAILURE, "Could not open BPF device"); + + if (ioctl(fd, BIOCVERSION, (caddr_t)&bv) < 0) + err(EXIT_FAILURE, "BIOCVERSION ioctl failed"); - if (ioctl(fd, BIOCVERSION, (caddr_t)&bv) < 0) { - fprintf(stderr, "BIOCVERSION: %s\n", strerror(errno)); - return (EXIT_FAILURE); - } if (bv.bv_major != BPF_MAJOR_VERSION || - bv.bv_minor < BPF_MINOR_VERSION) { - fprintf(stderr, "kernel bpf filter out of date"); - return (EXIT_FAILURE); - } + bv.bv_minor < BPF_MINOR_VERSION) + errx(EXIT_FAILURE, "Kernel BPF filter out of date"); /* USB transfers can be greater than 64KByte */ v = 1U << 16; @@ -592,22 +612,16 @@ main(int argc, char *argv[]) if (ioctl(fd, BIOCSETIF, (caddr_t)&ifr) >= 0) break; } - if (v == 0) { - fprintf(stderr, "BIOCSBLEN: %s: No buffer size worked", i_arg); - return (EXIT_FAILURE); - } + if (v == 0) + errx(EXIT_FAILURE, "No buffer size worked."); - if (ioctl(fd, BIOCGBLEN, (caddr_t)&v) < 0) { - fprintf(stderr, "BIOCGBLEN: %s", strerror(errno)); - return (EXIT_FAILURE); - } + if (ioctl(fd, BIOCGBLEN, (caddr_t)&v) < 0) + err(EXIT_FAILURE, "BIOCGBLEN ioctl failed"); p->bufsize = v; p->buffer = (uint8_t *)malloc(p->bufsize); - if (p->buffer == NULL) { - fprintf(stderr, "malloc: %s", strerror(errno)); - return (EXIT_FAILURE); - } + if (p->buffer == NULL) + errx(EX_SOFTWARE, "Out of memory."); /* XXX no read filter rules yet so at this moment accept everything */ total_insn.code = (u_short)(BPF_RET | BPF_K); @@ -617,27 +631,21 @@ main(int argc, char *argv[]) total_prog.bf_len = 1; total_prog.bf_insns = &total_insn; - if (ioctl(p->fd, BIOCSETF, (caddr_t)&total_prog) < 0) { - fprintf(stderr, "BIOCSETF: %s", strerror(errno)); - return (EXIT_FAILURE); - } + if (ioctl(p->fd, BIOCSETF, (caddr_t)&total_prog) < 0) + err(EXIT_FAILURE, "BIOCSETF ioctl failed"); /* 1 second read timeout */ tv.tv_sec = 1; tv.tv_usec = 0; - if (ioctl(p->fd, BIOCSRTIMEOUT, (caddr_t)&tv) < 0) { - fprintf(stderr, "BIOCSRTIMEOUT: %s", strerror(errno)); - return (EXIT_FAILURE); - } + if (ioctl(p->fd, BIOCSRTIMEOUT, (caddr_t)&tv) < 0) + err(EXIT_FAILURE, "BIOCSRTIMEOUT ioctl failed"); (void)signal(SIGINT, handle_sigint); do_loop(p); - if (ioctl(fd, BIOCGSTATS, (caddr_t)&us) < 0) { - fprintf(stderr, "BIOCGSTATS: %s", strerror(errno)); - return (EXIT_FAILURE); - } + if (ioctl(fd, BIOCGSTATS, (caddr_t)&us) < 0) + err(EXIT_FAILURE, "BIOCGSTATS ioctl failed"); /* XXX what's difference between pkt_captured and us.us_recv? */ printf("\n"); From owner-svn-src-all@FreeBSD.ORG Sat May 7 16:32:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EEEA106564A; Sat, 7 May 2011 16:32:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E9618FC14; Sat, 7 May 2011 16:32:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47GWxqk006312; Sat, 7 May 2011 16:32:59 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47GWxxk006310; Sat, 7 May 2011 16:32:59 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201105071632.p47GWxxk006310@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 7 May 2011 16:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221605 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 16:32:59 -0000 Author: hselasky Date: Sat May 7 16:32:59 2011 New Revision: 221605 URL: http://svn.freebsd.org/changeset/base/221605 Log: Add new USB ID. Submitted by: Dmitry Luhtionov MFC after: 7 days Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat May 7 16:28:23 2011 (r221604) +++ head/sys/dev/usb/usbdevs Sat May 7 16:32:59 2011 (r221605) @@ -1565,6 +1565,7 @@ product FALCOM TWIST 0x0001 USB GSM/GPR /* FEIYA products */ product FEIYA 5IN1 0x1132 5-in-1 Card Reader +product FEIYA AC110 0x6300 AC-110 Card Reader /* Fiberline */ product FIBERLINE WL430U 0x6003 WL-430U From owner-svn-src-all@FreeBSD.ORG Sat May 7 16:37:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C57591065672; Sat, 7 May 2011 16:37:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id DD81D8FC0C; Sat, 7 May 2011 16:37:11 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=118a5bn0tGnRZbUa9ClBty6BTuM1bA5mUZqmf2RHYp4= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=c-supqcQF5kA:10 a=WQU8e4WWZSUA:10 a=N659UExz7-8A:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=wQDgyXbeP_IRP6VvZuUA:9 a=pILNOxqGKmIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 123488953; Sat, 07 May 2011 18:37:09 +0200 From: Hans Petter Selasky To: "src-committers@freebsd.org" Date: Sat, 7 May 2011 18:36:00 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201105071628.p47GSO16006145@svn.freebsd.org> In-Reply-To: <201105071628.p47GSO16006145@svn.freebsd.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201105071836.00660.hselasky@c2i.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" Subject: Re: svn commit: r221604 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 16:37:12 -0000 On Saturday 07 May 2011 18:28:24 Hans Petter Selasky wrote: > - Use memcpy() instead of bcopy(). - Use memset() instead of bzero(). --HPS From owner-svn-src-all@FreeBSD.ORG Sat May 7 17:13:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3138106564A; Sat, 7 May 2011 17:13:29 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 032EC8FC08; Sat, 7 May 2011 17:13:28 +0000 (UTC) Received: by wwc33 with SMTP id 33so4180490wwc.31 for ; Sat, 07 May 2011 10:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oeh11Jlha/SoMaVqhvU6+b7Is6WZc6O1G1d4leKR0mM=; b=ccsUpqxBr+6Zt5Puuu2mXdd9BhycowhQXi48L0xMV+onHEbbf/u/an2PNDfUZUD8D/ H+w2yr2dMzXRaDmk4rkPRnk9MVxvKndyykveJ88mi3fxgABTPUCBqTleVyah3C7uG8yS KukznLnuGiAtduCvvlIaqIjkUQPQtgdhJjTg4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=GDVil3LvWMCLYdHXXWzL8YaUWuNxUPM67EuZcOONoVQNW4xr4HolbwV9Orwlc86Ims OB8ONHLFBztwzU5xIObAaz0Xu0eMYxmYDGpEk+1CxE6DnQTigBJewvllA0ocX0vdY6E6 wG4LToZqPxWvrTthRTHCHqZStfbs1m5s9FY6I= MIME-Version: 1.0 Received: by 10.216.134.67 with SMTP id r45mr3847713wei.44.1304788407821; Sat, 07 May 2011 10:13:27 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.216.172.196 with HTTP; Sat, 7 May 2011 10:13:27 -0700 (PDT) In-Reply-To: <201105071836.00660.hselasky@c2i.net> References: <201105071628.p47GSO16006145@svn.freebsd.org> <201105071836.00660.hselasky@c2i.net> Date: Sat, 7 May 2011 10:13:27 -0700 X-Google-Sender-Auth: 4J1XIUyIZvOCXdNaKWTrtKuBbvE Message-ID: From: mdf@FreeBSD.org To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r221604 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 17:13:29 -0000 On Sat, May 7, 2011 at 9:36 AM, Hans Petter Selasky wrot= e: > On Saturday 07 May 2011 18:28:24 Hans Petter Selasky wrote: >> =A0 - Use memcpy() instead of bcopy(). > > - Use memset() instead of bzero(). Why? It usually falls through to the same code in libc. Is there some standardization on memfoo versus bfoo here? Thanks, matthew From owner-svn-src-all@FreeBSD.ORG Sat May 7 17:21:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D86DA1065673; Sat, 7 May 2011 17:21:26 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3F32A8FC0A; Sat, 7 May 2011 17:21:25 +0000 (UTC) Received: by vxc34 with SMTP id 34so6014853vxc.13 for ; Sat, 07 May 2011 10:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VZZhXNIdUryt/d5gqZtr1vcdtaM1im7w8lS+z45ozGg=; b=IeLTQDula5ersOBjhyUDbdU9tGnSmtlADvT14/9iA9LF+MByzZjrl5E7Rx2/kwYj2/ rjvXayzqVlQRCaTljxt0Z97h6fKVtvHZGhw+/2NBgikp3HcOUaXLxzu4nKsfl3aRckJN GkbNEezSgYkuLfCGI/DvEdDlnNPadAdJMpZuU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xGenD6Lh2T2svKwHLxXDy9VdVQ3wg8y17bL6hLM+O5ZMZMXpZLM8Oqvg6pHOUjrt3v j9RE3z//1qi0NtfZhTmYbWaT0BQ21f+e2k7aQnsZ5YL1kgRNQOn4JRCxDkyORmssWsiI wu4wEt9cbR2gDGWHLRuxX9t0vlfMtxH1wOtWI= MIME-Version: 1.0 Received: by 10.220.123.134 with SMTP id p6mr1254812vcr.2.1304788885215; Sat, 07 May 2011 10:21:25 -0700 (PDT) Received: by 10.220.201.136 with HTTP; Sat, 7 May 2011 10:21:25 -0700 (PDT) In-Reply-To: References: <201105071628.p47GSO16006145@svn.freebsd.org> <201105071836.00660.hselasky@c2i.net> Date: Sat, 7 May 2011 10:21:25 -0700 Message-ID: From: Garrett Cooper To: mdf@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Hans Petter Selasky Subject: Re: svn commit: r221604 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 17:21:26 -0000 On Sat, May 7, 2011 at 10:13 AM, wrote: > On Sat, May 7, 2011 at 9:36 AM, Hans Petter Selasky wr= ote: >> On Saturday 07 May 2011 18:28:24 Hans Petter Selasky wrote: >>> =A0 - Use memcpy() instead of bcopy(). >> >> - Use memset() instead of bzero(). > > Why? =A0It usually falls through to the same code in libc. =A0Is there > some standardization on memfoo versus bfoo here? bfoo is marked legacy per POSIX 2001.1; example: http://pubs.opengroup.org/onlinepubs/009695399/functions/bcopy.html . A lot of folks (Linux leading the charge) are actively working to deprecate the APIs. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Sat May 7 17:23:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 810A7106566B; Sat, 7 May 2011 17:23:13 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 722AF8FC08; Sat, 7 May 2011 17:23:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47HNDi0008036; Sat, 7 May 2011 17:23:13 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47HNDpR008034; Sat, 7 May 2011 17:23:13 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105071723.p47HNDpR008034@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 7 May 2011 17:23:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221606 - head/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 17:23:13 -0000 Author: marcel Date: Sat May 7 17:23:13 2011 New Revision: 221606 URL: http://svn.freebsd.org/changeset/base/221606 Log: In pmap_kextract(), return the physical address for PBVM virtual addresses as well (incl. the PBVM page table). Modified: head/sys/ia64/ia64/pmap.c Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Sat May 7 16:32:59 2011 (r221605) +++ head/sys/ia64/ia64/pmap.c Sat May 7 17:23:13 2011 (r221606) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -1206,6 +1207,8 @@ vm_paddr_t pmap_kextract(vm_offset_t va) { struct ia64_lpte *pte; + uint64_t *pbvm_pgtbl; + u_int idx; KASSERT(va >= VM_MAXUSER_ADDRESS, ("Must be kernel VA")); @@ -1222,6 +1225,25 @@ pmap_kextract(vm_offset_t va) return (pmap_present(pte) ? pmap_ppn(pte)|(va&PAGE_MASK) : 0); } + /* PBVM page table. */ + if (va >= IA64_PBVM_PGTBL + bootinfo->bi_pbvm_pgtblsz); + return (0); + if (va >= IA64_PBVM_PGTBL) + return (va - IA64_PBVM_PGTBL) + bootinfo->bi_pbvm_pgtbl; + + /* PBVM. */ + if (va >= IA64_PBVM_BASE) { + pbvm_pgtbl = (void *)IA64_PBVM_PGTBL; + idx = (va - IA64_PBVM_BASE) >> IA64_PBVM_PAGE_SHIFT; + if (idx >= (bootinfo->bi_pbvm_pgtblsz >> 3)) + return (0); + if ((pbvm_pgtbl[idx] & PTE_PRESENT) == 0) + return (0); + return ((pbvm_pgtbl[idx] & PTE_PPN_MASK) + + (va & IA64_PBVM_PAGE_MASK)); + } + + printf("XXX: %s: va=%#lx\n", __func__, va); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat May 7 17:56:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12B751065702; Sat, 7 May 2011 17:56:47 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 2DFF98FC1D; Sat, 7 May 2011 17:56:45 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=118a5bn0tGnRZbUa9ClBty6BTuM1bA5mUZqmf2RHYp4= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=c-supqcQF5kA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=6I5d2MoRAAAA:8 a=8kQB0OdkAAAA:8 a=apZ76THcO_1Ifn664lYA:9 a=wPNLvfGTeEIA:10 a=SV7veod9ZcQA:10 a=9aOQ2cSd83gA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 123501754; Sat, 07 May 2011 19:56:44 +0200 From: Hans Petter Selasky To: mdf@freebsd.org Date: Sat, 7 May 2011 19:55:35 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201105071628.p47GSO16006145@svn.freebsd.org> <201105071836.00660.hselasky@c2i.net> In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105071955.35305.hselasky@c2i.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r221604 - head/usr.sbin/usbdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 17:56:47 -0000 On Saturday 07 May 2011 19:13:27 mdf@freebsd.org wrote: > On Sat, May 7, 2011 at 9:36 AM, Hans Petter Selasky wrote: > > On Saturday 07 May 2011 18:28:24 Hans Petter Selasky wrote: > >> - Use memcpy() instead of bcopy(). > > > > - Use memset() instead of bzero(). > > Why? It usually falls through to the same code in libc. Is there > some standardization on memfoo versus bfoo here? Hi, I thought that memset() was a compiler builtin and bzero() optimised for larger amounts of data? --HPS From owner-svn-src-all@FreeBSD.ORG Sat May 7 17:59:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82CB0106566B; Sat, 7 May 2011 17:59:07 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 741328FC12; Sat, 7 May 2011 17:59:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47Hx71u009087; Sat, 7 May 2011 17:59:07 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47Hx7dt009085; Sat, 7 May 2011 17:59:07 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201105071759.p47Hx7dt009085@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 7 May 2011 17:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221607 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 17:59:07 -0000 Author: jh Date: Sat May 7 17:59:07 2011 New Revision: 221607 URL: http://svn.freebsd.org/changeset/base/221607 Log: To avoid duplicated warning, move WITNESS_WARN() added in r221597 to the branch which doesn't call malloc(9). Suggested by: kib Modified: head/sys/kern/kern_environment.c Modified: head/sys/kern/kern_environment.c ============================================================================== --- head/sys/kern/kern_environment.c Sat May 7 17:23:13 2011 (r221606) +++ head/sys/kern/kern_environment.c Sat May 7 17:59:07 2011 (r221607) @@ -310,7 +310,6 @@ getenv(const char *name) int len; if (dynamic_kenv) { - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "getenv"); mtx_lock(&kenv_lock); cp = _getenv_dynamic(name, NULL); if (cp != NULL) { @@ -322,6 +321,8 @@ getenv(const char *name) } else { mtx_unlock(&kenv_lock); ret = NULL; + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "getenv"); } } else ret = _getenv_static(name); From owner-svn-src-all@FreeBSD.ORG Sat May 7 18:42:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA3FD106564A; Sat, 7 May 2011 18:42:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9ABDD8FC08; Sat, 7 May 2011 18:42:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47Igfli010721; Sat, 7 May 2011 18:42:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47Igfdw010719; Sat, 7 May 2011 18:42:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201105071842.p47Igfdw010719@svn.freebsd.org> From: Adrian Chadd Date: Sat, 7 May 2011 18:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221608 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 18:42:41 -0000 Author: adrian Date: Sat May 7 18:42:41 2011 New Revision: 221608 URL: http://svn.freebsd.org/changeset/base/221608 Log: Fix the IS_5416 checks to actually work correctly. I've verified that my AR5416 revision 2.2 (minor revision 0x0A) now matches the correct checks. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sat May 7 17:59:07 2011 (r221607) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sat May 7 18:42:41 2011 (r221608) @@ -601,9 +601,9 @@ #define AR_RAD2122_SREV_MAJOR 0xf0 /* Fowl: 2+5G/2x2 */ /* Test macro for owl 1.0 */ -#define IS_5416V1(_ah) (AR_SREV_OWL((ah)) && (_ah)->ah_macRev == AR_SREV_REVISION_OWL_10) -#define IS_5416V2(_ah) (AR_SREV_OWL((ah)) && (_ah)->ah_macRev >= AR_SREV_REVISION_OWL_20) -#define IS_5416V2_2(_ah) (AR_SREV_OWL((ah)) && (_ah)->ah_macRev == AR_SREV_REVISION_OWL_22) +#define IS_5416V1(_ah) (AR_SREV_OWL((_ah)) && AH_PRIVATE((_ah))->ah_macRev == AR_SREV_REVISION_OWL_10) +#define IS_5416V2(_ah) (AR_SREV_OWL((_ah)) && AH_PRIVATE((_ah))->ah_macRev >= AR_SREV_REVISION_OWL_20) +#define IS_5416V2_2(_ah) (AR_SREV_OWL((_ah)) && AH_PRIVATE((_ah))->ah_macRev == AR_SREV_REVISION_OWL_22) /* Misc; compatibility with Atheros HAL */ #define AR_SREV_5416_V20_OR_LATER(_ah) (AR_SREV_HOWL((_ah)) || AR_SREV_OWL_20_OR_LATER(_ah)) From owner-svn-src-all@FreeBSD.ORG Sat May 7 19:22:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id DCEA9106566C; Sat, 7 May 2011 19:22:31 +0000 (UTC) Date: Sat, 7 May 2011 19:22:31 +0000 From: Alexey Dokuchaev To: Nathan Whitehorn Message-ID: <20110507192231.GA39113@FreeBSD.org> References: <201105051416.p45EGfcd003037@svn.freebsd.org> <8FF5539E-F91D-46C6-9019-B40CB8010A85@xcllnt.net> <4DC36B2B.4010509@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4DC36B2B.4010509@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marcel Moolenaar Subject: Re: svn commit: r221497 - head/release/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 19:22:32 -0000 On Thu, May 05, 2011 at 10:29:47PM -0500, Nathan Whitehorn wrote: > I'm cleaning up the release-building code, and am switching them from > mkisofs to makefs, which provides the same functionality. This started > with some irritation with the cdrtools port and a bug in the HFS hybrid > generation that was breaking PPC release CD generation. On a seemingly unrelated note, I've been under impression that for a long time, FreeBSD had some problems with generating "hybrid" installation images, while both some Linux distrosi (?) and Haiku had long history of providing *something* that can be equally burnt on CD and memstick. Are there plans for FreeBSD to do the same? Frankly speaking, right now assortment on ISOs offered by us seems quite suboptimal (e.g., there is not baseinstall+livefs image, which seems the most desirable). ./danfe From owner-svn-src-all@FreeBSD.ORG Sat May 7 22:17:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CA48106566C; Sat, 7 May 2011 22:17:19 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9B0288FC0A; Sat, 7 May 2011 22:17:18 +0000 (UTC) Received: by yie12 with SMTP id 12so1893141yie.13 for ; Sat, 07 May 2011 15:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=fp+o6nrvUXrh1bzABXJ/b4K5AE/YALM/ebUA10Xehcc=; b=T86O52BFvnuuoPzFmq24c/Scemh3YfhBdqL6Vex1xJVa/qeF5x8S/h6CEuuT6fXFZ0 0DLcDh14HMqO5BZLZAQG/s/276+LCNDuFxEwbMZg81kfRDfdYD7f8yg7WzCJ8ALHcwPI tPYIw95WjGk66k3pa7SSvM12IUXXbVvR2B/tU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=jzWP+FDoR5mkm6dH6Br5nO1dRoiTVR/w5PBFUcDmch6X2ouSJcwGPORHx5fGin6D85 aRx0Yypi0aYfVvdYtxX08acTHmtBvtmzhLK+LfTrbGnyMDqDTX4dklCmowCN1jiTJlxl WnS3fRpR5fof55OSEVhOLKSiaVIlMYd4SIIs8= MIME-Version: 1.0 Received: by 10.236.193.10 with SMTP id j10mr6271731yhn.506.1304806637958; Sat, 07 May 2011 15:17:17 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.236.111.33 with HTTP; Sat, 7 May 2011 15:17:17 -0700 (PDT) In-Reply-To: References: <201105062043.p46Kh2Vs065320@svn.freebsd.org> Date: Sat, 7 May 2011 18:17:17 -0400 X-Google-Sender-Auth: WHz490UONud1Um92halgTeB8Gow Message-ID: From: Attilio Rao To: Nathan Whitehorn Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, andreast@freebsd.org Subject: Re: svn commit: r221550 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 22:17:19 -0000 2011/5/6 Attilio Rao : > 2011/5/6 Nathan Whitehorn : >> Author: nwhitehorn >> Date: Fri May =C2=A06 20:43:02 2011 >> New Revision: 221550 >> URL: http://svn.freebsd.org/changeset/base/221550 >> >> Log: >> =C2=A0SMP has worked perfectly for a very long time on 32-bit PowerPC on= both >> =C2=A0UP and SMP hardware. Enable it in GENERIC. >> > > While working on largeSMP, I think there is a breakage in atomic.h. > More specifically, atomic_store_rel_long() (and related functions) are > not going to properly work because powerpc defines them as: > > atomic_store_rel_long -> atomic_store_rel_32(volatile u_int *p, u_int v) > > while this should really follow the long arguments. > > This happens because powerpc doesn't follow the other architectures > semantic on defining the "similar" atomic operations. > Other arches define an hardcode version of _type version of the > function and than make a macro the _32 (or whatever) version. > In other words this is what they do: > > void > atomic_store_rel_32() > { > ... > } > > #define atomic_store_rel_int atomic_store_rel_32 > > which si clearly dangerous for cases as reported above. Maybe that > could be fixed by passing sized types, rather than simply int or long > in numbered version, but I'd really prefer to follow the semantic by > other architectures and then have: > > void > atomic_store_rel_int() > { > ... > } > > #define atomic_store_rel_32 atomic_store_rel_int > > I fixed the ATOMIC_STORE_LOAD case in my code, because I needed it, > but the final cleanup is much bigger. > I can make a patch tomorrow if you can test it. > Can you please test and review this patch?: http://www.freebsd.org/~attilio/largeSMP/atomic-powerpc.diff Unfortunately I'm having issues with the toolchains in atm, so I can't really neither test compile it. Let me know, Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Sat May 7 22:20:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63E3D106566B; Sat, 7 May 2011 22:20:02 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CEA68FC0A; Sat, 7 May 2011 22:20:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p47MK2MG017387; Sat, 7 May 2011 22:20:02 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p47MK1Fo017362; Sat, 7 May 2011 22:20:02 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201105072220.p47MK1Fo017362@svn.freebsd.org> From: Nick Hibma Date: Sat, 7 May 2011 22:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221612 - in stable/8/sys/dev/usb: . net serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2011 22:20:02 -0000 Author: n_hibma Date: Sat May 7 22:20:01 2011 New Revision: 221612 URL: http://svn.freebsd.org/changeset/base/221612 Log: MFC overview: - Fix busg in events provided to devd from the USB stack. - Provide more info on the u3g devices that attached. - Make the ucom device numbering more sane. MFC r214429 Add support for setting per-interface PnP information. MFC r214761 - Simplify the way unit/subunit allocation is done in ucom. - hw.usb.ucom.cons_unit is now split into hw.usb.ucom.cons_unit/...cons_subunit. Note: The tunable/sysctl hw.usb.ucom.cons_unit needs to be reviewed if a) a console was defined a USB serial devices, and a USB device with more than 1 subunit is present, and this device is attached before the device functioning as a console or b) a console was defined on a USB device with more than 1 subunit MFC r214809 Don't terminate the notification with \n. This is done in usb_device.c:devctl_notify_f(). MFC r214830 Bugfix: Move the 'at =') and hence prevent 'port=X' (and 'bus=<"on" string>) from making it into the environment for the devd action. MFC r214831 - Remove an unused entry from the softc (only used in a debugging printf). - Fix the loop count on detach (causing a panic on detaching a serial dongle). - Increase a buffer in case some driver want extra long tty device names (postfixing the purpose of the tty for example, e.g. u3g.ppp). MFC r214843 Implement ucom_set_pnpinfo_usb() providing ttyname and port number information through devd. My E220 now produces the notification (1 line): +u3g0 at bus=1 hubaddr=1 port=0 devaddr=2 interface=0 \ vendor=0x12d1 product=0x1003 devclass=0x00 devsubclass=0x00 \ sernum="" release=0x0000 intclass=0xff intsubclass=0xff \ ttyname=U0 ttyports=2 on uhub0 Note: serial/ufoma and net/uhso still provide port number and tty name (uhso only) information through sysctls, which should now be removed. MFC r214919 Bugfix: Set the bit that marks a device number in use. This would cause a panic when disconnecting the second serial device. Modified: stable/8/sys/dev/usb/net/uhso.c stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/serial/uark.c stable/8/sys/dev/usb/serial/ubsa.c stable/8/sys/dev/usb/serial/ubser.c stable/8/sys/dev/usb/serial/uchcom.c stable/8/sys/dev/usb/serial/ucycom.c stable/8/sys/dev/usb/serial/ufoma.c stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/serial/ugensa.c stable/8/sys/dev/usb/serial/uipaq.c stable/8/sys/dev/usb/serial/umct.c stable/8/sys/dev/usb/serial/umodem.c stable/8/sys/dev/usb/serial/umoscom.c stable/8/sys/dev/usb/serial/uplcom.c stable/8/sys/dev/usb/serial/usb_serial.c stable/8/sys/dev/usb/serial/usb_serial.h stable/8/sys/dev/usb/serial/uslcom.c stable/8/sys/dev/usb/serial/uvisor.c stable/8/sys/dev/usb/serial/uvscom.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usbdi.h 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/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/net/uhso.c Sat May 7 22:20:01 2011 (r221612) @@ -633,11 +633,10 @@ uhso_attach(device_t self) ht->ht_name[0] = 0; if (sc->sc_ttys == 1) - snprintf(ht->ht_name, 32, "cuaU%d", ucom->sc_unit); + snprintf(ht->ht_name, 32, "cuaU%d", ucom->sc_super->sc_unit); else { snprintf(ht->ht_name, 32, "cuaU%d.%d", - ucom->sc_unit - ucom->sc_local_unit, - ucom->sc_local_unit); + ucom->sc_super->sc_unit, ucom->sc_subunit); } desc = uhso_port_type[port]; @@ -666,7 +665,7 @@ uhso_detach(device_t self) usbd_transfer_unsetup(sc->sc_xfer, 3); usbd_transfer_unsetup(sc->sc_ctrl_xfer, UHSO_CTRL_MAX); if (sc->sc_ttys > 0) { - ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_ttys); + ucom_detach(&sc->sc_super_ucom, sc->sc_ucom); for (i = 0; i < sc->sc_ttys; i++) { if (sc->sc_tty[i].ht_muxport != -1) { @@ -903,6 +902,7 @@ uhso_probe_iface(struct uhso_softc *sc, device_printf(sc->sc_dev, "ucom_attach failed\n"); return (ENXIO); } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, sc->sc_dev); mtx_lock(&sc->sc_mtx); usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); @@ -921,6 +921,7 @@ uhso_probe_iface(struct uhso_softc *sc, device_printf(sc->sc_dev, "ucom_attach failed\n"); return (ENXIO); } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, sc->sc_dev); } else { UHSO_DPRINTF(0, "Unknown type %x\n", type); @@ -1448,11 +1449,11 @@ uhso_ucom_start_read(struct ucom_softc * { struct uhso_softc *sc = ucom->sc_parent; - UHSO_DPRINTF(3, "unit=%d, local_unit=%d\n", - ucom->sc_unit, ucom->sc_local_unit); + UHSO_DPRINTF(3, "unit=%d, subunit=%d\n", + ucom->sc_super->sc_unit, ucom->sc_subunit); if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_MUX) { - sc->sc_tty[ucom->sc_local_unit].ht_open = 1; + sc->sc_tty[ucom->sc_subunit].ht_open = 1; usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); } else if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_BULK) { @@ -1470,9 +1471,9 @@ uhso_ucom_stop_read(struct ucom_softc *u struct uhso_softc *sc = ucom->sc_parent; if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_MUX) { - sc->sc_tty[ucom->sc_local_unit].ht_open = 0; + sc->sc_tty[ucom->sc_subunit].ht_open = 0; usbd_transfer_stop( - sc->sc_tty[ucom->sc_local_unit].ht_xfer[UHSO_CTRL_READ]); + sc->sc_tty[ucom->sc_subunit].ht_xfer[UHSO_CTRL_READ]); } else if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_BULK) { sc->sc_tty[0].ht_open = 0; @@ -1488,15 +1489,15 @@ uhso_ucom_start_write(struct ucom_softc struct uhso_softc *sc = ucom->sc_parent; if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_MUX) { - UHSO_DPRINTF(3, "local unit %d\n", ucom->sc_local_unit); + UHSO_DPRINTF(3, "local unit %d\n", ucom->sc_subunit); usbd_transfer_start(sc->sc_xfer[UHSO_MUX_ENDPT_INTR]); usbd_xfer_set_priv( - sc->sc_tty[ucom->sc_local_unit].ht_xfer[UHSO_CTRL_WRITE], - &sc->sc_tty[ucom->sc_local_unit]); + sc->sc_tty[ucom->sc_subunit].ht_xfer[UHSO_CTRL_WRITE], + &sc->sc_tty[ucom->sc_subunit]); usbd_transfer_start( - sc->sc_tty[ucom->sc_local_unit].ht_xfer[UHSO_CTRL_WRITE]); + sc->sc_tty[ucom->sc_subunit].ht_xfer[UHSO_CTRL_WRITE]); } else if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_BULK) { @@ -1511,7 +1512,7 @@ uhso_ucom_stop_write(struct ucom_softc * if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_MUX) { usbd_transfer_stop( - sc->sc_tty[ucom->sc_local_unit].ht_xfer[UHSO_CTRL_WRITE]); + sc->sc_tty[ucom->sc_subunit].ht_xfer[UHSO_CTRL_WRITE]); } else if (UHSO_IFACE_USB_TYPE(sc->sc_type) & UHSO_IF_BULK) { usbd_transfer_stop(sc->sc_xfer[UHSO_BULK_ENDPT_WRITE]); Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/u3g.c Sat May 7 22:20:01 2011 (r221612) @@ -855,8 +855,10 @@ u3g_attach(device_t dev) DPRINTF("ucom_attach failed\n"); goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); device_printf(dev, "Found %u port%s.\n", sc->sc_numports, sc->sc_numports > 1 ? "s":""); + return (0); detach: @@ -868,15 +870,15 @@ static int u3g_detach(device_t dev) { struct u3g_softc *sc = device_get_softc(dev); - uint8_t m; + uint8_t subunit; DPRINTF("sc=%p\n", sc); /* NOTE: It is not dangerous to detach more ports than attached! */ - ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, U3G_MAXPORTS); + ucom_detach(&sc->sc_super_ucom, sc->sc_ucom); - for (m = 0; m != U3G_MAXPORTS; m++) - usbd_transfer_unsetup(sc->sc_xfer[m], U3G_N_TRANSFER); + for (subunit = 0; subunit != U3G_MAXPORTS; subunit++) + usbd_transfer_unsetup(sc->sc_xfer[subunit], U3G_N_TRANSFER); mtx_destroy(&sc->sc_mtx); return (0); @@ -888,7 +890,7 @@ u3g_start_read(struct ucom_softc *ucom) struct u3g_softc *sc = ucom->sc_parent; /* start read endpoint */ - usbd_transfer_start(sc->sc_xfer[ucom->sc_local_unit][U3G_BULK_RD]); + usbd_transfer_start(sc->sc_xfer[ucom->sc_subunit][U3G_BULK_RD]); return; } @@ -898,7 +900,7 @@ u3g_stop_read(struct ucom_softc *ucom) struct u3g_softc *sc = ucom->sc_parent; /* stop read endpoint */ - usbd_transfer_stop(sc->sc_xfer[ucom->sc_local_unit][U3G_BULK_RD]); + usbd_transfer_stop(sc->sc_xfer[ucom->sc_subunit][U3G_BULK_RD]); return; } @@ -907,7 +909,7 @@ u3g_start_write(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom->sc_parent; - usbd_transfer_start(sc->sc_xfer[ucom->sc_local_unit][U3G_BULK_WR]); + usbd_transfer_start(sc->sc_xfer[ucom->sc_subunit][U3G_BULK_WR]); return; } @@ -916,7 +918,7 @@ u3g_stop_write(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom->sc_parent; - usbd_transfer_stop(sc->sc_xfer[ucom->sc_local_unit][U3G_BULK_WR]); + usbd_transfer_stop(sc->sc_xfer[ucom->sc_subunit][U3G_BULK_WR]); return; } Modified: stable/8/sys/dev/usb/serial/uark.c ============================================================================== --- stable/8/sys/dev/usb/serial/uark.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/uark.c Sat May 7 22:20:01 2011 (r221612) @@ -226,6 +226,8 @@ uark_attach(device_t dev) DPRINTF("ucom_attach failed\n"); goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); /* success */ detach: @@ -238,7 +240,7 @@ uark_detach(device_t dev) { struct uark_softc *sc = device_get_softc(dev); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UARK_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/ubsa.c ============================================================================== --- stable/8/sys/dev/usb/serial/ubsa.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/ubsa.c Sat May 7 22:20:01 2011 (r221612) @@ -330,6 +330,8 @@ ubsa_attach(device_t dev) DPRINTF("ucom_attach failed\n"); goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); detach: @@ -344,7 +346,7 @@ ubsa_detach(device_t dev) DPRINTF("sc=%p\n", sc); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UBSA_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/ubser.c ============================================================================== --- stable/8/sys/dev/usb/serial/ubser.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/ubser.c Sat May 7 22:20:01 2011 (r221612) @@ -295,6 +295,7 @@ ubser_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); mtx_lock(&sc->sc_mtx); usbd_xfer_set_stall(sc->sc_xfer[UBSER_BULK_DT_WR]); @@ -316,7 +317,7 @@ ubser_detach(device_t dev) DPRINTF("\n"); - ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_numser); + ucom_detach(&sc->sc_super_ucom, sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UBSER_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uchcom.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/uchcom.c Sat May 7 22:20:01 2011 (r221612) @@ -353,6 +353,8 @@ uchcom_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); detach: @@ -367,7 +369,7 @@ uchcom_detach(device_t dev) DPRINTFN(11, "\n"); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UCHCOM_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/ucycom.c ============================================================================== --- stable/8/sys/dev/usb/serial/ucycom.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/ucycom.c Sat May 7 22:20:01 2011 (r221612) @@ -271,13 +271,15 @@ ucycom_attach(device_t dev) } error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, &ucycom_callback, &sc->sc_mtx); - if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + if (urd_ptr) { free(urd_ptr, M_USBDEV); } + return (0); /* success */ detach: @@ -293,7 +295,7 @@ ucycom_detach(device_t dev) { struct ucycom_softc *sc = device_get_softc(dev); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UCYCOM_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/ufoma.c ============================================================================== --- stable/8/sys/dev/usb/serial/ufoma.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/ufoma.c Sat May 7 22:20:01 2011 (r221612) @@ -449,6 +449,8 @@ ufoma_attach(device_t dev) DPRINTF("ucom_attach failed\n"); goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + /*Sysctls*/ sctx = device_get_sysctl_ctx(dev); soid = device_get_sysctl_tree(dev); @@ -465,7 +467,7 @@ ufoma_attach(device_t dev) CTLFLAG_RW|CTLTYPE_STRING, sc, 0, ufoma_sysctl_open, "A", "Mode to transit when port is opened"); SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "comunit", - CTLFLAG_RD, &(sc->sc_ucom.sc_unit), 0, + CTLFLAG_RD, &(sc->sc_super_ucom.sc_unit), 0, "Unit number as USB serial"); return (0); /* success */ @@ -480,7 +482,7 @@ ufoma_detach(device_t dev) { struct ufoma_softc *sc = device_get_softc(dev); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_ctrl_xfer, UFOMA_CTRL_ENDPT_MAX); usbd_transfer_unsetup(sc->sc_bulk_xfer, UFOMA_BULK_ENDPT_MAX); Modified: stable/8/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/uftdi.c Sat May 7 22:20:01 2011 (r221612) @@ -332,6 +332,8 @@ uftdi_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); /* success */ detach: @@ -344,7 +346,7 @@ uftdi_detach(device_t dev) { struct uftdi_softc *sc = device_get_softc(dev); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UFTDI_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/ugensa.c ============================================================================== --- stable/8/sys/dev/usb/serial/ugensa.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/ugensa.c Sat May 7 22:20:01 2011 (r221612) @@ -246,6 +246,8 @@ ugensa_attach(device_t dev) DPRINTF("attach failed\n"); goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); /* success */ detach: @@ -259,7 +261,7 @@ ugensa_detach(device_t dev) struct ugensa_softc *sc = device_get_softc(dev); uint8_t x; - ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_niface); + ucom_detach(&sc->sc_super_ucom, sc->sc_ucom); for (x = 0; x < sc->sc_niface; x++) { usbd_transfer_unsetup(sc->sc_sub[x].sc_xfer, UGENSA_N_TRANSFER); Modified: stable/8/sys/dev/usb/serial/uipaq.c ============================================================================== --- stable/8/sys/dev/usb/serial/uipaq.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/uipaq.c Sat May 7 22:20:01 2011 (r221612) @@ -1160,6 +1160,8 @@ uipaq_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); detach: @@ -1172,7 +1174,7 @@ uipaq_detach(device_t dev) { struct uipaq_softc *sc = device_get_softc(dev); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UIPAQ_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/umct.c ============================================================================== --- stable/8/sys/dev/usb/serial/umct.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/umct.c Sat May 7 22:20:01 2011 (r221612) @@ -296,6 +296,8 @@ umct_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); /* success */ detach: @@ -308,7 +310,7 @@ umct_detach(device_t dev) { struct umct_softc *sc = device_get_softc(dev); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UMCT_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/8/sys/dev/usb/serial/umodem.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/umodem.c Sat May 7 22:20:01 2011 (r221612) @@ -388,6 +388,8 @@ umodem_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); detach: @@ -815,7 +817,7 @@ umodem_detach(device_t dev) DPRINTF("sc=%p\n", sc); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UMODEM_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/umoscom.c ============================================================================== --- stable/8/sys/dev/usb/serial/umoscom.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/umoscom.c Sat May 7 22:20:01 2011 (r221612) @@ -337,6 +337,8 @@ umoscom_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); detach: @@ -350,7 +352,7 @@ umoscom_detach(device_t dev) { struct umoscom_softc *sc = device_get_softc(dev); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UMOSCOM_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/uplcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uplcom.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/uplcom.c Sat May 7 22:20:01 2011 (r221612) @@ -445,6 +445,8 @@ uplcom_attach(device_t dev) device_printf(dev, "init failed\n"); goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); detach: @@ -459,7 +461,7 @@ uplcom_detach(device_t dev) DPRINTF("sc=%p\n", sc); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UPLCOM_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/usb_serial.c ============================================================================== --- stable/8/sys/dev/usb/serial/usb_serial.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/usb_serial.c Sat May 7 22:20:01 2011 (r221612) @@ -122,13 +122,16 @@ static unsigned int ucom_cons_tx_low = 0 static unsigned int ucom_cons_tx_high = 0; static int ucom_cons_unit = -1; +static int ucom_cons_subunit = 0; static int ucom_cons_baud = 9600; static struct ucom_softc *ucom_cons_softc = NULL; TUNABLE_INT("hw.usb.ucom.cons_unit", &ucom_cons_unit); SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_unit, CTLFLAG_RW, &ucom_cons_unit, 0, "console unit number"); - +TUNABLE_INT("hw.usb.ucom.cons_subunit", &ucom_cons_subunit); +SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_subunit, CTLFLAG_RW, + &ucom_cons_subunit, 0, "console subunit number"); TUNABLE_INT("hw.usb.ucom.cons_baud", &ucom_cons_baud); SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_baud, CTLFLAG_RW, &ucom_cons_baud, 0, "console baud rate"); @@ -140,9 +143,9 @@ static usb_proc_callback_t ucom_cfg_line static usb_proc_callback_t ucom_cfg_status_change; static usb_proc_callback_t ucom_cfg_param; -static uint8_t ucom_units_alloc(uint32_t, uint32_t *); -static void ucom_units_free(uint32_t, uint32_t); -static int ucom_attach_tty(struct ucom_softc *, uint32_t); +static int ucom_unit_alloc(void); +static void ucom_unit_free(int); +static int ucom_attach_tty(struct ucom_super_softc *, struct ucom_softc *); static void ucom_detach_tty(struct ucom_softc *); static void ucom_queue_command(struct ucom_softc *, usb_proc_callback_t *, struct termios *pt, @@ -175,84 +178,57 @@ static struct ttydevsw ucom_class = { MODULE_DEPEND(ucom, usb, 1, 1, 1); MODULE_VERSION(ucom, 1); -#define UCOM_UNIT_MAX 0x200 /* exclusive */ -#define UCOM_SUB_UNIT_MAX 0x100 /* exclusive */ +#define UCOM_UNIT_MAX 128 /* limits size of ucom_bitmap */ static uint8_t ucom_bitmap[(UCOM_UNIT_MAX + 7) / 8]; static struct mtx ucom_bitmap_mtx; MTX_SYSINIT(ucom_bitmap_mtx, &ucom_bitmap_mtx, "ucom bitmap", MTX_DEF); -static uint8_t -ucom_units_alloc(uint32_t sub_units, uint32_t *p_root_unit) +#define UCOM_TTY_PREFIX "U" + +/* + * Mark a unit number (the X in cuaUX) as in use. + * + * Note that devices using a different naming scheme (see ucom_tty_name() + * callback) still use this unit allocation. + */ +static int +ucom_unit_alloc(void) { - uint32_t n; - uint32_t o; - uint32_t x; - uint32_t max = UCOM_UNIT_MAX - (UCOM_UNIT_MAX % sub_units); - uint8_t error = 1; + int unit; mtx_lock(&ucom_bitmap_mtx); - for (n = 0; n < max; n += sub_units) { - - /* check for free consecutive bits */ - - for (o = 0; o < sub_units; o++) { - - x = n + o; - - if (ucom_bitmap[x / 8] & (1 << (x % 8))) { - goto skip; - } - } - - /* allocate */ - - for (o = 0; o < sub_units; o++) { - - x = n + o; - - ucom_bitmap[x / 8] |= (1 << (x % 8)); + for (unit = 0; unit < UCOM_UNIT_MAX; unit++) { + if ((ucom_bitmap[unit / 8] & (1 << (unit % 8))) == 0) { + ucom_bitmap[unit / 8] |= (1 << (unit % 8)); + break; } - - error = 0; - - break; - -skip: ; } mtx_unlock(&ucom_bitmap_mtx); - /* - * Always set the variable pointed to by "p_root_unit" so that - * the compiler does not think that it is used uninitialised: - */ - *p_root_unit = n; - - return (error); + if (unit == UCOM_UNIT_MAX) + return -1; + else + return unit; } +/* + * Mark the unit number as not in use. + */ static void -ucom_units_free(uint32_t root_unit, uint32_t sub_units) +ucom_unit_free(int unit) { - uint32_t x; - mtx_lock(&ucom_bitmap_mtx); - while (sub_units--) { - x = root_unit + sub_units; - ucom_bitmap[x / 8] &= ~(1 << (x % 8)); - } + ucom_bitmap[unit / 8] &= ~(1 << (unit % 8)); mtx_unlock(&ucom_bitmap_mtx); } /* - * "N" sub_units are setup at a time. All sub-units will - * be given sequential unit numbers. The number of - * sub-units can be used to differentiate among - * different types of devices. + * Setup a group of one or more serial ports. * * The mutex pointed to by "mtx" is applied before all * callbacks are called back. Also "mtx" must be applied @@ -260,47 +236,47 @@ ucom_units_free(uint32_t root_unit, uint */ int ucom_attach(struct ucom_super_softc *ssc, struct ucom_softc *sc, - uint32_t sub_units, void *parent, + uint32_t subunits, void *parent, const struct ucom_callback *callback, struct mtx *mtx) { - uint32_t n; - uint32_t root_unit; + uint32_t subunit; int error = 0; if ((sc == NULL) || - (sub_units == 0) || - (sub_units > UCOM_SUB_UNIT_MAX) || + (subunits == 0) || (callback == NULL)) { return (EINVAL); } - /* XXX unit management does not really belong here */ - if (ucom_units_alloc(sub_units, &root_unit)) { + ssc->sc_unit = ucom_unit_alloc(); + if (ssc->sc_unit == -1) return (ENOMEM); - } error = usb_proc_create(&ssc->sc_tq, mtx, "ucom", USB_PRI_MED); if (error) { - ucom_units_free(root_unit, sub_units); + ucom_unit_free(ssc->sc_unit); return (error); } + ssc->sc_subunits = subunits; - for (n = 0; n != sub_units; n++, sc++) { - sc->sc_unit = root_unit + n; - sc->sc_local_unit = n; - sc->sc_super = ssc; - sc->sc_mtx = mtx; - sc->sc_parent = parent; - sc->sc_callback = callback; + for (subunit = 0; subunit < ssc->sc_subunits; subunit++) { + sc[subunit].sc_subunit = subunit; + sc[subunit].sc_super = ssc; + sc[subunit].sc_mtx = mtx; + sc[subunit].sc_parent = parent; + sc[subunit].sc_callback = callback; - error = ucom_attach_tty(sc, sub_units); + error = ucom_attach_tty(ssc, &sc[subunit]); if (error) { - ucom_detach(ssc, sc - n, n); - ucom_units_free(root_unit + n, sub_units - n); + ucom_detach(ssc, &sc[0]); return (error); } - sc->sc_flag |= UCOM_FLAG_ATTACHED; + sc[subunit].sc_flag |= UCOM_FLAG_ATTACHED; } + + DPRINTF("tp = %p, unit = %d, subunits = %d\n", + sc->sc_tty, ssc->sc_unit, ssc->sc_subunits); + return (0); } @@ -309,62 +285,51 @@ ucom_attach(struct ucom_super_softc *ssc * the structure pointed to by "ssc" and "sc" is zero. */ void -ucom_detach(struct ucom_super_softc *ssc, struct ucom_softc *sc, - uint32_t sub_units) +ucom_detach(struct ucom_super_softc *ssc, struct ucom_softc *sc) { - uint32_t n; + uint32_t subunit; usb_proc_drain(&ssc->sc_tq); - for (n = 0; n != sub_units; n++, sc++) { - if (sc->sc_flag & UCOM_FLAG_ATTACHED) { - - ucom_detach_tty(sc); + for (subunit = 0; subunit < ssc->sc_subunits; subunit++) { + if (sc[subunit].sc_flag & UCOM_FLAG_ATTACHED) { - ucom_units_free(sc->sc_unit, 1); + ucom_detach_tty(&sc[subunit]); - /* avoid duplicate detach: */ - sc->sc_flag &= ~UCOM_FLAG_ATTACHED; + /* avoid duplicate detach */ + sc[subunit].sc_flag &= ~UCOM_FLAG_ATTACHED; } } + ucom_unit_free(ssc->sc_unit); usb_proc_free(&ssc->sc_tq); } static int -ucom_attach_tty(struct ucom_softc *sc, uint32_t sub_units) +ucom_attach_tty(struct ucom_super_softc *ssc, struct ucom_softc *sc) { struct tty *tp; - int error = 0; char buf[32]; /* temporary TTY device name buffer */ tp = tty_alloc_mutex(&ucom_class, sc, sc->sc_mtx); - if (tp == NULL) { - error = ENOMEM; - goto done; - } - DPRINTF("tp = %p, unit = %d\n", tp, sc->sc_unit); - - buf[0] = 0; /* set some default value */ + if (tp == NULL) + return (ENOMEM); /* Check if the client has a custom TTY name */ + buf[0] = '\0'; if (sc->sc_callback->ucom_tty_name) { sc->sc_callback->ucom_tty_name(sc, buf, - sizeof(buf), sc->sc_local_unit); + sizeof(buf), ssc->sc_unit, sc->sc_subunit); } if (buf[0] == 0) { /* Use default TTY name */ - if (sub_units > 1) { + if (ssc->sc_subunits > 1) { /* multiple modems in one */ - if (snprintf(buf, sizeof(buf), "U%u.%u", - sc->sc_unit - sc->sc_local_unit, - sc->sc_local_unit)) { - /* ignore */ - } + snprintf(buf, sizeof(buf), UCOM_TTY_PREFIX "%u.%u", + ssc->sc_unit, sc->sc_subunit); } else { /* single modem */ - if (snprintf(buf, sizeof(buf), "U%u", sc->sc_unit)) { - /* ignore */ - } + snprintf(buf, sizeof(buf), UCOM_TTY_PREFIX "%u", + ssc->sc_unit); } } tty_makedev(tp, NULL, "%s", buf); @@ -376,10 +341,12 @@ ucom_attach_tty(struct ucom_softc *sc, u /* Check if this device should be a console */ if ((ucom_cons_softc == NULL) && - (sc->sc_unit == ucom_cons_unit)) { - + (ssc->sc_unit == ucom_cons_unit) && + (sc->sc_subunit == ucom_cons_subunit)) { struct termios t; + DPRINTF("unit %d subunit %d is console", ssc->sc_unit, sc->sc_subunit); + ucom_cons_softc = sc; memset(&t, 0, sizeof(t)); @@ -397,8 +364,8 @@ ucom_attach_tty(struct ucom_softc *sc, u ucom_param(ucom_cons_softc->sc_tty, &t); mtx_unlock(ucom_cons_softc->sc_mtx); } -done: - return (error); + + return (0); } static void @@ -411,6 +378,7 @@ ucom_detach_tty(struct ucom_softc *sc) if (sc->sc_flag & UCOM_FLAG_CONSOLE) { mtx_lock(ucom_cons_softc->sc_mtx); ucom_close(ucom_cons_softc->sc_tty); + sc->sc_flag &= ~UCOM_FLAG_CONSOLE; mtx_unlock(ucom_cons_softc->sc_mtx); ucom_cons_softc = NULL; } @@ -446,6 +414,24 @@ ucom_detach_tty(struct ucom_softc *sc) cv_destroy(&sc->sc_cv); } +void +ucom_set_pnpinfo_usb(struct ucom_super_softc *ssc, device_t dev) +{ + char buf[64]; + uint8_t iface_index; + struct usb_attach_arg *uaa; + + snprintf(buf, sizeof(buf), "ttyname=%s%d ttyports=%d", + UCOM_TTY_PREFIX, ssc->sc_unit, ssc->sc_subunits); + + /* Store the PNP info in the first interface for the dev */ + uaa = device_get_ivars(dev); + iface_index = uaa->info.bIfaceIndex; + + if (usbd_set_pnpinfo(uaa->device, iface_index, buf) != 0) + device_printf(dev, "Could not set PNP info\n"); +} + static void ucom_queue_command(struct ucom_softc *sc, usb_proc_callback_t *fn, struct termios *pt, Modified: stable/8/sys/dev/usb/serial/usb_serial.h ============================================================================== --- stable/8/sys/dev/usb/serial/usb_serial.h Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/usb_serial.h Sat May 7 22:20:01 2011 (r221612) @@ -105,7 +105,7 @@ struct ucom_callback { void (*ucom_stop_read) (struct ucom_softc *); void (*ucom_start_write) (struct ucom_softc *); void (*ucom_stop_write) (struct ucom_softc *); - void (*ucom_tty_name) (struct ucom_softc *, char *pbuf, uint16_t buflen, uint16_t local_subunit); + void (*ucom_tty_name) (struct ucom_softc *, char *pbuf, uint16_t buflen, uint16_t unit, uint16_t subunit); void (*ucom_poll) (struct ucom_softc *); }; @@ -133,6 +133,8 @@ struct ucom_param_task { struct ucom_super_softc { struct usb_process sc_tq; + uint32_t sc_unit; + uint32_t sc_subunits; }; struct ucom_softc { @@ -161,8 +163,7 @@ struct ucom_softc { struct tty *sc_tty; struct mtx *sc_mtx; void *sc_parent; - uint32_t sc_unit; - uint32_t sc_local_unit; + uint32_t sc_subunit; uint16_t sc_portno; uint16_t sc_flag; #define UCOM_FLAG_RTS_IFLOW 0x01 /* use RTS input flow control */ @@ -192,8 +193,8 @@ struct ucom_softc { int ucom_attach(struct ucom_super_softc *, struct ucom_softc *, uint32_t, void *, const struct ucom_callback *callback, struct mtx *); -void ucom_detach(struct ucom_super_softc *, - struct ucom_softc *, uint32_t); +void ucom_detach(struct ucom_super_softc *, struct ucom_softc *); +void ucom_set_pnpinfo_usb(struct ucom_super_softc *, device_t); void ucom_status_change(struct ucom_softc *); uint8_t ucom_get_data(struct ucom_softc *, struct usb_page_cache *, uint32_t, uint32_t, uint32_t *); Modified: stable/8/sys/dev/usb/serial/uslcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uslcom.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/uslcom.c Sat May 7 22:20:01 2011 (r221612) @@ -332,6 +332,8 @@ uslcom_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); detach: @@ -346,7 +348,7 @@ uslcom_detach(device_t dev) DPRINTF("sc=%p\n", sc); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, USLCOM_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/uvisor.c ============================================================================== --- stable/8/sys/dev/usb/serial/uvisor.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/uvisor.c Sat May 7 22:20:01 2011 (r221612) @@ -346,6 +346,8 @@ uvisor_attach(device_t dev) DPRINTF("ucom_attach failed\n"); goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + return (0); detach: @@ -360,7 +362,7 @@ uvisor_detach(device_t dev) DPRINTF("sc=%p\n", sc); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UVISOR_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/serial/uvscom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uvscom.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/serial/uvscom.c Sat May 7 22:20:01 2011 (r221612) @@ -320,6 +320,8 @@ uvscom_attach(device_t dev) if (error) { goto detach; } + ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); + /* start interrupt pipe */ mtx_lock(&sc->sc_mtx); usbd_transfer_start(sc->sc_xfer[UVSCOM_INTR_DT_RD]); @@ -344,7 +346,7 @@ uvscom_detach(device_t dev) if (sc->sc_xfer[UVSCOM_INTR_DT_RD]) usbd_transfer_stop(sc->sc_xfer[UVSCOM_INTR_DT_RD]); - ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); + ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, UVSCOM_N_TRANSFER); mtx_destroy(&sc->sc_mtx); Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Sat May 7 22:05:14 2011 (r221611) +++ stable/8/sys/dev/usb/usb_device.c Sat May 7 22:20:01 2011 (r221612) @@ -87,7 +87,7 @@ static void usb_init_endpoint(struct usb struct usb_endpoint *); static void usb_unconfigure(struct usb_device *, uint8_t); static void usb_detach_device_sub(struct usb_device *, device_t *, - uint8_t); + char **, uint8_t); static uint8_t usb_probe_and_attach_sub(struct usb_device *, struct usb_attach_arg *); static void usb_init_attach_arg(struct usb_device *, @@ -1032,9 +1032,10 @@ usb_reset_iface_endpoints(struct usb_dev *------------------------------------------------------------------------*/ static void usb_detach_device_sub(struct usb_device *udev, device_t *ppdev, - uint8_t flag) + char **ppnpinfo, uint8_t flag) { device_t dev; + char *pnpinfo; int err; dev = *ppdev; @@ -1066,11 +1067,17 @@ usb_detach_device_sub(struct usb_device goto error; } } + + pnpinfo = *ppnpinfo; + if (pnpinfo != NULL) { + *ppnpinfo = NULL; + free(pnpinfo, M_USBDEV); + } return; error: /* Detach is not allowed to fail in the USB world */ - panic("A USB driver would not detach\n"); + panic("usb_detach_device_sub: A USB driver would not detach\n"); } /*------------------------------------------------------------------------* @@ -1119,7 +1126,8 @@ usb_detach_device(struct usb_device *ude /* looks like the end of the USB interfaces */ break; } - usb_detach_device_sub(udev, &iface->subdev, flag); + usb_detach_device_sub(udev, &iface->subdev, + &iface->pnpinfo, flag); } } @@ -2409,25 +2417,24 @@ usb_notify_addq_compat(const char *type, snprintf(data, buf_size, "%s" "%s " + "at port=%u " "vendor=0x%04x " "product=0x%04x " "devclass=0x%02x " "devsubclass=0x%02x " "sernum=\"%s\" " "release=0x%04x " - "at " - "port=%u " "on " "%s\n", ntype, udev->ugen_name, + udev->port_no, UGETW(udev->ddesc.idVendor), UGETW(udev->ddesc.idProduct), udev->ddesc.bDeviceClass, udev->ddesc.bDeviceSubClass, usb_get_serial(udev), UGETW(udev->ddesc.bcdDevice), - udev->port_no, udev->parent_hub != NULL ? udev->parent_hub->ugen_name : device_get_nameunit(device_get_parent(udev->bus->bdev))); @@ -2459,7 +2466,7 @@ usb_notify_addq(const char *type, struct "release=0x%04x " "mode=%s " "port=%u " - "parent=%s\n", + "parent=%s", udev->ugen_name, UGETW(udev->ddesc.idVendor), UGETW(udev->ddesc.idProduct), @@ -2498,7 +2505,7 @@ usb_notify_addq(const char *type, struct "endpoints=%d " "intclass=0x%02x " "intsubclass=0x%02x " - "intprotocol=0x%02x\n", + "intprotocol=0x%02x", udev->ugen_name, UGETW(udev->ddesc.idVendor), UGETW(udev->ddesc.idProduct), @@ -2682,3 +2689,37 @@ usbd_enum_is_locked(struct usb_device *u { return (sx_xlocked(&udev->enum_sx)); } + +/* + * The following function is used to set the per-interface specific *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***